From 71e38b74091062c318c8ae94cc7dc6efbff096ad Mon Sep 17 00:00:00 2001 From: "George G. Davis" Date: Fri, 22 Sep 2006 18:36:38 +0100 Subject: [PATCH] --- yaml --- r: 36618 b: refs/heads/master c: 4052ebb7a2729bd7c28260cdf8e470c0d81b9c56 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mm/init.c | 4 ++-- trunk/include/asm-arm/pgtable.h | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 76f811ea1d0a..db8e68044908 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4b053e7a320882fbdbc6613cec60a929553b4215 +refs/heads/master: 4052ebb7a2729bd7c28260cdf8e470c0d81b9c56 diff --git a/trunk/arch/arm/mm/init.c b/trunk/arch/arm/mm/init.c index 1099af6d470a..64262bda8e54 100644 --- a/trunk/arch/arm/mm/init.c +++ b/trunk/arch/arm/mm/init.c @@ -434,9 +434,9 @@ static void __init devicemaps_init(struct machine_desc *mdesc) * It is always first in the modulearea. */ #ifdef CONFIG_XIP_KERNEL - map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & PGDIR_MASK); + map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); map.virtual = MODULE_START; - map.length = ((unsigned long)&_etext - map.virtual + ~PGDIR_MASK) & PGDIR_MASK; + map.length = ((unsigned long)&_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; map.type = MT_ROM; create_mapping(&map); #endif diff --git a/trunk/include/asm-arm/pgtable.h b/trunk/include/asm-arm/pgtable.h index 8d3919c6458c..38b2b55688e2 100644 --- a/trunk/include/asm-arm/pgtable.h +++ b/trunk/include/asm-arm/pgtable.h @@ -135,6 +135,13 @@ extern void __pgd_error(const char *file, int line, unsigned long val); #define FIRST_USER_PGD_NR 1 #define USER_PTRS_PER_PGD ((TASK_SIZE/PGDIR_SIZE) - FIRST_USER_PGD_NR) +/* + * section address mask and size definitions. + */ +#define SECTION_SHIFT 20 +#define SECTION_SIZE (1UL << SECTION_SHIFT) +#define SECTION_MASK (~(SECTION_SIZE-1)) + /* * ARMv6 supersection address mask and size definitions. */