Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcarm/hpcarm Mark cpu_reset as dead and add an exp...



details:   https://anonhg.NetBSD.org/src/rev/25561bba7341
branches:  trunk
changeset: 327238:25561bba7341
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Mar 02 13:27:38 2014 +0000

description:
Mark cpu_reset as dead and add an explicit __builtin_unreachable for a
terminal function call for clang's noreturn diagnostic.

diffstat:

 sys/arch/hpcarm/hpcarm/hpc_machdep.c     |  6 +++---
 sys/arch/hpcarm/hpcarm/kloader_machdep.c |  7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (62 lines):

diff -r 3d6bf2f63b16 -r 25561bba7341 sys/arch/hpcarm/hpcarm/hpc_machdep.c
--- a/sys/arch/hpcarm/hpcarm/hpc_machdep.c      Sun Mar 02 13:26:30 2014 +0000
+++ b/sys/arch/hpcarm/hpcarm/hpc_machdep.c      Sun Mar 02 13:27:38 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpc_machdep.c,v 1.102 2013/08/18 22:26:51 matt Exp $   */
+/*     $NetBSD: hpc_machdep.c,v 1.103 2014/03/02 13:27:38 joerg Exp $  */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.102 2013/08/18 22:26:51 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.103 2014/03/02 13:27:38 joerg Exp $");
 
 #include "opt_cputypes.h"
 #include "opt_kloader.h"
@@ -101,7 +101,7 @@
 void (*__sleep_func)(void *);
 void *__sleep_ctx;
 
-void (*__cpu_reset)(void) = cpu_reset;
+void (*__cpu_reset)(void) __dead = cpu_reset;
 
 u_int initarm(int, char **, struct bootinfo *);
 #if defined(CPU_SA1100) || defined(CPU_SA1110)
diff -r 3d6bf2f63b16 -r 25561bba7341 sys/arch/hpcarm/hpcarm/kloader_machdep.c
--- a/sys/arch/hpcarm/hpcarm/kloader_machdep.c  Sun Mar 02 13:26:30 2014 +0000
+++ b/sys/arch/hpcarm/hpcarm/kloader_machdep.c  Sun Mar 02 13:27:38 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kloader_machdep.c,v 1.1 2012/03/31 14:02:54 nonaka Exp $       */
+/*     $NetBSD: kloader_machdep.c,v 1.2 2014/03/02 13:27:38 joerg Exp $        */
 
 /*-
  * Copyright (C) 2012 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kloader_machdep.c,v 1.1 2012/03/31 14:02:54 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kloader_machdep.c,v 1.2 2014/03/02 13:27:38 joerg Exp $");
 
 #include "debug_kloader.h"
 #include "opt_cputypes.h"
@@ -67,7 +67,7 @@
 void
 kloader_hpcarm_reset(void)
 {
-       extern void (*__cpu_reset)(void);
+       extern void (*__cpu_reset)(void) __dead;
 
        __cpu_reset();
        /*NOTREACHED*/
@@ -83,6 +83,7 @@
 
        /* jump to 2nd boot-loader */
        (*func)(kbi, tag);
+       __builtin_unreachable();
 }
 
 /*



Home | Main Index | Thread Index | Old Index