mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Liu, Chuansheng" <chuansheng.liu@intel.com>
To: "mingo@redhat.com" <mingo@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>
Cc: "x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Liu, Chuansheng" <chuansheng.liu@intel.com>
Subject: RE: [PATCH] x86/irq,io_apic: Fix wrong unmask_ioapic calling when the irq is masked
Date: Fri, 16 Nov 2012 00:36:12 +0000	[thread overview]
Message-ID: <27240C0AC20F114CBF8149A2696CBE4A1CE9A9@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1352911962.15558.1676.camel@cliu38-desktop-build>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1780 bytes --]

Hi Thomas and Ingo,

Could you have a look for this patch? It fix the wrong unmask action.
Thanks.

> -----Original Message-----
> From: Liu, Chuansheng
> Sent: Thursday, November 15, 2012 12:53 AM
> To: mingo@redhat.com; tglx@linutronix.de
> Cc: x86@kernel.org; linux-kernel@vger.kernel.org; Liu, Chuansheng
> Subject: [PATCH] x86/irq,io_apic: Fix wrong unmask_ioapic calling when the irq
> is masked
> 
> 
> There is one typical case will cause this issue, that is:
> One io-apic interrupt with ONE_SHOT and threaded, when interrupt is coming:
> handle_fasteoi_irq()
> --> mask_irq(desc)
>     ...
>     desc->irq_data.chip->irq_eoi(&desc->irq_data)[ack_apic_level]
>     --> ioapic_irqd_mask()
>         ...
>         ioapic_irqd_unmask()
> 
> After that, the irq will be in unmasked state.
> 
> It will break the ONE_SHOT and threaded irq, and brings some unwanted
> issues.
> Here adding the irqd_irq_masked() condition to know if unmasking action is
> needed.
> 
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> ---
>  arch/x86/kernel/apic/io_apic.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 1817fa9..d963e76 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -2479,7 +2479,8 @@ 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);
> +		if (!irqd_irq_masked(data))
> +			unmask_ioapic(cfg);
>  	}
>  }
>  #else
> --
> 1.7.0.4
> 
> 

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

      reply	other threads:[~2012-11-16  0:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 16:52 Chuansheng Liu
2012-11-16  0:36 ` Liu, Chuansheng [this message]

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=27240C0AC20F114CBF8149A2696CBE4A1CE9A9@SHSMSX101.ccr.corp.intel.com \
    --to=chuansheng.liu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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®