diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-08-01 14:54:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-08-01 14:54:26 -0400 |
commit | c70fbb01b11cecfa13d9e746f462617d3ac0e38c (patch) | |
tree | 1946cf555bee185ac81dc0127c6e067040681469 /arch/arm | |
parent | 4b2974fa6a4a32d390a50e23381a2270a2e0d444 (diff) | |
parent | 83de911cf897a4317147dd9cb379378c2c4abf4c (diff) |
Merge tag 'nommu-for-rmk' of git://git.pengutronix.de/git/ukl/linux into devel-stable
Two different fixes for the same problem making some ARM nommu configurations
not boot since 3.6-rc1. The problem is that user_addr_max returned the biggest
available RAM address which makes some copy_from_user variants fail to read
from XIP memory.
Even in the presence of one of the two fixes the other still makes sense, so
both patches are included here.
This problem was the last one preventing efm32 boot to a prompt with mainline.
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/memory.h | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/uaccess.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 2b751464d6ff..c6bbb7daea59 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -91,9 +91,7 @@ | |||
91 | * of this define that was meant to. | 91 | * of this define that was meant to. |
92 | * Fortunately, there is no reference for this in noMMU mode, for now. | 92 | * Fortunately, there is no reference for this in noMMU mode, for now. |
93 | */ | 93 | */ |
94 | #ifndef TASK_SIZE | 94 | #define TASK_SIZE UL(0xffffffff) |
95 | #define TASK_SIZE (CONFIG_DRAM_SIZE) | ||
96 | #endif | ||
97 | 95 | ||
98 | #ifndef TASK_UNMAPPED_BASE | 96 | #ifndef TASK_UNMAPPED_BASE |
99 | #define TASK_UNMAPPED_BASE UL(0x00000000) | 97 | #define TASK_UNMAPPED_BASE UL(0x00000000) |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 75d95799b6e6..fd42da46828d 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -224,7 +224,7 @@ static inline void set_fs(mm_segment_t fs) | |||
224 | #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) | 224 | #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) |
225 | 225 | ||
226 | #define user_addr_max() \ | 226 | #define user_addr_max() \ |
227 | (segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL) | 227 | (segment_eq(get_fs(), KERNEL_DS) ? ~0UL : get_fs()) |
228 | 228 | ||
229 | /* | 229 | /* |
230 | * The "__xxx" versions of the user access functions do not verify the | 230 | * The "__xxx" versions of the user access functions do not verify the |