[PATCH 1/8] powerpc: set up OF properties for ppc32 kexec

Michael Ellerman michael at ellerman.id.au
Thu Aug 7 20:44:27 EST 2008


On Fri, 2008-08-01 at 18:14 +0400, Anton Vorontsov wrote:
> From: Dale Farnsworth <dale at farnsworth.org>
> 
> Refactor the setting of kexec OF properties, moving the common code
> from machine_kexec_64.c to machine_kexec.c where it can be used on
> both ppc64 and ppc32.  This is needed for kexec to work on ppc32
> platforms.

Hi Anton,


> diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
> index aab7688..a625673 100644
> --- a/arch/powerpc/kernel/machine_kexec.c
> +++ b/arch/powerpc/kernel/machine_kexec.c
...
> +
> +static int __init kexec_setup(void)
> +{
> +	struct device_node *node;
> +
> +	node = of_find_node_by_path("/chosen");
> +	if (!node)
> +		return -ENOENT;
> +
> +	kernel_end = __pa(_end);
> +	prom_add_property(node, &kernel_end_prop);
> +
> +	of_node_put(node);
> +	return 0;
> +}
> +__initcall(kexec_setup);

__initcall() is supposedly deprecated, use device_initcall() instead.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080807/89f4ded9/attachment.pgp>


More information about the Linuxppc-dev mailing list