[PATCH 1/7] ARM: restart: add restart hook to machine_desc record

Tony Lindgren tony at atomide.com
Wed Nov 9 17:28:09 EST 2011


* Russell King - ARM Linux <linux at arm.linux.org.uk> [111106 09:00]:
> Add a restart hook to the machine_desc record so we don't have to
> populate all platforms with init_early methods to initialize the
> arm_pm_restart function pointer.
> 
> Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
> ---
>  arch/arm/include/asm/mach/arch.h |    1 +
>  arch/arm/kernel/setup.c          |    3 +++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
> index 7d19425..8aa397a 100644
> --- a/arch/arm/include/asm/mach/arch.h
> +++ b/arch/arm/include/asm/mach/arch.h
> @@ -45,6 +45,7 @@ struct machine_desc {
>  #ifdef CONFIG_MULTI_IRQ_HANDLER
>  	void			(*handle_irq)(struct pt_regs *);
>  #endif
> +	void			(*restart)(char, const char *);
>  };
>  
>  /*
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index bda0a21..d187d0a 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -922,6 +922,9 @@ void __init setup_arch(char **cmdline_p)
>  	paging_init(mdesc);
>  	request_standard_resources(mdesc);
>  
> +	if (mdesc->restart)
> +		arm_pm_restart = mdesc->restart;
> +
>  	unflatten_device_tree();
>  
>  #ifdef CONFIG_SMP

Good to see this happening:

Acked-by: Tony Lindgren <tony at atomide.com>



More information about the linux-arm-kernel mailing list