From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: [03/17] i386: Resolve dependency of asm-i386/pgtable.h on highmem.h Date: Tue, 25 Sep 2007 16:42:07 -0700 Message-ID: <20070925234249.866179367@sgi.com> References: <20070925234204.546836393@sgi.com> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: unlisted-recipients:; (no To-header on input) Return-path: Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:36402 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751822AbXIYXmu (ORCPT ); Tue, 25 Sep 2007 19:42:50 -0400 Content-Disposition: inline; filename=vcompound_fix_i386_pgtable_mess Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org pgtable.h does not include highmem.h but uses various constants from highmem.h. We cannot include highmem.h because highmem.h will in turn include many other include files that also depend on pgtable.h So move the definitions from highmem.h into pgtable.h. Signed-off-by: Christoph Lameter --- include/asm-i386/highmem.h | 6 ------ include/asm-i386/pgtable.h | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) Index: linux-2.6/include/asm-i386/highmem.h =================================================================== --- linux-2.6.orig/include/asm-i386/highmem.h 2007-09-20 23:54:57.000000000 -0700 +++ linux-2.6/include/asm-i386/highmem.h 2007-09-20 23:55:40.000000000 -0700 @@ -38,11 +38,6 @@ extern pte_t *pkmap_page_table; * easily, subsequent pte tables have to be allocated in one physical * chunk of RAM. */ -#ifdef CONFIG_X86_PAE -#define LAST_PKMAP 512 -#else -#define LAST_PKMAP 1024 -#endif /* * Ordering is: * @@ -58,7 +53,6 @@ extern pte_t *pkmap_page_table; * VMALLOC_START * high_memory */ -#define PKMAP_BASE ( (FIXADDR_BOOT_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK ) #define LAST_PKMAP_MASK (LAST_PKMAP-1) #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) Index: linux-2.6/include/asm-i386/pgtable.h =================================================================== --- linux-2.6.orig/include/asm-i386/pgtable.h 2007-09-20 23:55:16.000000000 -0700 +++ linux-2.6/include/asm-i386/pgtable.h 2007-09-20 23:56:21.000000000 -0700 @@ -81,6 +81,14 @@ void paging_init(void); #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long) high_memory + \ 2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1)) +#ifdef CONFIG_X86_PAE +#define LAST_PKMAP 512 +#else +#define LAST_PKMAP 1024 +#endif + +#define PKMAP_BASE ( (FIXADDR_BOOT_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK ) + #ifdef CONFIG_HIGHMEM # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) #else --