From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QqJbr-0001Et-B3 for barebox@lists.infradead.org; Mon, 08 Aug 2011 06:46:48 +0000 From: Sascha Hauer Date: Mon, 8 Aug 2011 08:46:36 +0200 Message-Id: <1312786003-14734-2-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1312786003-14734-1-git-send-email-s.hauer@pengutronix.de> References: <1312786003-14734-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/8] ARM: add missing volatile in get_cr() To: barebox@lists.infradead.org Without it, the compiler optimizes away subsequent reads of the control register. Signed-off-by: Sascha Hauer --- arch/arm/include/asm/system.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 77d6305..1d67492 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -59,7 +59,7 @@ static inline unsigned int get_cr(void) { unsigned int val; - asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); + asm volatile ("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); return val; } -- 1.7.5.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox