diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index b9b26ab62561..226ca16d7ca6 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -3094,21 +3094,16 @@ pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, if ((m->oflags & VPO_UNMANAGED) == 0) { vm_page_aflag_set(m, PGA_WRITEABLE); /* - * Enable write permission if the access type - * indicates write intention. Emulate modified - * bit otherwise. + * XXX: Skip modified bit emulation for now. + * The emulation reveals problems + * that result in random failures + * during memory allocation on some + * platforms. + * Therefore, the page is marked RW + * immediately. */ - if ((access & VM_PROT_WRITE) != 0) { - npte &= ~(L2_APX); - /* - * The access type and permissions - * indicate that the page will be - * written as soon as returned from - * fault service. - * Mark it dirty from the outset. - */ - vm_page_dirty(m); - } + npte &= ~(L2_APX); + vm_page_dirty(m); } else npte &= ~(L2_APX); }