pinctrl: mediatek: Ignore interrupts that are wake only during resume
Nicolas Boichat authored
[ Upstream commit 35594bc7 ]

Before suspending, mtk-eint would set the interrupt mask to the
one in wake_mask. However, some of these interrupts may not have a
corresponding interrupt handler, or the interrupt may be disabled.

On resume, the eint irq handler would trigger nevertheless,
and irq/pm.c:irq_pm_check_wakeup would be called, which would
try to call irq_disable. However, if the interrupt is not enabled
(irqd_irq_disabled(&desc->irq_data) is true), the call does nothing,
and the interrupt is left enabled in the eint driver.

Especially for level-sensitive interrupts, this will lead to an
interrupt storm on resume.

If we detect that an interrupt is only in wake_mask, but not in
cur_mask, we can just mask it out immediately (as mtk_eint_resume
would do anyway at a later stage in the resume sequence, when
restoring cur_mask).

Fixes: bf22ff45 ("genirq: Avoid unnecessary low level irq function ...
ea722ba4
Name Last commit Last update
Documentation Documentation/admin: Remove the vsyscall=native documentation
LICENSES LICENSES: Add GCC runtime library exception text
arch x86/boot/64: Add missing fixup_pointer() for next_early_pgt access
block block, bfq: NULL out the bic when it's no longer valid
certs kexec, KEYS: Make use of platform keyring for signature verify
crypto crypto: lrw - use correct alignmask
drivers pinctrl: mediatek: Ignore interrupts that are wake only during resume
fs afs: Fix uninitialised spinlock afs_volume::cb_break_lock
include drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT
init initramfs: free initrd memory if opening /initrd.image fails
ipc ipc: prevent lockup on alloc_msg and free_msg
kernel perf/core: Fix perf_sample_regs_user() mm check
lib lib/mpi: Fix karactx leak in mpi_powm
mm mm/vmscan.c: prevent useless kswapd loops
net cfg80211: report measurement start TSF correctly
samples samples, bpf: suppress compiler warning
scripts scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE
security apparmor: reset pos on failure to unpack for various functions
sound ALSA: hda/realtek - Headphone Mic can't record after S3
tools selftests/powerpc: Add test of fork with mapping above 512TB
usr user/Makefile: Fix typo and capitalization in comment section
virt KVM: arm/arm64: Fix emulated ptimer irq injection
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore kbuild: Add support for DT binding schema checks
.mailmap Update Nicolas Pitre's email address
COPYING COPYING: use the new text with points to the license files
CREDITS Merge tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Kbuild Merge tag 'kbuild-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt
MAINTAINERS Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Makefile Linux 5.1.18
README Drop all 00-INDEX files from Documentation/
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.