All of lore.kernel.org
 help / color / mirror / Atom feed
* + genirq-mask-irqs-when-migrating-them.patch added to -mm tree
@ 2007-02-27 20:54 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-27 20:54 UTC (permalink / raw)
  To: mm-commits; +Cc: ebiederm, ak, suresh.b.siddha


The patch titled
     genirq: Mask irqs when migrating them
has been added to the -mm tree.  Its filename is
     genirq-mask-irqs-when-migrating-them.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: genirq: Mask irqs when migrating them
From: Eric W. Biederman <ebiederm@xmission.com>

move_native_irqs tries to do the right thing when migrating irqs by disabling
them.  However disabling them is a software logical thing, not a hardware
thing.  This has always been a little flaky and after Ingo's latest round of
changes it is guaranteed to not mask the apic.

So this patch fixes move_native_irq to directly call the mask and unmask chip
methods to guarantee that we mask the irq when we are migrating it.  We must
do this as it is required by all code that call into the path.

Since we don't know the masked status when IRQ_DISABLED is set so we will not
be able to restore it.  The patch makes the code just give up and trying again
the next time this routing is called.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/irq/migration.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff -puN kernel/irq/migration.c~genirq-mask-irqs-when-migrating-them kernel/irq/migration.c
--- a/kernel/irq/migration.c~genirq-mask-irqs-when-migrating-them
+++ a/kernel/irq/migration.c
@@ -65,12 +65,11 @@ void move_native_irq(int irq)
 	if (likely(!(desc->status & IRQ_MOVE_PENDING)))
 		return;
 
-	if (likely(!(desc->status & IRQ_DISABLED)))
-		desc->chip->disable(irq);
+	if (unlikely(desc->status & IRQ_DISABLED))
+		return;
 
+	desc->chip->mask(irq);
 	move_masked_irq(irq);
-
-	if (likely(!(desc->status & IRQ_DISABLED)))
-		desc->chip->enable(irq);
+	desc->chip->unmask(irq);
 }
 
_

Patches currently in -mm which might be from ebiederm@xmission.com are

make-ipc-shmcshm_nopage-static.patch
mm-tiny-shmemc-cleanups.patch
fix-the-sysctl=n-compilation.patch
powerpc-rtas-msi-support.patch
fix-i-oat-for-kexec.patch
i386-irq-kill-irq-compression.patch
i386-irq-kill-irq-compression-fix.patch
xen-paravirt_ops-clean-up-elf-note-generation.patch
genirq-mask-irqs-when-migrating-them.patch
procfs-fix-race-between-proc_readdir-and-remove_proc_entry.patch
procfs-fix-race-between-proc_readdir-and-remove_proc_entry-fix.patch
clone-flag-clone_parent_tidptr-leaves-invalid-results-in-memory.patch
fix-rmmod-read-write-races-in-proc-entries.patch
fix-rmmod-read-write-races-in-proc-entries-fix.patch
allow-access-to-proc-pid-fd-after-setuid.patch
allow-access-to-proc-pid-fd-after-setuid-fix.patch
allow-access-to-proc-pid-fd-after-setuid-update.patch
allow-access-to-proc-pid-fd-after-setuid-update-2.patch
edac-k8-driver-coding-tidy.patch
sched2-sched-domain-sysctl-use-ctl_unnumbered.patch
sysctl-remove-insert_at_head-from-register_sysctl-fix.patch
mm-implement-swap-prefetching-use-ctl_unnumbered.patch
readahead-sysctl-parameters-use-ctl_unnumbered.patch
vdso-print-fatal-signals-use-ctl_unnumbered.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-27 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 20:54 + genirq-mask-irqs-when-migrating-them.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.