(repost) cleaning up handling of bad IRQs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-kernel@xxxxxxxxxxxxxxx
- Subject: (repost) cleaning up handling of bad IRQs
- From: "Enrico Weigelt, metux IT consult" <info@xxxxxxxxx>
- Date: Fri, 18 Dec 2020 15:57:23 +0100
- Cc: mark.rutland@xxxxxxx, alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx, namhyung@xxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx, msalter@xxxxxxxxxx, jacquiot.aurelien@xxxxxxxxx, gerg@xxxxxxxxxxxxxx, geert@xxxxxxxxxxxxxx, tsbogend@xxxxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, deller@xxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, ysato@xxxxxxxxxxxxxxxxxxxx, dalias@xxxxxxxx, davem@xxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, bp@xxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, linus.walleij@xxxxxxxxxx, bgolaszewski@xxxxxxxxxxxx, maz@xxxxxxxxxx, tony@xxxxxxxxxxx, arnd@xxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx, linux-omap@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx
Hello friends,
<< reposting, since first queue didn't go through completely, due to mailer problem >>
here's a patch queue for cleaning up the IRQ handling. Inspired by a
discussion we had on a previous patch of mine:
"arch: fix 'unexpected IRQ trap at vector' warnings"
https://www.spinics.net/lists/kernel/msg3763137.html
Turned out that the whole message, as it is right now, doesn't make much
sense at at all - not just incorrect wording, but also not quite useful
information. And the whole ack_bad_irq() thing deserves a cleanup anyways.
So, I've had a closer look and came to these conclusions:
1. The warning message doesn't need to be duplicated in the per architecture
ack_bad_irq() functions. All, but one callers already do their own warning.
Thus just adding a pr_warn() call there, printing out more useful data
like the hardware IRQ number, and dropping all warnings from all the
ack_bad_irq() functions.
2. Many of the ack_bad_irq()'s count up the spurious interrupts - lots of
duplications over the various archs. Some of them using atomic_t, some
just plain ints. Consolidating this by introducing a global counter
with inline'd accessors and doing the upcounting in the (currently 3)
call sites of ack_bad_irq(). After that, step by step changing all
archs to use the new counter.
3. For all but one arch (x86), ack_bad_irq() became a no-op.
On x86, it's just a call to ack_APIC_irq(), in order to prevent lockups
when IRQs missed to be ack'ed on the APIC. Could we perhaps do this in
some better place ? In that case, ack_bad_irq() could easily be removed
entirely.
have fun,
--mtx
- Follow-Ups:
- [PATCH 02/23] arch: alpha: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 03/23] arch: arm: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 07/23] arch: parisc: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 08/23] arch: powerpc: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 10/23] arch: sh: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 05/23] arch: ia64: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 04/23] arch: c6x: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 12/23] arch: x86: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 06/23] arch: mips: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 13/23] arch: generic: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 15/23] arch: mips: use generic irq error counter
- From: Enrico Weigelt, metux IT consult
- [PATCH 17/23] arch: arm: use generic irq error counter
- From: Enrico Weigelt, metux IT consult
- [PATCH 18/23] arch: arm64: use generic irq error counter
- From: Enrico Weigelt, metux IT consult
- [PATCH 19/23] arch: c6x: use generic irq error counter
- From: Enrico Weigelt, metux IT consult
- [PATCH 16/23] arch: alpha: use generic irq error counter
- From: Enrico Weigelt, metux IT consult
- [PATCH 14/23] kernel: generic counter for interrupt errors
- From: Enrico Weigelt, metux IT consult
- [PATCH 11/23] arch: sparc: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 09/23] arch: s390: drop misleading warning on spurious IRQ
- From: Enrico Weigelt, metux IT consult
- [PATCH 01/23] kernel: irq: irqdescs: warn on spurious IRQ
- From: Enrico Weigelt, metux IT consult
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]