[PATCH] hang on p630

Paul Mackerras paulus at samba.org
Thu Nov 13 22:10:12 EST 2003


Hi Anton,

Do you think plpar_ipi etc. should translate the cpu number from soft
to hard, or should it take the hard cpu number as Joel's patch does?

Paul.

Joel Schopp writes:
>
> This short patch fixes a hang when physical cpu numbering is
> not the same as logical cpu numbering.  Those running pSeries
> paritions may experience this hang at boot.  The symptoms is the
> message:
>
> Kernel panic: bad return code qirr - rc = fffffffffffffffc
>
> diff -Nru a/arch/ppc64/kernel/xics.c b/arch/ppc64/kernel/xics.c
> --- a/arch/ppc64/kernel/xics.c	Wed Nov 12 11:10:36 2003
> +++ b/arch/ppc64/kernel/xics.c	Wed Nov 12 11:10:36 2003
> @@ -202,7 +202,7 @@
>  {
>  	unsigned long lpar_rc;
>
> -	lpar_rc = plpar_ipi(n_cpu, value);
> +	lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value);
>  	if (lpar_rc != H_Success)
>  		panic("bad return code qirr - rc = %lx\n", lpar_rc);
>  }
> @@ -448,7 +448,7 @@
>  	     np;
>  	     np = of_find_node_by_type(np, "cpu")) {
>  		ireg = (uint *)get_property(np, "reg", &ilen);
> -		if (ireg && ireg[0] == smp_processor_id()) {
> +		if (ireg && ireg[0] == hard_smp_processor_id()) {
>  			ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
>  			i = ilen / sizeof(int);
>  			if (ireg && i > 0) {
> @@ -485,8 +485,8 @@
>  		for (i = 0; i < NR_CPUS; ++i) {
>  			if (!cpu_possible(i))
>  				continue;
> -			xics_per_cpu[i] = __ioremap((ulong)inodes[i].addr,
> -						    (ulong)inodes[i].size,
> +			xics_per_cpu[i] = __ioremap((ulong)inodes[get_hard_smp_processor_id(i)].addr,
> +						    (ulong)inodes[get_hard_smp_processor_id(i)].size,
>  						    _PAGE_NO_CACHE);
>  		}
>  #else
> @@ -569,7 +569,7 @@
>  		cpus_and(tmp, cpu_online_map, cpumask);
>  		if (cpus_empty(tmp))
>  			goto out;
> -		newmask = first_cpu(cpumask);
> +		newmask = get_hard_smp_processor_id(first_cpu(cpumask));
>  	}
>
>  	status = rtas_call(ibm_set_xive, 3, 1, NULL,
>
>

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list