public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch] make reset_cpu nonreturn.
Date: Tue, 11 Sep 2012 02:17:41 +0200	[thread overview]
Message-ID: <20120911001740.GA6149@elf.ucw.cz> (raw)
In-Reply-To: <201209010047.15704.marex@denx.de>

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.

---

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

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2012-09-11  0:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 23:39 [U-Boot] [PATCHv2] ARM: Add Altera SOCFPGA Cyclone5 dinguyen at altera.com
2012-08-31 22:47 ` Marek Vasut
2012-09-11  0:17   ` Pavel Machek [this message]
2012-09-11  6:53     ` [U-Boot] [Patch] make reset_cpu nonreturn Marek Vasut
2012-09-12  9:16       ` Pavel Machek
2012-09-11  0:21   ` [U-Boot] [PATCHv2] ARM: Add Altera SOCFPGA Cyclone5 Pavel Machek
2012-09-11  5:53     ` Stefan Roese
2012-09-12  9:23       ` Pavel Machek
2012-09-12 16:56       ` Tom Rini
2012-09-13  6:51         ` Stefan Roese
2012-09-11  6:54     ` Marek Vasut
2012-09-25 12:26       ` Pavel Machek
2012-09-25 13:58         ` Marek Vasut
2012-09-12 17:02     ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120911001740.GA6149@elf.ucw.cz \
    --to=pavel@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox