From 4052ebb7a2729bd7c28260cdf8e470c0d81b9c56 Mon Sep 17 00:00:00 2001 From: "George G. Davis" Date: Fri, 22 Sep 2006 18:36:38 +0100 Subject: [ARM] 3859/1: Fix devicemaps_init() XIP_KERNEL odd 1MiB XIP_PHYS_ADDR translation error The ARM XIP_KERNEL map created in devicemaps_init() is wrong. The map.pfn is rounded down to an even 1MiB section boundary which results in va/pa translations errors when XIP_PHYS_ADDR starts on an odd 1MiB boundary and this causes the kernel to hang. This patch fixes ARM XIP_KERNEL translation errors for the odd 1MiB XIP_PHYS_ADDR boundary case. Signed-off-by: George G. Davis Signed-off-by: Russell King --- include/asm-arm/pgtable.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/asm-arm/pgtable.h') diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 8d3919c6458..38b2b55688e 100644 --- a/include/asm-arm/pgtable.h +++ b/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. */ -- cgit v1.2.3