From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e5.ny.us.ibm.com (e5.ny.us.ibm.com [32.97.182.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e5.ny.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 0C534DDEE4 for ; Thu, 28 Aug 2008 20:36:59 +1000 (EST) Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m7SAalKN018715 for ; Thu, 28 Aug 2008 06:36:47 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m7SAalRk224046 for ; Thu, 28 Aug 2008 06:36:47 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m7SAakUw003592 for ; Thu, 28 Aug 2008 06:36:47 -0400 Date: Thu, 28 Aug 2008 06:36:44 -0400 From: Josh Boyer To: vb Subject: Re: mmap and ppc460gt Message-ID: <20080828063644.2ee4cf7c@zod.rchland.ibm.com> In-Reply-To: References: <200808271013.18659.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: Roland Dreier , Arnd Bergmann , linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 27 Aug 2008 20:47:24 -0700 vb wrote: > On Wed, Aug 27, 2008 at 8:12 PM, Roland Dreier wrote: > > OK, please try this and let me know if it helps: > > > > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > > index 1c93c25..98d7bf9 100644 > > --- a/arch/powerpc/mm/mem.c > > +++ b/arch/powerpc/mm/mem.c > > @@ -75,11 +75,10 @@ static inline pte_t *virt_to_kpte(unsigned long vaddr) > > > > int page_is_ram(unsigned long pfn) > > { > > - unsigned long paddr = (pfn << PAGE_SHIFT); > > - > > #ifndef CONFIG_PPC64 /* XXX for now */ > > - return paddr < __pa(high_memory); > > + return pfn < max_pfn; > > #else > > + unsigned long paddr = (pfn << PAGE_SHIFT); > > int i; > > for (i=0; i < lmb.memory.cnt; i++) { > > unsigned long base; > > > > Ronald, thank you for the hint, I actually tried something slightly different: > > return pfn < (__pa(high_memory) >> PAGE_SHIFT); > > and it worked. I guess your fix is faster, I'll try it tomorrow. > > I also checked that the problem is there in the top of the tree in > Linus' git - isn't it amazing - I guess very few people use mmap() > nowadays, everybody must be using UIO device :-) No, most people use device drivers in the kernel. josh