Re: [PATCH v6 12/36] nds32: Process management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu <green.hu@xxxxxxxxx> wrote:

> +void machine_restart(char *__unused)
> +{
> +       /*
> +        * Clean and disable cache, and turn off interrupts
> +        */
> +       cpu_proc_fin();
> +
> +       /*
> +        * Tell the mm system that we are going to reboot -
> +        * we may need it to insert some 1:1 mappings so that
> +        * soft boot works.
> +        */
> +       setup_mm_for_reboot(reboot_mode);
> +
> +       /*
> +        * Now call the architecture specific reboot code.
> +        */
> +       arch_reset(reboot_mode);
> +
> +       /*
> +        * Whoops - the architecture was unable to reboot.
> +        * Tell the user!
> +        */
> +       mdelay(1000);
> +       pr_info("Reboot failed -- System halted\n");
> +       while (1) ;
> +}

You should insert a call to do_kernel_restart() in this function to allow e.g. a
watchdog driver to provide a machine-specific reboot method. Otherwise
the patch looks good to me,

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux