xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: <stefano.stabellini@eu.citrix.com>
To: konrad.wilk@oracle.com
Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Stefano.Stabellini@eu.citrix.com
Subject: [PATCH 2/2] xen: do not implement irq_mask and irq_unmask in xen_percpu_chip
Date: Fri, 6 May 2011 12:27:51 +0100	[thread overview]
Message-ID: <1304681271-3836-2-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <1304681271-3836-1-git-send-email-stefano.stabellini@eu.citrix.com>

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

irq_mask and irq_unmask are not needed by handle_percpu_irq, but
they are called by fixup_irqs when changing affinity.
At the moment calling fixup_irqs can result in unmasking an interrupt
that was previously masked because of the call to irq_unmask.
However xen_percpu_chip doesn't even support irq_set_affinity, and we
don't need irq_mask and irq_unmask, so we can just change them to noops,
following the example of uv_irq_chip.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 drivers/xen/events.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index bb59651..8eb5316 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -120,6 +120,7 @@ static struct irq_chip xen_percpu_chip;
 static struct irq_chip xen_pirq_chip;
 static void enable_dynirq(struct irq_data *data);
 static void disable_dynirq(struct irq_data *data);
+static void evtchn_noop(struct irq_data *data) { }
 
 /* Get info for IRQ */
 static struct irq_info *info_for_irq(unsigned irq)
@@ -1595,9 +1596,10 @@ static struct irq_chip xen_pirq_chip __read_mostly = {
 static struct irq_chip xen_percpu_chip __read_mostly = {
 	.name			= "xen-percpu",
 
+	.irq_enable		= enable_dynirq,
 	.irq_disable		= disable_dynirq,
-	.irq_mask		= disable_dynirq,
-	.irq_unmask		= enable_dynirq,
+	.irq_mask		= evtchn_noop,
+	.irq_unmask		= evtchn_noop,
 
 	.irq_ack		= ack_dynirq,
 };
-- 
1.7.2.3

      reply	other threads:[~2011-05-06 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 11:27 [PATCH v4 1/2] xen: do not clear and mask evtchns in __xen_evtchn_do_upcall stefano.stabellini
2011-05-06 11:27 ` stefano.stabellini [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=1304681271-3836-2-git-send-email-stefano.stabellini@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.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 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).