lkml.org 
[lkml]   [2008]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC 01/10] arm: vmlinux.lds.S cleanup - use PERCPU, PAGE_SIZE macroses
This patch modifies PAGE_SIZE definition to be able to
include it into vmlinux.lds.S script and use it then

Also PERCPU macros is used instead of explicit section
declaration

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

WARNING: COMPLETELY UNTESTED !!!

arch/arm/kernel/vmlinux.lds.S | 21 ++++++++++-----------
include/asm-arm/page.h | 4 +++-
2 files changed, 13 insertions(+), 12 deletions(-)

Index: linux-2.6.git/arch/arm/kernel/vmlinux.lds.S
===================================================================
--- linux-2.6.git.orig/arch/arm/kernel/vmlinux.lds.S 2008-02-10 10:46:36.000000000 +0300
+++ linux-2.6.git/arch/arm/kernel/vmlinux.lds.S 2008-02-27 20:34:47.000000000 +0300
@@ -5,8 +5,9 @@

#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
+#include <asm/page.h>
#include <asm/memory.h>
-
+
OUTPUT_ARCH(arm)
ENTRY(stext)

@@ -63,15 +64,13 @@ SECTIONS
usr/built-in.o(.init.ramfs)
__initramfs_end = .;
#endif
- . = ALIGN(4096);
- __per_cpu_start = .;
- *(.data.percpu)
- *(.data.percpu.shared_aligned)
- __per_cpu_end = .;
+
+ PERCPU(PAGE_SIZE)
+
#ifndef CONFIG_XIP_KERNEL
__init_begin = _stext;
INIT_DATA
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
__init_end = .;
#endif
}
@@ -128,17 +127,17 @@ SECTIONS
*(.data.init_task)

#ifdef CONFIG_XIP_KERNEL
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
__init_begin = .;
INIT_DATA
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
__init_end = .;
#endif

- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
__nosave_begin = .;
*(.data.nosave)
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
__nosave_end = .;

/*
Index: linux-2.6.git/include/asm-arm/page.h
===================================================================
--- linux-2.6.git.orig/include/asm-arm/page.h 2008-02-09 12:09:28.000000000 +0300
+++ linux-2.6.git/include/asm-arm/page.h 2008-02-27 20:38:59.000000000 +0300
@@ -10,9 +10,11 @@
#ifndef _ASMARM_PAGE_H
#define _ASMARM_PAGE_H

+#include <linux/const.h>
+
/* 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))

/* to align the pointer to the (next) page boundary */
--


\
 
 \ /
  Last update: 2008-02-27 22:03    [W:0.112 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site