From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by ozlabs.org (Postfix) with ESMTP id 7A271DDE20 for ; Thu, 28 Feb 2008 08:00:36 +1100 (EST) Received: by ug-out-1314.google.com with SMTP id q7so523934uge.0 for ; Wed, 27 Feb 2008 13:00:35 -0800 (PST) Message-Id: <20080227210003.230880164@gmail.com> References: <20080227205831.150784453@gmail.com> Date: Wed, 27 Feb 2008 23:58:35 +0300 From: gorcunov@gmail.com To: rth@twiddle.net, chris@zankel.net, jdike@addtoit.com, linuxppc-dev@ozlabs.org, paulus@samba.org, dhowells@redhat.com, zippel@linux-m68k.org, geert@linux-m68k.org, linux-m68k@lists.linux-m68k.org, takata@linux-m32r.org, linux-m32r@ml.linux-m32r.org, linux-kernel@vger.kernel.org Subject: [RFC 04/10] m68knommu: vmlinux.lds cleanup - use PAGE_SIZE macro Cc: gorcunov@gmail.com, sam@ravnborg.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This patch modifies page.h header to be able to include it into linker script and then we're able to use PAGE_SIZE in vmlinux.lds Signed-off-by: Cyrill Gorcunov --- WARNING: COMPLETELY UNTESTED !!! arch/m68knommu/kernel/vmlinux.lds.S | 5 +++-- include/asm-m68knommu/page.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) Index: linux-2.6.git/arch/m68knommu/kernel/vmlinux.lds.S =================================================================== --- linux-2.6.git.orig/arch/m68knommu/kernel/vmlinux.lds.S 2008-02-10 10:46:37.000000000 +0300 +++ linux-2.6.git/arch/m68knommu/kernel/vmlinux.lds.S 2008-02-27 21:24:46.000000000 +0300 @@ -8,6 +8,7 @@ */ #include +#include #if defined(CONFIG_RAMKERNEL) #define RAM_START CONFIG_KERNELBASE @@ -140,7 +141,7 @@ SECTIONS { } > DATA .init : { - . = ALIGN(4096); + . = ALIGN(PAGE_SIZE); __init_begin = .; _sinittext = .; INIT_TEXT @@ -165,7 +166,7 @@ SECTIONS { *(.init.ramfs) __initramfs_end = .; #endif - . = ALIGN(4096); + . = ALIGN(PAGE_SIZE); __init_end = .; } > INIT Index: linux-2.6.git/include/asm-m68knommu/page.h =================================================================== --- linux-2.6.git.orig/include/asm-m68knommu/page.h 2008-02-10 12:03:48.000000000 +0300 +++ linux-2.6.git/include/asm-m68knommu/page.h 2008-02-27 21:19:37.000000000 +0300 @@ -1,16 +1,18 @@ #ifndef _M68KNOMMU_PAGE_H #define _M68KNOMMU_PAGE_H +#include + /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT (12) -#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) #include #ifndef __ASSEMBLY__ - + #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) #define free_user_page(page, addr) free_page(addr) --