From: Greg KH <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Jiang Liu <jiang.liu@huawei.com>,
Jiang Liu <liuj97@gmail.com>, Keping Chen <chenkeping@huawei.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [ 12/42] genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value
Date: Wed, 11 Apr 2012 16:13:19 -0700 [thread overview]
Message-ID: <20120411231309.320578569@linuxfoundation.org> (raw)
In-Reply-To: <20120411231443.GA808@kroah.com>
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiang Liu <liuj97@gmail.com>
commit f5cb92ac82d06cb583c1f66666314c5c0a4d7913 upstream.
irq_move_masked_irq() checks the return code of
chip->irq_set_affinity() only for 0, but IRQ_SET_MASK_OK_NOCOPY is
also a valid return code, which is there to avoid a redundant copy of
the cpumask. But in case of IRQ_SET_MASK_OK_NOCOPY we not only avoid
the redundant copy, we also fail to adjust the thread affinity of an
eventually threaded interrupt handler.
Handle IRQ_SET_MASK_OK (==0) and IRQ_SET_MASK_OK_NOCOPY(==1) return
values correctly by checking the valid return values seperately.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Keping Chen <chenkeping@huawei.com>
Link: http://lkml.kernel.org/r/1333120296-13563-2-git-send-email-jiang.liu@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/irq/migration.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/kernel/irq/migration.c
+++ b/kernel/irq/migration.c
@@ -43,12 +43,16 @@ void irq_move_masked_irq(struct irq_data
* masking the irqs.
*/
if (likely(cpumask_any_and(desc->pending_mask, cpu_online_mask)
- < nr_cpu_ids))
- if (!chip->irq_set_affinity(&desc->irq_data,
- desc->pending_mask, false)) {
+ < nr_cpu_ids)) {
+ int ret = chip->irq_set_affinity(&desc->irq_data,
+ desc->pending_mask, false);
+ switch (ret) {
+ case IRQ_SET_MASK_OK:
cpumask_copy(desc->irq_data.affinity, desc->pending_mask);
+ case IRQ_SET_MASK_OK_NOCOPY:
irq_set_thread_affinity(desc);
}
+ }
cpumask_clear(desc->pending_mask);
}
next prev parent reply other threads:[~2012-04-11 23:13 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 23:14 [ 00/42] 3.0.28-stable review Greg KH
2012-04-11 23:13 ` [ 01/42] x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND Greg KH
2012-04-11 23:13 ` [ 02/42] rose_dev: fix memcpy-bug in rose_set_mac_address Greg KH
2012-04-11 23:13 ` [ 03/42] net: usb: cdc_eem: fix mtu Greg KH
2012-04-11 23:13 ` [ 04/42] mtd: sst25l: initialize writebufsize Greg KH
2012-04-11 23:13 ` [ 05/42] mtd: block2mtd: " Greg KH
2012-04-11 23:13 ` [ 06/42] mtd: lart: " Greg KH
2012-04-11 23:13 ` [ 07/42] mtd: m25p80: set writebufsize Greg KH
2012-04-11 23:13 ` [ 08/42] ACPI: Do cpufreq clamping for throttling per package v2 Greg KH
2012-04-11 23:13 ` [ 09/42] PNPACPI: Fix device ref leaking in acpi_pnp_match Greg KH
2012-04-11 23:13 ` [ 10/42] ACPICA: Fix regression in FADT revision checks Greg KH
2012-04-11 23:13 ` [ 11/42] modpost: fix ALL_INIT_DATA_SECTIONS Greg KH
2012-04-11 23:13 ` Greg KH [this message]
2012-04-11 23:13 ` [ 13/42] tracing: Fix ftrace stack trace entries Greg KH
2012-04-11 23:13 ` [ 14/42] m68k/mac: Add missing platform check before registering platform devices Greg KH
2012-04-11 23:13 ` [ 15/42] mac80211: fix possible tid_rx->reorder_timer use after free Greg KH
2012-04-11 23:13 ` [ 16/42] drm: Validate requested virtual size against allocated fb size Greg KH
2012-04-11 23:13 ` [ 17/42] drm/radeon/kms: fix fans after resume Greg KH
2012-04-11 23:13 ` [ 18/42] drm/i915: no-lvds quirk on MSI DC500 Greg KH
2012-04-11 23:13 ` [ 19/42] drm/i915: Sanitize BIOS debugging bits from PIPECONF Greg KH
2012-04-11 23:13 ` [ 20/42] drm/i915: Add lock on drm_helper_resume_force_mode Greg KH
2012-04-11 23:13 ` [ 21/42] drm/i915: quirk away broken OpRegion VBT Greg KH
2012-04-11 23:13 ` [ 22/42] kgdb,debug_core: pass the breakpoint struct instead of address and memory Greg KH
2012-04-11 23:13 ` [ 23/42] kgdbts: Fix kernel oops with CONFIG_DEBUG_RODATA Greg KH
2012-04-11 23:13 ` [ 24/42] kgdbts: (1 of 2) fix single step awareness to work correctly with SMP Greg KH
2012-04-11 23:13 ` [ 25/42] kgdbts: (2 " Greg KH
2012-04-11 23:13 ` [ 26/42] x86,kgdb: Fix DEBUG_RODATA limitation using text_poke() Greg KH
2012-04-11 23:13 ` [ 27/42] mmc: atmel-mci: correct data timeout computation Greg KH
2012-04-11 23:13 ` [ 28/42] sysctl: fix write access to dmesg_restrict/kptr_restrict Greg KH
2012-04-11 23:13 ` [ 29/42] modpost: Fix modposts license checking V3 Greg KH
2012-04-11 23:13 ` [ 30/42] modpost: Fix modpost license checking of vmlinux.o Greg KH
2012-04-11 23:13 ` [ 31/42] x86/PCI: use host bridge _CRS info on MSI MS-7253 Greg KH
2012-04-11 23:13 ` [ 32/42] x86/PCI: do not tie MSI MS-7253 use_crs quirk to BIOS version Greg KH
2012-04-11 23:13 ` [ 33/42] Revert "x86/ioapic: Add register level checks to detect bogus io-apic entries" Greg KH
2012-04-11 23:13 ` [ 34/42] acer-wmi: No wifi rfkill on Sony machines Greg KH
2012-04-11 23:13 ` [ 35/42] sched/x86: Fix overflow in cyc2ns_offset Greg KH
2012-04-11 23:13 ` [ 36/42] mfd: Clear twl6030 IRQ status register only once Greg KH
2012-04-11 23:13 ` [ 37/42] USB: Add Motorola Rokr E6 Id to the USBNet driver "zaurus" Greg KH
2012-04-11 23:13 ` [ 38/42] ASoC: ak4642: fixup: mute needs +1 step Greg KH
2012-04-11 23:13 ` [ 39/42] cred: copy_process() should clear child->replacement_session_keyring Greg KH
2012-04-11 23:13 ` [ 40/42] iommu/amd: Make sure IOMMU interrupts are re-enabled on resume Greg KH
2012-04-11 23:13 ` [ 41/42] TOMOYO: Fix mount flags checking order Greg KH
2012-04-11 23:13 ` [ 42/42] Bluetooth: Fix l2cap conn failures for ssp devices Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120411231309.320578569@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=chenkeping@huawei.com \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).