Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Use the new flags argument to pmap_kenter_pa for PM...
details: https://anonhg.NetBSD.org/src/rev/60dce7c12991
branches: trunk
changeset: 748950:60dce7c12991
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Nov 11 16:08:31 2009 +0000
description:
Use the new flags argument to pmap_kenter_pa for PMAP_NOCACHE.
diffstat:
sys/arch/hp700/hp700/mainbus.c | 6 +++---
sys/arch/hppa/hppa/pmap.c | 8 ++++----
sys/arch/hppa/include/pmap.h | 9 ++++++---
3 files changed, 13 insertions(+), 10 deletions(-)
diffs (93 lines):
diff -r dcb931e63455 -r 60dce7c12991 sys/arch/hp700/hp700/mainbus.c
--- a/sys/arch/hp700/hp700/mainbus.c Wed Nov 11 15:49:05 2009 +0000
+++ b/sys/arch/hp700/hp700/mainbus.c Wed Nov 11 16:08:31 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.55 2009/11/07 07:27:43 cegger Exp $ */
+/* $NetBSD: mainbus.c,v 1.56 2009/11/11 16:08:31 skrll Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.55 2009/11/07 07:27:43 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.56 2009/11/11 16:08:31 skrll Exp $");
#include "locators.h"
#include "power.h"
@@ -1304,7 +1304,7 @@
TAILQ_FOREACH(pg, pglist, pageq.queue) {
KASSERT(size != 0);
pa = VM_PAGE_TO_PHYS(pg);
- pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE | PMAP_NC, 0);
+ pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE, PMAP_NOCACHE);
va += PAGE_SIZE;
size -= PAGE_SIZE;
}
diff -r dcb931e63455 -r 60dce7c12991 sys/arch/hppa/hppa/pmap.c
--- a/sys/arch/hppa/hppa/pmap.c Wed Nov 11 15:49:05 2009 +0000
+++ b/sys/arch/hppa/hppa/pmap.c Wed Nov 11 16:08:31 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.54 2009/11/07 07:27:44 cegger Exp $ */
+/* $NetBSD: pmap.c,v 1.55 2009/11/11 16:08:31 skrll Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.54 2009/11/07 07:27:44 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.55 2009/11/11 16:08:31 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1780,7 +1780,7 @@
opte = pmap_pte_get(pde, va);
pte = pa | PTE_PROT(TLB_WIRED | TLB_REFTRAP |
pmap_prot(pmap_kernel(), prot & VM_PROT_ALL));
- if (pa >= HPPA_IOBEGIN || (prot & PMAP_NC))
+ if (pa >= HPPA_IOBEGIN || (flags & PMAP_NOCACHE))
pte |= PTE_PROT(TLB_UNCACHEABLE);
pmap_kernel()->pm_stats.wired_count++;
pmap_kernel()->pm_stats.resident_count++;
@@ -1797,7 +1797,7 @@
mutex_enter(&pg->mdpage.pvh_lock);
- if (prot & PMAP_NC)
+ if (flags & PMAP_NOCACHE)
pg->mdpage.pvh_attrs |= PVF_NC;
else {
struct pv_entry *pve;
diff -r dcb931e63455 -r 60dce7c12991 sys/arch/hppa/include/pmap.h
--- a/sys/arch/hppa/include/pmap.h Wed Nov 11 15:49:05 2009 +0000
+++ b/sys/arch/hppa/include/pmap.h Wed Nov 11 16:08:31 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.21 2009/05/24 06:53:35 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.22 2009/11/11 16:08:31 skrll Exp $ */
/* $OpenBSD: pmap.h,v 1.35 2007/12/14 18:32:23 deraadt Exp $ */
@@ -56,8 +56,6 @@
struct pmap_statistics pm_stats;
};
-#define PMAP_NC 0x100
-
/*
* Flags that indicate attributes of pages or mappings of pages.
*
@@ -208,6 +206,11 @@
((((va) & 0xc0000000) != 0xc0000000) ? \
(pmap)->pm_space : HPPA_SID_KERNEL)
+/*
+ * MD flags that we use for pmap_kenter_pa:
+ */
+#define PMAP_NOCACHE 0x01 /* set the non-cacheable bit */
+
#endif /* _KERNEL */
#endif /* _HPPA_PMAP_H_ */
Home |
Main Index |
Thread Index |
Old Index