From: Sam Ravnborg <sam@ravnborg.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: [PATCH 2/2] s390: use PAGE_SIZE in vmlinux.lds
Date: Thu, 4 Oct 2007 21:18:35 +0200 [thread overview]
Message-ID: <20071004191835.GC23211@uranus.ravnborg.org> (raw)
In-Reply-To: <20071004112706.574737175@de.ibm.com>
Repalce the hardcoded 4096 value with the PAGE_SIZE macro.
Converted a few decimal numbers to readable hex numbers.
Use of PAGE_SIZE required a small change to page.h
to allow PAGE_SIZE to be used from assembler/linker scripts.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
build tested only
arch/s390/kernel/vmlinux.lds.S | 27 ++++++++++++++-------------
include/asm-s390/page.h | 3 ++-
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 3a364d1..dd3b310 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -2,6 +2,7 @@
* Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
*/
+#include <asm/page.h>
#include <asm-generic/vmlinux.lds.h>
#ifndef CONFIG_64BIT
@@ -35,10 +36,10 @@ SECTIONS
RODATA
#ifdef CONFIG_SHARED_KERNEL
- . = ALIGN(1048576); /* VM shared segments are 1MB aligned */
+ . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
#endif
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
_eshared = .; /* End of shareable data */
. = ALIGN(16); /* Exception table */
@@ -56,37 +57,37 @@ SECTIONS
CONSTRUCTORS
}
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
.data_nosave : {
__nosave_begin = .;
*(.data.nosave)
}
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
__nosave_end = .;
- . = ALIGN(4096);
+ . = ALIGN(PAGE_SIZE);
.data.page_aligned : {
*(.data.idt)
}
- . = ALIGN(256);
+ . = ALIGN(0x100);
.data.cacheline_aligned : {
*(.data.cacheline_aligned)
}
- . = ALIGN(256);
+ . = ALIGN(0x100);
.data.read_mostly : {
*(.data.read_mostly)
}
_edata = .; /* End of data section */
- . = ALIGN(8192); /* init_task */
+ . = ALIGN(2 * PAGE_SIZE); /* init_task */
.data.init_task : {
*(.data.init_task)
}
/* will be freed after init */
- . = ALIGN(4096); /* Init code and data */
+ . = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .;
.init.text : {
_sinittext = .;
@@ -104,7 +105,7 @@ SECTIONS
.init.data : {
*(.init.data)
}
- . = ALIGN(256);
+ . = ALIGN(0x100);
.init.setup : {
__setup_start = .;
*(.init.setup)
@@ -124,7 +125,7 @@ SECTIONS
SECURITY_INIT
#ifdef CONFIG_BLK_DEV_INITRD
- . = ALIGN(256);
+ . = ALIGN(0x100);
.init.ramfs : {
__initramfs_start = .;
*(.init.initramfs)
@@ -133,8 +134,8 @@ SECTIONS
}
#endif
- PERCPU(4096)
- . = ALIGN(4096);
+ PERCPU(PAGE_SIZE)
+ . = ALIGN(PAGE_SIZE);
__init_end = .; /* freed after init ends here */
/* BSS */
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h
index f326451..e3ce489 100644
--- a/include/asm-s390/page.h
+++ b/include/asm-s390/page.h
@@ -9,11 +9,12 @@
#ifndef _S390_PAGE_H
#define _S390_PAGE_H
+#include <linux/const.h>
#include <asm/types.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))
#define PAGE_DEFAULT_ACC 0
#define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4)
prev parent reply other threads:[~2007-10-04 19:18 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-04 11:27 [patch 00/34] s390 patches for 2.6.24 Martin Schwidefsky
2007-10-04 11:27 ` [patch 01/34] cio: rename css to channel_subsystems Martin Schwidefsky
2007-10-04 11:27 ` [patch 02/34] cio: remove subchannel_add_files() Martin Schwidefsky
2007-10-04 11:27 ` [patch 03/34] cio: Fix some coding style issues in cmf Martin Schwidefsky
2007-10-04 11:27 ` [patch 04/34] cio: Kerneldoc comments for cmf Martin Schwidefsky
2007-10-04 11:27 ` [patch 05/34] cio: Add docbook comments Martin Schwidefsky
2007-10-04 11:27 ` [patch 06/34] cio: Add s390-drivers book Martin Schwidefsky
2007-10-04 11:27 ` [patch 07/34] cio: Minor style fixes Martin Schwidefsky
2007-10-04 11:27 ` [patch 08/34] cio: Disable channel path measurements on shutdown/reboot Martin Schwidefsky
2007-10-04 11:27 ` [patch 09/34] cio: Introduce ccw_bus_type.shutdown Martin Schwidefsky
2007-10-04 11:27 ` [patch 10/34] cio: Disable channel measurements (cmf) on shutdown/reboot Martin Schwidefsky
2007-10-04 11:27 ` [patch 11/34] cio: Fix device attributes for early devices Martin Schwidefsky
2007-10-04 11:27 ` [patch 12/34] Add Documentation/s390/00-INDEX Martin Schwidefsky
2007-10-04 11:27 ` [patch 13/34] cio: Documentation update Martin Schwidefsky
2007-10-04 11:27 ` [patch 14/34] zcrypt: make init/exit functions static Martin Schwidefsky
2007-10-04 11:27 ` [patch 15/34] zcrypt: remove duplicated struct CPRBX definition Martin Schwidefsky
2007-10-04 11:27 ` [patch 16/34] zcrypt: fix ap_reset_domain() Martin Schwidefsky
2007-10-04 11:27 ` [patch 17/34] appldata_base: Misc cpuinit annotations and bugfix Martin Schwidefsky
2007-10-04 11:27 ` [patch 18/34] appldata_base: Remove module_exit function and modular stuff Martin Schwidefsky
2007-10-04 11:27 ` [patch 19/34] disassembler: fix output for insns with 6 operands Martin Schwidefsky
2007-10-04 11:27 ` [patch 20/34] disassembler: Remove redundant variable assignment Martin Schwidefsky
2007-10-04 11:27 ` [patch 21/34] Get rid of a bunch of sparse warnings again Martin Schwidefsky
2007-10-04 11:27 ` [patch 22/34] remove packed attribute from ext_int_info_t Martin Schwidefsky
2007-10-04 11:27 ` [patch 23/34] Get rid of ARCH_KMALLOC_MINALIGN Martin Schwidefsky
2007-10-04 11:27 ` [patch 24/34] qdio: dont cast function pointers and use them to call functions Martin Schwidefsky
2007-10-04 11:27 ` [patch 25/34] is_power_of_2 in drivers/s390/block/dasd_int.h Martin Schwidefsky
2007-10-04 11:27 ` [patch 26/34] qdio: change QDIO performance_stats error message priority Martin Schwidefsky
2007-10-04 11:27 ` [patch 27/34] Force link error if xchg/cmpxchg gets called with unsupported size Martin Schwidefsky
2007-10-04 11:27 ` [patch 28/34] Use IPL CLEAR for reipl under z/VM Martin Schwidefsky
2007-10-04 11:27 ` [patch 29/34] Remove obsolete recommendation for 8M ramdisk size Martin Schwidefsky
2007-10-04 11:27 ` [patch 30/34] zcore: fix inline assembly in memcpy_real() Martin Schwidefsky
2007-10-04 11:27 ` [patch 31/34] Make vmalloc area start at address > 4GB Martin Schwidefsky
2007-10-04 11:27 ` [patch 32/34] cpcmd: fix inline assembly usage Martin Schwidefsky
2007-10-04 11:27 ` [patch 33/34] tape: Fix medium state handling Martin Schwidefsky
2007-10-04 11:27 ` [patch 34/34] vmwatchdog: fix broken inline assembly Martin Schwidefsky
2007-10-04 19:10 ` [patch 00/34] s390 patches for 2.6.24 Sam Ravnborg
2007-10-05 8:30 ` Martin Schwidefsky
2007-10-04 19:15 ` [PATCH 1/2] s390: beautify vmlinux.lds Sam Ravnborg
2007-10-04 19:18 ` Sam Ravnborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071004191835.GC23211@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox