* Re: 8xx v2.6 TLB problems and suggested workaround
From: Marcelo Tosatti @ 2005-04-07 19:38 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: linuxppc-embedded
In-Reply-To: <BCEFJBPJCGFCNMMMIDBHGEGHCLAA.Joakim.Tjernlund@lumentis.se>
Joakim,
On Thu, Apr 07, 2005 at 10:35:30PM +0200, Joakim Tjernlund wrote:
> > -----Original Message-----
> > From: Marcelo Tosatti [mailto:marcelo.tosatti@cyclades.com]
> > Sent: den 7 april 2005 14:00
> > On Wed, Apr 06, 2005 at 11:24:46PM +0200, Joakim Tjernlund wrote:
> > > > On Tue, Apr 05, 2005 at 11:51:42PM +0200, Joakim Tjernlund wrote:
> > > > > Hi Marcelo
> > > > >
> > > > > Reading your report it doesn't sound likely but I will ask anyway:
> > > > > Is it possible that the problem you are seeing isn't caused by the
> > > > > "famous" CPU bug mentioned here:
> > > > > http://ozlabs.org/pipermail/linuxppc-embedded/2005-January/016351.html
> > > > >
> > > > > The DTLB error handler needs DAR to be set correctly and since the
> > > > > dcbX instructions doesn't set DAR in either DTLB Miss nor DTLB Error you
> > > > > may end up trying to fix the wrong address.
> > > >
> > > > Hi Joakim,
> > > >
> > > > First of all, thanks your care!
> > >
> > > NP, I want to be able to run 8xx on 2.6 in the future.
> > >
> > > >
> > > > Well, I dont think the above issue is exactly what we're hitting because
> > > > DAR is correctly updated on our case with "dcbst".
> > >
> > > Are you sure? Cant remeber all details but this looks a bit strange to me
> > > SPR 826 : 0x00001f00 7936
> > > is not 0x00001 supposed to be the physical page?
> >
> > SPR 826 contains the page attributes, not Physical Page Number (which is held
> > by SPR 825).
>
> Yes, my memory is getting really bad :)
>
> Does SPR 825 hould the correct physical page? 0x000001e0 looks like
> Zero to me(I should probably bring the manual home so i don't have the rely on
> my bad memory :)
Yes, it is zero. That is because there is no pte entry for the page yet (DataStoreTLBMiss
sets the pte even if its zero). Thats when DataTLBError (EA present in TLB entry but valid
bit not set) gets called.
> > > Also DSISR: C2000000 looks strange and "impossible". Are you sure this value
> > > is correct?
> >
> > As defined by the PEM, bit 1 indicates "data-store error exception", bit 2
> > indicates:
I meant "bit 0 and bit 1".
> > "Set if the translation of an attempted access is not found in the primary hash
> > table entry group (HTEG), or in the rehashed secondary HTEG, or in the range of a
> > DBAT register (page fault condition); otherwise cleared."
> >
> > And bit 6 indicates a store operation (shouldnt be set).
>
> Yes, but bit 0 is also set and if I remember correctly(don't have the manual handy)
> it should always be zero?
Well, bit 0 and bit 1 are set.
> > > Don't understand why the "tlbie()" call works around the problem. Can you
> > > explain that a bit more?
> >
> > It must be because the TLB entry is now removed from the cache, which avoids
> > dcbst from faulting as a store.
> >
> > There must be some relation to the invalid present TLB entry and dcbst
> > misbehaviour.
> >
> > I didnt check what happens with the TLB after tlbie(), I should do that.
> > But I suppose it gets wiped off?
>
> Unless the pte gets populated(valid) before the next TLB miss I think you
> will repeat the same sequence that caused the error in the first place.
> So why does that work?
It does get populated.
The sequence is:
1) userspace access triggers DataTLBMiss
2) DataTLBMiss sets TLB from Linux pte. At this stage pte entry is still
zeroed (pte table entry clear). Thats why PPN points to page "00000".
3) DataTLBError (TLB EA match but valid bit not set) - jumps to page fault
handler
4) do_no_page()
- allocates a page
- set pte accordingly
- update_mmu_cache() (dcbst access faults as a write)
So, there must be some relation over dcbst's misbehaviour and the _invalid_
zero RPN TLB entry.
Thing is dcbst is not supposed to fault as a store operation, from what PEM
indicates.
As I understand 8xx deviates from other PPC's in many aspects. Dan says:
"The PEM cache instructions are all implemented in a microcode that
uses the 8xx unique cache control SPRs. Depending upon the state
of the cache and MMU, it seems in some cases the EA translation is
subject to a "normal" protection match instead of a load operation
match.
The behavior of these operations isn't consistent across all of the 8xx
processor revisions, especially with early silicon if people are still
using those. During conversations with Freescale engineers, it seems
the only guaranteed operation was to use the 8xx unique SPRs, but
I think I only did that in 8xx specific functions."
I'll check what the tlbie does precisely (tomorrow). I suppose it wipes the TLB
entry completly.
Would be nice to have someone from 8xx team look into this?
> > > > The problem is that it is treated as a write operation, but shouldnt.
> > > >
> > > > Maybe it is related to dcbst's inability to set DAR?
> > >
> > > Could be, but even if it isn't you are in trouble when dcbX instr.
> > > generates DTLB Misses/Errors Sooner or later you will end up with
> > > strange SEGV or hangs.
> >
> > Hangs due to the dcbX misbehaviour wrt DAR setting, you mean? (which your
> > patch corrects).
>
> Yes.
>
> >
> > Yep, that makes sense.
> >
> > > > BTW, about the CPU15 bug fix, has there been any effort to port/merge
> > > > it in v2.6 ?
> > >
> > > None that I know.
I'll try cpu15.c on v2.6 tomorrow.
^ permalink raw reply
* Re: Interrupt disabling design
From: Benjamin Herrenschmidt @ 2005-04-07 23:58 UTC (permalink / raw)
To: Garcia Jérémie; +Cc: linuxppc-dev list
In-Reply-To: <D4FDDD1349B5AC46B68FC26AD8AF42D6226B1B@exnet.3il.fr>
On Thu, 2005-04-07 at 12:23 +0200, Garcia Jérémie wrote:
> Hi everybody,
> I'm trying to emulate a VxWorks-designed application under a linux montavista environment.
> In this application I have critical portion of code which need the interrupts disabled as below:
>
> -------------------------------------
> lockKey = OSIntrLock();some
> .
> . // my critical code
> .
> bsos1IntrUnlock(lockKey);
> -------------------------------------
> As you can see we use an OS encapsulation layer which is used to call the OS routines:
On Linux, you can disable interrupts only on the current CPU. If your HW
is SMP, that cannot work, you need to complement the interrupt disabling
with a spinlock.
> ----------------------------
> int OSIntrLock(void)
> {
> return (intLock()); // vxWorks routine
> }
>
> void OSIntrUnlock(int lockKey)
> {
> intUnlock(lockKey); // vxWorks routine
> }
> ----------------------------
>
> Furthermore, I'm running my "VxWorks emulator" in the user-space and I'm not allowed to modify files others than the OS encapsulation layer ones.
> So, how can I use the "cli() / sti()" functions from the user space as below:
You cannot. Never. Forget it. If you ever need to actually disable
interrupts, you have to be a kernel driver. Period. Wrong model.
>
> | USER-SPACE | --> | KERNEL-SPACE | --> | USER-SPACE | --> | KERNEL-SPACE | --> | USER-SPACE |
> | | | | | | | | | |
> | OSIntrLock() | | cli() | | my critical code | | sti() | | ..... |
> | OSIntrUnlock() |
>
> Is it possible to do that? Cause If I do a "cli()" call, I disable interrupts --> so, will the "sti()" call work?
> If yes, it allows me to make my own system call to use them from the user space but I'm not really sure...
>
> Tks a lot for your help
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
--
Benjamin Herrenschmidt <benh@kernel.crashing.org>
^ permalink raw reply
* Re: iBook G3 owners
From: Benjamin Herrenschmidt @ 2005-04-07 23:42 UTC (permalink / raw)
To: Andreas Schwab; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <jer7hm6unm.fsf@sykes.suse.de>
On Fri, 2005-04-08 at 01:20 +0200, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>
> > I know, but this oneliner is incorrect. It can't be correct, no way.
> > That is very strange, and that's what I'm trying to figure out. Can you
> > try instead changing the start address of the flush from 0xfff00000 to 0
> > by changing the L1 flush bit initalisation from lis r4,0xfff0 to li
> > r4,0 ?
>
> This fixes the problem.
Ok, I still don't have anything like a good explanation of why this
fixes it, but it's a better workaround for now.
Ben.
^ permalink raw reply
* Re: [PATCH] [RFC] workaround buggy dcbX instructions in 8xx
From: Tom Rini @ 2005-04-07 23:35 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: Linuxppc-Embedded@Ozlabs. Org
In-Reply-To: <BCEFJBPJCGFCNMMMIDBHMEGGCLAA.Joakim.Tjernlund@lumentis.se>
On Thu, Apr 07, 2005 at 10:18:29PM +0200, Joakim Tjernlund wrote:
> >
> > On Wed, Apr 06, 2005 at 05:22:57PM +0200, Joakim Tjernlund wrote:
> >
> > > All cache instructions in 8xx are somewhat buggy as they
> > > do not update the DAR register when causing a DTLB Miss/Error
> > [snip]
> > > ===== head_8xx.S 1.21 vs edited =====
> > [snip]
> > > +#define CONFIG_8xx_DCBxFIXED
> >
> > If this is configurable, it needs to be done in the Kconfig like, well a
> > real config option. The arguement for doing it as a config option is
> > that it is possible to avoid these instructions in userland (I _think_
> > with a properly configured gcc, all you need to do is remove the
> > memset.S file from glibc), and avoid the (theoretical) slow-down.
> >
> > That said, it should also probably be an 'advanced' option that defaults
> > to the fixup.
>
> Yes, I don't want the patch applied as is. This is just how the patch
> progressed as I wen't along. I wan't to hash out what to do next
> before messing with files outside head_8xx.S.
> Should it be configurable or not?
My 2 cents is yes, under advanced options, to disable the fixup. We can
later judge if there's really been an impact and go from there.
> > [snip]
> > > +#ifdef CONFIG_8xx_DCBxFIXED
> > > +/* These macros are used to tag DAR with a known value so that the
> > > + * DataTLBError can recognize a buggy dcbx instruction and workaround
> > > + * the problem.
> > > + */
> > > +#define TAG_VAL 0x00f0 /* -1 may also be used */
> >
> > Is there an advantage of using -1? If it just "or we could use",
> > perhaps we should just comment about it, and always define TAG_VAL to
> > 0x00f0 (which will make the rest of the patch a bit cleaner).
>
> Not sure. -1 is more "logical" than 0xf0, but 0xf0 saves an instruction
> in the DTLB handlers. Comments welcome.
Less instructions the better.
> > [snip]
> > > +#ifdef CONFIG_8xx_DCBxFIXED
> > > +/* This is the workaround procedure to calculate the data EA for buggy dcbx,dcbi instructions
> > > + * by decoding the registers used by the dcbx instruction and adding them.
> > > + * DAR is set to the calculated address and r10 also holds the EA on exit.
> > > + */
> > > +//#define INSTR_CHECK /* define to verify if it is a dcbx instr. Should not be needed. */
> > > +//#define NO_SELF_MODIFYING_CODE /* define if you don't want to use self modifying code */
> > > +//#define DEBUG_DCBX_INSTRUCTIONS /* for debugging only. Needs INSTR_CHECK defined as well. */
> > > +//#define KERNEL_SPACE_ONLY /* define if user space do NOT contain dcbx instructions. */
> >
> > Aside from preferring #undef FOO to /* #define FOO *//* Comment */ and
> > detesting // comments:
> > - Perhaps just one debug symbol (combine INSTR_CHECK and
> > DEBUG_DCBX_INSTRUCTIONS).
>
> NP.
>
> > - Is there (aside from "eww, self modifying code") a good reason to have
> > NO_SELF_MODIFYING_CODE ?
>
> The self modifying code version is smaller, eaiser to maintain and possibly faster.
> I would like to remove the other alternative if acceptable.
Sounds like a plan to me.
> > - Since today, IIRC, we avoid these instructions in the kernel anyhow,
> > is there a reason for KERNEL_SPACE_ONLY ? In my mind at least, I
> > could see a why for userspace-only, but would think an all/nothing
> > approach is probably most sane (if you can avoid in space A why not
> > B?).
>
> I just started out this way and added user space later, the KERNEL_SPACE_ONLY
> should be removed.
ok.
> we don't avoid all of these instructions in kernel space, but the bigger point is that we don't
> need to avoid them if we do this workaround instead. Then 8xx can use the same code as the rest of
> the PPC CPU:s
>
> I am just showing the options with these defines and I hope we can agree on
> removing some or all of these choises.
>
> Before I invest any more time on this, is this something we want in the kernel?
Yes, I think it is.
> BTW, have you tested the patch? Does it work if you remove the 8xx special handling in
> copy_tofrom_user()?
I have not. I've been very busy, and leave for 2 weeks vacation Monday.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: iBook G3 owners
From: Andreas Schwab @ 2005-04-07 23:20 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <1112913519.9568.295.camel@gaston>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> I know, but this oneliner is incorrect. It can't be correct, no way.
> That is very strange, and that's what I'm trying to figure out. Can you
> try instead changing the start address of the flush from 0xfff00000 to 0
> by changing the L1 flush bit initalisation from lis r4,0xfff0 to li
> r4,0 ?
This fixes the problem.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: undefined reference to `zs_kgdb_
From: Tom Rini @ 2005-04-07 22:57 UTC (permalink / raw)
To: Eduardo Munoz; +Cc: linuxppc-embedded
In-Reply-To: <OFBEBF187E.5BDC9AA1-ON87256FDC.006D71EC-86256FDC.006E4252@us.ibm.com>
On Thu, Apr 07, 2005 at 02:58:16PM -0500, Eduardo Munoz wrote:
> Hey!!
>
> I am trying to compile my ppc kernel 2.6 with KGDB enable and it fails
> with the following message:
>
> LD .tmp_vmlinux1
> arch/ppc/platforms/built-in.o(.init.text+0xfc4): In function
> `pmac_setup_arch':
> arch/ppc/platforms/pmac_setup.c:301: undefined reference to `zs_kgdb_hook'
> make: *** [.tmp_vmlinux1] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.40235 (%build)
KGDB is not supported on PPC_MULTIPLATFORM. If you want something like
pegasos you might be able to kludge in arch/ppc/syslib/gen550_* so that
you can get it working for you, however.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: iBook G3 owners
From: Benjamin Herrenschmidt @ 2005-04-07 22:38 UTC (permalink / raw)
To: Andreas Schwab; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <jezmwa6y4i.fsf@sykes.suse.de>
On Fri, 2005-04-08 at 00:05 +0200, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>
> > http://gate.crashing.org/~benh/ppc32-pmac-sleep-fix.diff
>
> This patch does not work on the 750fx, I'm getting random crashes on
> wakeup. When I replace it with this one-liner, all is well again:
I know, but this oneliner is incorrect. It can't be correct, no way.
That is very strange, and that's what I'm trying to figure out. Can you
try instead changing the start address of the flush from 0xfff00000 to 0
by changing the L1 flush bit initalisation from lis r4,0xfff0 to li
r4,0 ?
Ben.
^ permalink raw reply
* Re: [PATCH] invalid instructions in kernel mode
From: Kumar Gala @ 2005-04-07 22:29 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-dev
In-Reply-To: <20050407221440.GT3396@smtp.west.cox.net>
[snip]
> > >The problem here is, HEY! (classic) FP instrs in the kernel.? The
> > > question is why?? Or rather, why are these four classic FP instrs
> > > (lfs/lfd/stfd/stfs) being done on CONFIG_4xx || E500 when neither=20=
> has
> > > classic FP?? I think the problem here is that on !FPU
> > >(which is 4xx||E500||8xx, or so), we need to rewrite these two
> > > functions (yes, 8xx does emulate them if hit, but that's a=20
> tangent).
> >
> > What is not clear to me is what condition causes these to get hit on=20=
> an
> > e500.
>
> They are called in align.c from fix_alignment().=A0 As has been said,=20=
> some
> of the stress testing apps in LTP will trigger this.=A0 Since the=20
> comment
> around the code in question (in fix_alignent()) is
> /* Single-precision FP load and store require conversions... */
> perhaps it's more valid to not define these functions on e500 || 4xx,
> and make the two cases in the switch there depend on !e500 && !4xx.
What I'm concerned about what instruction is actually causing this=20
fault that e500 actually gets into this case to began with. Maybe I=20
missed something in the email thread, but it would seem the only way to=20=
get here is via kernel emulation of the floating point load/store=20
instructions, but that seems odd since they would have to be doing=20
normal integer load/store... something is not quiet right in all this.
Before we go start making changes I really do want to know what=20
instruction, with what effective address is causing this case to get=20
triggered.
Can someone add something like the following:
if (__get_user(instr, (unsigned int __user *) regs->nip))
return 0;
int insn_orig;
....
insn_orig =3D instr;
....
case LD+F+S:
printk ("align fault [LD+F+S] for insn =3D %x @ %x\n", insn_orig,=20=
regs->nip);
..
case ST+F+S:
printk ("align fault [ST+F+S] for insn =3D %x @ %x\n", insn_orig,=20=
regs->nip);
and report back the results.
thanks
- kumar
^ permalink raw reply
* Re: [PATCH] invalid instructions in kernel mode
From: Tom Rini @ 2005-04-07 22:14 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <f3f5e13e4c8b3cb7b327fb51db84150d@freescale.com>
On Thu, Apr 07, 2005 at 04:41:59PM -0500, Kumar Gala wrote:
>
> On Apr 7, 2005, at 12:38 PM, Tom Rini wrote:
>
> >On Thu, Mar 31, 2005 at 07:47:32PM +0200, Fillod Stephane wrote:
> >
> >> When CPU has no (classic) FPU, and math emulation is disabled,
> > > fp instructions are not allowed in kernel mode.
> > [snip]
> > > --- linux/arch/ppc/kernel/misc.S????? 26 Mar 2005 03:28:36 -0000
> > > 1.1.1.2
> > > +++ linux/arch/ppc/kernel/misc.S????? 31 Mar 2005 16:33:25 -0000
> > > @@ -1096,7 +1096,8 @@
> > >?? * and exceptions as if the cpu had performed the load or store.
> > >?? */
> > >?
> >> -#if defined(CONFIG_4xx) || defined(CONFIG_E500)
> >> +#if !(defined(CONFIG_4xx) || defined(CONFIG_E500) ||
> > > defined(CONFIG_8xx)) ||? defined(CONFIG_MATH_EMULATION)
> >> +#if defined(CONFIG_4xx) || defined(CONFIG_E500)
> >>? _GLOBAL(cvt_fd)
> >>? ???? lfs???? 0,0(r3)
> > >? ???? stfd??? 0,0(r4)
> > > @@ -1125,6 +1126,7 @@
> > >? ???? stfd??? 0,-4(r5)
> > >? ???? blr
> > >? #endif
> > > +#endif
> >
> >The problem here is, HEY! (classic) FP instrs in the kernel.? The
> > question is why?? Or rather, why are these four classic FP instrs
> > (lfs/lfd/stfd/stfs) being done on CONFIG_4xx || E500 when neither has
> > classic FP?? I think the problem here is that on !FPU
> >(which is 4xx||E500||8xx, or so), we need to rewrite these two
> > functions (yes, 8xx does emulate them if hit, but that's a tangent).
>
> What is not clear to me is what condition causes these to get hit on an
> e500.
They are called in align.c from fix_alignment(). As has been said, some
of the stress testing apps in LTP will trigger this. Since the comment
around the code in question (in fix_alignent()) is
/* Single-precision FP load and store require conversions... */
perhaps it's more valid to not define these functions on e500 || 4xx,
and make the two cases in the switch there depend on !e500 && !4xx.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: iBook G3 owners
From: Andreas Schwab @ 2005-04-07 22:05 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc@lists.debian.org
In-Reply-To: <1112616384.19004.60.camel@gaston>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> http://gate.crashing.org/~benh/ppc32-pmac-sleep-fix.diff
This patch does not work on the 750fx, I'm getting random crashes on
wakeup. When I replace it with this one-liner, all is well again:
--- linux-2.6.12-rc2.orig/arch/ppc/platforms/pmac_cache.S 2005-04-04 23:05:41.000000000 +0200
+++ linux-2.6.12-rc2/arch/ppc/platforms/pmac_cache.S 2005-04-07 23:22:04.000000000 +0200
@@ -73,7 +73,7 @@
/* disable / invalidate / enable L1 data */
mfspr r3,SPRN_HID0
- rlwinm r0,r0,0,~HID0_DCE
+ rlwinm r3,r3,0,~(HID0_DCE | HID0_ICE)
mtspr SPRN_HID0,r3
sync
isync
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply
* Re: [PATCH] invalid instructions in kernel mode
From: Kumar Gala @ 2005-04-07 21:41 UTC (permalink / raw)
To: Tom Rini; +Cc: linuxppc-dev
In-Reply-To: <20050407173821.GQ3396@smtp.west.cox.net>
On Apr 7, 2005, at 12:38 PM, Tom Rini wrote:
> On Thu, Mar 31, 2005 at 07:47:32PM +0200, Fillod Stephane wrote:
>
> > When CPU has no (classic) FPU, and math emulation is disabled,
> > fp instructions are not allowed in kernel mode.
> [snip]
> > --- linux/arch/ppc/kernel/misc.S=A0=A0=A0=A0=A0 26 Mar 2005 =
03:28:36 -0000
> > 1.1.1.2
> > +++ linux/arch/ppc/kernel/misc.S=A0=A0=A0=A0=A0 31 Mar 2005 =
16:33:25 -0000
> > @@ -1096,7 +1096,8 @@
> >=A0=A0 * and exceptions as if the cpu had performed the load or =
store.
> >=A0=A0 */
> >=A0
> > -#if defined(CONFIG_4xx) || defined(CONFIG_E500)
> > +#if !(defined(CONFIG_4xx) || defined(CONFIG_E500) ||
> > defined(CONFIG_8xx)) ||=A0 defined(CONFIG_MATH_EMULATION)
> > +#if defined(CONFIG_4xx) || defined(CONFIG_E500)
> >=A0 _GLOBAL(cvt_fd)
> >=A0 =A0=A0=A0=A0 lfs=A0=A0=A0=A0 0,0(r3)
> >=A0 =A0=A0=A0=A0 stfd=A0=A0=A0 0,0(r4)
> > @@ -1125,6 +1126,7 @@
> >=A0 =A0=A0=A0=A0 stfd=A0=A0=A0 0,-4(r5)
> >=A0 =A0=A0=A0=A0 blr
> >=A0 #endif
> > +#endif
>
> The problem here is, HEY! (classic) FP instrs in the kernel.=A0 The
> question is why?=A0 Or rather, why are these four classic FP instrs
> (lfs/lfd/stfd/stfs) being done on CONFIG_4xx || E500 when neither has
> classic FP?=A0 I think the problem here is that on !FPU
> (which is 4xx||E500||8xx, or so), we need to rewrite these two
> functions (yes, 8xx does emulate them if hit, but that's a tangent).
What is not clear to me is what condition causes these to get hit on an=20=
e500.
- kumar
^ permalink raw reply
* [PATCH] ppc32: Support 36-bit physical addressing on e500 (fwd)
From: Kumar Gala @ 2005-04-07 21:21 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: linux-kernel
Oops, forget to CC the lists on this one.
- kumar
---------- Forwarded message ----------
Date: Thu, 7 Apr 2005 16:20:43 -0500 (CDT)
From: Kumar Gala <galak@freescale.com>
To: Andrew Morton <akpm@osdl.org>
Subject: [PATCH] ppc32: Support 36-bit physical addressing on e500
Andrew,
To add support for 36-bit physical addressing on e500 the following
changes have been made. The changes are generalized to support any
physical address size larger than 32-bits:
* Allow FSL Book-E parts to use a 64-bit PTE, it is 44-bits of pfn,
20-bits of flags.
* Introduced new CPU feature (CPU_FTR_BIG_PHYS) to allow runtime
handling of updating hardware register (SPRN_MAS7) which holds the upper
32-bits of physical address that will be written into the TLB. This is
useful since not all e500 cores support 36-bit physical addressing.
* Currently have a pass through implementation of fixup_bigphys_addr
* Moved _PAGE_DIRTY in the 64-bit PTE case to free room for three
additional storage attributes that may exist in future FSL Book-E cores
and updated fault handler to copy these bits into the hardware TLBs.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
diff -Nru a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig 2005-04-07 16:19:41 -05:00
+++ b/arch/ppc/Kconfig 2005-04-07 16:19:41 -05:00
@@ -98,13 +98,19 @@
config PTE_64BIT
bool
- depends on 44x
- default y
+ depends on 44x || E500
+ default y if 44x
+ default y if E500 && PHYS_64BIT
config PHYS_64BIT
- bool
- depends on 44x
- default y
+ bool 'Large physical address support' if E500
+ depends on 44x || E500
+ default y if 44x
+ ---help---
+ This option enables kernel support for larger than 32-bit physical
+ addresses. This features is not be available on all e500 cores.
+
+ If in doubt, say N here.
config ALTIVEC
bool "AltiVec Support"
diff -Nru a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S
--- a/arch/ppc/kernel/head_fsl_booke.S 2005-04-07 16:19:41 -05:00
+++ b/arch/ppc/kernel/head_fsl_booke.S 2005-04-07 16:19:41 -05:00
@@ -347,6 +347,38 @@
mtspr SPRN_SRR1,r3
rfi /* change context and jump to start_kernel */
+/* Macros to hide the PTE size differences
+ *
+ * FIND_PTE -- walks the page tables given EA & pgdir pointer
+ * r10 -- EA of fault
+ * r11 -- PGDIR pointer
+ * r12 -- free
+ * label 2: is the bailout case
+ *
+ * if we find the pte (fall through):
+ * r11 is low pte word
+ * r12 is pointer to the pte
+ */
+#ifdef CONFIG_PTE_64BIT
+#define PTE_FLAGS_OFFSET 4
+#define FIND_PTE \
+ rlwinm r12, r10, 13, 19, 29; /* Compute pgdir/pmd offset */ \
+ lwzx r11, r12, r11; /* Get pgd/pmd entry */ \
+ rlwinm. r12, r11, 0, 0, 20; /* Extract pt base address */ \
+ beq 2f; /* Bail if no table */ \
+ rlwimi r12, r10, 23, 20, 28; /* Compute pte address */ \
+ lwz r11, 4(r12); /* Get pte entry */
+#else
+#define PTE_FLAGS_OFFSET 0
+#define FIND_PTE \
+ rlwimi r11, r10, 12, 20, 29; /* Create L1 (pgdir/pmd) address */ \
+ lwz r11, 0(r11); /* Get L1 entry */ \
+ rlwinm. r12, r11, 0, 0, 19; /* Extract L2 (pte) base address */ \
+ beq 2f; /* Bail if no table */ \
+ rlwimi r12, r10, 22, 20, 29; /* Compute PTE address */ \
+ lwz r11, 0(r12); /* Get Linux PTE */
+#endif
+
/*
* Interrupt vector entry code
*
@@ -405,13 +437,7 @@
mfspr r11,SPRN_SPRG3
lwz r11,PGDIR(r11)
4:
- rlwimi r11, r10, 12, 20, 29 /* Create L1 (pgdir/pmd) address */
- lwz r11, 0(r11) /* Get L1 entry */
- rlwinm. r12, r11, 0, 0, 19 /* Extract L2 (pte) base address */
- beq 2f /* Bail if no table */
-
- rlwimi r12, r10, 22, 20, 29 /* Compute PTE address */
- lwz r11, 0(r12) /* Get Linux PTE */
+ FIND_PTE
/* Are _PAGE_USER & _PAGE_RW set & _PAGE_HWWRITE not? */
andi. r13, r11, _PAGE_RW|_PAGE_USER|_PAGE_HWWRITE
@@ -420,14 +446,12 @@
/* Update 'changed'. */
ori r11, r11, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
- stw r11, 0(r12) /* Update Linux page table */
+ stw r11, PTE_FLAGS_OFFSET(r12) /* Update Linux page table */
/* MAS2 not updated as the entry does exist in the tlb, this
fault taken to detect state transition (eg: COW -> DIRTY)
*/
- lis r12, MAS3_RPN@h
- ori r12, r12, _PAGE_HWEXEC | MAS3_RPN@l
- and r11, r11, r12
+ andi. r11, r11, _PAGE_HWEXEC
rlwimi r11, r11, 31, 27, 27 /* SX <- _PAGE_HWEXEC */
ori r11, r11, (MAS3_UW|MAS3_SW|MAS3_UR|MAS3_SR)@l /* set static perms */
@@ -439,7 +463,10 @@
/* find the TLB index that caused the fault. It has to be here. */
tlbsx 0, r10
- mtspr SPRN_MAS3,r11
+ /* only update the perm bits, assume the RPN is fine */
+ mfspr r12, SPRN_MAS3
+ rlwimi r12, r11, 0, 20, 31
+ mtspr SPRN_MAS3,r12
tlbwe
/* Done...restore registers and get out of here. */
@@ -530,18 +557,15 @@
lwz r11,PGDIR(r11)
4:
- rlwimi r11, r10, 12, 20, 29 /* Create L1 (pgdir/pmd) address */
- lwz r11, 0(r11) /* Get L1 entry */
- rlwinm. r12, r11, 0, 0, 19 /* Extract L2 (pte) base address */
- beq 2f /* Bail if no table */
-
- rlwimi r12, r10, 22, 20, 29 /* Compute PTE address */
- lwz r11, 0(r12) /* Get Linux PTE */
- andi. r13, r11, _PAGE_PRESENT
- beq 2f
-
+ FIND_PTE
+ andi. r13, r11, _PAGE_PRESENT /* Is the page present? */
+ beq 2f /* Bail if not present */
+
+#ifdef CONFIG_PTE_64BIT
+ lwz r13, 0(r12)
+#endif
ori r11, r11, _PAGE_ACCESSED
- stw r11, 0(r12)
+ stw r11, PTE_FLAGS_OFFSET(r12)
/* Jump to common tlb load */
b finish_tlb_load
@@ -594,18 +618,15 @@
lwz r11,PGDIR(r11)
4:
- rlwimi r11, r10, 12, 20, 29 /* Create L1 (pgdir/pmd) address */
- lwz r11, 0(r11) /* Get L1 entry */
- rlwinm. r12, r11, 0, 0, 19 /* Extract L2 (pte) base address */
- beq 2f /* Bail if no table */
-
- rlwimi r12, r10, 22, 20, 29 /* Compute PTE address */
- lwz r11, 0(r12) /* Get Linux PTE */
- andi. r13, r11, _PAGE_PRESENT
- beq 2f
-
+ FIND_PTE
+ andi. r13, r11, _PAGE_PRESENT /* Is the page present? */
+ beq 2f /* Bail if not present */
+
+#ifdef CONFIG_PTE_64BIT
+ lwz r13, 0(r12)
+#endif
ori r11, r11, _PAGE_ACCESSED
- stw r11, 0(r12)
+ stw r11, PTE_FLAGS_OFFSET(r12)
/* Jump to common TLB load point */
b finish_tlb_load
@@ -690,27 +711,39 @@
*/
mfspr r12, SPRN_MAS2
+#ifdef CONFIG_PTE_64BIT
+ rlwimi r12, r11, 26, 24, 31 /* extract ...WIMGE from pte */
+#else
rlwimi r12, r11, 26, 27, 31 /* extract WIMGE from pte */
+#endif
mtspr SPRN_MAS2, r12
bge 5, 1f
- /* addr > TASK_SIZE */
- li r10, (MAS3_UX | MAS3_UW | MAS3_UR)
- andi. r13, r11, (_PAGE_USER | _PAGE_HWWRITE | _PAGE_HWEXEC)
- andi. r12, r11, _PAGE_USER /* Test for _PAGE_USER */
- iseleq r12, 0, r10
- and r10, r12, r13
- srwi r12, r10, 1
+ /* is user addr */
+ andi. r12, r11, (_PAGE_USER | _PAGE_HWWRITE | _PAGE_HWEXEC)
+ andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */
+ srwi r10, r12, 1
or r12, r12, r10 /* Copy user perms into supervisor */
+ iseleq r12, 0, r12
b 2f
- /* addr <= TASK_SIZE */
+ /* is kernel addr */
1: rlwinm r12, r11, 31, 29, 29 /* Extract _PAGE_HWWRITE into SW */
ori r12, r12, (MAS3_SX | MAS3_SR)
+#ifdef CONFIG_PTE_64BIT
+2: rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */
+ rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */
+ mtspr SPRN_MAS3, r12
+BEGIN_FTR_SECTION
+ srwi r10, r13, 8 /* grab RPN[8:31] */
+ mtspr SPRN_MAS7, r10
+END_FTR_SECTION_IFSET(CPU_FTR_BIG_PHYS)
+#else
2: rlwimi r11, r12, 0, 20, 31 /* Extract RPN from PTE and merge with perms */
mtspr SPRN_MAS3, r11
+#endif
tlbwe
/* Done...restore registers and get out of here. */
diff -Nru a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c
--- a/arch/ppc/syslib/ppc85xx_common.c 2005-04-07 16:19:41 -05:00
+++ b/arch/ppc/syslib/ppc85xx_common.c 2005-04-07 16:19:41 -05:00
@@ -31,3 +31,11 @@
}
EXPORT_SYMBOL(get_ccsrbar);
+
+/* For now this is a pass through */
+phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size)
+{
+ return addr;
+};
+EXPORT_SYMBOL(fixup_bigphys_addr);
+
diff -Nru a/include/asm-ppc/cputable.h b/include/asm-ppc/cputable.h
--- a/include/asm-ppc/cputable.h 2005-04-07 16:19:41 -05:00
+++ b/include/asm-ppc/cputable.h 2005-04-07 16:19:41 -05:00
@@ -86,8 +86,9 @@
#define CPU_FTR_DUAL_PLL_750FX 0x00004000
#define CPU_FTR_NO_DPM 0x00008000
#define CPU_FTR_HAS_HIGH_BATS 0x00010000
-#define CPU_FTR_NEED_COHERENT 0x00020000
+#define CPU_FTR_NEED_COHERENT 0x00020000
#define CPU_FTR_NO_BTIC 0x00040000
+#define CPU_FTR_BIG_PHYS 0x00080000
#ifdef __ASSEMBLY__
diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
--- a/include/asm-ppc/pgtable.h 2005-04-07 16:19:41 -05:00
+++ b/include/asm-ppc/pgtable.h 2005-04-07 16:19:41 -05:00
@@ -225,8 +225,7 @@
/* ERPN in a PTE never gets cleared, ignore it */
#define _PTE_NONE_MASK 0xffffffff00000000ULL
-#elif defined(CONFIG_E500)
-
+#elif defined(CONFIG_FSL_BOOKE)
/*
MMU Assist Register 3:
@@ -240,21 +239,29 @@
entries use the top 29 bits.
*/
-/* Definitions for e500 core */
-#define _PAGE_PRESENT 0x001 /* S: PTE contains a translation */
-#define _PAGE_USER 0x002 /* S: User page (maps to UR) */
-#define _PAGE_FILE 0x002 /* S: when !present: nonlinear file mapping */
-#define _PAGE_ACCESSED 0x004 /* S: Page referenced */
-#define _PAGE_HWWRITE 0x008 /* H: Dirty & RW, set in exception */
-#define _PAGE_RW 0x010 /* S: Write permission */
-#define _PAGE_HWEXEC 0x020 /* H: UX permission */
-
-#define _PAGE_ENDIAN 0x040 /* H: E bit */
-#define _PAGE_GUARDED 0x080 /* H: G bit */
-#define _PAGE_COHERENT 0x100 /* H: M bit */
-#define _PAGE_NO_CACHE 0x200 /* H: I bit */
-#define _PAGE_WRITETHRU 0x400 /* H: W bit */
-#define _PAGE_DIRTY 0x800 /* S: Page dirty */
+/* Definitions for FSL Book-E Cores */
+#define _PAGE_PRESENT 0x00001 /* S: PTE contains a translation */
+#define _PAGE_USER 0x00002 /* S: User page (maps to UR) */
+#define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */
+#define _PAGE_ACCESSED 0x00004 /* S: Page referenced */
+#define _PAGE_HWWRITE 0x00008 /* H: Dirty & RW, set in exception */
+#define _PAGE_RW 0x00010 /* S: Write permission */
+#define _PAGE_HWEXEC 0x00020 /* H: UX permission */
+
+#define _PAGE_ENDIAN 0x00040 /* H: E bit */
+#define _PAGE_GUARDED 0x00080 /* H: G bit */
+#define _PAGE_COHERENT 0x00100 /* H: M bit */
+#define _PAGE_NO_CACHE 0x00200 /* H: I bit */
+#define _PAGE_WRITETHRU 0x00400 /* H: W bit */
+
+#ifdef CONFIG_PTE_64BIT
+#define _PAGE_DIRTY 0x08000 /* S: Page dirty */
+
+/* ERPN in a PTE never gets cleared, ignore it */
+#define _PTE_NONE_MASK 0xffffffffffff0000ULL
+#else
+#define _PAGE_DIRTY 0x00800 /* S: Page dirty */
+#endif
#define _PMD_PRESENT 0
#define _PMD_PRESENT_MASK (PAGE_MASK)
@@ -433,7 +440,11 @@
/* in some case we want to additionaly adjust where the pfn is in the pte to
* allow room for more flags */
+#if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_PTE_64BIT)
+#define PFN_SHIFT_OFFSET (PAGE_SHIFT + 8)
+#else
#define PFN_SHIFT_OFFSET (PAGE_SHIFT)
+#endif
#define pte_pfn(x) (pte_val(x) >> PFN_SHIFT_OFFSET)
#define pte_page(x) pfn_to_page(pte_pfn(x))
diff -Nru a/include/asm-ppc/reg_booke.h b/include/asm-ppc/reg_booke.h
--- a/include/asm-ppc/reg_booke.h 2005-04-07 16:19:41 -05:00
+++ b/include/asm-ppc/reg_booke.h 2005-04-07 16:19:41 -05:00
@@ -172,6 +172,7 @@
#define SPRN_MAS4 0x274 /* MMU Assist Register 4 */
#define SPRN_MAS5 0x275 /* MMU Assist Register 5 */
#define SPRN_MAS6 0x276 /* MMU Assist Register 6 */
+#define SPRN_MAS7 0x3b0 /* MMU Assist Register 7 */
#define SPRN_PID1 0x279 /* Process ID Register 1 */
#define SPRN_PID2 0x27A /* Process ID Register 2 */
#define SPRN_TLB0CFG 0x2B0 /* TLB 0 Config Register */
^ permalink raw reply
* RE: 8xx v2.6 TLB problems and suggested workaround
From: Joakim Tjernlund @ 2005-04-07 20:35 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-embedded
In-Reply-To: <20050407120013.GF14822@logos.cnet>
> -----Original Message-----
> From: Marcelo Tosatti [mailto:marcelo.tosatti@cyclades.com]
> Sent: den 7 april 2005 14:00
> On Wed, Apr 06, 2005 at 11:24:46PM +0200, Joakim Tjernlund wrote:
> > > On Tue, Apr 05, 2005 at 11:51:42PM +0200, Joakim Tjernlund wrote:
> > > > Hi Marcelo
> > > >
> > > > Reading your report it doesn't sound likely but I will ask anyway:
> > > > Is it possible that the problem you are seeing isn't caused by the
> > > > "famous" CPU bug mentioned here:
> > > > http://ozlabs.org/pipermail/linuxppc-embedded/2005-January/016351.html
> > > >
> > > > The DTLB error handler needs DAR to be set correctly and since the
> > > > dcbX instructions doesn't set DAR in either DTLB Miss nor DTLB Error you
> > > > may end up trying to fix the wrong address.
> > >
> > > Hi Joakim,
> > >
> > > First of all, thanks your care!
> >
> > NP, I want to be able to run 8xx on 2.6 in the future.
> >
> > >
> > > Well, I dont think the above issue is exactly what we're hitting because
> > > DAR is correctly updated on our case with "dcbst".
> >
> > Are you sure? Cant remeber all details but this looks a bit strange to me
> > SPR 826 : 0x00001f00 7936
> > is not 0x00001 supposed to be the physical page?
>
> SPR 826 contains the page attributes, not Physical Page Number (which is held
> by SPR 825).
Yes, my memory is getting really bad :)
Does SPR 825 hould the correct physical page? 0x000001e0 looks like
Zero to me(I should probably bring the manual home so i don't have the rely on
my bad memory :)
>
> > Also DSISR: C2000000 looks strange and "impossible". Are you sure this value
> > is correct?
>
> As defined by the PEM, bit 1 indicates "data-store error exception", bit 2
> indicates:
>
> "Set if the translation of an attempted access is not found in the primary hash
> table entry group (HTEG), or in the rehashed secondary HTEG, or in the range of a
> DBAT register (page fault condition); otherwise cleared."
>
> And bit 6 indicates a store operation (shouldnt be set).
Yes, but bit 0 is also set and if I remember correctly(don't have the manual handy)
it should always be zero?
>
> > Don't understand why the "tlbie()" call works around the problem. Can you
> > explain that a bit more?
>
> It must be because the TLB entry is now removed from the cache, which avoids
> dcbst from faulting as a store.
>
> There must be some relation to the invalid present TLB entry and dcbst
> misbehaviour.
>
> I didnt check what happens with the TLB after tlbie(), I should do that.
> But I suppose it gets wiped off?
Unless the pte gets populated(valid) before the next TLB miss I think you
will repeat the same sequence that caused the error in the first place. So
why does that work?
>
> > > The problem is that it is treated as a write operation, but shouldnt.
> > >
> > > Maybe it is related to dcbst's inability to set DAR?
> >
> > Could be, but even if it isn't you are in trouble when dcbX instr.
> > generates DTLB Misses/Errors Sooner or later you will end up with
> > strange SEGV or hangs.
>
> Hangs due to the dcbX misbehaviour wrt DAR setting, you mean? (which your
> patch corrects).
Yes.
>
> Yep, that makes sense.
>
> > > BTW, about the CPU15 bug fix, has there been any effort to port/merge
> > > it in v2.6 ?
> >
> > None that I know.
^ permalink raw reply
* RE: [PATCH] [RFC] workaround buggy dcbX instructions in 8xx
From: Joakim Tjernlund @ 2005-04-07 20:18 UTC (permalink / raw)
To: Tom Rini; +Cc: Linuxppc-Embedded@Ozlabs. Org
In-Reply-To: <20050407161935.GM3396@smtp.west.cox.net>
>
> On Wed, Apr 06, 2005 at 05:22:57PM +0200, Joakim Tjernlund wrote:
>
> > All cache instructions in 8xx are somewhat buggy as they
> > do not update the DAR register when causing a DTLB Miss/Error
> [snip]
> > ===== head_8xx.S 1.21 vs edited =====
> [snip]
> > +#define CONFIG_8xx_DCBxFIXED
>
> If this is configurable, it needs to be done in the Kconfig like, well a
> real config option. The arguement for doing it as a config option is
> that it is possible to avoid these instructions in userland (I _think_
> with a properly configured gcc, all you need to do is remove the
> memset.S file from glibc), and avoid the (theoretical) slow-down.
>
> That said, it should also probably be an 'advanced' option that defaults
> to the fixup.
Yes, I don't want the patch applied as is. This is just how the patch
progressed as I wen't along. I wan't to hash out what to do next
before messing with files outside head_8xx.S.
Should it be configurable or not?
>
> [snip]
> > +#ifdef CONFIG_8xx_DCBxFIXED
> > +/* These macros are used to tag DAR with a known value so that the
> > + * DataTLBError can recognize a buggy dcbx instruction and workaround
> > + * the problem.
> > + */
> > +#define TAG_VAL 0x00f0 /* -1 may also be used */
>
> Is there an advantage of using -1? If it just "or we could use",
> perhaps we should just comment about it, and always define TAG_VAL to
> 0x00f0 (which will make the rest of the patch a bit cleaner).
Not sure. -1 is more "logical" than 0xf0, but 0xf0 saves an instruction
in the DTLB handlers. Comments welcome.
>
> [snip]
> > +#ifdef CONFIG_8xx_DCBxFIXED
> > +/* This is the workaround procedure to calculate the data EA for buggy dcbx,dcbi instructions
> > + * by decoding the registers used by the dcbx instruction and adding them.
> > + * DAR is set to the calculated address and r10 also holds the EA on exit.
> > + */
> > +//#define INSTR_CHECK /* define to verify if it is a dcbx instr. Should not be needed. */
> > +//#define NO_SELF_MODIFYING_CODE /* define if you don't want to use self modifying code */
> > +//#define DEBUG_DCBX_INSTRUCTIONS /* for debugging only. Needs INSTR_CHECK defined as well. */
> > +//#define KERNEL_SPACE_ONLY /* define if user space do NOT contain dcbx instructions. */
>
> Aside from preferring #undef FOO to /* #define FOO *//* Comment */ and
> detesting // comments:
> - Perhaps just one debug symbol (combine INSTR_CHECK and
> DEBUG_DCBX_INSTRUCTIONS).
NP.
> - Is there (aside from "eww, self modifying code") a good reason to have
> NO_SELF_MODIFYING_CODE ?
The self modifying code version is smaller, eaiser to maintain and possibly faster.
I would like to remove the other alternative if acceptable.
> - Since today, IIRC, we avoid these instructions in the kernel anyhow,
> is there a reason for KERNEL_SPACE_ONLY ? In my mind at least, I
> could see a why for userspace-only, but would think an all/nothing
> approach is probably most sane (if you can avoid in space A why not
> B?).
I just started out this way and added user space later, the KERNEL_SPACE_ONLY
should be removed.
we don't avoid all of these instructions in kernel space, but the bigger point is that we don't
need to avoid them if we do this workaround instead. Then 8xx can use the same code as the rest of
the PPC CPU:s
I am just showing the options with these defines and I hope we can agree on
removing some or all of these choises.
Before I invest any more time on this, is this something we want in the kernel?
BTW, have you tested the patch? Does it work if you remove the 8xx special handling in
copy_tofrom_user()?
Jocke
^ permalink raw reply
* undefined reference to `zs_kgdb_
From: Eduardo Munoz @ 2005-04-07 19:58 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 499 bytes --]
Hey!!
I am trying to compile my ppc kernel 2.6 with KGDB enable and it fails
with the following message:
LD .tmp_vmlinux1
arch/ppc/platforms/built-in.o(.init.text+0xfc4): In function
`pmac_setup_arch':
arch/ppc/platforms/pmac_setup.c:301: undefined reference to `zs_kgdb_hook'
make: *** [.tmp_vmlinux1] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.40235 (%build)
I am sure you have seen this!
Any ideas how to fix it??
Regards,
Eduardo A. Munoz
eamunoz@us.ibm.com
512-838-8219
[-- Attachment #2: Type: text/html, Size: 600 bytes --]
^ permalink raw reply
* [PATCH] ppc32: Allow adjust of pfn offset in pte
From: Kumar Gala @ 2005-04-07 19:26 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev, linux-kernel, linuxppc-embedded
Andrew,
Allow the pfn to be offset by more than just PAGE_SHIFT in the pte.
Today, PAGE_SHIFT tends to allow us to have 12-bits of flags in the pte.
In the future if we have a larger pte we can allocate more bits for flags
by offsetting the pfn even further.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
--- a/include/asm-ppc/pgtable.h 2005-04-07 14:25:07 -05:00
+++ b/include/asm-ppc/pgtable.h 2005-04-07 14:25:07 -05:00
@@ -431,10 +431,15 @@
* Conversions between PTE values and page frame numbers.
*/
-#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)
+/* in some case we want to additionaly adjust where the pfn is in the pte to
+ * allow room for more flags */
+#define PFN_SHIFT_OFFSET (PAGE_SHIFT)
+
+#define pte_pfn(x) (pte_val(x) >> PFN_SHIFT_OFFSET)
#define pte_page(x) pfn_to_page(pte_pfn(x))
-#define pfn_pte(pfn, prot) __pte(((pte_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pfn_pte(pfn, prot) __pte(((pte_basic_t)(pfn) << PFN_SHIFT_OFFSET) |\
+ pgprot_val(prot))
#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
/*
^ permalink raw reply
* [PATCH] FCC Ethernet startup crash
From: Rune Torgersen @ 2005-04-07 19:22 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
This patch fizxes a race condition in the FCC ethernet driver, where the
ethernet driver starts to receive packets before the IP layer is
initialized.
This pathch is originally from Stefan Nickl <Stefan.Nickl@kontron.com>
for the linuxppc2.4 three, redone for 2.6 and tested.
Signed-off-by: Rune Torgersen <runet@innovsys.com>
Rune Torgersen
System Developer
Innovative Systems LLC
1000 Innovative Drive
Mitchell, SD 57301
Ph: 605-995-6120
www.innovsys.com
[-- Attachment #2: fcc_enet_startup_crash.patch --]
[-- Type: application/octet-stream, Size: 955 bytes --]
===== arch/ppc/8260_io/fcc_enet.c 1.24 vs edited =====
--- 1.24/arch/ppc/8260_io/fcc_enet.c 2005-03-18 14:51:31 -06:00
+++ edited/arch/ppc/8260_io/fcc_enet.c 2005-04-07 14:13:31 -05:00
@@ -2158,16 +2158,6 @@
*(volatile uint *)(BCSR_ADDR + 12) &= ~BCSR3_FETHIEN2;
*(volatile uint *)(BCSR_ADDR + 12) |= BCSR3_FETH2_RST;
#endif
-
-#if defined(CONFIG_USE_MDIO) || defined(CONFIG_TQM8260)
- /* start in full duplex mode, and negotiate speed
- */
- fcc_restart (dev, 1);
-#else
- /* start in half duplex mode
- */
- fcc_restart (dev, 0);
-#endif
}
#ifdef CONFIG_USE_MDIO
@@ -2367,6 +2357,16 @@
fcc_enet_open(struct net_device *dev)
{
struct fcc_enet_private *fep = dev->priv;
+
+#if defined(CONFIG_USE_MDIO) || defined(CONFIG_TQM8260)
+ /* start in full duplex mode, and negotiate speed
+ */
+ fcc_restart (dev, 1);
+#else
+ /* start in half duplex mode
+ */
+ fcc_restart (dev, 0);
+#endif
#ifdef CONFIG_USE_MDIO
fep->sequence_done = 0;
^ permalink raw reply
* [PATCH] ppc32: make usage of CONFIG_PTE_64BIT & CONFIG_PHYS_64BIT consistent
From: Kumar Gala @ 2005-04-07 19:14 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, linuxppc-dev, Paul Mackerras, linuxppc-embedded
Andrew,
CONFIG_PTE_64BIT & CONFIG_PHYS_64BIT are not currently consistently used
in the code base. Fixed up the usage such that CONFIG_PTE_64BIT is used
when we have a 64-bit PTE regardless of physical address width.
CONFIG_PHYS_64BIT is used if the physical address width is larger than
32-bits, regardless of PTE size.
These changes required a few sub-arch specific ifdef's to be fixed and the
introduction of a physical address format string.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
diff -Nru a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
--- a/arch/ppc/mm/pgtable.c 2005-04-07 14:13:06 -05:00
+++ b/arch/ppc/mm/pgtable.c 2005-04-07 14:13:06 -05:00
@@ -74,7 +74,7 @@
#define p_mapped_by_tlbcam(x) (0UL)
#endif /* HAVE_TLBCAM */
-#ifdef CONFIG_44x
+#ifdef CONFIG_PTE_64BIT
/* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */
#define PGDIR_ORDER 1
#else
@@ -142,13 +142,13 @@
__free_page(ptepage);
}
-#ifndef CONFIG_44x
+#ifndef CONFIG_PHYS_64BIT
void __iomem *
ioremap(phys_addr_t addr, unsigned long size)
{
return __ioremap(addr, size, _PAGE_NO_CACHE);
}
-#else /* CONFIG_44x */
+#else /* CONFIG_PHYS_64BIT */
void __iomem *
ioremap64(unsigned long long addr, unsigned long size)
{
@@ -162,7 +162,7 @@
return ioremap64(addr64, size);
}
-#endif /* CONFIG_44x */
+#endif /* CONFIG_PHYS_64BIT */
void __iomem *
__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
@@ -193,7 +193,7 @@
*/
if ( mem_init_done && (p < virt_to_phys(high_memory)) )
{
- printk("__ioremap(): phys addr "PTE_FMT" is RAM lr %p\n", p,
+ printk("__ioremap(): phys addr "PHYS_FMT" is RAM lr %p\n", p,
__builtin_return_address(0));
return NULL;
}
diff -Nru a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h
--- a/include/asm-ppc/mmu.h 2005-04-07 14:13:06 -05:00
+++ b/include/asm-ppc/mmu.h 2005-04-07 14:13:06 -05:00
@@ -15,11 +15,13 @@
* virtual/physical addressing like 32-bit virtual / 36-bit
* physical need a larger than native word size type. -Matt
*/
-#ifndef CONFIG_PTE_64BIT
+#ifndef CONFIG_PHYS_64BIT
typedef unsigned long phys_addr_t;
+#define PHYS_FMT "%.8lx"
#else
typedef unsigned long long phys_addr_t;
extern phys_addr_t fixup_bigphys_addr(phys_addr_t, phys_addr_t);
+#define PHYS_FMT "%16Lx"
#endif
/* Default "unsigned long" context */
^ permalink raw reply
* [PATCH] ppc32: Fix pte_update for 64-bit PTEs
From: Kumar Gala @ 2005-04-07 19:07 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, linuxppc-dev, Linus Torvalds, Paul Mackerras,
linuxppc-embedded
Andrew,
(this should probably go in for 2.6.12)
While the existing pte_update code handled atomically modifying a 64-bit
PTE, it did not return all 64-bits of the PTE before it was modified.
This causes problems in some places that expect the full PTE to be
returned, like ptep_get_and_clear().
Created a new pte_update function that is conditional on CONFIG_PTE_64BIT.
It atomically reads the low PTE word which all PTE flags are required to
be in and returns a premodified full 64-bit PTE.
Since we now have an explicit 64-bit PTE version of pte_update we can also
remove the hack that existed to get the low PTE word regardless of size.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
diff -Nru a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h
--- a/include/asm-ppc/pgtable.h 2005-04-07 14:01:09 -05:00
+++ b/include/asm-ppc/pgtable.h 2005-04-07 14:01:09 -05:00
@@ -526,10 +526,10 @@
* Atomic PTE updates.
*
* pte_update clears and sets bit atomically, and returns
- * the old pte value.
- * The ((unsigned long)(p+1) - 4) hack is to get to the least-significant
- * 32 bits of the PTE regardless of whether PTEs are 32 or 64 bits.
+ * the old pte value. In the 64-bit PTE case we lock around the
+ * low PTE word since we expect ALL flag bits to be there
*/
+#ifndef CONFIG_PTE_64BIT
static inline unsigned long pte_update(pte_t *p, unsigned long clr,
unsigned long set)
{
@@ -543,10 +543,31 @@
" stwcx. %1,0,%3\n\
bne- 1b"
: "=&r" (old), "=&r" (tmp), "=m" (*p)
- : "r" ((unsigned long)(p+1) - 4), "r" (clr), "r" (set), "m" (*p)
+ : "r" (p), "r" (clr), "r" (set), "m" (*p)
: "cc" );
return old;
}
+#else
+static inline unsigned long long pte_update(pte_t *p, unsigned long clr,
+ unsigned long set)
+{
+ unsigned long long old;
+ unsigned long tmp;
+
+ __asm__ __volatile__("\
+1: lwarx %L0,0,%4\n\
+ lwzx %0,0,%3\n\
+ andc %1,%L0,%5\n\
+ or %1,%1,%6\n"
+ PPC405_ERR77(0,%3)
+" stwcx. %1,0,%4\n\
+ bne- 1b"
+ : "=&r" (old), "=&r" (tmp), "=m" (*p)
+ : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p)
+ : "cc" );
+ return old;
+}
+#endif
/*
* set_pte stores a linux PTE into the linux page table.
^ permalink raw reply
* Re: Fw: Problem with NTP on (embedded) PPC, patch and RFC
From: Tom Rini @ 2005-04-07 18:17 UTC (permalink / raw)
To: Giovambattista Pulcini, Gabriel Paubert; +Cc: linuxppc-dev
In-Reply-To: <20050311172401.18ba47f6.akpm@osdl.org>
> Date: Fri, 11 Mar 2005 14:16:32 +0100
> From: Giovambattista Pulcini <gpulcini@swintel.it>
> To: LKML <linux-kernel@vger.kernel.org>
> Subject: Problem with NTP on (embedded) PPC, patch and RFC
>
>
> Hi,
>
> On an embedded device based on the IBM 405GP, but this may be a general
> problem for most PPC platforms except for chrp and gemini, the NTP
> utility 'ntptime' always returns error code 5 (TIME_ERROR) even after
> that NTP status reaches the PLL and FLL state. Analysis of problem
> showed that the time_state variable set to TIME_ERROR by
> do_settimeofday() is never set back to TIME_OK.
> I found the problem in 2.4.10-1 (Lynuxworks BlueCat) but I also checked
> the 2.6.11 and found similar problem. Many architectures under arch/ppc
> may be affected with the exception of chrp and gemini.
>
> Steps to reproduce:
> On a PowerPC (non-CHRP) platform, set the system date with 'date',
> configure and start the NTP daemon as client of a working NTP server.
> Wait for it to reach the PLL/FLL state. Issue the 'ntptime' command and
> check that the following two errors never disappear no matter how long
> you let it running: "ntp_gettime() returns code 5 (ERROR)",
> "ntp_adjtime() returns code 5 (ERROR)".
>
> Detailed analysis:
> AFAIK NTP relies on the global time_state variable which is statically
> initialized to TIME_OK (kernel/timer.c). The ntptime utility calls
> adjtimex() which results in a call to do_adjtimex() and prints its
> return value which is basically the value of time_state. It is changed
> by (kernel/timer.c)second_overflow() and by the
> (kernel/time.c)do_adjtimex() state machine.
> These two functions never set time_state to TIME_OK once it has been set
> to TIME_ERROR.
> Also, do_settimeofday() sets the STA_UNSYNC flag in time_status and sets
> time_state to TIME_ERROR (in ppc but not in ppc64 nor in x86).
> The function (arch/ppc/kernel/time.c)timer_interrupt() calls the
> ppc_md.set_rtc_time() when certain conditions are met, as follows
> (time.c:171):
>
> if ( ppc_md.set_rtc_time && (time_status & STA_UNSYNC) == 0 &&
> xtime.tv_sec - last_rtc_update >= 659 &&
> abs(xtime.tv_usec - (1000000-1000000/HZ)) < 500000/HZ &&
> jiffies - wall_jiffies == 1) {
> if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
>
> In the CHRP architecture (see arch/ppc/platforms/chrp_*) the specific
> implementation of the set_rtc_time(), chrp_set_rtc_time(), has a check
> like this (chrp_time.c:76):
>
> if ( (time_state == TIME_ERROR) || (time_state == TIME_BAD) )
> time_state = TIME_OK;
>
> which is the only chance for the time_state to be set back to TIME_OK
> after a do_settimeofday(). In other platforms this is not done.
>
>
> Proposed patch:
> This change should make NTP to work on any ppc platform, while not
> breaking chrp and gemini. Although I've tested it only on mine.
> --- linux-2.6.11/arch/ppc/kernel/time.c 2005-03-02 08:38:17.000000000 +0100
> +++ linux/arch/ppc/kernel/time.c 2005-03-08 14:16:56.000000000 +0100
> @@ -272,7 +272,6 @@
>
> time_adjust = 0; /* stop active adjtime() */
> time_status |= STA_UNSYNC;
> - time_state = TIME_ERROR; /* p. 24, (a) */
> time_maxerror = NTP_PHASE_LIMIT;
> time_esterror = NTP_PHASE_LIMIT;
> write_sequnlock_irqrestore(&xtime_lock, flags);
>
>
> My question:
> I've read some documentation but I am by no means an expert in the NTP
> kernel support implementation. So I ask you where the time_state should
> be reset to TIME_OK. Should this be done by the <platform>set_rtc_time() ?
> Or, as in the x86 case, do_settimeofday should not set time_state to
> TIME_ERROR ?
>
>
> Giovambattista Pulcini
So, digging back to 2.2.20 even, i386 does not have this TIME_ERROR
line, and we do. Gabriel, as guru of all things NTP-related, can you
please shed some enlightenment on what should be fixed? Should we drop
that line? Make the various RTC drivers do the check CHRP does (which
at first thought seems like a 'Hey, that's wrong, let me kludge it' kind
of thing. Thanks.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
From: Tom Rini @ 2005-04-07 17:49 UTC (permalink / raw)
To: Jon Loeliger
Cc: Jon Masters, Andrei Konovalov, Sylvain Munaut,
Linux PPC Embedded list, Jakob Viketoft
In-Reply-To: <1112895351.11987.89.camel@cashmere.sps.mot.com>
On Thu, Apr 07, 2005 at 12:35:51PM -0500, Jon Loeliger wrote:
> On Thu, 2005-04-07 at 12:20, Tom Rini wrote:
> > Part of the point of this is to move to a defined interface :)
>
> I've extracted a defined interface for the _current_ bd_t
> structure so far. I'm telling you, you're not going to
> like it... :-)
>
> So what do you want to do with it? Specifically, my tree
> is in this state:
>
> - I have made two files, a .c and a .h that contain
> essentially a grand-union of all of the bd_t and
> board_info structure definitions that I could find.
>
> - I have introduced shim function definitions that are
> simple accessor functions to front the common structure
> definition.
It sounds like a start certainly.
> It is semi gross in that this file contains a plethora of
> #ifdef messes that span multiple PPC32 boards and architectures.
> Whereas these used to be nicely distributed (:-)) they are
> all gathered into one place that clearly demonstrates a
> few things:
>
> - This is wrong and needs to be cleaned up more :-),
>
> - Obvious refactoring for common functionality that
> is NOT board-specific is still needed,
>
> - There are 51 unique fields in all the bd_t defs.
The vauge idea was that we would contruct the flattened tree, somehow
along the lines of
cat totally_common.txt > tree.txt
cat cpu_specific.txt >> tree.txt
cat board_specific.txt >> tree.txt
... autogen a header, or whatever ...
But basically yes, we should and must refactor things a bit so that,
ideally, a new 440GX-based platform would just need to supply its own
board_specific.txt (or whatever) and get the rest of the truely common
bits easily.
And ideally, a lot of the generation code can be shared between
kernel/U-Boot/whatever.
> I am currently proving that various platforms still build.
> I'm not going to be able to run-test any boards except
> a limited few.
>
> I will happily supply a diff of my messings to the list or
> a few individuals who want it.
Please post to the list as an RFC. Thanks.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: [PATCH] invalid instructions in kernel mode
From: Tom Rini @ 2005-04-07 17:38 UTC (permalink / raw)
To: Fillod Stephane; +Cc: linuxppc-dev
In-Reply-To: <1CFEB358338412458B21FAA0D78FE86D4F0D23@rennsmail02.eu.thmulti.com>
On Thu, Mar 31, 2005 at 07:47:32PM +0200, Fillod Stephane wrote:
> When CPU has no (classic) FPU, and math emulation is disabled,
> fp instructions are not allowed in kernel mode.
[snip]
> --- linux/arch/ppc/kernel/misc.S 26 Mar 2005 03:28:36 -0000
> 1.1.1.2
> +++ linux/arch/ppc/kernel/misc.S 31 Mar 2005 16:33:25 -0000
> @@ -1096,7 +1096,8 @@
> * and exceptions as if the cpu had performed the load or store.
> */
>
> -#if defined(CONFIG_4xx) || defined(CONFIG_E500)
> +#if !(defined(CONFIG_4xx) || defined(CONFIG_E500) ||
> defined(CONFIG_8xx)) || defined(CONFIG_MATH_EMULATION)
> +#if defined(CONFIG_4xx) || defined(CONFIG_E500)
> _GLOBAL(cvt_fd)
> lfs 0,0(r3)
> stfd 0,0(r4)
> @@ -1125,6 +1126,7 @@
> stfd 0,-4(r5)
> blr
> #endif
> +#endif
The problem here is, HEY! (classic) FP instrs in the kernel. The
question is why? Or rather, why are these four classic FP instrs
(lfs/lfd/stfd/stfs) being done on CONFIG_4xx || E500 when neither has
classic FP? I think the problem here is that on !FPU
(which is 4xx||E500||8xx, or so), we need to rewrite these two
functions (yes, 8xx does emulate them if hit, but that's a tangent).
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
From: Jon Loeliger @ 2005-04-07 17:35 UTC (permalink / raw)
To: Tom Rini
Cc: Jon Masters, Andrei Konovalov, Sylvain Munaut, Jakob Viketoft,
Linux PPC Embedded list
In-Reply-To: <20050407172003.GP3396@smtp.west.cox.net>
On Thu, 2005-04-07 at 12:20, Tom Rini wrote:
> Part of the point of this is to move to a defined interface :)
I've extracted a defined interface for the _current_ bd_t
structure so far. I'm telling you, you're not going to
like it... :-)
So what do you want to do with it? Specifically, my tree
is in this state:
- I have made two files, a .c and a .h that contain
essentially a grand-union of all of the bd_t and
board_info structure definitions that I could find.
- I have introduced shim function definitions that are
simple accessor functions to front the common structure
definition.
It is semi gross in that this file contains a plethora of
#ifdef messes that span multiple PPC32 boards and architectures.
Whereas these used to be nicely distributed (:-)) they are
all gathered into one place that clearly demonstrates a
few things:
- This is wrong and needs to be cleaned up more :-),
- Obvious refactoring for common functionality that
is NOT board-specific is still needed,
- There are 51 unique fields in all the bd_t defs.
I am currently proving that various platforms still build.
I'm not going to be able to run-test any boards except
a limited few.
I will happily supply a diff of my messings to the list or
a few individuals who want it.
jdl
^ permalink raw reply
* Re: 8xx v2.6 TLB problems and suggested workaround
From: Marcelo Tosatti @ 2005-04-07 12:00 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: linuxppc-embedded
In-Reply-To: <BCEFJBPJCGFCNMMMIDBHKEGBCLAA.Joakim.Tjernlund@lumentis.se>
On Wed, Apr 06, 2005 at 11:24:46PM +0200, Joakim Tjernlund wrote:
> > On Tue, Apr 05, 2005 at 11:51:42PM +0200, Joakim Tjernlund wrote:
> > > Hi Marcelo
> > >
> > > Reading your report it doesn't sound likely but I will ask anyway:
> > > Is it possible that the problem you are seeing isn't caused by the
> > > "famous" CPU bug mentioned here:
> > > http://ozlabs.org/pipermail/linuxppc-embedded/2005-January/016351.html
> > >
> > > The DTLB error handler needs DAR to be set correctly and since the
> > > dcbX instructions doesn't set DAR in either DTLB Miss nor DTLB Error you
> > > may end up trying to fix the wrong address.
> >
> > Hi Joakim,
> >
> > First of all, thanks your care!
>
> NP, I want to be able to run 8xx on 2.6 in the future.
>
> >
> > Well, I dont think the above issue is exactly what we're hitting because
> > DAR is correctly updated on our case with "dcbst".
>
> Are you sure? Cant remeber all details but this looks a bit strange to me
> SPR 826 : 0x00001f00 7936
> is not 0x00001 supposed to be the physical page?
SPR 826 contains the page attributes, not Physical Page Number (which is held
by SPR 825).
> Also DSISR: C2000000 looks strange and "impossible". Are you sure this value
> is correct?
As defined by the PEM, bit 1 indicates "data-store error exception", bit 2
indicates:
"Set if the translation of an attempted access is not found in the primary hash
table entry group (HTEG), or in the rehashed secondary HTEG, or in the range of a
DBAT register (page fault condition); otherwise cleared."
And bit 6 indicates a store operation (shouldnt be set).
> Don't understand why the "tlbie()" call works around the problem. Can you
> explain that a bit more?
It must be because the TLB entry is now removed from the cache, which avoids
dcbst from faulting as a store.
There must be some relation to the invalid present TLB entry and dcbst
misbehaviour.
I didnt check what happens with the TLB after tlbie(), I should do that.
But I suppose it gets wiped off?
> > The problem is that it is treated as a write operation, but shouldnt.
> >
> > Maybe it is related to dcbst's inability to set DAR?
>
> Could be, but even if it isn't you are in trouble when dcbX instr.
> generates DTLB Misses/Errors Sooner or later you will end up with
> strange SEGV or hangs.
Hangs due to the dcbX misbehaviour wrt DAR setting, you mean? (which your
patch corrects).
Yep, that makes sense.
> > BTW, about the CPU15 bug fix, has there been any effort to port/merge
> > it in v2.6 ?
>
> None that I know.
^ permalink raw reply
* Re: Flat OF Device Tree for ppc32 [was: Platform bus/ppc sys model...]
From: Tom Rini @ 2005-04-07 17:20 UTC (permalink / raw)
To: Andrei Konovalov
Cc: Jon Masters, Sylvain Munaut, Linux PPC Embedded list,
Jakob Viketoft
In-Reply-To: <42511D55.4040507@ru.mvista.com>
On Mon, Apr 04, 2005 at 02:56:21PM +0400, Andrei Konovalov wrote:
> Should we rely on U-Boot to give that device tree structure to
> the kernel? If I got it correct this is how the Freescale team
It shouldn't matter who passes the flattened tree really, so long as the
information is correct. arch/ppc/boot/simple/ should translate
older-non-uboot-bd_t, or PReP residual, or statically construct, or
some combination, into the tree and pass it in. U-Boot (or yaboot or
grub or whatever) can just pass it right to the kernel.
Part of the point of this is to move to a defined interface :)
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox