Message ID | 20120911001740.GA6149@elf.ucw.cz |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Dear Pavel Machek, > Hi! > > > > From: Dinh Nguyen <dinguyen@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@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
Hi! > > > > From: Dinh Nguyen <dinguyen@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. I think so. It is actually when optimizing the caller when "nonreturn" is important... Pavel
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