[PATCH 11/11] powerpc/microwatt: Disable interrupts in boot wrapper main program

Nicholas Piggin npiggin at gmail.com
Tue Jun 15 11:21:27 AEST 2021


Excerpts from Paul Mackerras's message of June 15, 2021 9:05 am:
> This ensures that we don't get a decrementer interrupt arriving before
> we have set up a handler for it.

Would this be better off merged in the previous patch (maybe with 
comment)? Why don't other platform_init()s seem to require this?

Thanks,
Nick

> 
> Signed-off-by: Paul Mackerras <paulus at ozlabs.org>
> ---
>  arch/powerpc/boot/microwatt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/boot/microwatt.c b/arch/powerpc/boot/microwatt.c
> index ac922dd0aa4d..86a07bceaadf 100644
> --- a/arch/powerpc/boot/microwatt.c
> +++ b/arch/powerpc/boot/microwatt.c
> @@ -12,6 +12,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
>  {
>  	unsigned long heapsize = 16*1024*1024 - (unsigned long)_end;
>  
> +	__asm__ volatile("mtmsrd %0,1" : : "r" (0));
>  	simple_alloc_init(_end, heapsize, 32, 64);
>  	fdt_init(_dtb_start);
>  	serial_console_init();
> -- 
> 2.31.1
> 
> 


More information about the Linuxppc-dev mailing list