Module Name:    src
Committed By:   tsutsui
Date:           Mon Jul 20 16:45:50 UTC 2009

Modified Files:
        src/sys/arch/pmax/pmax: memc_3min.c

Log Message:
Sprinkle keyword volatile around device register accesses.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/pmax/memc_3min.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/pmax/pmax/memc_3min.c
diff -u src/sys/arch/pmax/pmax/memc_3min.c:1.10 src/sys/arch/pmax/pmax/memc_3min.c:1.11
--- src/sys/arch/pmax/pmax/memc_3min.c:1.10	Sun Dec 11 12:18:39 2005
+++ src/sys/arch/pmax/pmax/memc_3min.c	Mon Jul 20 16:45:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: memc_3min.c,v 1.10 2005/12/11 12:18:39 christos Exp $	*/
+/*	$NetBSD: memc_3min.c,v 1.11 2009/07/20 16:45:50 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -79,7 +79,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: memc_3min.c,v 1.10 2005/12/11 12:18:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: memc_3min.c,v 1.11 2009/07/20 16:45:50 tsutsui Exp $");
 
 /*
  * Motherboard memory error contoller used in both
@@ -105,12 +105,12 @@
 	int mer, adr, siz, err;
 	static int errintr_cnt = 0;
 
-	siz = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MSR);
-	mer = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MER);
-	adr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_AER);
+	siz = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MSR);
+	mer = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MER);
+	adr = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_AER);
 
 	/* clear interrupt bit */
-	*(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0;
+	*(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0;
 
 	err = 0;	/* XXX gcc */
 	switch (mer & KMIN_MER_LASTBYTE) {

Reply via email to