Return-Path: Received: from aun.it.uu.se (aun.it.uu.se [130.238.12.36]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smtp.srv.it.uu.se", Issuer "Uppsala University CA" (not verified)) by ozlabs.org (Postfix) with ESMTP id 48E552BD81 for ; Sat, 16 Oct 2004 21:35:59 +1000 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <16753.1940.232184.119064@alkaid.it.uu.se> Date: Sat, 16 Oct 2004 13:35:48 +0200 From: Mikael Pettersson To: Benjamin Herrenschmidt In-Reply-To: <1097925801.8965.42.camel@gaston> References: <16752.64288.975262.790788@alkaid.it.uu.se> <1097925801.8965.42.camel@gaston> Cc: linuxppc-dev@ozlabs.org, Paul Mackerras Subject: Re: 745x coherency fix for 2.4? List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Benjamin Herrenschmidt writes: > > > > -#ifdef CONFIG_SMP > > - if ((flags & _PAGE_NO_CACHE) == 0) > > + if (((flags & _PAGE_NO_CACHE) == 0) && > > + (cur_cpu_spec[0]->cpu_features & CPU_FTR_NEED_COHERENT)) > > flags |= _PAGE_COHERENT; > > -#endif > > Wouldn't your patch result in _not_ setting _PAGE_COHERENT on non-broken > CPUs when CONFIG_SMP is set ? The cputable.c change adds CPU_FTR_NEED_COHERENT to all CPUs when CONFIG_SMP is set. That's why the changes from #ifdef CONFIG_SMP to checking this feature flag work for both SMP and 745x. The logic is straight from the 2.6 kernel; I only adapted it where the 2.4 kernel was different, like some of the cputable entries were missing in 2.4. /Mikael