[PATCH] ARM: imx: replace imx6q_restart() with mxc_restart()

Nathan Lynch Nathan_Lynch at mentor.com
Tue Oct 8 11:32:53 EDT 2013


On 10/06/2013 04:06 AM, Shawn Guo wrote:
> The imx6q_restart() works fine with normal reboot but will run into
> problem with emergency reboot like sysrq-b.  In that case, of_iomap()
> gets called from interrupt context and hence triggers the BUG_ON in
> __get_vm_area_node().
> 
> Actually, since commit c1e31d1 (ARM: imx: create
> mxc_arch_reset_init_dt() for DT boot), imx6q/dl should try to use
> mxc_restart() by calling mxc_arch_reset_init_dt() beforehand, where
> things like of_iomap() can be done.
> 
> The patch updates mxc_restart() a little bit to get it work for imx6q/dl
> and kill imx6q_restart() completely.
> 
> Reported-by: Nathan Lynch <nathan_lynch at mentor.com>
> Signed-off-by: Shawn Guo <shawn.guo at linaro.org>

Thanks Shawn, works for me.  One minor comment on the patch below.


> diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
> index 7230cf8..9ebca9e 100644
> --- a/arch/arm/mach-imx/common.h
> +++ b/arch/arm/mach-imx/common.h
> @@ -130,7 +130,11 @@ static inline void imx_smp_prepare(void) {}
>  static inline void imx_scu_standby_enable(void) {}
>  #endif
>  extern void imx_src_init(void);
> +#ifdef CONFIG_HAVE_IMX_SRC
>  extern void imx_src_prepare_restart(void);
> +#else
> +extern inline void imx_src_prepare_restart(void) {}

Should be static inline?




More information about the linux-arm-kernel mailing list