[U-Boot] [Patch] make reset_cpu nonreturn.
Marek Vasut
marex at denx.de
Tue Sep 11 08:53:23 CEST 2012
Dear Pavel Machek,
> Hi!
>
> > > From: Dinh Nguyen <dinguyen at altera.com>
> > >
> > > Add minimal support for Altera's SOCFPGA Cyclone 5 hardware.
> > >
> > > Applied on top of trini/WIP/spl-improvements v6
> >
> > [...]
> >
> > __noreturn attribute to reset_cpu() is still missing, but that's a minor
> > thing.
>
> Hmm, I thought about it, but I guess the right solution is below.
You sure it's propagated through to the function (aka. that it's not ignored) ?
If so, WFM.
> ---
>
> reset_cpu should never return, annotate it as such.
>
> Signed-off-by: Pavel Machek <pavel at denx.de>
>
> diff --git a/include/common.h b/include/common.h
> index 55025c0..e57301f 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -582,7 +582,7 @@ int checkicache (void);
> int checkdcache (void);
> void upmconfig (unsigned int, unsigned int *, unsigned int);
> ulong get_tbclk (void);
> -void reset_cpu (ulong addr);
> +void reset_cpu (ulong addr) __attribute__((noreturn));
> #if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
> void ft_cpu_setup(void *blob, bd_t *bd);
> #ifdef CONFIG_PCI
Best regards,
Marek Vasut
More information about the U-Boot
mailing list