From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5E128B7BE6 for ; Mon, 5 Oct 2009 07:27:00 +1100 (EST) Subject: Re: [PATCH] powerpc/8xx: fix regression introduced by cache coherency rewrite From: Benjamin Herrenschmidt To: Joakim Tjernlund In-Reply-To: References: <20090929210331.GA25779@laura.chatsunix.int.mrv.com> <20090930090002.GA2928@compile2.chatsunix.int.mrv.com> <1254350159.5699.21.camel@pasglop> <20091002214949.GA20514@b07421-ec1.am.freescale.net> <1254558678.7122.7.camel@pasglop> Content-Type: text/plain; charset="UTF-8" Date: Mon, 05 Oct 2009 07:26:42 +1100 Message-Id: <1254688002.7122.28.camel@pasglop> Mime-Version: 1.0 Cc: Scott Wood , "linuxppc-dev@ozlabs.org" , Rex Feany List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sun, 2009-10-04 at 10:35 +0200, Joakim Tjernlund wrote: > Benjamin Herrenschmidt wrote on 03/10/2009 12:57:28: > > > > On Sat, 2009-10-03 at 11:24 +0200, Joakim Tjernlund wrote: > > > > > > So yes, there is a missing _tlbil_va() missing for 8xx somewhere > > > but there is something more too. > > > Maybe your new filter functions and my > > > powerpc, 8xx: DTLB Error must check for more errors. > > > will do the trick? > > > > Well, if we can't tell between a load and a store on a TLB miss, then > > we should probably let it create an unpopulated entry in all cases, > > so that we do take a proper DSI/ISI the second time around, which > > would then tell us where we come from... > > While looking closer on 8xx TLB handling I noticed we were taking > an extra TLB Error when making a page dirty. Tracked it down to: > static inline pte_t pte_mkdirty(pte_t pte) { > pte_val(pte) |= _PAGE_DIRTY; return pte; } > pte_mkdirty does not set HWWRITE thus forcing a new > TLB error to clear it. Adding HWWRITE to pte_mkdirty fixes the > problem. We should just get rid of HWWRITE like I did for 44x and BookE. > Looking at (especially pte_mkclean): > static inline pte_t pte_wrprotect(pte_t pte) { > pte_val(pte) &= ~(_PAGE_RW | _PAGE_HWWRITE); return pte; } > static inline pte_t pte_mkclean(pte_t pte) { > pte_val(pte) &= ~(_PAGE_DIRTY | _PAGE_HWWRITE); return pte; } > > it looks like a mistake not to include HWWRITE in pte_mkdirty(), > what do you think? Maybe yes. No big deal right now, we have more important problems to fix no ? :-) Ben.