From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Xen <xen-devel@lists.xenproject.org>, Ingo Molnar <mingo@elte.hu>
Subject: [patch 21/26] xen: Get rid of the last irq_desc abuse
Date: Sun, 23 Feb 2014 21:40:20 -0000 [thread overview]
Message-ID: <20140223212738.579581220@linutronix.de> (raw)
In-Reply-To: 20140223212703.511977310@linutronix.de
[-- Attachment #1: xen-get-rid-of-the-last-irq-to-desc-abuse.patch --]
[-- Type: text/plain, Size: 2311 bytes --]
I'd prefer to drop that completely but there seems to be some mystic
value to the error printout and the allocation check.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Xen <xen-devel@lists.xenproject.org>
---
drivers/xen/events/events_base.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
Index: tip/drivers/xen/events/events_base.c
===================================================================
--- tip.orig/drivers/xen/events/events_base.c
+++ tip/drivers/xen/events/events_base.c
@@ -487,13 +487,6 @@ static void pirq_query_unmask(int irq)
info->u.pirq.flags |= PIRQ_NEEDS_EOI;
}
-static bool probing_irq(int irq)
-{
- struct irq_desc *desc = irq_to_desc(irq);
-
- return desc && desc->action == NULL;
-}
-
static void eoi_pirq(struct irq_data *data)
{
int evtchn = evtchn_from_irq(data->irq);
@@ -517,7 +510,7 @@ static void mask_ack_pirq(struct irq_dat
eoi_pirq(data);
}
-static unsigned int __startup_pirq(unsigned int irq)
+static unsigned int __startup_pirq(struct irq_data *data, unsigned int irq)
{
struct evtchn_bind_pirq bind_pirq;
struct irq_info *info = info_for_irq(irq);
@@ -535,7 +528,7 @@ static unsigned int __startup_pirq(unsig
BIND_PIRQ__WILL_SHARE : 0;
rc = HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, &bind_pirq);
if (rc != 0) {
- if (!probing_irq(irq))
+ if (!data || irqd_irq_has_action(data))
pr_info("Failed to obtain physical IRQ %d\n", irq);
return 0;
}
@@ -562,7 +555,7 @@ out:
static unsigned int startup_pirq(struct irq_data *data)
{
- return __startup_pirq(data->irq);
+ return __startup_pirq(data, data->irq);
}
static void shutdown_pirq(struct irq_data *data)
@@ -769,15 +762,13 @@ error_irq:
int xen_destroy_irq(int irq)
{
- struct irq_desc *desc;
struct physdev_unmap_pirq unmap_irq;
struct irq_info *info = info_for_irq(irq);
int rc = -ENOENT;
mutex_lock(&irq_mapping_update_lock);
- desc = irq_to_desc(irq);
- if (!desc)
+ if (!irq_is_allocated(irq))
goto out;
if (xen_initial_domain()) {
@@ -1432,7 +1423,7 @@ static void restore_pirqs(void)
printk(KERN_DEBUG "xen: --> irq=%d, pirq=%d\n", irq, map_irq.pirq);
- __startup_pirq(irq);
+ __startup_pirq(irq_get_irq_data(irq), irq);
}
}
next prev parent reply other threads:[~2014-02-23 21:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140223212703.511977310@linutronix.de>
2014-02-23 21:40 ` [patch 15/26] x86: xen: Use the core irq stats function Thomas Gleixner
2014-02-24 14:20 ` David Vrabel
2014-03-04 16:41 ` [tip:irq/core] x86: Xen: " tip-bot for Thomas Gleixner
2014-02-23 21:40 ` [patch 18/26] xen: Use the proper irq functions Thomas Gleixner
2014-02-24 14:24 ` David Vrabel
[not found] ` <530B5624.8080309@citrix.com>
2014-02-24 21:13 ` Thomas Gleixner
2014-03-04 16:40 ` [tip:irq/core] " tip-bot for Thomas Gleixner
2014-02-23 21:40 ` Thomas Gleixner [this message]
2014-02-24 14:33 ` [patch 21/26] xen: Get rid of the last irq_desc abuse David Vrabel
[not found] ` <530B5856.7080900@citrix.com>
2014-02-24 21:12 ` Thomas Gleixner
2014-03-04 16:41 ` [tip:irq/core] " tip-bot for Thomas Gleixner
[not found] ` <tip-02893afdd310fab8f41f6afbe5233c6609ec19ed@git.kernel.org>
2014-03-04 17:16 ` David Vrabel
2014-02-23 21:40 ` [patch 23/26] xen: Add proper irq accounting for HYPERCALL vector Thomas Gleixner
2014-02-24 14:48 ` David Vrabel
2014-03-04 16:42 ` [tip:irq/core] " tip-bot for Thomas Gleixner
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=20140223212738.579581220@linutronix.de \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=xen-devel@lists.xenproject.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).