From: leroy christophe <christophe.leroy@c-s.fr>
To: Scott Wood <scottwood@freescale.com>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 11/11] powerpc/8xx: Add support for TASK_SIZE greater than 0x80000000
Date: Tue, 07 Apr 2015 10:15:59 +0200 [thread overview]
Message-ID: <5523923F.2050502@c-s.fr> (raw)
In-Reply-To: <1426898829.27998.256.camel@freescale.com>
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
prev parent reply other threads:[~2015-04-07 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 9:57 [PATCH v2 11/11] powerpc/8xx: Add support for TASK_SIZE greater than 0x80000000 Christophe Leroy
2015-03-21 0:47 ` Scott Wood
2015-04-07 8:15 ` leroy christophe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5523923F.2050502@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).