public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: mostrows@watson•ibm.com
To: linuxppc-dev@ozlabs•org
Subject: [PATCH 4/8] Avoid use of ppc64_interrupt_controller.
Date: Mon, 29 May 2006 16:42:05 -0400	[thread overview]
Message-ID: <1148935325431-git-send-email-mostrows@watson.ibm.com> (raw)
In-Reply-To: <1148935262.25048.31.camel@brick>

Existence of "/platform-open-pic" is asserted by pSeries_setup_mpic if
an mpic interrupt controller exists.  Thus pSeries_mpic is non-NULL
only if the opprop value obtained here is good. Hence, no need to
check ppc64_intrerrupt_controller.

--
Signed-off-by: Michal Ostrowski <mostrows@watson•ibm.com>

---

 arch/powerpc/kernel/rtas_pci.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

3a5eaf5436e0c413e154a933867ff5a09c019e3c
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 57b539a..e1dbd53 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -301,10 +301,8 @@ unsigned long __init find_and_init_phbs(
 	unsigned int *opprop = NULL;
 	struct device_node *root = of_find_node_by_path("/");
 
-	if (ppc64_interrupt_controller == IC_OPEN_PIC) {
-		opprop = (unsigned int *)get_property(root,
-				"platform-open-pic", NULL);
-	}
+	/* If pSeries_mpic is non-NULL, it's because opprop is non-0. */
+	opprop = (unsigned int *)get_property(root, "platform-open-pic", NULL);
 
 	root_size_cells = prom_n_size_cells(root);
 
@@ -324,7 +322,7 @@ unsigned long __init find_and_init_phbs(
 		pci_setup_phb_io(phb, index == 0);
 #ifdef CONFIG_PPC_PSERIES
 		/* XXX This code need serious fixing ... --BenH */
-		if (ppc64_interrupt_controller == IC_OPEN_PIC && pSeries_mpic) {
+		if (pSeries_mpic) {
 			int addr = root_size_cells * (index + 2) - 1;
 			mpic_assign_isu(pSeries_mpic, index, opprop[addr]);
 		}
-- 
1.1.4.g0b63-dirty

  parent reply	other threads:[~2006-05-29 20:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-29 20:41 [RFC/PATCH 0/8] Overhaul of virt IRQ configuration. / Kill ppc64_interrupt_controller Michal Ostrowski
2006-05-29 20:42 ` [PATCH 2/8] PIC discovery re-organization mostrows
2006-05-29 20:42 ` mostrows [this message]
2006-05-29 20:42 ` [PATCH 1/8] Formalize virtual-IRQ remapping configuration mostrows
2006-05-29 20:42 ` [PATCH 3/8] Avoid use of ppc64_interrupt_controller mostrows
2006-05-29 20:42 ` [PATCH 7/8] Cleaner checks for MPIC on pSeries mostrows
2006-05-29 20:50   ` Olof Johansson
2006-05-29 20:42 ` [PATCH 8/8] Kill the ppc64_interrupt_controller global symbol mostrows
2006-05-29 20:42 ` [PATCH 6/8] Avoid use of ppc64_interrupt_controller mostrows
2006-05-29 20:42 ` [PATCH 5/8] " mostrows
2006-05-29 21:28 ` [RFC/PATCH 0/8] Overhaul of virt IRQ configuration. / Kill ppc64_interrupt_controller Benjamin Herrenschmidt
2006-05-29 23:08   ` Michal Ostrowski
2006-05-30 13:54   ` Michal Ostrowski
2006-05-30 22:13     ` Benjamin Herrenschmidt
2006-05-30 22:53       ` Michal Ostrowski
2006-05-30 23:10         ` Benjamin Herrenschmidt
2006-05-29 21:56 ` Paul Mackerras

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=1148935325431-git-send-email-mostrows@watson.ibm.com \
    --to=mostrows@watson$(echo .)ibm.com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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