linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: linux-kernel@vger.kernel.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linuxppc-dev@lists.ozlabs.org,
	Russell King <linux@arm.linux.org.uk>,
	sfr@canb.auug.org.au
Cc: Grant Likely <grant.likely@secretlab.ca>
Subject: [RFC 06/14] irq_domain/powerpc: Eliminate virq_is_host()
Date: Wed, 11 Jan 2012 13:22:09 -0700	[thread overview]
Message-ID: <1326313337-24603-7-git-send-email-grant.likely@secretlab.ca> (raw)
In-Reply-To: <1326313337-24603-1-git-send-email-grant.likely@secretlab.ca>

There is only one user, and it is trivial to open-code.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/irq.h         |    1 -
 arch/powerpc/kernel/irq.c              |    7 -------
 arch/powerpc/sysdev/xics/xics-common.c |   12 ++++++------
 3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index abdd7ef..f80f262 100644
--- a/arch/powerpc/include/asm/irq.h
+++ b/arch/powerpc/include/asm/irq.h
@@ -58,7 +58,6 @@ extern atomic_t ppc_n_lost_interrupts;
 struct irq_data;
 extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d);
 extern irq_hw_number_t virq_to_hw(unsigned int virq);
-extern bool virq_is_host(unsigned int virq, struct irq_domain *host);
 
 /**
  * irq_alloc_host - Allocate a new irq_domain data structure
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 23fd9ce..a15cf0a 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -510,13 +510,6 @@ irq_hw_number_t virq_to_hw(unsigned int virq)
 }
 EXPORT_SYMBOL_GPL(virq_to_hw);
 
-bool virq_is_host(unsigned int virq, struct irq_domain *host)
-{
-	struct irq_data *irq_data = irq_get_irq_data(virq);
-	return irq_data ? irq_data->domain == host : false;
-}
-EXPORT_SYMBOL_GPL(virq_is_host);
-
 static int default_irq_host_match(struct irq_domain *h, struct device_node *np)
 {
 	return h->of_node != NULL && h->of_node == np;
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
index c4b3ce1..fb2e303 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -212,16 +212,16 @@ void xics_migrate_irqs_away(void)
 		/* We can't set affinity on ISA interrupts */
 		if (virq < NUM_ISA_INTERRUPTS)
 			continue;
-		if (!virq_is_host(virq, xics_host))
-			continue;
-		irq = (unsigned int)virq_to_hw(virq);
-		/* We need to get IPIs still. */
-		if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
-			continue;
 		desc = irq_to_desc(virq);
 		/* We only need to migrate enabled IRQS */
 		if (!desc || !desc->action)
 			continue;
+		if (desc->irq_data.domain != xics_host)
+			continue;
+		irq = desc->irq_data.hwirq;
+		/* We need to get IPIs still. */
+		if (irq == XICS_IPI || irq == XICS_IRQ_SPURIOUS)
+			continue;
 		chip = irq_desc_get_chip(desc);
 		if (!chip || !chip->irq_set_affinity)
 			continue;
-- 
1.7.5.4


  parent reply	other threads:[~2012-01-11 20:24 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 20:22 [RFC 0/14] Finish up irq_domain generalization Grant Likely
2012-01-11 20:22 ` [RFC 01/14] dt: Make irqdomain less verbose Grant Likely
2012-01-11 20:22 ` [RFC 02/14] irq_domain: Make irq_domain structure match powerpc's irq_host Grant Likely
2012-01-11 20:22 ` [RFC 03/14] irq_domain: convert microblaze from irq_host to irq_domain Grant Likely
2012-01-11 20:22 ` [RFC 04/14] irq_domain/powerpc: Use common irq_domain structure instead of irq_host Grant Likely
2012-01-11 20:22 ` [RFC 05/14] irq_domain/powerpc: eliminate irq_map; use irq_alloc_desc() instead Grant Likely
2012-01-11 20:22 ` Grant Likely [this message]
2012-01-11 20:22 ` [RFC 07/14] irq_domain: Move irq_domain code from powerpc to kernel/irq Grant Likely
2012-01-11 20:22 ` [RFC 08/14] irqdomain: remove NO_IRQ from irq domain code Grant Likely
2012-01-11 20:22 ` [RFC 09/14] irq_domain: Remove references to old irq_host names Grant Likely
2012-01-11 20:22 ` [RFC 10/14] irq_domain: Replace irq_alloc_host() with revmap-specific initializers Grant Likely
2012-01-11 20:22 ` [RFC 11/14] powerpc: Eliminate NO_IRQ usage Grant Likely
2013-07-25 21:58   ` Geert Uytterhoeven
2013-07-26  3:56     ` Grant Likely
2013-08-23 13:18       ` Geert Uytterhoeven
2013-08-23 13:22         ` Geert Uytterhoeven
2012-01-11 20:22 ` [RFC 12/14] irq_domain: Add support for base irq and hwirq in legacy mappings Grant Likely
2012-01-13  0:37   ` Rob Herring
2012-01-13  0:53     ` Grant Likely
2012-01-11 20:22 ` [RFC 13/14] irq_domain: Remove 'new' irq_domain in favour of the ppc one Grant Likely
2012-01-11 21:15   ` Rob Herring
2012-01-11 21:27     ` Grant Likely
2012-01-13  0:31       ` Rob Herring
2012-01-13  0:47         ` Grant Likely
2012-01-13  0:53           ` Rob Herring
2012-01-13  2:20         ` Grant Likely
2012-01-17  2:43         ` Michael Bohan
2012-01-17  3:42           ` Benjamin Herrenschmidt
2012-01-18  0:28             ` Grant Likely
2012-01-18  2:16               ` Benjamin Herrenschmidt
2012-01-11 20:22 ` [RFC 14/14] irq_domain: Remove irq_domain_add_simple() Grant Likely
2012-01-11 21:39 ` [RFC 0/14] Finish up irq_domain generalization Randy Dunlap
2012-01-11 20:50   ` Grant Likely
2012-01-11 21:23     ` Grant Likely
2012-01-11 22:48       ` Randy Dunlap
2012-01-12 10:17 ` [RFC 06/14] irq_domain/powerpc: Eliminate virq_is_host() Milton Miller
2012-01-18  0:38   ` Grant Likely
2012-01-18 21:25   ` Grant Likely

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=1326313337-24603-7-git-send-email-grant.likely@secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rob.herring@calxeda.com \
    --cc=sfr@canb.auug.org.au \
    --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;
as well as URLs for NNTP newsgroup(s).