* Work on IP30 @ 2004-04-12 20:51 Stanislaw Skowronek 2004-04-12 23:13 ` Ralf Baechle 0 siblings, 1 reply; 19+ messages in thread From: Stanislaw Skowronek @ 2004-04-12 20:51 UTC (permalink / raw) To: linux-mips My Octane got as far as 'Calibrating delay loop... ' now. It works with ARCS graphical console, which is a Good Thing. Memory identification is correct. Caches work OK. I'm going to do the IRQs tomorrow, but I foresee it will be really hard as there is no documentation for the HEART. Well, we shall experiment. Fortunately, the Octane has one really nice feature: the power button is hooked up to an interrupt source. It may prove quite useful for debugging. Interesting note: the ARCS console breaks when I change KSEG0 cache coherence in the CP0_CONFIG register (in c-r4k.c). Of course, it breaks sooner or later, not exactly afterwards, unless I flush cache exactly after changing; it breaks immediately then. I don't give a hoot, because IP30 has almost no RAM in KSEG0 and the kernel runs in XKPHYS, always cached copy-on-write. But those of you with another machines might be interested. Stanislaw Skowronek --<=>-- Paranoid: one who is truly in touch with reality. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Work on IP30 2004-04-12 20:51 Work on IP30 Stanislaw Skowronek @ 2004-04-12 23:13 ` Ralf Baechle 2004-04-12 23:42 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c Bradley D. LaRonde 0 siblings, 1 reply; 19+ messages in thread From: Ralf Baechle @ 2004-04-12 23:13 UTC (permalink / raw) To: Stanislaw Skowronek; +Cc: linux-mips On Mon, Apr 12, 2004 at 10:51:13PM +0200, Stanislaw Skowronek wrote: > Interesting note: the ARCS console breaks when I change KSEG0 cache > coherence in the CP0_CONFIG register (in c-r4k.c). Of course, it breaks > sooner or later, not exactly afterwards, unless I flush cache exactly > after changing; it breaks immediately then. I don't give a hoot, because > IP30 has almost no RAM in KSEG0 and the kernel runs in XKPHYS, always > cached copy-on-write. But those of you with another machines might be > interested. Most firmware breaks at some point due to Linux fiddling with it's resources. What differs is how and when it breaks. In case of IP27 the first TLB flush for example is going to kill ARC. And remember, it's written ARC but pronounced ARGGHHHH ;) Ralf ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c 2004-04-12 23:13 ` Ralf Baechle @ 2004-04-12 23:42 ` Bradley D. LaRonde 2004-04-12 23:42 ` Bradley D. LaRonde 2004-04-13 0:53 ` Bradley D. LaRonde 0 siblings, 2 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-12 23:42 UTC (permalink / raw) To: linux-mips This 2.4 patch look OK? Regards, Brad diff -u -r1.1.1.1 time.c --- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1 +++ arch/mips/kernel/time.c 12 Apr 2004 23:41:38 -0000 @@ -242,7 +242,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo", "hi"); /* * Due to possible jiffies inconsistencies, we need to check @@ -297,7 +297,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo", "hi"); /* * Due to possible jiffies inconsistencies, we need to check @@ -339,7 +339,7 @@ : "r" (timerhi), "m" (timerlo), "r" (tmp), "r" (USECS_PER_JIFFY), "r" (USECS_PER_JIFFY_FRAC) - : "hi", "lo", "accum"); + : "hi", "lo", "hi"); cached_quotient = quotient; } } @@ -353,7 +353,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo", "hi"); /* * Due to possible jiffies inconsistencies, we need to check ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c 2004-04-12 23:42 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c Bradley D. LaRonde @ 2004-04-12 23:42 ` Bradley D. LaRonde 2004-04-13 0:53 ` Bradley D. LaRonde 1 sibling, 0 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-12 23:42 UTC (permalink / raw) To: linux-mips This 2.4 patch look OK? Regards, Brad diff -u -r1.1.1.1 time.c --- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1 +++ arch/mips/kernel/time.c 12 Apr 2004 23:41:38 -0000 @@ -242,7 +242,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo", "hi"); /* * Due to possible jiffies inconsistencies, we need to check @@ -297,7 +297,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo", "hi"); /* * Due to possible jiffies inconsistencies, we need to check @@ -339,7 +339,7 @@ : "r" (timerhi), "m" (timerlo), "r" (tmp), "r" (USECS_PER_JIFFY), "r" (USECS_PER_JIFFY_FRAC) - : "hi", "lo", "accum"); + : "hi", "lo", "hi"); cached_quotient = quotient; } } @@ -353,7 +353,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo", "hi"); /* * Due to possible jiffies inconsistencies, we need to check ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c 2004-04-12 23:42 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c Bradley D. LaRonde 2004-04-12 23:42 ` Bradley D. LaRonde @ 2004-04-13 0:53 ` Bradley D. LaRonde 2004-04-13 0:53 ` Bradley D. LaRonde 2004-04-13 1:02 ` Eric Christopher 1 sibling, 2 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 0:53 UTC (permalink / raw) To: linux-mips Uh oh, with this patch: ... time.c: In function `fixed_rate_gettimeoffset': time.c:242: error: can't find a register in class `HI_REG' while reloading `asm' ... Regards, Brad ----- Original Message ----- From: "Bradley D. LaRonde" <brad@laronde.org> To: <linux-mips@linux-mips.org> Sent: Monday, April 12, 2004 7:42 PM Subject: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c > This 2.4 patch look OK? > > Regards, > Brad > > diff -u -r1.1.1.1 time.c > --- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1 > +++ arch/mips/kernel/time.c 12 Apr 2004 23:41:38 -0000 > @@ -242,7 +242,7 @@ > __asm__("multu %1,%2" > : "=h" (res) > : "r" (count), "r" (sll32_usecs_per_cycle) > - : "lo", "accum"); > + : "lo", "hi"); > > /* > * Due to possible jiffies inconsistencies, we need to check > @@ -297,7 +297,7 @@ > __asm__("multu %1,%2" > : "=h" (res) > : "r" (count), "r" (quotient) > - : "lo", "accum"); > + : "lo", "hi"); > > /* > * Due to possible jiffies inconsistencies, we need to check > @@ -339,7 +339,7 @@ > : "r" (timerhi), "m" (timerlo), > "r" (tmp), "r" (USECS_PER_JIFFY), > "r" (USECS_PER_JIFFY_FRAC) > - : "hi", "lo", "accum"); > + : "hi", "lo", "hi"); > cached_quotient = quotient; > } > } > @@ -353,7 +353,7 @@ > __asm__("multu %1,%2" > : "=h" (res) > : "r" (count), "r" (quotient) > - : "lo", "accum"); > + : "lo", "hi"); > > /* > * Due to possible jiffies inconsistencies, we need to check > > > ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c 2004-04-13 0:53 ` Bradley D. LaRonde @ 2004-04-13 0:53 ` Bradley D. LaRonde 2004-04-13 1:02 ` Eric Christopher 1 sibling, 0 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 0:53 UTC (permalink / raw) To: linux-mips Uh oh, with this patch: ... time.c: In function `fixed_rate_gettimeoffset': time.c:242: error: can't find a register in class `HI_REG' while reloading `asm' ... Regards, Brad ----- Original Message ----- From: "Bradley D. LaRonde" <brad@laronde.org> To: <linux-mips@linux-mips.org> Sent: Monday, April 12, 2004 7:42 PM Subject: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c > This 2.4 patch look OK? > > Regards, > Brad > > diff -u -r1.1.1.1 time.c > --- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1 > +++ arch/mips/kernel/time.c 12 Apr 2004 23:41:38 -0000 > @@ -242,7 +242,7 @@ > __asm__("multu %1,%2" > : "=h" (res) > : "r" (count), "r" (sll32_usecs_per_cycle) > - : "lo", "accum"); > + : "lo", "hi"); > > /* > * Due to possible jiffies inconsistencies, we need to check > @@ -297,7 +297,7 @@ > __asm__("multu %1,%2" > : "=h" (res) > : "r" (count), "r" (quotient) > - : "lo", "accum"); > + : "lo", "hi"); > > /* > * Due to possible jiffies inconsistencies, we need to check > @@ -339,7 +339,7 @@ > : "r" (timerhi), "m" (timerlo), > "r" (tmp), "r" (USECS_PER_JIFFY), > "r" (USECS_PER_JIFFY_FRAC) > - : "hi", "lo", "accum"); > + : "hi", "lo", "hi"); > cached_quotient = quotient; > } > } > @@ -353,7 +353,7 @@ > __asm__("multu %1,%2" > : "=h" (res) > : "r" (count), "r" (quotient) > - : "lo", "accum"); > + : "lo", "hi"); > > /* > * Due to possible jiffies inconsistencies, we need to check > > > ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c 2004-04-13 0:53 ` Bradley D. LaRonde 2004-04-13 0:53 ` Bradley D. LaRonde @ 2004-04-13 1:02 ` Eric Christopher 2004-04-13 1:05 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c Bradley D. LaRonde 1 sibling, 1 reply; 19+ messages in thread From: Eric Christopher @ 2004-04-13 1:02 UTC (permalink / raw) To: Bradley D. LaRonde; +Cc: linux-mips On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > Uh oh, with this patch: > > ... > time.c: In function `fixed_rate_gettimeoffset': > time.c:242: error: can't find a register in class `HI_REG' while reloading > `asm' > ... > > > > /* > > * Due to possible jiffies inconsistencies, we need to check > > @@ -339,7 +339,7 @@ > > : "r" (timerhi), "m" (timerlo), > > "r" (tmp), "r" (USECS_PER_JIFFY), > > "r" (USECS_PER_JIFFY_FRAC) > > - : "hi", "lo", "accum"); > > + : "hi", "lo", "hi"); > > cached_quotient = quotient; Maybe this hunk where you use "hi" twice for the same asm statement? -eric -- Eric Christopher <echristo@redhat.com> ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:02 ` Eric Christopher @ 2004-04-13 1:05 ` Bradley D. LaRonde 2004-04-13 1:05 ` Bradley D. LaRonde 2004-04-13 1:07 ` Daniel Jacobowitz 0 siblings, 2 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 1:05 UTC (permalink / raw) To: linux-mips, Eric Christopher ----- Original Message ----- From: "Eric Christopher" <echristo@redhat.com> To: "Bradley D. LaRonde" <brad@laronde.org> Cc: <linux-mips@linux-mips.org> Sent: Monday, April 12, 2004 9:02 PM Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > > Uh oh, with this patch: > > > > ... > > time.c: In function `fixed_rate_gettimeoffset': > > time.c:242: error: can't find a register in class `HI_REG' while reloading > > `asm' > > ... > > > > > > > /* > > > * Due to possible jiffies inconsistencies, we need to check > > > @@ -339,7 +339,7 @@ > > > : "r" (timerhi), "m" (timerlo), > > > "r" (tmp), "r" (USECS_PER_JIFFY), > > > "r" (USECS_PER_JIFFY_FRAC) > > > - : "hi", "lo", "accum"); > > > + : "hi", "lo", "hi"); > > > cached_quotient = quotient; > > > Maybe this hunk where you use "hi" twice for the same asm statement? Yeah, that's messed up, but it fails here too: @@ -242,7 +242,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo", "hi"); Regards, Brad ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:05 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c Bradley D. LaRonde @ 2004-04-13 1:05 ` Bradley D. LaRonde 2004-04-13 1:07 ` Daniel Jacobowitz 1 sibling, 0 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 1:05 UTC (permalink / raw) To: linux-mips, Eric Christopher ----- Original Message ----- From: "Eric Christopher" <echristo@redhat.com> To: "Bradley D. LaRonde" <brad@laronde.org> Cc: <linux-mips@linux-mips.org> Sent: Monday, April 12, 2004 9:02 PM Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > > Uh oh, with this patch: > > > > ... > > time.c: In function `fixed_rate_gettimeoffset': > > time.c:242: error: can't find a register in class `HI_REG' while reloading > > `asm' > > ... > > > > > > > /* > > > * Due to possible jiffies inconsistencies, we need to check > > > @@ -339,7 +339,7 @@ > > > : "r" (timerhi), "m" (timerlo), > > > "r" (tmp), "r" (USECS_PER_JIFFY), > > > "r" (USECS_PER_JIFFY_FRAC) > > > - : "hi", "lo", "accum"); > > > + : "hi", "lo", "hi"); > > > cached_quotient = quotient; > > > Maybe this hunk where you use "hi" twice for the same asm statement? Yeah, that's messed up, but it fails here too: @@ -242,7 +242,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo", "hi"); Regards, Brad ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:05 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c Bradley D. LaRonde 2004-04-13 1:05 ` Bradley D. LaRonde @ 2004-04-13 1:07 ` Daniel Jacobowitz 2004-04-13 1:12 ` Bradley D. LaRonde 1 sibling, 1 reply; 19+ messages in thread From: Daniel Jacobowitz @ 2004-04-13 1:07 UTC (permalink / raw) To: Bradley D. LaRonde; +Cc: linux-mips, Eric Christopher On Mon, Apr 12, 2004 at 09:05:34PM -0400, Bradley D. LaRonde wrote: > ----- Original Message ----- > From: "Eric Christopher" <echristo@redhat.com> > To: "Bradley D. LaRonde" <brad@laronde.org> > Cc: <linux-mips@linux-mips.org> > Sent: Monday, April 12, 2004 9:02 PM > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" > intime.c > > > > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > > > Uh oh, with this patch: > > > > > > ... > > > time.c: In function `fixed_rate_gettimeoffset': > > > time.c:242: error: can't find a register in class `HI_REG' while > reloading > > > `asm' > > > ... > > > > > > > > > > /* > > > > * Due to possible jiffies inconsistencies, we need to check > > > > @@ -339,7 +339,7 @@ > > > > : "r" (timerhi), "m" (timerlo), > > > > "r" (tmp), "r" (USECS_PER_JIFFY), > > > > "r" (USECS_PER_JIFFY_FRAC) > > > > - : "hi", "lo", "accum"); > > > > + : "hi", "lo", "hi"); > > > > cached_quotient = quotient; > > > > > > Maybe this hunk where you use "hi" twice for the same asm statement? > > Yeah, that's messed up, but it fails here too: > > @@ -242,7 +242,7 @@ > __asm__("multu %1,%2" > : "=h" (res) > : "r" (count), "r" (sll32_usecs_per_cycle) > - : "lo", "accum"); > + : "lo", "hi"); Because the asm is outputting something in HI - see the =h? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:07 ` Daniel Jacobowitz @ 2004-04-13 1:12 ` Bradley D. LaRonde 2004-04-13 1:12 ` Bradley D. LaRonde 2004-04-13 1:23 ` Bradley D. LaRonde 0 siblings, 2 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 1:12 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: linux-mips, Eric Christopher ----- Original Message ----- From: "Daniel Jacobowitz" <dan@debian.org> To: "Bradley D. LaRonde" <brad@laronde.org> Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com> Sent: Monday, April 12, 2004 9:07 PM Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c > On Mon, Apr 12, 2004 at 09:05:34PM -0400, Bradley D. LaRonde wrote: > > ----- Original Message ----- > > From: "Eric Christopher" <echristo@redhat.com> > > To: "Bradley D. LaRonde" <brad@laronde.org> > > Cc: <linux-mips@linux-mips.org> > > Sent: Monday, April 12, 2004 9:02 PM > > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" > > intime.c > > > > > > > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > > > > Uh oh, with this patch: > > > > > > > > ... > > > > time.c: In function `fixed_rate_gettimeoffset': > > > > time.c:242: error: can't find a register in class `HI_REG' while > > reloading > > > > `asm' > > > > ... > > > > > > > > > > > > > /* > > > > > * Due to possible jiffies inconsistencies, we need to check > > > > > @@ -339,7 +339,7 @@ > > > > > : "r" (timerhi), "m" (timerlo), > > > > > "r" (tmp), "r" (USECS_PER_JIFFY), > > > > > "r" (USECS_PER_JIFFY_FRAC) > > > > > - : "hi", "lo", "accum"); > > > > > + : "hi", "lo", "hi"); > > > > > cached_quotient = quotient; > > > > > > > > > Maybe this hunk where you use "hi" twice for the same asm statement? > > > > Yeah, that's messed up, but it fails here too: > > > > @@ -242,7 +242,7 @@ > > __asm__("multu %1,%2" > > : "=h" (res) > > : "r" (count), "r" (sll32_usecs_per_cycle) > > - : "lo", "accum"); > > + : "lo", "hi"); > > Because the asm is outputting something in HI - see the =h? Oh... yeah, I guess gcc knows that the output is clobbered. :-P So just remove the accum clobbers? Regards, Brad ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:12 ` Bradley D. LaRonde @ 2004-04-13 1:12 ` Bradley D. LaRonde 2004-04-13 1:23 ` Bradley D. LaRonde 1 sibling, 0 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 1:12 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: linux-mips, Eric Christopher ----- Original Message ----- From: "Daniel Jacobowitz" <dan@debian.org> To: "Bradley D. LaRonde" <brad@laronde.org> Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com> Sent: Monday, April 12, 2004 9:07 PM Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c > On Mon, Apr 12, 2004 at 09:05:34PM -0400, Bradley D. LaRonde wrote: > > ----- Original Message ----- > > From: "Eric Christopher" <echristo@redhat.com> > > To: "Bradley D. LaRonde" <brad@laronde.org> > > Cc: <linux-mips@linux-mips.org> > > Sent: Monday, April 12, 2004 9:02 PM > > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" > > intime.c > > > > > > > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > > > > Uh oh, with this patch: > > > > > > > > ... > > > > time.c: In function `fixed_rate_gettimeoffset': > > > > time.c:242: error: can't find a register in class `HI_REG' while > > reloading > > > > `asm' > > > > ... > > > > > > > > > > > > > /* > > > > > * Due to possible jiffies inconsistencies, we need to check > > > > > @@ -339,7 +339,7 @@ > > > > > : "r" (timerhi), "m" (timerlo), > > > > > "r" (tmp), "r" (USECS_PER_JIFFY), > > > > > "r" (USECS_PER_JIFFY_FRAC) > > > > > - : "hi", "lo", "accum"); > > > > > + : "hi", "lo", "hi"); > > > > > cached_quotient = quotient; > > > > > > > > > Maybe this hunk where you use "hi" twice for the same asm statement? > > > > Yeah, that's messed up, but it fails here too: > > > > @@ -242,7 +242,7 @@ > > __asm__("multu %1,%2" > > : "=h" (res) > > : "r" (count), "r" (sll32_usecs_per_cycle) > > - : "lo", "accum"); > > + : "lo", "hi"); > > Because the asm is outputting something in HI - see the =h? Oh... yeah, I guess gcc knows that the output is clobbered. :-P So just remove the accum clobbers? Regards, Brad ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:12 ` Bradley D. LaRonde 2004-04-13 1:12 ` Bradley D. LaRonde @ 2004-04-13 1:23 ` Bradley D. LaRonde 2004-04-13 1:23 ` Bradley D. LaRonde 2004-04-13 12:57 ` Maciej W. Rozycki 1 sibling, 2 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 1:23 UTC (permalink / raw) To: linux-mips; +Cc: Eric Christopher, Daniel Jacobowitz OK, so this patch actually builds, and it sounds like it will do the job, since "accum" means "hi and low", "lo" is already clobbered in all cases, and either "hi" is the output and doesn't need clobbering (hunks 1, 2, and 4), or "hi" is already clobbered (hunk 3). Regards, Brad diff -u -r1.1.1.1 time.c --- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1 +++ arch/mips/kernel/time.c 13 Apr 2004 01:19:15 -0000 @@ -242,7 +242,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -297,7 +297,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -339,7 +339,7 @@ : "r" (timerhi), "m" (timerlo), "r" (tmp), "r" (USECS_PER_JIFFY), "r" (USECS_PER_JIFFY_FRAC) - : "hi", "lo", "accum"); + : "hi", "lo"); cached_quotient = quotient; } } @@ -353,7 +353,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check ----- Original Message ----- From: "Bradley D. LaRonde" <brad@laronde.org> To: "Daniel Jacobowitz" <dan@debian.org> Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com> Sent: Monday, April 12, 2004 9:12 PM Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c > ----- Original Message ----- > From: "Daniel Jacobowitz" <dan@debian.org> > To: "Bradley D. LaRonde" <brad@laronde.org> > Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com> > Sent: Monday, April 12, 2004 9:07 PM > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" > intime.c > > > > On Mon, Apr 12, 2004 at 09:05:34PM -0400, Bradley D. LaRonde wrote: > > > ----- Original Message ----- > > > From: "Eric Christopher" <echristo@redhat.com> > > > To: "Bradley D. LaRonde" <brad@laronde.org> > > > Cc: <linux-mips@linux-mips.org> > > > Sent: Monday, April 12, 2004 9:02 PM > > > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" > > > intime.c > > > > > > > > > > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > > > > > Uh oh, with this patch: > > > > > > > > > > ... > > > > > time.c: In function `fixed_rate_gettimeoffset': > > > > > time.c:242: error: can't find a register in class `HI_REG' while > > > reloading > > > > > `asm' > > > > > ... > > > > > > > > > > > > > > > > /* > > > > > > * Due to possible jiffies inconsistencies, we need to > check > > > > > > @@ -339,7 +339,7 @@ > > > > > > : "r" (timerhi), "m" (timerlo), > > > > > > "r" (tmp), "r" > (USECS_PER_JIFFY), > > > > > > "r" (USECS_PER_JIFFY_FRAC) > > > > > > - : "hi", "lo", "accum"); > > > > > > + : "hi", "lo", "hi"); > > > > > > cached_quotient = quotient; > > > > > > > > > > > > Maybe this hunk where you use "hi" twice for the same asm statement? > > > > > > Yeah, that's messed up, but it fails here too: > > > > > > @@ -242,7 +242,7 @@ > > > __asm__("multu %1,%2" > > > : "=h" (res) > > > : "r" (count), "r" (sll32_usecs_per_cycle) > > > - : "lo", "accum"); > > > + : "lo", "hi"); > > > > Because the asm is outputting something in HI - see the =h? > > Oh... yeah, I guess gcc knows that the output is clobbered. :-P > > So just remove the accum clobbers? > > Regards, > Brad > > > ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:23 ` Bradley D. LaRonde @ 2004-04-13 1:23 ` Bradley D. LaRonde 2004-04-13 12:57 ` Maciej W. Rozycki 1 sibling, 0 replies; 19+ messages in thread From: Bradley D. LaRonde @ 2004-04-13 1:23 UTC (permalink / raw) To: linux-mips; +Cc: Eric Christopher, Daniel Jacobowitz OK, so this patch actually builds, and it sounds like it will do the job, since "accum" means "hi and low", "lo" is already clobbered in all cases, and either "hi" is the output and doesn't need clobbering (hunks 1, 2, and 4), or "hi" is already clobbered (hunk 3). Regards, Brad diff -u -r1.1.1.1 time.c --- arch/mips/kernel/time.c 10 Nov 2003 21:06:52 -0000 1.1.1.1 +++ arch/mips/kernel/time.c 13 Apr 2004 01:19:15 -0000 @@ -242,7 +242,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -297,7 +297,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -339,7 +339,7 @@ : "r" (timerhi), "m" (timerlo), "r" (tmp), "r" (USECS_PER_JIFFY), "r" (USECS_PER_JIFFY_FRAC) - : "hi", "lo", "accum"); + : "hi", "lo"); cached_quotient = quotient; } } @@ -353,7 +353,7 @@ __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check ----- Original Message ----- From: "Bradley D. LaRonde" <brad@laronde.org> To: "Daniel Jacobowitz" <dan@debian.org> Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com> Sent: Monday, April 12, 2004 9:12 PM Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c > ----- Original Message ----- > From: "Daniel Jacobowitz" <dan@debian.org> > To: "Bradley D. LaRonde" <brad@laronde.org> > Cc: <linux-mips@linux-mips.org>; "Eric Christopher" <echristo@redhat.com> > Sent: Monday, April 12, 2004 9:07 PM > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" > intime.c > > > > On Mon, Apr 12, 2004 at 09:05:34PM -0400, Bradley D. LaRonde wrote: > > > ----- Original Message ----- > > > From: "Eric Christopher" <echristo@redhat.com> > > > To: "Bradley D. LaRonde" <brad@laronde.org> > > > Cc: <linux-mips@linux-mips.org> > > > Sent: Monday, April 12, 2004 9:02 PM > > > Subject: Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" > > > intime.c > > > > > > > > > > On Mon, 2004-04-12 at 17:53, Bradley D. LaRonde wrote: > > > > > Uh oh, with this patch: > > > > > > > > > > ... > > > > > time.c: In function `fixed_rate_gettimeoffset': > > > > > time.c:242: error: can't find a register in class `HI_REG' while > > > reloading > > > > > `asm' > > > > > ... > > > > > > > > > > > > > > > > /* > > > > > > * Due to possible jiffies inconsistencies, we need to > check > > > > > > @@ -339,7 +339,7 @@ > > > > > > : "r" (timerhi), "m" (timerlo), > > > > > > "r" (tmp), "r" > (USECS_PER_JIFFY), > > > > > > "r" (USECS_PER_JIFFY_FRAC) > > > > > > - : "hi", "lo", "accum"); > > > > > > + : "hi", "lo", "hi"); > > > > > > cached_quotient = quotient; > > > > > > > > > > > > Maybe this hunk where you use "hi" twice for the same asm statement? > > > > > > Yeah, that's messed up, but it fails here too: > > > > > > @@ -242,7 +242,7 @@ > > > __asm__("multu %1,%2" > > > : "=h" (res) > > > : "r" (count), "r" (sll32_usecs_per_cycle) > > > - : "lo", "accum"); > > > + : "lo", "hi"); > > > > Because the asm is outputting something in HI - see the =h? > > Oh... yeah, I guess gcc knows that the output is clobbered. :-P > > So just remove the accum clobbers? > > Regards, > Brad > > > ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 1:23 ` Bradley D. LaRonde 2004-04-13 1:23 ` Bradley D. LaRonde @ 2004-04-13 12:57 ` Maciej W. Rozycki 2004-04-18 2:39 ` Steven J. Hill 2004-04-18 13:00 ` Ralf Baechle 1 sibling, 2 replies; 19+ messages in thread From: Maciej W. Rozycki @ 2004-04-13 12:57 UTC (permalink / raw) To: Bradley D. LaRonde; +Cc: linux-mips, Eric Christopher, Daniel Jacobowitz On Mon, 12 Apr 2004, Bradley D. LaRonde wrote: > OK, so this patch actually builds, and it sounds like it will do the job, > since "accum" means "hi and low", "lo" is already clobbered in all cases, > and either "hi" is the output and doesn't need clobbering (hunks 1, 2, and > 4), or "hi" is already clobbered (hunk 3). There are more places this should be dealt with and I have the following preliminary patch for this, but I'm unsure about removal of "accum" being completely safe for older compilers. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + patch-mips-2.4.24-pre2-20040116-mips-gcc3-2 diff -up --recursive --new-file linux-mips-2.4.24-pre2-20040116.macro/arch/mips/kernel/time.c linux-mips-2.4.24-pre2-20040116/arch/mips/kernel/time.c --- linux-mips-2.4.24-pre2-20040116.macro/arch/mips/kernel/time.c 2004-01-15 03:56:58.000000000 +0000 +++ linux-mips-2.4.24-pre2-20040116/arch/mips/kernel/time.c 2004-02-02 04:38:34.000000000 +0000 @@ -242,7 +242,7 @@ static unsigned long fixed_rate_gettimeo __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -297,7 +297,7 @@ static unsigned long calibrate_div32_get __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -339,7 +339,7 @@ static unsigned long calibrate_div64_get : "r" (timerhi), "m" (timerlo), "r" (tmp), "r" (USECS_PER_JIFFY), "r" (USECS_PER_JIFFY_FRAC) - : "hi", "lo", "accum"); + : "hi", "lo"); cached_quotient = quotient; } } @@ -353,7 +353,7 @@ static unsigned long calibrate_div64_get __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check diff -up --recursive --new-file linux-mips-2.4.24-pre2-20040116.macro/arch/mips64/kernel/cpu-probe.c linux-mips-2.4.24-pre2-20040116/arch/mips64/kernel/cpu-probe.c --- linux-mips-2.4.24-pre2-20040116.macro/arch/mips64/kernel/cpu-probe.c 2003-12-11 03:56:36.000000000 +0000 +++ linux-mips-2.4.24-pre2-20040116/arch/mips64/kernel/cpu-probe.c 2004-02-02 04:44:30.000000000 +0000 @@ -177,7 +177,7 @@ static inline void mult_sh_align_mod(lon ".set pop" : "=&r" (lv1), "=r" (lw) : "r" (m1), "r" (m2), "r" (s), "I" (0) - : "hi", "lo", "accum"); + : "hi", "lo"); /* We have to use single integers for m1 and m2 and a double * one for p to be sure the mulsidi3 gcc's RTL multiplication * instruction has the workaround applied. Older versions of diff -up --recursive --new-file linux-mips-2.4.24-pre2-20040116.macro/arch/mips64/kernel/time.c linux-mips-2.4.24-pre2-20040116/arch/mips64/kernel/time.c --- linux-mips-2.4.24-pre2-20040116.macro/arch/mips64/kernel/time.c 2004-01-15 03:57:03.000000000 +0000 +++ linux-mips-2.4.24-pre2-20040116/arch/mips64/kernel/time.c 2004-02-02 04:39:21.000000000 +0000 @@ -242,7 +242,7 @@ static unsigned long fixed_rate_gettimeo __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (sll32_usecs_per_cycle) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -297,7 +297,7 @@ static unsigned long calibrate_div32_get __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check @@ -339,7 +339,7 @@ static unsigned long calibrate_div64_get : "r" (timerhi), "m" (timerlo), "r" (tmp), "r" (USECS_PER_JIFFY), "r" (USECS_PER_JIFFY_FRAC) - : "hi", "lo", "accum"); + : "hi", "lo"); cached_quotient = quotient; } } @@ -353,7 +353,7 @@ static unsigned long calibrate_div64_get __asm__("multu %1,%2" : "=h" (res) : "r" (count), "r" (quotient) - : "lo", "accum"); + : "lo"); /* * Due to possible jiffies inconsistencies, we need to check ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 12:57 ` Maciej W. Rozycki @ 2004-04-18 2:39 ` Steven J. Hill 2004-04-19 11:50 ` Maciej W. Rozycki 2004-04-18 13:00 ` Ralf Baechle 1 sibling, 1 reply; 19+ messages in thread From: Steven J. Hill @ 2004-04-18 2:39 UTC (permalink / raw) To: Maciej W. Rozycki Cc: Bradley D. LaRonde, linux-mips, Eric Christopher, Daniel Jacobowitz Maciej W. Rozycki wrote: > > There are more places this should be dealt with and I have the following > preliminary patch for this, but I'm unsure about removal of "accum" being > completely safe for older compilers. > Works fine for gcc-3.1.1 and my Swarm board boots just fine with this change and it seems stable. I vote for you to go ahead and commit the fixes to CVS. Thanks Maciej. -Steve ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-18 2:39 ` Steven J. Hill @ 2004-04-19 11:50 ` Maciej W. Rozycki 0 siblings, 0 replies; 19+ messages in thread From: Maciej W. Rozycki @ 2004-04-19 11:50 UTC (permalink / raw) To: Steven J. Hill Cc: Bradley D. LaRonde, linux-mips, Eric Christopher, Daniel Jacobowitz On Sat, 17 Apr 2004, Steven J. Hill wrote: > Works fine for gcc-3.1.1 and my Swarm board boots just fine with this > change and it seems stable. I vote for you to go ahead and commit the > fixes to CVS. Thanks Maciej. I'm worried more about 2.95. And even if it works now, it may stop after some changes, if the compiler decides it's safe to keep something in "accum" across the asm. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-13 12:57 ` Maciej W. Rozycki 2004-04-18 2:39 ` Steven J. Hill @ 2004-04-18 13:00 ` Ralf Baechle 2004-04-18 13:00 ` Ralf Baechle 1 sibling, 1 reply; 19+ messages in thread From: Ralf Baechle @ 2004-04-18 13:00 UTC (permalink / raw) To: Maciej W. Rozycki Cc: Bradley D. LaRonde, linux-mips, Eric Christopher, Daniel Jacobowitz On Tue, Apr 13, 2004 at 02:57:07PM +0200, Maciej W. Rozycki wrote: > > > OK, so this patch actually builds, and it sounds like it will do the job, > > since "accum" means "hi and low", "lo" is already clobbered in all cases, > > and either "hi" is the output and doesn't need clobbering (hunks 1, 2, and > > 4), or "hi" is already clobbered (hunk 3). > > There are more places this should be dealt with and I have the following > preliminary patch for this, but I'm unsure about removal of "accum" being > completely safe for older compilers. From everything I know about the behavior of older compilers this should be save. "accum" was treated a little strage in some context anyway, so I'm happy to see it go ... Ralf ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c 2004-04-18 13:00 ` Ralf Baechle @ 2004-04-18 13:00 ` Ralf Baechle 0 siblings, 0 replies; 19+ messages in thread From: Ralf Baechle @ 2004-04-18 13:00 UTC (permalink / raw) To: Maciej W. Rozycki Cc: Bradley D. LaRonde, linux-mips, Eric Christopher, Daniel Jacobowitz On Tue, Apr 13, 2004 at 02:57:07PM +0200, Maciej W. Rozycki wrote: > > > OK, so this patch actually builds, and it sounds like it will do the job, > > since "accum" means "hi and low", "lo" is already clobbered in all cases, > > and either "hi" is the output and doesn't need clobbering (hunks 1, 2, and > > 4), or "hi" is already clobbered (hunk 3). > > There are more places this should be dealt with and I have the following > preliminary patch for this, but I'm unsure about removal of "accum" being > completely safe for older compilers. ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2004-04-19 11:50 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-04-12 20:51 Work on IP30 Stanislaw Skowronek 2004-04-12 23:13 ` Ralf Baechle 2004-04-12 23:42 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" in time.c Bradley D. LaRonde 2004-04-12 23:42 ` Bradley D. LaRonde 2004-04-13 0:53 ` Bradley D. LaRonde 2004-04-13 0:53 ` Bradley D. LaRonde 2004-04-13 1:02 ` Eric Christopher 2004-04-13 1:05 ` [PATCH] gcc 3.4 drops "accum" clobber, replace with "hi" intime.c Bradley D. LaRonde 2004-04-13 1:05 ` Bradley D. LaRonde 2004-04-13 1:07 ` Daniel Jacobowitz 2004-04-13 1:12 ` Bradley D. LaRonde 2004-04-13 1:12 ` Bradley D. LaRonde 2004-04-13 1:23 ` Bradley D. LaRonde 2004-04-13 1:23 ` Bradley D. LaRonde 2004-04-13 12:57 ` Maciej W. Rozycki 2004-04-18 2:39 ` Steven J. Hill 2004-04-19 11:50 ` Maciej W. Rozycki 2004-04-18 13:00 ` Ralf Baechle 2004-04-18 13:00 ` Ralf Baechle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox