[PATCH 0/8] Fix 8xx MMU/TLB.

2009-10-11 Thread Joakim Tjernlund
This is the latest batch of mu 8xx MMU/TLB rework. I think this is complete now and will relax with other work the next few days. I hope I can get some testing from Scott and Rex during this time. Joakim Tjernlund (8): 8xx: invalidate non present TLBs 8xx: Update TLB asm so it behaves as linux

[PATCH 0/8] Fix 8xx MMU/TLB

2009-10-15 Thread Joakim Tjernlund
Now updated with Scott's remarks. There is still(probably) a trivial conflict in pte-8xx.h Joakim Tjernlund (8): 8xx: invalidate non present TLBs 8xx: Update TLB asm so it behaves as linux mm expects. 8xx: Tag DAR with 0x00f0 to catch buggy instructions. 8xx: Fixup DAR from buggy dcbX inst

Re: [PATCH 0/8] Fix 8xx MMU/TLB.

2009-10-14 Thread Scott Wood
On Sun, Oct 11, 2009 at 06:35:04PM +0200, Joakim Tjernlund wrote: > This is the latest batch of mu 8xx MMU/TLB rework. > I think this is complete now and will relax with > other work the next few days. I hope I can get some > testing from Scott and Rex during this time. I applied this stack plus "

Re: [PATCH 0/8] Fix 8xx MMU/TLB.

2009-10-14 Thread Joakim Tjernlund
Scott Wood wrote on 14/10/2009 19:23:51: > > On Sun, Oct 11, 2009 at 06:35:04PM +0200, Joakim Tjernlund wrote: > > This is the latest batch of mu 8xx MMU/TLB rework. > > I think this is complete now and will relax with > > other work the next few days. I hope I can get some > > testing from Scott

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-15 Thread Rex Feany
arch/powerpc/kernel/head_8xx.o: In function `FixupDAR': /home/rfeany/src/lnxnm/linux-dev/arch/powerpc/kernel/head_8xx.S:576: undefined reference to `DARfix' With all of your patches applied I have this problem: open("/proc/mounts", O_RDONLY) = 3 fstat64(0x3, 0x7fc6ad58)=

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-15 Thread Scott Wood
Joakim Tjernlund wrote: Now updated with Scott's remarks. There is still(probably) a trivial conflict in pte-8xx.h Joakim Tjernlund (8): 8xx: invalidate non present TLBs 8xx: Update TLB asm so it behaves as linux mm expects. 8xx: Tag DAR with 0x00f0 to catch buggy instructions. 8xx: Fixu

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-16 Thread Joakim Tjernlund
Rex Feany wrote on 15/10/2009 18:56:50: > > arch/powerpc/kernel/head_8xx.o: In function `FixupDAR': > /home/rfeany/src/lnxnm/linux-dev/arch/powerpc/kernel/head_8xx.S:576: undefined > reference to `DARfix' > > With all of your patches applied I have this problem: > > open("/proc/mounts", O_RDONLY)

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-16 Thread Rex Feany
Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.se): > Right, it is the pte table walk that is blowing up. > I just noted that 2.6 lacks a tophys() call in its table walk > so I removed that one(there is one more tophys call but I don't think > it should be removed). > Try this addon patch

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-17 Thread Joakim Tjernlund
Rex Feany wrote on 16/10/2009 22:25:41: > > Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.se): > > > Right, it is the pte table walk that is blowing up. > > I just noted that 2.6 lacks a tophys() call in its table walk > > so I removed that one(there is one more tophys call but I don't t

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-17 Thread Joakim Tjernlund
Joakim Tjernlund/Transmode wrote on 17/10/2009 13:24:18: > > Rex Feany wrote on 16/10/2009 22:25:41: > > > > Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.se): > > > > > Right, it is the pte table walk that is blowing up. > > > I just noted that 2.6 lacks a tophys() call in its table wal

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-26 Thread Benjamin Herrenschmidt
> Probably better to walk the kernel page table too. Does this > make a difference(needs the tophys() patch I posted earlier): This whole thing would be a -lot- easier to do from C code. Why ? Simply because you could just use get_user() to load the instruction rather than doing this page table w

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-26 Thread Dan Malek
On Oct 26, 2009, at 3:47 PM, Benjamin Herrenschmidt wrote: This whole thing would be a -lot- easier to do from C code. Why ? Simply because you could just use get_user() to load the instruction rather than doing this page table walking in asm, Just be careful the get_user() doesn't regenera

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-26 Thread Benjamin Herrenschmidt
On Mon, 2009-10-26 at 16:26 -0700, Dan Malek wrote: > Just be careful the get_user() doesn't regenerate the same > translation error you are trying to fix by being here.. It shouldn't since it will always come up with a proper DAR but you may want to double check before hand that your instruct

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-27 Thread Joakim Tjernlund
Benjamin Herrenschmidt wrote on 27/10/2009 01:00:53: > > On Mon, 2009-10-26 at 16:26 -0700, Dan Malek wrote: > > Just be careful the get_user() doesn't regenerate the same > > translation error you are trying to fix by being here.. yes, I had some problems with this initially but managed to w

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-27 Thread Scott Wood
On Tue, Oct 27, 2009 at 10:16:17AM +0100, Joakim Tjernlund wrote: > Benjamin Herrenschmidt wrote on 27/10/2009 > 01:00:53: > > > > On Mon, 2009-10-26 at 16:26 -0700, Dan Malek wrote: > > > Just be careful the get_user() doesn't regenerate the same > > > translation error you are trying to fix by

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-27 Thread Joakim Tjernlund
Scott Wood wrote on 27/10/2009 16:58:41: > > On Tue, Oct 27, 2009 at 10:16:17AM +0100, Joakim Tjernlund wrote: > > Benjamin Herrenschmidt wrote on 27/10/2009 > > 01:00:53: > > > > > > On Mon, 2009-10-26 at 16:26 -0700, Dan Malek wrote: > > > > Just be careful the get_user() doesn't regenerate th

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-29 Thread Scott Wood
On Sat, Oct 17, 2009 at 02:01:38PM +0200, Joakim Tjernlund wrote: > Joakim Tjernlund/Transmode wrote on 17/10/2009 13:24:18: > > > > Rex Feany wrote on 16/10/2009 22:25:41: > > > > > > Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.se): > > > > > > > Right, it is the pte table walk that i

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-29 Thread Joakim Tjernlund
Scott Wood wrote on 30/10/2009 01:12:28: > > On Sat, Oct 17, 2009 at 02:01:38PM +0200, Joakim Tjernlund wrote: > > Joakim Tjernlund/Transmode wrote on 17/10/2009 13:24:18: > > > > > > Rex Feany wrote on 16/10/2009 22:25:41: > > > > > > > > Thus spake Joakim Tjernlund (joakim.tjernl...@transmode.s

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-30 Thread Scott Wood
On Sat, Oct 17, 2009 at 02:01:38PM +0200, Joakim Tjernlund wrote: > + mfspr r10, SPRN_SRR0 > DO_8xx_CPU6(0x3780, r3) > mtspr SPRN_MD_EPN, r10 > mfspr r11, SPRN_M_TWB /* Get level 1 table entry address */ > - lwz r11, 0(r11) /* Get the level 1 entry */ > + cmp

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-30 Thread Scott Wood
On Fri, Oct 30, 2009 at 12:16:07PM -0500, Scott Wood wrote: > On Sat, Oct 17, 2009 at 02:01:38PM +0200, Joakim Tjernlund wrote: > > + mfspr r10, SPRN_SRR0 > > DO_8xx_CPU6(0x3780, r3) > > mtspr SPRN_MD_EPN, r10 > > mfspr r11, SPRN_M_TWB /* Get level 1 table entry address */ > >

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-10-31 Thread Joakim Tjernlund
Scott Wood wrote on 30/10/2009 18:37:49: > > On Fri, Oct 30, 2009 at 12:16:07PM -0500, Scott Wood wrote: > > On Sat, Oct 17, 2009 at 02:01:38PM +0200, Joakim Tjernlund wrote: > > > + mfspr r10, SPRN_SRR0 > > > DO_8xx_CPU6(0x3780, r3) > > > mtspr SPRN_MD_EPN, r10 > > > mfspr r

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-11-03 Thread Joakim Tjernlund
Scott Wood wrote on 30/10/2009 18:37:49: > > On Fri, Oct 30, 2009 at 12:16:07PM -0500, Scott Wood wrote: > > On Sat, Oct 17, 2009 at 02:01:38PM +0200, Joakim Tjernlund wrote: > > > + mfspr r10, SPRN_SRR0 > > > DO_8xx_CPU6(0x3780, r3) > > > mtspr SPRN_MD_EPN, r10 > > > mfspr r

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-11-03 Thread Scott Wood
Joakim Tjernlund wrote: and things seem to work. You could probably replace the rlwinm by subtracting PAGE_OFFSET from swapper_pg_dir instead. Just guessing here, do you mean: lis r11, (swapper_pg_dir-PAGE_OFFSET)@h ori r11, r11, (swapper_pg_dir-PAGE_OFFSET)@l r

Re: [PATCH 0/8] Fix 8xx MMU/TLB

2009-11-03 Thread Joakim Tjernlund
Scott Wood wrote on 03/11/2009 17:59:30: > > Joakim Tjernlund wrote: > >> and things seem to work. You could probably replace the rlwinm by > >> subtracting PAGE_OFFSET from swapper_pg_dir instead. > > > > Just guessing here, do you mean: > >lis r11, (swapper_pg_dir-PAGE_OFFSET)@h > >or