From: Chuansheng Liu <chuansheng.liu@intel.com>
To: agordeev@redhat.com, yinghai@kernel.org, joerg.roedel@amd.com,
suresh.b.siddha@intel.com, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com
Subject: [PATCH] x86/io_apic: Do not unmask the masked-irq when migrating irq in ack_apic_level()
Date: Fri, 01 Feb 2013 20:05:14 +0800 [thread overview]
Message-ID: <1359720314.1223.32.camel@cliu38-desktop-build> (raw)
In ack_apic_level(), when there is pending affinity setting for current irq,
ioapic_irqd_mask()/ioapic_irqd_unmask() will try to mask the irq and do the
irq affinity setting.
But at this time, it is possibility that the irq has been masked, in this case,
we should not unmask it directly in ioapic_irqd_unmask().
One real case is one threaded interrupt with ONE_SHOT, the irq has been masked in
handle_fasteoi_irq().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
---
arch/x86/kernel/apic/io_apic.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index b739d39..5c0fe25 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2429,7 +2429,8 @@ static inline bool ioapic_irqd_mask(struct irq_data *data, struct irq_cfg *cfg)
{
/* If we are moving the irq we need to mask it */
if (unlikely(irqd_is_setaffinity_pending(data))) {
- mask_ioapic(cfg);
+ if (!irqd_irq_masked(data))
+ mask_ioapic(cfg);
return true;
}
return false;
@@ -2467,7 +2468,13 @@ static inline void ioapic_irqd_unmask(struct irq_data *data,
*/
if (!io_apic_level_ack_pending(cfg))
irq_move_masked_irq(data);
- unmask_ioapic(cfg);
+ /*
+ * For the threaded interrupt with ONE_SHOT flag,
+ * the irq has been masked in handle_fasteoi_irq().
+ * We should be careful not to unmask it here.
+ */
+ if (!irqd_irq_masked(data))
+ unmask_ioapic(cfg);
}
}
#else
--
1.7.0.4
reply other threads:[~2013-02-01 2:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1359720314.1223.32.camel@cliu38-desktop-build \
--to=chuansheng.liu@intel.com \
--cc=agordeev@redhat.com \
--cc=hpa@zytor.com \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@kernel.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
all inboxes | Powered by JetHome®