[PATCH] Introduce 'struct machine_class' for SoC level abstraction

Hendrik Sattler post at hendrik-sattler.de
Thu Jul 22 07:11:45 EDT 2010


Zitat von Eric Miao <eric.miao at canonical.com>:
> @@ -772,8 +774,13 @@ void __init setup_arch(char **cmdline_p)
>
>  	if (__atags_pointer)
>  		tags = phys_to_virt(__atags_pointer);
> -	else if (mdesc->boot_params)
> -		tags = phys_to_virt(mdesc->boot_params);
> +	else {
> +		unsigned long boot_params = mdesc->boot_params ?
> +					    mdesc->boot_params :
> +					   (class ? class->boot_params: 0);
> +		if (boot_params)
> +			tags = phys_to_virt(boot_params);
> +	}

Isn't
	if (__atags_pointer)
		tags = phys_to_virt(__atags_pointer);
	else if (mdesc->boot_params)
		tags = phys_to_virt(mdesc->boot_params);
+	else if (class)
+		tags = phys_to_virt(class->boot_params);

equivalent and much simpler?

HS





More information about the linux-arm-kernel mailing list