android_kernel_xiaomi_sm8350/arch/x86_64/kernel
Siddha, Suresh B 48d8d7ee5d x86_64 irq: use mask/unmask and proper locking in fixup_irqs()
Force irq migration path during cpu offline, is not using proper locks and
irq_chip mask/unmask routines.  This will result in some races(especially
the device generating the interrupt can see some inconsistent state,
resulting in issues like stuck irq,..).

Appended patch fixes the issue by taking proper lock and encapsulating
irq_chip set_affinity() with a mask() before and an unmask() after.

This fixes a MSI irq stuck issue reported by Darrick Wong.

There are several more general bugs in this area(irq migration in the
process context). For example,

 1. Possibility of missing edge triggered irq.
 2. Reliable method of migrating level triggered irq in the process context.

We plan to look and close these in the near future.

Eric says:
	In addition even with the fix from Suresh there is still at least one
	nasty hardware race in fixup_irqs().   However we exercise that code
	path rarely enough that we are unlikely to hit it in the real world,
	and that race seems to have existed since the code was merged.  And a
	fix for that is not coming soon as it is an open investigation area
	if we can fix irq migration to work outside of irq context or if
	we have to rework the requirements imposed by the generic cpu hotplug
	and layer on fixup_irqs().  So this may come up again.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Reported-and-tested-by: Darrick Wong <djwong@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-26 16:54:29 -07:00
..
acpi
cpufreq
aperture.c x86_64: off-by-two error in aperture.c 2007-05-11 12:53:00 -07:00
apic.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
asm-offsets.c
audit.c [PATCH] audit signal recipients 2007-05-11 05:38:25 -04:00
bugs.c x86_64: Add asm/mtrr.h include for some builds 2007-05-12 09:47:15 -07:00
crash_dump.c
crash.c
e820.c
early_printk.c x86_64: early_print kernel console should send CRLF not LFCR 2007-05-21 09:56:57 -07:00
early-quirks.c
entry.S x86_64: Ignore compat mode SYSCALL when IA32_EMULATION is not defined 2007-06-22 18:41:19 -07:00
genapic_flat.c
genapic.c
head64.c x86_64: display more intuitive error message if kernel is not 2MB aligned 2007-05-11 08:29:32 -07:00
head.S
hpet.c
i387.c
i8259.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
init_task.c
io_apic.c x86_64: set the irq_chip name for lapic 2007-06-26 16:54:29 -07:00
ioport.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
irq.c x86_64 irq: use mask/unmask and proper locking in fixup_irqs() 2007-06-26 16:54:29 -07:00
k8.c Avoid zero size allocation in cache_k8_northbridges() 2007-05-23 20:14:12 -07:00
kprobes.c Kprobes: The ON/OFF knob thru debugfs 2007-05-08 11:15:19 -07:00
ldt.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
machine_kexec.c
Makefile x86, serial: convert legacy COM ports to platform devices 2007-05-08 11:15:23 -07:00
mce_amd.c Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
mce_intel.c
mce.c x86_64: fix misplaced `continue' in mce.c 2007-06-24 08:59:12 -07:00
module.c
mpparse.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
nmi.c
pci-calgary.c
pci-dma.c x86: Disable DAC on VIA bridges 2007-06-20 14:27:25 -07:00
pci-gart.c x86_64: off-by-two error in aperture.c 2007-05-11 12:53:00 -07:00
pci-nommu.c
pci-swiotlb.c
pmtimer.c
process.c
ptrace.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
reboot.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
relocate_kernel.S
setup64.c x86_64: Ignore compat mode SYSCALL when IA32_EMULATION is not defined 2007-06-22 18:41:19 -07:00
setup.c x86_64: Don't call mtrr_bp_init from identify_cpu 2007-05-11 12:53:00 -07:00
signal.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
smp.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
smpboot.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
stacktrace.c
suspend_asm.S
suspend.c
sys_x86_64.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
syscall.c
tce.c
time.c Add IRQF_IRQPOLL flag on x86_64 2007-05-08 11:15:22 -07:00
trampoline.S
traps.c x86_64: oops_begin() fix 2007-06-08 17:23:34 -07:00
tsc_sync.c
tsc.c
verify_cpu.S
vmlinux.lds.S all-archs: consolidate .data section definition in asm-generic 2007-05-19 09:11:57 +02:00
vsmp.c
vsyscall.c x86_64: vsyscall time() fix 2007-05-21 09:56:57 -07:00
x8664_ksyms.c