Subject: Re: Exception in kernel mode

From: Sergei Shtylyov <[email-masked]>
Date: Thu, 15 Mar 2007 21:23:36 +0300

Hello.

Charles Krinke wrote:

>     Obviously, you've got an exception in the decrementer exception
> handler 
> itself -- and this was something like program check exception, judging
> on the 
> signal you've got (SIGILL).

>>So, with that said:

>>"What might be the causes of such an exception from the decrementer in a

>>2.6.17.11 ppc8241 kernel?"

>>"Where should one concentrate ones efforts in figuring this out?"

>     Hrm, looks like some CPU errata maybe...

    Please, tune message quoting in your mailer.

> Thank you very much for the great hint. I have a follow-up question.

> I can see from arch/ppc/kernel/head.S that the EXCEPTION_PROLOG macro is
> the first instruction in the decrementer ISR and it says (amongst other
> things):

> mtspr SPRN_SPRG0, r10 
> mtspr SPRN_SPRG1, r11

> Which is, I believe, moving r10 to SPRG0 and r11 to SPRG1.

> So, how do we know that r10 and r11 are always valid in an interrupt
> context? Are we setting aside r10 and r11 somewhere else in

    That doesn't matter to kernel at all -- they are just *saved* in SPRG regs 
to avoid being trashed by the exception handler.

WBR, Sergei