* [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
@ 2005-05-18 10:21 Eugene Surovegin
2005-05-18 14:14 ` Dan Malek
0 siblings, 1 reply; 5+ messages in thread
From: Eugene Surovegin @ 2005-05-18 10:21 UTC (permalink / raw)
To: linuxppc-embedded
Hi!
This patch fixed CONFIG_TASK_SIZE handling on 44x. Currently
head_44x.S hardcodes 0x80000000, which breaks if user chooses to
change TASK_SIZE (e.g. for 3G user-space). Tested on Ocotea in 3G/1G
configuration.
Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Index: arch/ppc/kernel/head_44x.S
===================================================================
--- 59c3218467807e1793fb4fc5d90141e072ab2212/arch/ppc/kernel/head_44x.S (mode:100644)
+++ uncommitted/arch/ppc/kernel/head_44x.S (mode:100644)
@@ -330,8 +330,9 @@
/* If we are faulting a kernel address, we have to use the
* kernel page tables.
*/
- andis. r11, r10, 0x8000
- beq 3f
+ lis r11, TASK_SIZE@h
+ cmplw r10, r11
+ blt+ 3f
lis r11, swapper_pg_dir@h
ori r11, r11, swapper_pg_dir@l
@@ -464,8 +465,9 @@
/* If we are faulting a kernel address, we have to use the
* kernel page tables.
*/
- andis. r11, r10, 0x8000
- beq 3f
+ lis r11, TASK_SIZE@h
+ cmplw r10, r11
+ blt+ 3f
lis r11, swapper_pg_dir@h
ori r11, r11, swapper_pg_dir@l
@@ -533,8 +535,9 @@
/* If we are faulting a kernel address, we have to use the
* kernel page tables.
*/
- andis. r11, r10, 0x8000
- beq 3f
+ lis r11, TASK_SIZE@h
+ cmplw r10, r11
+ blt+ 3f
lis r11, swapper_pg_dir@h
ori r11, r11, swapper_pg_dir@l
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
2005-05-18 10:21 [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x Eugene Surovegin
@ 2005-05-18 14:14 ` Dan Malek
2005-05-18 16:19 ` Kumar Gala
0 siblings, 1 reply; 5+ messages in thread
From: Dan Malek @ 2005-05-18 14:14 UTC (permalink / raw)
To: Eugene Surovegin; +Cc: linuxppc-embedded
On May 18, 2005, at 6:21 AM, Eugene Surovegin wrote:
> This patch fixed CONFIG_TASK_SIZE handling on 44x.
Paul suggested to me and I've been contemplating changing
the page table management on PowerPC to something similar
to other platforms. At first, I was only going to do this on 8xx,
but I think I'll do it for PowerPC in general so all boards can
take advantage if they choose to do so.
Other ports populate the user page tables with the kernel pmd
entries upon kernel faults, then we don't have to distinguish
among page tables during the TLB exceptions. I'm hoping we
can populate the init page table entries at boot time, and then
everyone will inherit them, eliminating all faults unless the kernel
vmalloc space grows to need a new pmd entry.
This would be a generic solution to selecting task size, among
other advanced memory mapping options.
I'll keep you posted.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
2005-05-18 14:14 ` Dan Malek
@ 2005-05-18 16:19 ` Kumar Gala
2005-05-18 16:34 ` Matt Porter
2005-05-18 16:48 ` Dan Malek
0 siblings, 2 replies; 5+ messages in thread
From: Kumar Gala @ 2005-05-18 16:19 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-embedded
On May 18, 2005, at 9:14 AM, Dan Malek wrote:
>
>
> On May 18, 2005, at 6:21 AM, Eugene Surovegin wrote:
>
> > This patch fixed CONFIG_TASK_SIZE handling on 44x.
>
> Paul suggested to me and I've been contemplating changing
> the page table management on PowerPC to something similar
> to other platforms.=A0 At first, I was only going to do this on 8xx,
> but I think I'll do it for PowerPC in general so all boards can
> take advantage if they choose to do so.
>
> Other ports populate the user page tables with the kernel pmd
> entries upon kernel faults, then we don't have to distinguish
> among page tables during the TLB exceptions.=A0 I'm hoping we
> can populate the init page table entries at boot time, and then
> everyone will inherit them, eliminating all faults unless the kernel
> vmalloc space grows to need a new pmd entry.
I'm a bit concerned about this in the future. On Book-E parts we may=20
end up actually utilizing the address space bit to provide a true 4G/4G=20=
split. I understand the current pain in doing this today. I just want=20=
you to be aware of what the future might bring.
> This would be a generic solution to selecting task size, among
> other advanced memory mapping options.
>
> I'll keep you posted.
While we wait on this I think getting Eugene's patch is worth while.
- kumar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
2005-05-18 16:19 ` Kumar Gala
@ 2005-05-18 16:34 ` Matt Porter
2005-05-18 16:48 ` Dan Malek
1 sibling, 0 replies; 5+ messages in thread
From: Matt Porter @ 2005-05-18 16:34 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-embedded
On Wed, May 18, 2005 at 11:19:15AM -0500, Kumar Gala wrote:
> While we wait on this I think getting Eugene's patch is worth while.
It's been on my long todo list for awhile anyway. Since I added the
advanced option stuff I've been aware of task size issue on 4xx. It's
already been sent upstream.
-Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
2005-05-18 16:19 ` Kumar Gala
2005-05-18 16:34 ` Matt Porter
@ 2005-05-18 16:48 ` Dan Malek
1 sibling, 0 replies; 5+ messages in thread
From: Dan Malek @ 2005-05-18 16:48 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-embedded
On May 18, 2005, at 12:19 PM, Kumar Gala wrote:
> I'm a bit concerned about this in the future. On Book-E parts we may
> end up actually utilizing the address space bit to provide a true
> 4G/4G split.
I've contemplated the 4G/4G split and we have discussed this for years.
This is why I kept the separate kernel/user page table lookup in the TLB
miss handlers.
This was always lost to the Linux "efficiency" argument due to the
mapping
operations required for accessing user space from the kernel. I don't
remember Book E inventing alternate address space options as m68k
does, and without them it will be lots of kernel modifications to
support
this. I suspect most of them will be under the "...to_from_user ..."
functions
and macros, but there are other places in the kernel where the
mapping is assumed.
> I understand the current pain in doing this today. I just want you
> to be aware of what the future might bring.
As I said, the changes aren't required to be implemented by anyone,
it all depends how you choose to write the tlb management functions
for a particular processor. The infrastructure will be there to choose
either method. Until we actually have totally separate kernel and
user VM spaces, you may as well take advantage of the performance
improvement.
> While we wait on this I think getting Eugene's patch is worth while.
That's fine, it was just an opportunity for me to post the message.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-05-18 16:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-18 10:21 [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x Eugene Surovegin
2005-05-18 14:14 ` Dan Malek
2005-05-18 16:19 ` Kumar Gala
2005-05-18 16:34 ` Matt Porter
2005-05-18 16:48 ` Dan Malek
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).