lkml.org 
[lkml]   [2015]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 11/11] powerpc/8xx: Add support for TASK_SIZE greater than 0x80000000

Le 21/03/2015 01:47, Scott Wood a écrit :
> On Tue, 2015-01-20 at 10:57 +0100, Christophe Leroy wrote:
>> By default, TASK_SIZE is set to 0x80000000 for PPC_8xx, which is most likely
>> sufficient for most cases. However, kernel configuration allows to set TASK_SIZE
>> to another value, so the 8xx shall handle it.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>>
>> ---
>> v2: no change
>>
>> arch/powerpc/kernel/head_8xx.S | 25 +++++++++++++++++++------
>> 1 file changed, 19 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
>> index ead6448..92a6456 100644
>> --- a/arch/powerpc/kernel/head_8xx.S
>> +++ b/arch/powerpc/kernel/head_8xx.S
>> @@ -48,6 +48,19 @@
>> mtspr spr, reg
>> #endif
>>
>> +/* Macro to test if an address is a kernel address */
>> +#if CONFIG_TASK_SIZE <= 0x80000000
>> +#define IS_KERNEL(tmp, addr) \
>> + andis. tmp, addr, 0x8000 /* Address >= 0x80000000 */
>> +#define BRANCH_UNLESS_KERNEL(label) beq label
>> +#else
> This works if CONFIG_TASK_SIZE == 0x80000000, but what if it's less, and
> you have a kernel address < 0x80000000?
>
>
You are right, I didn't realise that PAGE_OFFSET was also configurable
and could be different from 0xC0000000.
andis. (which is what is always used in the current kernel) can be used
if CONFIG_TASK_SIZE <= 0x80000000 AND PAGE_OFFSET >= 0x80000000.
I will resubmit the patch accordingly.

Christophe



\
 
 \ /
  Last update: 2015-04-07 10:41    [W:0.058 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site