X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fpowerpc%2Fplatforms%2Fpseries%2Fxics.c;h=fd823c7c9ac88e6db77d9d912750819df682ccd3;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=9ff7105bc1350858be7730eea16ec9a380ff644b;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 9ff7105bc..fd823c7c9 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -168,7 +167,7 @@ static int pSeriesLP_xirr_info_get(int n_cpu) unsigned long return_value; lpar_rc = plpar_xirr(&return_value); - if (lpar_rc != H_SUCCESS) + if (lpar_rc != H_Success) panic(" bad return code xirr - rc = %lx \n", lpar_rc); return (int)return_value; } @@ -179,7 +178,7 @@ static void pSeriesLP_xirr_info_set(int n_cpu, int value) unsigned long val64 = value & 0xffffffff; lpar_rc = plpar_eoi(val64); - if (lpar_rc != H_SUCCESS) + if (lpar_rc != H_Success) panic("bad return code EOI - rc = %ld, value=%lx\n", lpar_rc, val64); } @@ -189,7 +188,7 @@ void pSeriesLP_cppr_info(int n_cpu, u8 value) unsigned long lpar_rc; lpar_rc = plpar_cppr(value); - if (lpar_rc != H_SUCCESS) + if (lpar_rc != H_Success) panic("bad return code cppr - rc = %lx\n", lpar_rc); } @@ -198,7 +197,7 @@ static void pSeriesLP_qirr_info(int n_cpu , u8 value) unsigned long lpar_rc; lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value); - if (lpar_rc != H_SUCCESS) + if (lpar_rc != H_Success) panic("bad return code qirr - rc = %lx\n", lpar_rc); } @@ -500,7 +499,7 @@ nextnode: np; np = of_find_node_by_type(np, "cpu")) { ireg = (uint *)get_property(np, "reg", &ilen); - if (ireg && ireg[0] == get_hard_smp_processor_id(boot_cpuid)) { + if (ireg && ireg[0] == boot_cpuid_phys) { ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); i = ilen / sizeof(int); @@ -537,11 +536,11 @@ nextnode: of_node_put(np); } - if (firmware_has_feature(FW_FEATURE_LPAR)) + if (platform_is_lpar()) ops = &pSeriesLP_ops; else { #ifdef CONFIG_SMP - for_each_possible_cpu(i) { + for_each_cpu(i) { int hard_id; /* FIXME: Do this dynamically! --RR */ @@ -641,28 +640,23 @@ void xics_teardown_cpu(int secondary) ops->cppr_info(cpu, 0x00); iosync(); - /* - * Clear IPI - */ - ops->qirr_info(cpu, 0xff); - /* - * we need to EOI the IPI if we got here from kexec down IPI - * - * probably need to check all the other interrupts too - * should we be flagging idle loop instead? - * or creating some task to be scheduled? - */ - ops->xirr_info_set(cpu, XICS_IPI); - /* * Some machines need to have at least one cpu in the GIQ, * so leave the master cpu in the group. */ - if (secondary) + if (secondary) { + /* + * we need to EOI the IPI if we got here from kexec down IPI + * + * probably need to check all the other interrupts too + * should we be flagging idle loop instead? + * or creating some task to be scheduled? + */ + ops->xirr_info_set(cpu, XICS_IPI); rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE, (1UL << interrupt_server_size) - 1 - default_distrib_server, 0); - + } } #ifdef CONFIG_HOTPLUG_CPU