In pmap_kenter_pa honour VM_PROT_EXECUTE - otherwise LKMs are not mapped

executable.
Fixes PR port-sparc64/36376.
This commit is contained in:
martin 2007-05-23 09:36:22 +00:00
parent 48290fcae6
commit dad9937fa5
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.189 2007/05/17 14:51:32 yamt Exp $ */
/* $NetBSD: pmap.c,v 1.190 2007/05/23 09:36:22 martin Exp $ */
/*
*
* Copyright (C) 1996-1999 Eduardo Horvath.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.189 2007/05/17 14:51:32 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.190 2007/05/23 09:36:22 martin Exp $");
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
@ -1484,6 +1484,8 @@ pmap_kenter_pa(va, pa, prot)
/* We don't track mod/ref here. */
if (prot & VM_PROT_WRITE)
tte.data |= TLB_REAL_W|TLB_W;
if (prot & VM_PROT_EXECUTE)
tte.data |= TLB_EXEC;
tte.data |= TLB_TSB_LOCK; /* wired */
ptp = 0;