aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-01-17 18:21:11 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-01-17 18:38:58 -0500
commitb0e86f0a3b9329bbebadb01ca935208459df18c3 (patch)
treee5c662538c6c35a76d6a11a1e2d8db550e369e4d /include/asm-cris
parentefe7cf2dcf4b72c7a9f991466d1f22850232244f (diff)
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 <jesper.nilsson@axis.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-cris')
-rw-r--r--include/asm-cris/page.h7
1 files changed, 2 insertions, 5 deletions
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 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <asm/arch/page.h> 6#include <asm/arch/page.h>
7#include <linux/const.h>
7 8
8/* PAGE_SHIFT determines the page size */ 9/* PAGE_SHIFT determines the page size */
9#define PAGE_SHIFT 13 10#define PAGE_SHIFT 13
10#ifndef __ASSEMBLY__ 11#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
11#define PAGE_SIZE (1UL << PAGE_SHIFT)
12#else
13#define PAGE_SIZE (1 << PAGE_SHIFT)
14#endif
15#define PAGE_MASK (~(PAGE_SIZE-1)) 12#define PAGE_MASK (~(PAGE_SIZE-1))
16 13
17#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) 14#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)