[Linuxppc-users] Running generic code in critical interrupt handler.

Benjamin Herrenschmidt benh at linux.vnet.ibm.com
Fri Aug 10 12:45:10 AEST 2018


On Thu, 2018-08-09 at 20:01 +0000, Henry Bausley wrote:
> The code runs fine in a standard interrupt handler but periodically
> we are getting the following types of error when we use our code in
> the critical interrupt handler.  Is this a result of our
> CustomCritIntr handler disturbing  the TLB handlers of Linux?  I will
> add the interrupt is generated at a very high rate every ie. 15
> usecs.

It could be a number of things.

The critical handlers bypass the normal interrupt masking done by the
kernel. So any data structures that's supposed to be protected by
things like local_irq_save/restore will *not* be against your
interrupt handler.

Thus you must NOT use any common kernel service from it (kmalloc,
printk, etc... all of these are unsafe).

Additionally it's possible that there are restrictions on TLB, I'm
not entirely sure.

>  
> Unable to handle kernel paging request for data at address 0xa47bb580
> Faulting instruction address: 0x80088154
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=2 APM862xx vB
> Modules linked in: usralgo(O) rtpmac(O) libppmac(O) ppmachw(O) ec_r8169(O) ec_master(O) [last unloaded: usralgo]
> NIP: 80088154 LR: 8006799c CTR: a4796538
> REGS: 806cad90 TRAP: 0300   Tainted: G           O  (3.2.21-powerpmac-smp)
> MSR: 00021000 <ME,CE>  CR: 28dd4f88  XER: 00000000
> DEAR: a47bb580, ESR: 00000000
> TASK = 9e076d00[0] 'swapper/1' THREAD: 9e0ac000 CPU: 1
> GPR00: a47bb4d0 806cae40 9e076d00 00000000 00000000 80088154 fff2eaf7 806df200
> GPR08: 806c0090 80621840 806bc790 00021000 9e0ac260 fff2eaf7 30000000 ffffffe0
> GPR16: a47c0000 a47c0000 00000000 a47c0000 00000000 a47c0000 ffffffff 000030dd
> GPR24: a47c0000 a76891a8 a7688800 a76891a8 00000004 80088154 8066dec8 a47bb4cc



More information about the Linuxppc-users mailing list