Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/oea When trying to write into page 0, use v...
details: https://anonhg.NetBSD.org/src/rev/f6bda732d399
branches: trunk
changeset: 787817:f6bda732d399
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Jul 04 22:59:27 2013 +0000
description:
When trying to write into page 0, use volatile to force the compiler to
actually create this access.
diffstat:
sys/arch/powerpc/oea/oea_machdep.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 477d3bb928a4 -r f6bda732d399 sys/arch/powerpc/oea/oea_machdep.c
--- a/sys/arch/powerpc/oea/oea_machdep.c Thu Jul 04 22:29:29 2013 +0000
+++ b/sys/arch/powerpc/oea/oea_machdep.c Thu Jul 04 22:59:27 2013 +0000
@@ -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 @@
* 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;
}
/*
Home |
Main Index |
Thread Index |
Old Index