From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.234]) by ozlabs.org (Postfix) with ESMTP id 58BBFDDE45 for ; Thu, 28 Aug 2008 13:47:26 +1000 (EST) Received: by rv-out-0506.google.com with SMTP id f6so206810rvb.9 for ; Wed, 27 Aug 2008 20:47:24 -0700 (PDT) Message-ID: Date: Wed, 27 Aug 2008 20:47:24 -0700 From: vb Sender: vbendeb@gmail.com To: "Roland Dreier" Subject: Re: mmap and ppc460gt In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: <200808271013.18659.arnd@arndb.de> Cc: 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, 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 :-) cheers, vadim