[PATCH 7/8] Cleaner checks for MPIC on pSeries.
Olof Johansson
olof at lixom.net
Tue May 30 06:50:03 EST 2006
On Mon, May 29, 2006 at 04:42:06PM -0400, mostrows at watson.ibm.com wrote:
> Instead of checking the pSeries_mpic pointer, use a wrapper
> (pSeries_uses_mpic()) that tells us what we want to know.
You might as well kill the SillyCaps while you're at it.
-Olof
> --
> Signed-off-by: Michal Ostrowski <mostrows at 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
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
More information about the Linuxppc-dev
mailing list