From: mostrows@watson.ibm.com
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 7/8] Cleaner checks for MPIC on pSeries.
Date: Mon, 29 May 2006 16:42:06 -0400 [thread overview]
Message-ID: <11489353263834-git-send-email-mostrows@watson.ibm.com> (raw)
In-Reply-To: <1148935262.25048.31.camel@brick>
Instead of checking the pSeries_mpic pointer, use a wrapper
(pSeries_uses_mpic()) that tells us what we want to know.
--
Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
---
arch/powerpc/kernel/rtas_pci.c | 2 +-
arch/powerpc/platforms/pseries/setup.c | 2 +-
include/asm-powerpc/mpic.h | 6 ++++++
3 files changed, 8 insertions(+), 2 deletions(-)
082a93566e954ce0cc945b89aced0b28feb7ee60
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index e1dbd53..2a6b729 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -322,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 (pSeries_mpic) {
+ if (pSeries_uses_mpic()) {
int addr = root_size_cells * (index + 2) - 1;
mpic_assign_isu(pSeries_mpic, index, opprop[addr]);
}
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 4ff127b..551da6a 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -536,7 +536,7 @@ static void pseries_kexec_cpu_down(int c
}
}
- if (pSeries_mpic)
+ if (pSeries_uses_mpic())
mpic_teardown_this_cpu(secondary);
else
xics_teardown_cpu(secondary);
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
index 6b9e781..1f1b2eb 100644
--- a/include/asm-powerpc/mpic.h
+++ b/include/asm-powerpc/mpic.h
@@ -287,5 +287,11 @@ extern int mpic_get_irq(struct pt_regs *
/* global mpic for pSeries */
extern struct mpic *pSeries_mpic;
+#ifdef CONFIG_MPIC
+#define pSeries_uses_mpic() (pSeries_mpic != NULL)
+#else
+#define pSeries_uses_mpic() 0
+#endif
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_MPIC_H */
--
1.1.4.g0b63-dirty
next prev 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 4/8] Avoid use of ppc64_interrupt_controller mostrows
2006-05-29 20:42 ` [PATCH 3/8] " mostrows
2006-05-29 20:42 ` [PATCH 1/8] Formalize virtual-IRQ remapping configuration mostrows
2006-05-29 20:42 ` [PATCH 2/8] PIC discovery re-organization mostrows
2006-05-29 20:42 ` [PATCH 5/8] Avoid use of ppc64_interrupt_controller mostrows
2006-05-29 20:42 ` [PATCH 8/8] Kill the ppc64_interrupt_controller global symbol mostrows
2006-05-29 20:42 ` mostrows [this message]
2006-05-29 20:50 ` [PATCH 7/8] Cleaner checks for MPIC on pSeries Olof Johansson
2006-05-29 20:42 ` [PATCH 6/8] Avoid use of ppc64_interrupt_controller 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=11489353263834-git-send-email-mostrows@watson.ibm.com \
--to=mostrows@watson.ibm.com \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.