linux/arch/mips
Ralf Baechle e376fdf420 MIPS: Malta: Don't crash on spurious interrupt.
48d480b0bd [[MIPS] Malta: Fix off by one bug in interrupt
handler.] did not take in account that irq_ffs() will also return 0 if for some reason
the set of pending interrupts happens to be empty.

This is trivial to trigger with a RM5261 CPU module running a 64-bit kernel and results
in something like the following:

CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == ffffffff801772d0, ra == ffffffff8017ad24
Oops[#1]:
Cpu 0
$ 0   : 0000000000000000 ffffffff9000a4e0 ffffffff9000a4e0 ffffffff9000a4e0
$ 4   : ffffffff80592be0 0000000000000000 00000000000000d6 ffffffff80322ed0
$ 8   : ffffffff805fe538 0000000000000000 ffffffff9000a4e0 ffffffff80590000
$12   : 00000000000000d6 0000000000000000 ffffffff80600000 ffffffff805fe538
$16   : 0000000000000000 0000000000000010 ffffffff80592be0 0000000000000010
$20   : 0000000000000000 0000000000500001 0000000000000000 ffffffff8051e078
$24   : 0000000000000028 ffffffff803226e8
$28   : 9800000003828000 980000000382b900 ffffffff8051e060 ffffffff8017ad24
Hi    : 0000000000000000
Lo    : 0000006388974000
epc   : ffffffff801772d0 handle_irq_event_percpu+0x70/0x2f0
    Not tainted
ra    : ffffffff8017ad24 handle_percpu_irq+0x54/0x88
Status: 9000a4e2    KX SX UX KERNEL EXL
Cause : 00808008
BadVA : 0000000000000000
PrId  : 000028a0 (Nevada)
Modules linked in:
Process init (pid: 1, threadinfo=9800000003828000, task=9800000003827968, tls=0000000077087490)
Stack : ffffffff80592be0 ffffffff8058d248 0000000000000040 0000000000000000
        ffffffff80613340 0000000000500001 ffffffff805a0000 0000000000000882
        9800000003b89000 ffffffff8017ad24 00000000000000d5 0000000000000010
        ffffffff9000a4e1 ffffffff801769f4 ffffffff9000a4e0 ffffffff801037f8
        0000000000000000 ffffffff80101c44 0000000000000000 ffffffff9000a4e0
        0000000000000000 9000000018000000 90000000180003f9 0000000000000001
        0000000000000000 00000000000000ff 0000000000000018 0000000000000001
        0000000000000001 00000000003fffff 0000000000000020 ffffffff802cf7ac
        ffffffff80208918 000000007fdadf08 ffffffff80612d88 ffffffff9000a4e1
        0000000000000040 0000000000000000 ffffffff80613340 0000000000500001
        ...
Call Trace:
[<ffffffff801772d0>] handle_irq_event_percpu+0x70/0x2f0
[<ffffffff8017ad24>] handle_percpu_irq+0x54/0x88
[<ffffffff801769f4>] generic_handle_irq+0x44/0x60
[<ffffffff801037f8>] do_IRQ+0x48/0x70
[<ffffffff80101c44>] ret_from_irq+0x0/0x4
[<ffffffff80326170>] serial8250_startup+0x310/0x870
[<ffffffff8032175c>] uart_startup.part.7+0x9c/0x330
[<ffffffff80321b4c>] uart_open+0x15c/0x1b0
[<ffffffff80302034>] tty_open+0x1fc/0x720
[<ffffffff801bffac>] chrdev_open+0x7c/0x180
[<ffffffff801b9ab8>] do_dentry_open.isra.14+0x288/0x390
[<ffffffff801bac5c>] nameidata_to_filp+0x5c/0xc0
[<ffffffff801ca700>] do_last.isra.33+0x330/0x8f0
[<ffffffff801caf3c>] path_openat+0xbc/0x440
[<ffffffff801cb3c8>] do_filp_open+0x38/0xa8
[<ffffffff801bade4>] do_sys_open+0x124/0x218
[<ffffffff80110538>] handle_sys+0x118/0x13c

Code: 02d5a825  12800012  02a0b02d <de820000> de850008  0040f809  0220202d  0040a82d  40026000
---[ end trace 5d8e7b9a86badd2d ]---
Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-09-17 02:04:29 +02:00
..
alchemy Merge branches 'next/generic', 'next/alchemy', 'next/bcm63xx', 'next/cavium', 'next/jz4740', 'next/lantiq', 'next/loongson1b' and 'next/netlogic' into mips-for-linux-next 2012-07-25 16:37:46 +02:00
ar7 arch: Use eth_random_addr 2012-07-16 22:39:25 -07:00
ath79 MIPS: ath79: add initial support for the Atheros DB120 board 2012-05-15 17:49:11 +02:00
bcm47xx MIPS: BCM47xx: Fix BCMA_DRIVER_PCI_HOSTMODE config dependencies 2012-07-19 11:23:43 +02:00
bcm63xx MIPS: BCM63XX: Add 96328avng reference board 2012-07-24 16:33:14 +02:00
boot MIPS: Enable vmlinuz for JZ4740 2012-07-23 13:56:21 +01:00
cavium-octeon Merge branches 'next/generic', 'next/alchemy', 'next/bcm63xx', 'next/cavium', 'next/jz4740', 'next/lantiq', 'next/loongson1b' and 'next/netlogic' into mips-for-linux-next 2012-07-25 16:37:46 +02:00
cobalt
configs Merge branches 'next/generic', 'next/alchemy', 'next/bcm63xx', 'next/cavium', 'next/jz4740', 'next/lantiq', 'next/loongson1b' and 'next/netlogic' into mips-for-linux-next 2012-07-25 16:37:46 +02:00
dec MIPS: DEC: use IS_ENABLED() 2012-07-23 13:55:54 +01:00
emma Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
fw MIPS: Remove all -Wall and almost all -Werror usage from arch/mips. 2012-05-21 15:09:36 +01:00
include/asm MIPS: Loongson 2: Sort out clock managment. 2012-08-01 18:10:06 +02:00
jazz Merge branch 'next/generic' into mips-for-linux-next 2012-01-11 15:41:47 +01:00
jz4740 MIPS: JZ4740: reset: Initialize hibernate wakeup counters. 2012-07-23 13:56:20 +01:00
kernel MIPS: CMP/SMTC: Fix tc_id calculation 2012-08-27 16:10:13 +02:00
lantiq MIPS: Lantiq: Platform specific CLK fixup 2012-08-01 17:58:09 +02:00
lasat Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
lib MIPS: Unify memcpy.S and memcpy-inatomic.S 2012-07-23 13:55:55 +01:00
loongson MIPS: Loongson 2: Sort out clock managment. 2012-08-01 18:10:06 +02:00
loongson1 MIPS: Loongson 1: more clk support and add select HAVE_CLK 2012-08-01 17:59:23 +02:00
math-emu Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
mipssim Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
mm MIPS: mm: Add compound tail page _mapcount when mapped 2012-08-27 16:10:21 +02:00
mti-malta MIPS: Malta: Don't crash on spurious interrupt. 2012-09-17 02:04:29 +02:00
netlogic Merge branches 'next/generic', 'next/alchemy', 'next/bcm63xx', 'next/cavium', 'next/jz4740', 'next/lantiq', 'next/loongson1b' and 'next/netlogic' into mips-for-linux-next 2012-07-25 16:37:46 +02:00
oprofile Merge branches 'next/generic', 'next/alchemy', 'next/bcm63xx', 'next/cavium', 'next/jz4740', 'next/lantiq', 'next/loongson1b' and 'next/netlogic' into mips-for-linux-next 2012-07-25 16:37:46 +02:00
pci Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-07-30 11:45:52 -07:00
pmc-sierra PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
pnx833x MIPS: PNX833x: use IS_ENABLED() macro 2012-07-23 13:55:53 +01:00
pnx8550
power
powertv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-07-24 10:01:50 -07:00
rb532 - More robust parsing especially of xattr data in JFFS2 2012-06-01 16:55:42 -07:00
sgi-ip22 Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
sgi-ip27 mips: zero out pg_data_t when it's allocated 2012-07-31 18:42:49 -07:00
sgi-ip32 Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
sibyte documentation: remove references to cpu_*_map. 2012-03-29 15:38:31 +10:30
sni Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-05-29 18:27:19 -07:00
txx9 MIPS: txx9: Fix redefinition of clk_* by adding select HAVE_CLK 2012-08-01 17:59:15 +02:00
vr41xx Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
wrppmc
Kbuild
Kbuild.platforms MIPS: Loongson 1B: Add board support 2012-07-25 16:17:24 +02:00
Kconfig MIPS: BCM63xx: Fix redefinition of clk_* by adding select HAVE_CLK 2012-08-01 17:59:06 +02:00
Kconfig.debug Fix typo in various Kconfig file 2012-04-16 14:40:08 +02:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2012-05-28 10:32:28 -07:00