Module Name: src
Committed By: jmcneill
Date: Sat Jan 20 00:18:20 UTC 2024
Modified Files:
src/sys/arch/powerpc/oea: oea_machdep.c
Log Message:
powerpc: oea: Fix prefetchable mappings
Prefetchable mappings need PMAP_NOCACHE to get write-combine semantics.
To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/powerpc/oea/oea_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/powerpc/oea/oea_machdep.c
diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.84 src/sys/arch/powerpc/oea/oea_machdep.c:1.85
--- src/sys/arch/powerpc/oea/oea_machdep.c:1.84 Sun Aug 7 09:37:46 2022
+++ src/sys/arch/powerpc/oea/oea_machdep.c Sat Jan 20 00:18:19 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: oea_machdep.c,v 1.84 2022/08/07 09:37:46 andvar Exp $ */
+/* $NetBSD: oea_machdep.c,v 1.85 2024/01/20 00:18:19 jmcneill Exp $ */
/*
* Copyright (C) 2002 Matt Thomas
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.84 2022/08/07 09:37:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.85 2024/01/20 00:18:19 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_altivec.h"
@@ -1064,7 +1064,7 @@ mapiodev(paddr_t pa, psize_t len, bool p
for (; len > 0; len -= PAGE_SIZE) {
pmap_kenter_pa(taddr, faddr, VM_PROT_READ | VM_PROT_WRITE,
- (prefetchable ? PMAP_MD_PREFETCHABLE : PMAP_NOCACHE));
+ PMAP_NOCACHE | (prefetchable ? PMAP_MD_PREFETCHABLE : 0));
faddr += PAGE_SIZE;
taddr += PAGE_SIZE;
}