Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hppa Define PMAP_NEED_PROCWR and provide pmap_procw...
details: https://anonhg.NetBSD.org/src/rev/0d2865e6774d
branches: trunk
changeset: 772197:0d2865e6774d
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Dec 23 16:35:00 2011 +0000
description:
Define PMAP_NEED_PROCWR and provide pmap_procwr so that the i-cache is
synchronised with the d-cache appropriately.
diffstat:
sys/arch/hppa/hppa/pmap.c | 16 ++++++++++++++--
sys/arch/hppa/include/pmap.h | 6 +++++-
2 files changed, 19 insertions(+), 3 deletions(-)
diffs (64 lines):
diff -r 90f86215efdd -r 0d2865e6774d sys/arch/hppa/hppa/pmap.c
--- a/sys/arch/hppa/hppa/pmap.c Fri Dec 23 15:31:16 2011 +0000
+++ b/sys/arch/hppa/hppa/pmap.c Fri Dec 23 16:35:00 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.83 2011/12/16 12:45:04 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.84 2011/12/23 16:35:00 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.83 2011/12/16 12:45:04 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.84 2011/12/23 16:35:00 skrll Exp $");
#include "opt_cputype.h"
@@ -1587,6 +1587,18 @@
mtctl(pmap->pm_pid, CR_PIDR2);
}
+void
+pmap_procwr(struct proc *p, vaddr_t va, size_t len)
+{
+ pmap_t pmap = p->p_vmspace->vm_map.pmap;
+
+ fdcache(pmap->pm_space, va, len);
+ sync_caches();
+ ficache(pmap->pm_space, va, len);
+ sync_caches();
+
+}
+
static inline void
pmap_flush_page(struct vm_page *pg, bool purge)
{
diff -r 90f86215efdd -r 0d2865e6774d sys/arch/hppa/include/pmap.h
--- a/sys/arch/hppa/include/pmap.h Fri Dec 23 15:31:16 2011 +0000
+++ b/sys/arch/hppa/include/pmap.h Fri Dec 23 16:35:00 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.32 2011/12/16 13:38:44 skrll Exp $ */
+/* $NetBSD: pmap.h,v 1.33 2011/12/23 16:35:00 skrll Exp $ */
/* $OpenBSD: pmap.h,v 1.35 2007/12/14 18:32:23 deraadt Exp $ */
@@ -48,6 +48,8 @@
#ifdef _KERNEL
+#define PMAP_NEED_PROCWR
+
struct pmap {
struct uvm_object pm_obj; /* object (lck by object lock) */
#define pm_lock pm_obj.vmobjlock
@@ -148,6 +150,8 @@
void pmap_remove(struct pmap *pmap, vaddr_t sva, vaddr_t eva);
void pmap_page_remove(struct vm_page *pg);
+void pmap_procwr(struct proc *, vaddr_t, size_t);
+
static inline void
pmap_deactivate(struct lwp *l)
{
Home |
Main Index |
Thread Index |
Old Index