Module Name:    src
Committed By:   matt
Date:           Tue Jul 26 03:34:13 UTC 2011

Modified Files:
        src/sys/arch/powerpc/booke [matt-nb5-pq3]: e500_tlb.c

Log Message:
When matching a TLB1 entry for an I/O mapping, make sure it's not cachable.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/powerpc/booke/e500_tlb.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/booke/e500_tlb.c
diff -u src/sys/arch/powerpc/booke/e500_tlb.c:1.1.2.1 src/sys/arch/powerpc/booke/e500_tlb.c:1.1.2.2
--- src/sys/arch/powerpc/booke/e500_tlb.c:1.1.2.1	Fri Jan  7 01:26:19 2011
+++ src/sys/arch/powerpc/booke/e500_tlb.c	Tue Jul 26 03:34:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_tlb.c,v 1.1.2.1 2011/01/07 01:26:19 matt Exp $	*/
+/*	$NetBSD: e500_tlb.c,v 1.1.2.2 2011/07/26 03:34:13 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.1.2.1 2011/01/07 01:26:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.1.2.2 2011/07/26 03:34:13 matt Exp $");
 
 #include <sys/param.h>
 
@@ -646,7 +646,8 @@
 	 * See if we have a TLB entry for the pa.  If completely falls within
 	 * mark the reference and return the pa.
 	 */
-	if (xtlb && pa + len <= xtlb->e_tlb.tlb_va + xtlb->e_tlb.tlb_size) {
+	if (xtlb && pa + len <= xtlb->e_tlb.tlb_va + xtlb->e_tlb.tlb_size
+	    && (xtlb->e_tlb.tlb_pte & PTE_WIG) == (PTE_I|PTE_G)) {
 		xtlb->e_refcnt++;
 		return (void *) pa;
 	}

Reply via email to