[Top] [All Lists]

Re: [PATCH] Add support for profiling Loongson 2E

To: Dajie Tan <>
Subject: Re: [PATCH] Add support for profiling Loongson 2E
From: Fuxin Zhang <>
Date: Thu, 26 Jul 2007 12:48:32 +0800
Cc: John Levon <>, Ralf Baechle <>, linux-mips <>,,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <>
User-agent: Thunderbird (Windows/20070716)

Dajie Tan 写道:
> Yeah,this change is to enhance the robust of oprofile. When using
> performace counter manually(writting control register in a module, no
> need to use the oprofile),I usually make kernel panic if I do not
> initialize the oprofile and enable the overflow interrupt carelessly.
> So, this change can avoid this panic. :D

This panic is good and should stay. It shows that you've made a mistake.


This panic is caused by accessing a null pointer.Do you think that
accessing a null
pointer is allowed in a robust system ?
I think you don't really understand Ralf and John's responses. The problem should not be workarounded in that position. Your code should ensure that overflow interrupt will not be enabled when oprofile is not enabled, or something like this. If everyone choose to 'fix' problems via patching generic code, it would be a maintainence headache. Why other platform s won't have your problem?

It is not to say that the panic is ok, but it is your problem if others are not suffering the same panic, and should be fixed in your code.

Fuxin Zhang

Vice Researcher
Microprocessor Research Center, Institute of Computing Technolgy
Chiese Academy of China
Beijing, 100080


<Prev in Thread] Current Thread [Next in Thread>