From b0e86f0a3b9329bbebadb01ca935208459df18c3 Mon Sep 17 00:00:00 2001 From: Jesper Nilsson Date: Thu, 17 Jan 2008 15:21:11 -0800 Subject: CRIS v10: vmlinux.lds.S: ix kernel oops on boot and use common defines - Move alignment to page size of init data outside ifdef for BLK_DEV_INITRD. The reservation up to page size of memory after init data was previously not done if BLK_DEV_INITRD was undefined. This caused a kernel oops when init memory pages were freed after startup, data placed in the same page as the last init memory would also be freed and reused, with disastrous results. - Use macros for initcalls and .text sections. - Replace hardcoded page size constant with PAGE_SIZE define. - Change include/asm-cris/page.h to use the _AC macro to instead of testing __ASSEMBLY__. Signed-off-by: Jesper Nilsson Cc: Sam Ravnborg Cc: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-cris/page.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index 0648e3153f81..b84353ef6998 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h @@ -4,14 +4,11 @@ #ifdef __KERNEL__ #include +#include /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT 13 -#ifndef __ASSEMBLY__ -#define PAGE_SIZE (1UL << PAGE_SHIFT) -#else -#define PAGE_SIZE (1 << PAGE_SHIFT) -#endif +#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) -- cgit v1.2.3-59-g8ed1b