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 When allocating the kernel virtual addres...
details: https://anonhg.NetBSD.org/src/rev/0872f39867a3
branches: trunk
changeset: 782252:0872f39867a3
user: matt <matt%NetBSD.org@localhost>
date: Tue Oct 23 22:50:00 2012 +0000
description:
When allocating the kernel virtual addresses, make sure to match the
color of the user addresses.
diffstat:
sys/arch/arm/arm32/vm_machdep.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r c43f1a0fae2c -r 0872f39867a3 sys/arch/arm/arm32/vm_machdep.c
--- a/sys/arch/arm/arm32/vm_machdep.c Tue Oct 23 20:44:22 2012 +0000
+++ b/sys/arch/arm/arm32/vm_machdep.c Tue Oct 23 22:50:00 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.60 2012/08/29 07:09:12 matt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.61 2012/10/23 22:50:00 matt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.60 2012/08/29 07:09:12 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.61 2012/10/23 22:50:00 matt Exp $");
#include "opt_armfpe.h"
#include "opt_pmap_debug.h"
@@ -251,7 +251,8 @@
faddr = trunc_page((vaddr_t)bp->b_data);
off = (vaddr_t)bp->b_data - faddr;
len = round_page(off + len);
- taddr = uvm_km_alloc(phys_map, len, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+ taddr = uvm_km_alloc(phys_map, len, atop(faddr) & uvmexp.colormask,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA | UVM_KMF_COLORMATCH);
bp->b_data = (void *)(taddr + off);
/*
Home |
Main Index |
Thread Index |
Old Index