Module Name: src
Committed By: macallan
Date: Thu Mar 22 21:26:27 UTC 2018
Modified Files:
src/sys/arch/powerpc/include/oea: cpufeat.h
Log Message:
provide a wrapper for mapiodev() - if we have BATs just use the paddr, if
we don't then actually map it
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/include/oea/cpufeat.h
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/include/oea/cpufeat.h
diff -u src/sys/arch/powerpc/include/oea/cpufeat.h:1.4 src/sys/arch/powerpc/include/oea/cpufeat.h:1.5
--- src/sys/arch/powerpc/include/oea/cpufeat.h:1.4 Mon Apr 28 20:23:32 2008
+++ src/sys/arch/powerpc/include/oea/cpufeat.h Thu Mar 22 21:26:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufeat.h,v 1.4 2008/04/28 20:23:32 martin Exp $ */
+/* $NetBSD: cpufeat.h,v 1.5 2018/03/22 21:26:27 macallan Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -50,6 +50,10 @@
#ifdef _KERNEL
void cpu_model_init(void);
extern unsigned long oeacpufeat;
+
+#define oea_mapiodev(addr, size) ((oeacpufeat & OEACPU_NOBAT) ? \
+ mapiodev((paddr_t)(addr), (size), 0) : (void *)(addr))
+
#endif
#endif /* _POWERPC_OEA_OEAFEAT_H_ */