[PATCH] powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Sep 9 07:31:12 EST 2009


On Tue, 2009-09-08 at 14:21 -0500, Kumar Gala wrote:

>  
>  struct smp_ops_t smp_85xx_ops = {
> +	.message_pass = NULL,
> +	.probe = NULL,
>  	.kick_cpu = smp_85xx_kick_cpu,
> +	.setup_cpu = NULL,
>  };

Why explicitely setting those to NULL ?

Cheers,
Ben.

> -static int __init smp_dummy_probe(void)
> -{
> -	return NR_CPUS;
> -}
> -
>  void __init mpc85xx_smp_init(void)
>  {
>  	struct device_node *np;
>  
> -	smp_85xx_ops.message_pass = NULL;
> -
>  	np = of_find_node_by_type(NULL, "open-pic");
>  	if (np) {
>  		smp_85xx_ops.probe = smp_mpic_probe;
>  		smp_85xx_ops.setup_cpu = smp_85xx_setup_cpu;
>  		smp_85xx_ops.message_pass = smp_mpic_message_pass;
> -	} else {
> -		smp_85xx_ops.probe = smp_dummy_probe;
> -		smp_85xx_ops.setup_cpu = smp_85xx_basic_setup;
>  	}
>  
>  	if (cpu_has_feature(CPU_FTR_DBELL))



More information about the Linuxppc-dev mailing list