* Improperly handled case in arch/mips/au1000/common/time.c
@ 2003-04-22 19:54 Jeff Baitis
2003-04-22 20:20 ` Pete Popov
2003-04-22 22:56 ` Jun Sun
0 siblings, 2 replies; 15+ messages in thread
From: Jeff Baitis @ 2003-04-22 19:54 UTC (permalink / raw)
To: Pete Popov; +Cc: linux-mips
Pete:
While struggling to get Linux up on Evolution's custom board based on the
Au1500, I discovered a poorly handled case in time.c; null interrupts are
handled should not affect the local IRQ count. (if the local IRQ count is not
decremented, tests for in_irq() fail.)
Thanks for taking a look at my patch!
-Jeff
Index: time.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/au1000/common/time.c,v
retrieving revision 1.5.2.10
diff -u -r1.5.2.10 time.c
--- time.c 25 Mar 2003 14:30:19 -0000 1.5.2.10
+++ time.c 22 Apr 2003 19:47:24 -0000
@@ -114,6 +114,7 @@
return;
null:
+ irq_exit(cpu, irq);
ack_r4ktimer(0);
}
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 19:54 Improperly handled case in arch/mips/au1000/common/time.c Jeff Baitis @ 2003-04-22 20:20 ` Pete Popov 2003-04-22 20:49 ` Ralf Baechle 2003-04-22 22:56 ` Jun Sun 1 sibling, 1 reply; 15+ messages in thread From: Pete Popov @ 2003-04-22 20:20 UTC (permalink / raw) To: baitisj; +Cc: Linux MIPS mailing list Jeff, Thanks, I'll get to this this week. Are there other outstanding Au patches that you have sent me and I haven't applied yet? I just got back from vacation so I'll get to them. Pete On Tue, 2003-04-22 at 12:54, Jeff Baitis wrote: > Pete: > > While struggling to get Linux up on Evolution's custom board based on the > Au1500, I discovered a poorly handled case in time.c; null interrupts are > handled should not affect the local IRQ count. (if the local IRQ count is not > decremented, tests for in_irq() fail.) > > Thanks for taking a look at my patch! > > -Jeff > > Index: time.c > =================================================================== > RCS file: /home/cvs/linux/arch/mips/au1000/common/time.c,v > retrieving revision 1.5.2.10 > diff -u -r1.5.2.10 time.c > --- time.c 25 Mar 2003 14:30:19 -0000 1.5.2.10 > +++ time.c 22 Apr 2003 19:47:24 -0000 > @@ -114,6 +114,7 @@ > return; > > null: > + irq_exit(cpu, irq); > ack_r4ktimer(0); > } > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 20:20 ` Pete Popov @ 2003-04-22 20:49 ` Ralf Baechle 0 siblings, 0 replies; 15+ messages in thread From: Ralf Baechle @ 2003-04-22 20:49 UTC (permalink / raw) To: Pete Popov; +Cc: baitisj, Linux MIPS mailing list On Tue, Apr 22, 2003 at 01:20:21PM -0700, Pete Popov wrote: > Thanks, I'll get to this this week. Are there other outstanding Au > patches that you have sent me and I haven't applied yet? I just got back > from vacation so I'll get to them. I dealt with a few bugs introduced by the Great Cache Hackery; aside of that I don't think there is much pending. Ralf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 19:54 Improperly handled case in arch/mips/au1000/common/time.c Jeff Baitis 2003-04-22 20:20 ` Pete Popov @ 2003-04-22 22:56 ` Jun Sun 2003-04-22 23:00 ` Pete Popov 2003-04-22 23:07 ` Ralf Baechle 1 sibling, 2 replies; 15+ messages in thread From: Jun Sun @ 2003-04-22 22:56 UTC (permalink / raw) To: Jeff Baitis; +Cc: Pete Popov, linux-mips, jsun I think this is a good example to show benefit of code sharing. There is no good reason for au1x00 boards of not using new time.c. You get to write less board code, fewer bugs and future proof. Jun On Tue, Apr 22, 2003 at 12:54:50PM -0700, Jeff Baitis wrote: > Pete: > > While struggling to get Linux up on Evolution's custom board based on the > Au1500, I discovered a poorly handled case in time.c; null interrupts are > handled should not affect the local IRQ count. (if the local IRQ count is not > decremented, tests for in_irq() fail.) > > Thanks for taking a look at my patch! > > -Jeff > > Index: time.c > =================================================================== > RCS file: /home/cvs/linux/arch/mips/au1000/common/time.c,v > retrieving revision 1.5.2.10 > diff -u -r1.5.2.10 time.c > --- time.c 25 Mar 2003 14:30:19 -0000 1.5.2.10 > +++ time.c 22 Apr 2003 19:47:24 -0000 > @@ -114,6 +114,7 @@ > return; > > null: > + irq_exit(cpu, irq); > ack_r4ktimer(0); > } > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 22:56 ` Jun Sun @ 2003-04-22 23:00 ` Pete Popov 2003-04-22 23:07 ` Jun Sun 2003-04-23 15:35 ` Dan Malek 2003-04-22 23:07 ` Ralf Baechle 1 sibling, 2 replies; 15+ messages in thread From: Pete Popov @ 2003-04-22 23:00 UTC (permalink / raw) To: Jun Sun; +Cc: Jeff Baitis, Linux MIPS mailing list On Tue, 2003-04-22 at 15:56, Jun Sun wrote: > I think this is a good example to show benefit of code sharing. > There is no good reason for au1x00 boards of not using new time.c. > You get to write less board code, fewer bugs and future proof. The I didn't use the generic time.c back then is power management. The CP0 counter sleeps when using the 'wait' instruction, so in that case you have to use a different counter with a rather poor resolution. The modifications I had to make were such that they couldn't go in the generic time.c. But that area definitely needs to be revisited and cleaned up. Pete > Jun > > On Tue, Apr 22, 2003 at 12:54:50PM -0700, Jeff Baitis wrote: > > Pete: > > > > While struggling to get Linux up on Evolution's custom board based on the > > Au1500, I discovered a poorly handled case in time.c; null interrupts are > > handled should not affect the local IRQ count. (if the local IRQ count is not > > decremented, tests for in_irq() fail.) > > > > Thanks for taking a look at my patch! > > > > -Jeff > > > > Index: time.c > > =================================================================== > > RCS file: /home/cvs/linux/arch/mips/au1000/common/time.c,v > > retrieving revision 1.5.2.10 > > diff -u -r1.5.2.10 time.c > > --- time.c 25 Mar 2003 14:30:19 -0000 1.5.2.10 > > +++ time.c 22 Apr 2003 19:47:24 -0000 > > @@ -114,6 +114,7 @@ > > return; > > > > null: > > + irq_exit(cpu, irq); > > ack_r4ktimer(0); > > } > > > > > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 23:00 ` Pete Popov @ 2003-04-22 23:07 ` Jun Sun 2003-04-23 15:35 ` Dan Malek 1 sibling, 0 replies; 15+ messages in thread From: Jun Sun @ 2003-04-22 23:07 UTC (permalink / raw) To: Pete Popov; +Cc: Jeff Baitis, Linux MIPS mailing list, jsun On Tue, Apr 22, 2003 at 04:00:39PM -0700, Pete Popov wrote: > On Tue, 2003-04-22 at 15:56, Jun Sun wrote: > > I think this is a good example to show benefit of code sharing. > > There is no good reason for au1x00 boards of not using new time.c. > > You get to write less board code, fewer bugs and future proof. > > The I didn't use the generic time.c back then is power management. Oh, I see. My ignorance ... :) > The > CP0 counter sleeps when using the 'wait' instruction, so in that case > you have to use a different counter with a rather poor resolution. The > modifications I had to make were such that they couldn't go in the > generic time.c. But that area definitely needs to be revisited and > cleaned up. > Yeah, there might be something interesting to do here. Jun ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 23:00 ` Pete Popov 2003-04-22 23:07 ` Jun Sun @ 2003-04-23 15:35 ` Dan Malek 1 sibling, 0 replies; 15+ messages in thread From: Dan Malek @ 2003-04-23 15:35 UTC (permalink / raw) To: Pete Popov; +Cc: Jun Sun, Jeff Baitis, Linux MIPS mailing list Pete Popov wrote: > .... The > modifications I had to make were such that they couldn't go in the > generic time.c. But that area definitely needs to be revisited and > cleaned up. I've got a bunch of updates to the Au1xxx timer stuff. I'll send a patch. -- Dan ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 22:56 ` Jun Sun 2003-04-22 23:00 ` Pete Popov @ 2003-04-22 23:07 ` Ralf Baechle 2003-04-22 23:13 ` Jun Sun 2003-04-22 23:17 ` Matthew Dharm 1 sibling, 2 replies; 15+ messages in thread From: Ralf Baechle @ 2003-04-22 23:07 UTC (permalink / raw) To: Jun Sun; +Cc: Jeff Baitis, Pete Popov, linux-mips, Matthew Dharm On Tue, Apr 22, 2003 at 03:56:25PM -0700, Jun Sun wrote: > I think this is a good example to show benefit of code sharing. > There is no good reason for au1x00 boards of not using new time.c. > You get to write less board code, fewer bugs and future proof. There are just three configurations left using CONFIG_OLD_TIME_C: - EV64120 which I guess can be considered abandonded - Momenco Ocelot (Matthew, feel like you have time to take care of this?) - RM200 (semi-maintained, my turn to fix it ...) Seems like it's time to get rid of CONFIG_OLD_TIME_C. Ralf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 23:07 ` Ralf Baechle @ 2003-04-22 23:13 ` Jun Sun 2003-04-22 23:18 ` Pete Popov 2003-04-23 0:29 ` Ralf Baechle 2003-04-22 23:17 ` Matthew Dharm 1 sibling, 2 replies; 15+ messages in thread From: Jun Sun @ 2003-04-22 23:13 UTC (permalink / raw) To: Ralf Baechle; +Cc: Jeff Baitis, Pete Popov, linux-mips, Matthew Dharm, jsun On Wed, Apr 23, 2003 at 01:07:27AM +0200, Ralf Baechle wrote: > On Tue, Apr 22, 2003 at 03:56:25PM -0700, Jun Sun wrote: > > > I think this is a good example to show benefit of code sharing. > > There is no good reason for au1x00 boards of not using new time.c. > > You get to write less board code, fewer bugs and future proof. > > There are just three configurations left using CONFIG_OLD_TIME_C: > > - EV64120 which I guess can be considered abandonded > - Momenco Ocelot (Matthew, feel like you have time to take care of > this?) > - RM200 (semi-maintained, my turn to fix it ...) > > Seems like it's time to get rid of CONFIG_OLD_TIME_C. > If we were going to get rid of CONFIG_OLD_TIME_C, I propose to make CONFIG_NEW_TIME_C as the default and therefore removed as well. And make other boards using private time_init() functions to use CONFIG_HAVE_PRIVATE_TIME. ... in the spirit of encouraging code sharing. :) Jun ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 23:13 ` Jun Sun @ 2003-04-22 23:18 ` Pete Popov 2003-04-22 23:30 ` Jun Sun 2003-04-23 0:29 ` Ralf Baechle 1 sibling, 1 reply; 15+ messages in thread From: Pete Popov @ 2003-04-22 23:18 UTC (permalink / raw) To: Jun Sun; +Cc: Ralf Baechle, Jeff Baitis, Linux MIPS mailing list, Matthew Dharm On Tue, 2003-04-22 at 16:13, Jun Sun wrote: > On Wed, Apr 23, 2003 at 01:07:27AM +0200, Ralf Baechle wrote: > > On Tue, Apr 22, 2003 at 03:56:25PM -0700, Jun Sun wrote: > > > > > I think this is a good example to show benefit of code sharing. > > > There is no good reason for au1x00 boards of not using new time.c. > > > You get to write less board code, fewer bugs and future proof. > > > > There are just three configurations left using CONFIG_OLD_TIME_C: > > > > - EV64120 which I guess can be considered abandonded > > - Momenco Ocelot (Matthew, feel like you have time to take care of > > this?) > > - RM200 (semi-maintained, my turn to fix it ...) > > > > Seems like it's time to get rid of CONFIG_OLD_TIME_C. > > > > If we were going to get rid of CONFIG_OLD_TIME_C, I propose > to make CONFIG_NEW_TIME_C as the default and therefore removed as well. > And make other boards using private time_init() functions to use > CONFIG_HAVE_PRIVATE_TIME. > > ... in the spirit of encouraging code sharing. :) How about just extending the time api so that "have private time" can just override some functions instead? That way even then you'll have some code sharing, even if it's not 100%. Pete ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 23:18 ` Pete Popov @ 2003-04-22 23:30 ` Jun Sun 0 siblings, 0 replies; 15+ messages in thread From: Jun Sun @ 2003-04-22 23:30 UTC (permalink / raw) To: Pete Popov Cc: Ralf Baechle, Jeff Baitis, Linux MIPS mailing list, Matthew Dharm, jsun On Tue, Apr 22, 2003 at 04:18:40PM -0700, Pete Popov wrote: > On Tue, 2003-04-22 at 16:13, Jun Sun wrote: > > On Wed, Apr 23, 2003 at 01:07:27AM +0200, Ralf Baechle wrote: > > > On Tue, Apr 22, 2003 at 03:56:25PM -0700, Jun Sun wrote: > > > > > > > I think this is a good example to show benefit of code sharing. > > > > There is no good reason for au1x00 boards of not using new time.c. > > > > You get to write less board code, fewer bugs and future proof. > > > > > > There are just three configurations left using CONFIG_OLD_TIME_C: > > > > > > - EV64120 which I guess can be considered abandonded > > > - Momenco Ocelot (Matthew, feel like you have time to take care of > > > this?) > > > - RM200 (semi-maintained, my turn to fix it ...) > > > > > > Seems like it's time to get rid of CONFIG_OLD_TIME_C. > > > > > > > If we were going to get rid of CONFIG_OLD_TIME_C, I propose > > to make CONFIG_NEW_TIME_C as the default and therefore removed as well. > > And make other boards using private time_init() functions to use > > CONFIG_HAVE_PRIVATE_TIME. > > > > ... in the spirit of encouraging code sharing. :) > > How about just extending the time api so that "have private time" can > just override some functions instead? Right now, the only function you _have_ to use is time_init(). All other functions you can override (in board_timer_setup()). And you can even set up such that your own private routines are called first and in side which you can call common routines. New extension might be needed if some common features are not accommondated by existing functions. We can look at those features and see what is the way to abstract the support. Jun ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-22 23:13 ` Jun Sun 2003-04-22 23:18 ` Pete Popov @ 2003-04-23 0:29 ` Ralf Baechle 2003-04-23 13:24 ` Maciej W. Rozycki 1 sibling, 1 reply; 15+ messages in thread From: Ralf Baechle @ 2003-04-23 0:29 UTC (permalink / raw) To: Jun Sun; +Cc: Jeff Baitis, Pete Popov, linux-mips, Matthew Dharm On Tue, Apr 22, 2003 at 04:13:38PM -0700, Jun Sun wrote: > If we were going to get rid of CONFIG_OLD_TIME_C, I propose > to make CONFIG_NEW_TIME_C as the default and therefore removed as well. > And make other boards using private time_init() functions to use > CONFIG_HAVE_PRIVATE_TIME. > > ... in the spirit of encouraging code sharing. :) That's basically the old situation again, just in disguise this time. In practice I fear that's going to be used to keep inferior copies of some code alive so let's see if we can avoid it. Ralf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Improperly handled case in arch/mips/au1000/common/time.c 2003-04-23 0:29 ` Ralf Baechle @ 2003-04-23 13:24 ` Maciej W. Rozycki 0 siblings, 0 replies; 15+ messages in thread From: Maciej W. Rozycki @ 2003-04-23 13:24 UTC (permalink / raw) To: Ralf Baechle; +Cc: Jun Sun, Jeff Baitis, Pete Popov, linux-mips, Matthew Dharm On Wed, 23 Apr 2003, Ralf Baechle wrote: > That's basically the old situation again, just in disguise this time. In > practice I fear that's going to be used to keep inferior copies of some > code alive so let's see if we can avoid it. Board-specific variations are unavoidable. I'll see how to deal with that as I want to merge the DECstation code (which already supports three configuration variations) with the generic one. It needs to be done for 2.5 and shouldn't hurt for 2.4, either. -- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro@ds2.pg.gda.pl, PGP key available + ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Improperly handled case in arch/mips/au1000/common/time.c @ 2003-04-22 23:17 ` Matthew Dharm 0 siblings, 0 replies; 15+ messages in thread From: Matthew Dharm @ 2003-04-22 23:17 UTC (permalink / raw) To: Ralf Baechle, Jun Sun; +Cc: Jeff Baitis, Pete Popov, linux-mips Umm... I might have some time in a few weeks. Right now it's not much of a priority for us (as a corporation). I just have to hijack the code from some of our other boards which already implements the new system. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: Ralf Baechle [mailto:ralf@linux-mips.org] > Sent: Tuesday, April 22, 2003 4:07 PM > To: Jun Sun > Cc: Jeff Baitis; Pete Popov; linux-mips@linux-mips.org; > Matthew Dharm > Subject: Re: Improperly handled case in > arch/mips/au1000/common/time.c > > > On Tue, Apr 22, 2003 at 03:56:25PM -0700, Jun Sun wrote: > > > I think this is a good example to show benefit of code sharing. > > There is no good reason for au1x00 boards of not using new time.c. > > You get to write less board code, fewer bugs and future proof. > > There are just three configurations left using CONFIG_OLD_TIME_C: > > - EV64120 which I guess can be considered abandonded > - Momenco Ocelot (Matthew, feel like you have time to take care of > this?) > - RM200 (semi-maintained, my turn to fix it ...) > > Seems like it's time to get rid of CONFIG_OLD_TIME_C. > > Ralf > ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Improperly handled case in arch/mips/au1000/common/time.c @ 2003-04-22 23:17 ` Matthew Dharm 0 siblings, 0 replies; 15+ messages in thread From: Matthew Dharm @ 2003-04-22 23:17 UTC (permalink / raw) To: Ralf Baechle, Jun Sun; +Cc: Jeff Baitis, Pete Popov, linux-mips Umm... I might have some time in a few weeks. Right now it's not much of a priority for us (as a corporation). I just have to hijack the code from some of our other boards which already implements the new system. Matt -- Matthew D. Dharm Senior Software Designer Momentum Computer Inc. 1815 Aston Ave. Suite 107 (760) 431-8663 X-115 Carlsbad, CA 92008-7310 Momentum Works For You www.momenco.com > -----Original Message----- > From: Ralf Baechle [mailto:ralf@linux-mips.org] > Sent: Tuesday, April 22, 2003 4:07 PM > To: Jun Sun > Cc: Jeff Baitis; Pete Popov; linux-mips@linux-mips.org; > Matthew Dharm > Subject: Re: Improperly handled case in > arch/mips/au1000/common/time.c > > > On Tue, Apr 22, 2003 at 03:56:25PM -0700, Jun Sun wrote: > > > I think this is a good example to show benefit of code sharing. > > There is no good reason for au1x00 boards of not using new time.c. > > You get to write less board code, fewer bugs and future proof. > > There are just three configurations left using CONFIG_OLD_TIME_C: > > - EV64120 which I guess can be considered abandonded > - Momenco Ocelot (Matthew, feel like you have time to take care of > this?) > - RM200 (semi-maintained, my turn to fix it ...) > > Seems like it's time to get rid of CONFIG_OLD_TIME_C. > > Ralf > ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2003-04-23 15:36 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-04-22 19:54 Improperly handled case in arch/mips/au1000/common/time.c Jeff Baitis 2003-04-22 20:20 ` Pete Popov 2003-04-22 20:49 ` Ralf Baechle 2003-04-22 22:56 ` Jun Sun 2003-04-22 23:00 ` Pete Popov 2003-04-22 23:07 ` Jun Sun 2003-04-23 15:35 ` Dan Malek 2003-04-22 23:07 ` Ralf Baechle 2003-04-22 23:13 ` Jun Sun 2003-04-22 23:18 ` Pete Popov 2003-04-22 23:30 ` Jun Sun 2003-04-23 0:29 ` Ralf Baechle 2003-04-23 13:24 ` Maciej W. Rozycki 2003-04-22 23:17 ` Matthew Dharm 2003-04-22 23:17 ` Matthew Dharm
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.