From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Oliver Pitzeier" Newsgroups: gmane.linux.redhat.axp.kernel Subject: RE: Problems with mm on Alpha... Date: Wed, 22 May 2002 12:10:29 +0200 Organization: =?us-ascii?Q?UPtime_Systemlosungen?= Sender: axp-kernel-list-admin@redhat.com Message-ID: <000c01c20178$e9d10c50$010b10ac@sbp.uptime.at> References: <20020508145454.A2394@jurassic.park.msu.ru> Reply-To: axp-kernel-list@redhat.com NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1022062373 19884 127.0.0.1 (22 May 2002 10:12:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 22 May 2002 10:12:53 +0000 (UTC) Cc: Return-path: Original-Received: from listman.redhat.com ([66.187.233.211]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17AT6y-0005Ab-00 for ; Wed, 22 May 2002 12:12:52 +0200 Original-Received: from listman.redhat.com (localhost.localdomain [127.0.0.1]) by listman.redhat.com (Postfix) with ESMTP id 363AA3F341; Wed, 22 May 2002 06:13:02 -0400 (EDT) Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id 270493FC4A for ; Wed, 22 May 2002 06:12:10 -0400 (EDT) Original-Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g4MACAh04915 for axp-kernel-list@listman.redhat.com; Wed, 22 May 2002 06:12:10 -0400 Original-Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g4MACAl04911 for ; Wed, 22 May 2002 06:12:10 -0400 Original-Received: from vivi.uptime.at (vivi.uptime.at [62.116.87.11]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g4MA5WM24657 for ; Wed, 22 May 2002 06:05:33 -0400 Original-Received: from LEFTIE (fw [62.116.87.2]) by vivi.uptime.at (8.11.6/8.11.6) with ESMTP id g4MABgY15962; Wed, 22 May 2002 12:11:42 +0200 Original-To: "'Ivan Kokshaysky'" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 In-Reply-To: <20020508145454.A2394@jurassic.park.msu.ru> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-MailScanner: Found to be clean X-Loop: axp-kernel-list@redhat.com Errors-To: axp-kernel-list-admin@redhat.com X-BeenThere: axp-kernel-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk X-Reply-To: List-Help: List-Post: List-Subscribe: , List-Id: Alpha Kernel issues List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.linux.redhat.axp.kernel:38 X-Report-Spam: http://spam.gmane.org/gmane.linux.redhat.axp.kernel:38 Hi Ivan! Can you remember... You sent me this patch some time ago... (8th of May as you can see). Now kernel 2.5.17 is ready, but the problem is still the same. It also was with 2.5.15. Your patch works fine with 2.5.15/17. But can Andrea or someone please add it!? Thanks a lot, Oliver PS: This mail also goes to the AXP-Kernel-List. Maybe someone is interessted!? > -----Original Message----- > From: Ivan Kokshaysky [mailto:ink@jurassic.park.msu.ru] > Sent: Wednesday, May 08, 2002 12:55 PM > To: Oliver Pitzeier > Cc: Richard Henderson; 'linux-kernel' > Subject: Re: Problems with mm on Alpha... > > > On Wed, May 08, 2002 at 11:46:28AM +0200, Oliver Pitzeier wrote: > > memory.c:80: warning: implicit declaration of function `pte_pfn' > > memory.c:81: warning: implicit declaration of function `pfn_valid' > > memory.c:83: warning: implicit declaration of function `pfn_to_page' > > New pte/pfn/page macros are defined only for i386 as yet. > Patch appended. However, CONFIG_DISCONTIGMEM is still broken in 2.5. > I hope Andrea will take a look into this some day. > > Ivan. > > --- 2.5.14/include/asm-alpha/page.h Fri May 3 04:22:55 2002 > +++ linux/include/asm-alpha/page.h Tue May 7 13:47:53 2002 > @@ -95,8 +95,12 @@ extern __inline__ int get_order(unsigned > #define __pa(x) ((unsigned long) (x) - > PAGE_OFFSET) > #define __va(x) ((void *)((unsigned > long) (x) + PAGE_OFFSET)) > #ifndef CONFIG_DISCONTIGMEM > -#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT)) > -#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr) > +#define pfn_to_page(pfn) (mem_map + (pfn)) > +#define page_to_pfn(page) ((unsigned long)((page) - mem_map)) > +#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) > + > +#define pfn_valid(pfn) ((pfn) < max_mapnr) > +#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) > >> PAGE_SHIFT) > #endif /* CONFIG_DISCONTIGMEM */ > > #define VM_DATA_DEFAULT_FLAGS (VM_READ | > VM_WRITE | VM_EXEC | \ > --- 2.5.14/include/asm-alpha/pgtable.h Fri May 3 04:22:46 2002 > +++ linux/include/asm-alpha/pgtable.h Wed May 8 14:44:22 2002 > @@ -179,11 +179,12 @@ extern unsigned long __zero_page(void); > #endif > #if defined(CONFIG_ALPHA_GENERIC) || \ > (defined(CONFIG_ALPHA_EV6) && !defined(USE_48_BIT_KSEG)) > -#define PHYS_TWIDDLE(phys) \ > - ((((phys) & 0xc0000000000UL) == 0x40000000000UL) \ > - ? ((phys) ^= 0xc0000000000UL) : (phys)) > +#define KSEG_PFN (0xc0000000000UL >> PAGE_SHIFT) > +#define PHYS_TWIDDLE(pfn) \ > + ((((pfn) & KSEG_PFN) == (0x40000000000UL >> PAGE_SHIFT)) \ > + ? ((pfn) ^= KSEG_PFN) : (pfn)) > #else > -#define PHYS_TWIDDLE(phys) (phys) > +#define PHYS_TWIDDLE(pfn) (pfn) > #endif > > /* > @@ -199,12 +200,13 @@ extern unsigned long __zero_page(void); > #endif > > #ifndef CONFIG_DISCONTIGMEM > +#define pte_pfn(pte) (pte_val(pte) >> 32) > +#define pte_page(pte) pfn_to_page(pte_pfn(pte)) > #define mk_pte(page, pgprot) > \ > ({ > \ > pte_t pte; > \ > > \ > - pte_val(pte) = ((unsigned long)(page - mem_map) << 32) > | \ > - pgprot_val(pgprot); > \ > + pte_val(pte) = (page_to_pfn(page) << 32) | > pgprot_val(pgprot); \ > pte; > \ > }) > #else > @@ -221,8 +223,8 @@ extern unsigned long __zero_page(void); > }) > #endif > > -extern inline pte_t mk_pte_phys(unsigned long physpage, > pgprot_t pgprot) > -{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpage) << > (32-PAGE_SHIFT)) | pgprot_val(pgprot); return pte; } > +extern inline pte_t pfn_pte(unsigned long physpfn, pgprot_t pgprot) > +{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpfn) << 32) | > pgprot_val(pgprot); return pte; } > > extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) > { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | > pgprot_val(newprot); return pte; } >