Exception in kernel mode

Charles Krinke ckrinke at istor.com
Fri Mar 16 05:55:24 EST 2007


> 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

Well, unfortunately, now I am more confused.

The original Oops was at an NIP of 00000900, which I think means it
faulted on the first mtspr from r10. I suppose one could argue that
pipeline issues might make it fault on the second one and appear to be
the first.

But, maybe I am confusing myself here. Would I be correct in assuming
that some further instruction in the ISR at 0x900 is the culprit?

Could there possibly be some user versus supervisor mode thing going on?

My key assumption is that the timer_tick (aka Decrementer) has worked
for many hundreds of thousands of interrupts and only when running some
particular user application, like tar is there a side effect from either
a mode or some register value, race condition, or other.

Charles



More information about the Linuxppc-embedded mailing list