From: "Liu, Chuansheng" <chuansheng.liu@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] genirq: Give warning when setup an already-setup non-shared irq
Date: Tue, 15 Jan 2013 00:54:06 +0000 [thread overview]
Message-ID: <27240C0AC20F114CBF8149A2696CBE4A203FC1@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1301141211500.7475@ionos>
> -----Original Message-----
> From: Thomas Gleixner [mailto:tglx@linutronix.de]
> Sent: Monday, January 14, 2013 7:16 PM
> To: Liu, Chuansheng
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] genirq: Give warning when setup an already-setup
> non-shared irq
>
> On Thu, 10 Jan 2013, Chuansheng Liu wrote:
> >
> > Meet the case when the request_threaded_irq() with the same irq
> > is called twice continually, get the below mismatch info:
> > "IRQ handler type mismatch for IRQ 323"
>
> I have no idea where you get that from. The mismatch is printed with:
>
> if (!(new->flags & IRQF_PROBE_SHARED)) {
> pr_err("Flags mismatch irq %d. %08x (%s) vs. %08x (%s)\n",
> irq, new->flags, new->name, old->flags,
> old->name);
if (!(new->flags & IRQF_PROBE_SHARED)) {
printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq);
if (old_name)
printk(KERN_ERR "current handler: %s\n", old_name);
dump_stack();
}
The "IRQ handler type mismatch for IRQ 323" message is coming from the above code,
which is something older than you pasted, but it is the same place.
>
> And its only printed when IRQF_PROBE_SHARED is not set. Your change
> would cause printouts where no printouts are due and it'd change the
> return value from EBUSY to EINVAL.
My test case is below:
request_irq(323, func1,
IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING,
name, dev);
After succeeded, then called it again:
request_irq(323, func1,
IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING,
name, dev);
After the test case, I will get the "mismatch" info.
But in this case, it should not be the "mismatch" case, so I want to give another warning
in case of duplicated setup the same irq with non-shared.
Not sure if it is right. Thanks your pointing out.
>
> Thanks,
>
> tglx
prev parent reply other threads:[~2013-01-15 0:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 15:55 Chuansheng Liu
2013-01-14 11:16 ` Thomas Gleixner
2013-01-15 0:54 ` 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=27240C0AC20F114CBF8149A2696CBE4A203FC1@SHSMSX101.ccr.corp.intel.com \
--to=chuansheng.liu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®