From 2766819605d499d1c960be9c856e6f4ad548747e Mon Sep 17 00:00:00 2001 From: Ariane van der Steldt Date: Thu, 28 Apr 2011 20:53:33 +0000 Subject: Expose pmap_prefer parameters. This will enable uvm_map to behave intelligently when allocating. Prodded by deraadt to commit this. --- sys/arch/m68k/include/pmap_motorola.h | 8 +++++++- sys/arch/m68k/m68k/pmap_motorola.c | 5 +---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h index 02c819d6710..f4f2e5c1a13 100644 --- a/sys/arch/m68k/include/pmap_motorola.h +++ b/sys/arch/m68k/include/pmap_motorola.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_motorola.h,v 1.22 2011/03/23 16:54:35 pirofti Exp $ */ +/* $OpenBSD: pmap_motorola.h,v 1.23 2011/04/28 20:53:32 ariane Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -139,6 +139,12 @@ void pmap_kenter_cache(vaddr_t, paddr_t, pt_entry_t); #ifdef M68K_MMU_HP vaddr_t pmap_prefer(vaddr_t, vaddr_t); #define PMAP_PREFER(foff, va) pmap_prefer((foff), (va)) + +extern int pmap_aliasmask; /* separation at which VA aliasing is ok */ +/* pmap prefer alignment */ +#define PMAP_PREFER_ALIGN() (pmap_aliasmask ? pmap_aliasmask + 1 : 0) +/* pmap prefer offset */ +#define PMAP_PREFER_OFFSET(of) ((of) & pmap_aliasmask) #endif #endif /* _KERNEL */ diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c index c19ef01ad53..fef76f80f55 100644 --- a/sys/arch/m68k/m68k/pmap_motorola.c +++ b/sys/arch/m68k/m68k/pmap_motorola.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap_motorola.c,v 1.59 2010/12/06 20:57:16 miod Exp $ */ +/* $OpenBSD: pmap_motorola.c,v 1.60 2011/04/28 20:53:32 ariane Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -276,9 +276,6 @@ vaddr_t virtual_end; /* VA of last avail page (end of kernel AS) */ TAILQ_HEAD(pv_page_list, pv_page) pv_page_freelist; int pv_nfree; -#if defined(M68K_MMU_HP) -extern int pmap_aliasmask; /* separation at which VA aliasing is ok */ -#endif #if defined(M68040) || defined(M68060) int protostfree; /* prototype (default) free ST map */ #endif -- cgit v1.2.3