aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@austin.ibm.com>2008-02-06 15:37:35 -0500
committerPaul Mackerras <paulus@samba.org>2008-02-06 19:40:19 -0500
commitb99e62608b5b9f8066629e7403a5f15401049b98 (patch)
tree120bda9727071c47989dd95b96de872d142ace6c
parentc3e8506c54f7263e71289e9e66533236d09f2fb7 (diff)
[POWERPC] Remove redundant of_get_cpu_node routine
It appears that xics.c has its own of_get_cpu_node(). Remove this and use the common one from prom.c. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/pseries/xics.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 485cb399b837..9ecf75fe9b14 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -658,31 +658,6 @@ static void __init xics_setup_8259_cascade(void)
658 set_irq_chained_handler(cascade, pseries_8259_cascade); 658 set_irq_chained_handler(cascade, pseries_8259_cascade);
659} 659}
660 660
661static struct device_node *cpuid_to_of_node(int cpu)
662{
663 struct device_node *np;
664 u32 hcpuid = get_hard_smp_processor_id(cpu);
665
666 for_each_node_by_type(np, "cpu") {
667 int i, len;
668 const u32 *intserv;
669
670 intserv = of_get_property(np, "ibm,ppc-interrupt-server#s",
671 &len);
672
673 if (!intserv)
674 intserv = of_get_property(np, "reg", &len);
675
676 i = len / sizeof(u32);
677
678 while (i--)
679 if (intserv[i] == hcpuid)
680 return np;
681 }
682
683 return NULL;
684}
685
686void __init xics_init_IRQ(void) 661void __init xics_init_IRQ(void)
687{ 662{
688 int i, j; 663 int i, j;
@@ -711,7 +686,7 @@ void __init xics_init_IRQ(void)
711 xics_init_host(); 686 xics_init_host();
712 687
713 /* Find the server numbers for the boot cpu. */ 688 /* Find the server numbers for the boot cpu. */
714 np = cpuid_to_of_node(boot_cpuid); 689 np = of_get_cpu_node(boot_cpuid, NULL);
715 BUG_ON(!np); 690 BUG_ON(!np);
716 ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); 691 ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
717 if (!ireg) 692 if (!ireg)