Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/include/oea provide a wrapper for mapiodev(...



details:   https://anonhg.NetBSD.org/src/rev/9cefa15a9aa1
branches:  trunk
changeset: 321564:9cefa15a9aa1
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Mar 22 21:26:27 2018 +0000

description:
provide a wrapper for mapiodev() - if we have BATs just use the paddr, if
we don't then actually map it

diffstat:

 sys/arch/powerpc/include/oea/cpufeat.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 864b9998379b -r 9cefa15a9aa1 sys/arch/powerpc/include/oea/cpufeat.h
--- a/sys/arch/powerpc/include/oea/cpufeat.h    Thu Mar 22 21:19:28 2018 +0000
+++ b/sys/arch/powerpc/include/oea/cpufeat.h    Thu Mar 22 21:26:27 2018 +0000
@@ -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_ */



Home | Main Index | Thread Index | Old Index