Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 If using arm32_kvminit, don't bother mapp...
details: https://anonhg.NetBSD.org/src/rev/979deb40f8bb
branches: trunk
changeset: 795283:979deb40f8bb
user: matt <matt%NetBSD.org@localhost>
date: Sat Apr 05 22:36:18 2014 +0000
description:
If using arm32_kvminit, don't bother mapping msgbuf since it's already mapped.
diffstat:
sys/arch/arm/arm32/arm32_kvminit.c | 6 ++++--
sys/arch/arm/arm32/arm32_machdep.c | 16 +++++++++-------
2 files changed, 13 insertions(+), 9 deletions(-)
diffs (78 lines):
diff -r 476dd507fd66 -r 979deb40f8bb sys/arch/arm/arm32/arm32_kvminit.c
--- a/sys/arch/arm/arm32/arm32_kvminit.c Sat Apr 05 22:05:12 2014 +0000
+++ b/sys/arch/arm/arm32/arm32_kvminit.c Sat Apr 05 22:36:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm32_kvminit.c,v 1.26 2014/04/01 05:37:35 skrll Exp $ */
+/* $NetBSD: arm32_kvminit.c,v 1.27 2014/04/05 22:36:18 matt Exp $ */
/*
* Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved.
@@ -122,7 +122,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.26 2014/04/01 05:37:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.27 2014/04/05 22:36:18 matt Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -144,6 +144,7 @@
struct bootmem_info bootmem_info;
+extern void *msgbufaddr;
paddr_t msgbufphys;
paddr_t physical_start;
paddr_t physical_end;
@@ -549,6 +550,7 @@
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE, false);
add_pages(bmi, &msgbuf);
msgbufphys = msgbuf.pv_pa;
+ msgbufaddr = (void *)msgbuf.pv_va;
if (map_vectors_p) {
/*
diff -r 476dd507fd66 -r 979deb40f8bb sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c Sat Apr 05 22:05:12 2014 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c Sat Apr 05 22:36:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm32_machdep.c,v 1.102 2014/03/28 21:39:09 matt Exp $ */
+/* $NetBSD: arm32_machdep.c,v 1.103 2014/04/05 22:36:18 matt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.102 2014/03/28 21:39:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.103 2014/04/05 22:36:18 matt Exp $");
#include "opt_modular.h"
#include "opt_md.h"
@@ -257,7 +257,6 @@
{
vaddr_t minaddr;
vaddr_t maxaddr;
- u_int loop;
char pbuf[9];
/*
@@ -284,10 +283,13 @@
*/
/* msgbufphys was setup during the secondary boot strap */
- for (loop = 0; loop < btoc(MSGBUFSIZE); ++loop)
- pmap_kenter_pa((vaddr_t)msgbufaddr + loop * PAGE_SIZE,
- msgbufphys + loop * PAGE_SIZE,
- VM_PROT_READ|VM_PROT_WRITE, 0);
+ if (!pmap_extract(pmap_kernel(), (vaddr_t)msgbufaddr, NULL)) {
+ for (u_int loop = 0; loop < btoc(MSGBUFSIZE); ++loop) {
+ pmap_kenter_pa((vaddr_t)msgbufaddr + loop * PAGE_SIZE,
+ msgbufphys + loop * PAGE_SIZE,
+ VM_PROT_READ|VM_PROT_WRITE, 0);
+ }
+ }
pmap_update(pmap_kernel());
initmsgbuf(msgbufaddr, round_page(MSGBUFSIZE));
Home |
Main Index |
Thread Index |
Old Index