From: Prarit Bhargava <prarit@redhat.com>
To: David Rientjes <rientjes@google.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Rui Wang <rui.y.wang@intel.com>,
Liu Ping Fan <kernelfans@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
Lv Zheng <lv.zheng@intel.com>,
Seiji Aguchi <seiji.aguchi@hds.com>,
Yang Zhang <yang.z.zhang@intel.com>,
Andi Kleen <ak@linux.intel.com>,
"Steven Rostedt (Red Hat)" <rostedt@goodmis.org>,
Li Fei <fei.li@intel.com>,
gong.chen@linux.intel.com
Subject: Re: [PATCH] x86, fix x86 fixup_irqs() error handling
Date: Wed, 05 Mar 2014 17:57:25 -0500 [thread overview]
Message-ID: <5317ABD5.80908@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1403051307590.22928@chino.kir.corp.google.com>
On 03/05/2014 04:09 PM, David Rientjes wrote:
> On Wed, 5 Mar 2014, Prarit Bhargava wrote:
>
>> diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
>> index d99f31d..55fab61 100644
>> --- a/arch/x86/kernel/irq.c
>> +++ b/arch/x86/kernel/irq.c
>> @@ -351,6 +351,7 @@ void fixup_irqs(void)
>> struct irq_desc *desc;
>> struct irq_data *data;
>> struct irq_chip *chip;
>> + int ret;
>>
>> for_each_irq_desc(irq, desc) {
>> int break_affinity = 0;
>> @@ -389,8 +390,12 @@ void fixup_irqs(void)
>> if (!irqd_can_move_in_process_context(data) && chip->irq_mask)
>> chip->irq_mask(data);
>>
>> - if (chip->irq_set_affinity)
>> - chip->irq_set_affinity(data, affinity, true);
>> + if (chip->irq_set_affinity) {
>> + ret = chip->irq_set_affinity(data, affinity, true);
>> + WARN(ret == -ENOSPC,
>> + "IRQ %d set affinity failed with %d. The device assigned to this IRQ is unstable.\n",
>> + irq, ret);
>
> Should this be WARN_ON_ONCE() to avoid filling the kernel log instead?
The problem is that it could hit multiple IRQs ... maybe pr_crit might be better
here so we don't flood the log with an unnecessary stack trace; anyone with the
source can figure out what the call path is.
>
> It doesn't make much sense to print out the negative return value, maybe
> you meant to print -ret instead?
Heh :) You're right. I'll fix that too.
P.
>
>> + }
>> else if (!(warned++))
>> set_affinity = 0;
>>
next prev parent reply other threads:[~2014-03-05 22:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 20:04 [PATCH] x86, fix x86 fixup_irqs() error handling Prarit Bhargava
2014-03-05 21:09 ` David Rientjes
2014-03-05 22:57 ` Prarit Bhargava [this message]
2014-03-06 10:22 ` Thomas Gleixner
2014-03-06 13:11 ` [PATCH] x86, fix x86 fixup_irqs() error handling [v2] Prarit Bhargava
2014-03-11 11:11 ` Ingo Molnar
2014-03-11 12:05 ` [PATCH] x86, fix x86 fixup_irqs() error handling [v3] Prarit Bhargava
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=5317ABD5.80908@redhat.com \
--to=prarit@redhat.com \
--cc=ak@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=fei.li@intel.com \
--cc=gong.chen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kernelfans@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=rostedt@goodmis.org \
--cc=rui.y.wang@intel.com \
--cc=seiji.aguchi@hds.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yang.z.zhang@intel.com \
--cc=yoshihiro.yunomae.ez@hitachi.com \
/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 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.