From 39f3b5a837df091e3fca7a51a45c66ed1edec96d Mon Sep 17 00:00:00 2001 From: miod Date: Sun, 7 Aug 2022 19:39:25 +0000 Subject: [PATCH] Move fallback PMAP_PREFER definitions from uvm_map.c to uvm_pmap.h for them to be available to other files. NFC ok kettenis@ mpi@ --- sys/uvm/uvm_map.c | 11 +---------- sys/uvm/uvm_pmap.h | 8 +++++++- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 77c2727fe86..d90ebdc62e9 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.291 2022/05/04 14:58:26 mpi Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.292 2022/08/07 19:39:25 miod Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -223,15 +223,6 @@ void vmspace_validate(struct vm_map*); #define vmspace_validate(_map) do {} while (0) #endif -/* - * All architectures will have pmap_prefer. - */ -#ifndef PMAP_PREFER -#define PMAP_PREFER_ALIGN() (vaddr_t)PAGE_SIZE -#define PMAP_PREFER_OFFSET(off) 0 -#define PMAP_PREFER(addr, off) (addr) -#endif - /* * The kernel map will initially be VM_MAP_KSIZE_INIT bytes. * Every time that gets cramped, we grow by at least VM_MAP_KSIZE_DELTA bytes. diff --git a/sys/uvm/uvm_pmap.h b/sys/uvm/uvm_pmap.h index 06de404d36e..e971573c5f1 100644 --- a/sys/uvm/uvm_pmap.h +++ b/sys/uvm/uvm_pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmap.h,v 1.29 2019/12/08 05:22:44 visa Exp $ */ +/* $OpenBSD: uvm_pmap.h,v 1.30 2022/08/07 19:39:25 miod Exp $ */ /* $NetBSD: uvm_pmap.h,v 1.1 2000/06/27 09:00:14 mrg Exp $ */ /* @@ -101,6 +101,12 @@ typedef struct pmap_statistics *pmap_statistics_t; #define PMAP_WC 0 #endif +#ifndef PMAP_PREFER +#define PMAP_PREFER_ALIGN() 0 +#define PMAP_PREFER_OFFSET(off) 0 +#define PMAP_PREFER(addr, off) (addr) +#endif + #ifdef _KERNEL __BEGIN_DECLS #ifndef pmap_activate -- 2.20.1