Module Name:    src
Committed By:   joerg
Date:           Thu Jul  4 22:59:28 UTC 2013

Modified Files:
        src/sys/arch/powerpc/oea: oea_machdep.c

Log Message:
When trying to write into page 0, use volatile to force the compiler to
actually create this access.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/powerpc/oea/oea_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/oea/oea_machdep.c
diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.64 src/sys/arch/powerpc/oea/oea_machdep.c:1.65
--- src/sys/arch/powerpc/oea/oea_machdep.c:1.64	Thu Feb 16 07:59:46 2012
+++ src/sys/arch/powerpc/oea/oea_machdep.c	Thu Jul  4 22:59:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: oea_machdep.c,v 1.64 2012/02/16 07:59:46 matt Exp $	*/
+/*	$NetBSD: oea_machdep.c,v 1.65 2013/07/04 22:59:27 joerg Exp $	*/
 
 /*
  * Copyright (C) 2002 Matt Thomas
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.64 2012/02/16 07:59:46 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.65 2013/07/04 22:59:27 joerg Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -280,8 +280,8 @@ oea_init(void (*handler)(void))
 	 * Install a branch absolute to trap0 to force a panic.
 	 */
 	if ((uintptr_t)trap0 < 0x2000000) {
-		*(uint32_t *) 0 = 0x7c6802a6;
-		*(uint32_t *) 4 = 0x48000002 | (uintptr_t) trap0;
+		*(volatile uint32_t *) 0 = 0x7c6802a6;
+		*(volatile uint32_t *) 4 = 0x48000002 | (uintptr_t) trap0;
 	}
 
 	/*

Reply via email to