Tue Jul 21 07:08:57 2009 UTC ()
protect C constructs from assembler source inclusion.


(nisimura)
diff -r1.12 -r1.13 src/sys/arch/powerpc/include/oea/bat.h

cvs diff -r1.12 -r1.13 src/sys/arch/powerpc/include/oea/bat.h (expand / switch to context diff)
--- src/sys/arch/powerpc/include/oea/bat.h 2008/04/28 20:23:32 1.12
+++ src/sys/arch/powerpc/include/oea/bat.h 2009/07/21 07:08:57 1.13
@@ -1,4 +1,4 @@
-/*	$NetBSD: bat.h,v 1.12 2008/04/28 20:23:32 martin Exp $	*/
+/*	$NetBSD: bat.h,v 1.13 2009/07/21 07:08:57 nisimura Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #ifndef	_POWERPC_OEA_BAT_H_
 #define	_POWERPC_OEA_BAT_H_
 
-#ifndef _LOCORE
+#if defined(_KERNEL) && !defined(_LOCORE)
 struct bat {
 	register_t batu;
 	register_t batl;
@@ -196,8 +196,7 @@
 
 #define	BAT_VA2IDX(va)	((va) >> ADDR_SR_SHFT)
 
-#ifdef	_KERNEL
-#ifndef _LOCORE
+#if defined(_KERNEL) && !defined(_LOCORE)
 void oea_batinit(paddr_t, ...);
 void oea_iobat_add(paddr_t, register_t);
 void oea_iobat_remove(paddr_t);
@@ -205,7 +204,6 @@
 #if !defined (PPC_OEA64)
 extern struct bat battable[];
 #endif /* PPC_OEA */
-#endif
 #endif
 
 #endif	/* _POWERPC_OEA_BAT_H_ */