* [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion
@ 2007-10-29 21:31 Jan Kiszka
2007-10-29 21:42 ` Jan Kiszka
2007-10-30 9:42 ` Philippe Gerum
0 siblings, 2 replies; 4+ messages in thread
From: Jan Kiszka @ 2007-10-29 21:31 UTC (permalink / raw)
To: adeos-main; +Cc: Philippe Gerum
[-- Attachment #1.1: Type: text/plain, Size: 515 bytes --]
Unless I'm utterly wrong, there are practically only two use cases
regarding the PIT: Either Linux has complete hold of it for clocksource
and/or clockevent usage, or the RT domain takes it over, also
completely. In both cases the RT domain does not need to use the
i8253_lock (see Xenomai). So let's remove the hunks that harden this
lock for no good (upcoming 2.6.24 would otherwise require even
_extended_ patching). Patch addresses i386, but this cleanup should be
applicable to x86_64 likewise.
Jan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: remove-i8253_lock-conversion.patch --]
[-- Type: text/x-patch; name="remove-i8253_lock-conversion.patch", Size: 2004 bytes --]
---
arch/i386/kernel/i8253.c | 2 +-
arch/i386/mach-voyager/voyager_basic.c | 8 ++++----
include/asm-i386/i8253.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
Index: linux-2.6.23.1-xeno/arch/i386/kernel/i8253.c
===================================================================
--- linux-2.6.23.1-xeno.orig/arch/i386/kernel/i8253.c
+++ linux-2.6.23.1-xeno/arch/i386/kernel/i8253.c
@@ -16,7 +16,7 @@
#include <asm/io.h>
#include <asm/timer.h>
-IPIPE_DEFINE_SPINLOCK(i8253_lock);
+DEFINE_SPINLOCK(i8253_lock);
EXPORT_SYMBOL(i8253_lock);
/*
Index: linux-2.6.23.1-xeno/arch/i386/mach-voyager/voyager_basic.c
===================================================================
--- linux-2.6.23.1-xeno.orig/arch/i386/mach-voyager/voyager_basic.c
+++ linux-2.6.23.1-xeno/arch/i386/mach-voyager/voyager_basic.c
@@ -185,20 +185,20 @@ voyager_timer_interrupt(void)
* pointy. */
__u16 val;
- spin_lock_irqsave(&i8253_lock);
+ spin_lock(&i8253_lock);
outb_p(0x00, 0x43);
val = inb_p(0x40);
val |= inb(0x40) << 8;
- spin_unlock_irqrestore(&i8253_lock);
+ spin_unlock(&i8253_lock);
if(val > LATCH) {
printk("\nVOYAGER: countdown timer value too high (%d), resetting\n\n", val);
- spin_lock_irqsave(&i8253_lock);
+ spin_lock(&i8253_lock);
outb(0x34,0x43);
outb_p(LATCH & 0xff , 0x40); /* LSB */
outb(LATCH >> 8 , 0x40); /* MSB */
- spin_unlock_irqrestore(&i8253_lock);
+ spin_unlock(&i8253_lock);
}
}
#ifdef CONFIG_SMP
Index: linux-2.6.23.1-xeno/include/asm-i386/i8253.h
===================================================================
--- linux-2.6.23.1-xeno.orig/include/asm-i386/i8253.h
+++ linux-2.6.23.1-xeno/include/asm-i386/i8253.h
@@ -8,7 +8,7 @@
#define PIT_CH0 0x40
#define PIT_CH2 0x42
-extern ipipe_spinlock_t i8253_lock;
+extern spinlock_t i8253_lock;
extern struct clock_event_device *global_clock_event;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion
2007-10-29 21:31 [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion Jan Kiszka
@ 2007-10-29 21:42 ` Jan Kiszka
2007-10-30 9:44 ` Philippe Gerum
2007-10-30 9:42 ` Philippe Gerum
1 sibling, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2007-10-29 21:42 UTC (permalink / raw)
To: adeos-main; +Cc: Philippe Gerum
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
Jan Kiszka wrote:
> Unless I'm utterly wrong, there are practically only two use cases
> regarding the PIT: Either Linux has complete hold of it for clocksource
> and/or clockevent usage, or the RT domain takes it over, also
> completely. In both cases the RT domain does not need to use the
> i8253_lock (see Xenomai). So let's remove the hunks that harden this
> lock for no good (upcoming 2.6.24 would otherwise require even
> _extended_ patching). Patch addresses i386, but this cleanup should be
> applicable to x86_64 likewise.
>
> Jan
PS: voyager hunk was uncompilable anyway.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion
2007-10-29 21:31 [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion Jan Kiszka
2007-10-29 21:42 ` Jan Kiszka
@ 2007-10-30 9:42 ` Philippe Gerum
1 sibling, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2007-10-30 9:42 UTC (permalink / raw)
To: Jan Kiszka; +Cc: adeos-main
Jan Kiszka wrote:
> Unless I'm utterly wrong, there are practically only two use cases
> regarding the PIT: Either Linux has complete hold of it for clocksource
> and/or clockevent usage, or the RT domain takes it over, also
> completely. In both cases the RT domain does not need to use the
> i8253_lock (see Xenomai).
Ack.
So let's remove the hunks that harden this
> lock for no good (upcoming 2.6.24 would otherwise require even
> _extended_ patching). Patch addresses i386, but this cleanup should be
> applicable to x86_64 likewise.
>
Our x86_64 port relies on having APIC+TSC, so we don't even care about
the PIT anyway.
Will merge, thanks.
> Jan
>
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion
2007-10-29 21:42 ` Jan Kiszka
@ 2007-10-30 9:44 ` Philippe Gerum
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2007-10-30 9:44 UTC (permalink / raw)
To: Jan Kiszka; +Cc: adeos-main
Jan Kiszka wrote:
> Jan Kiszka wrote:
>> Unless I'm utterly wrong, there are practically only two use cases
>> regarding the PIT: Either Linux has complete hold of it for clocksource
>> and/or clockevent usage, or the RT domain takes it over, also
>> completely. In both cases the RT domain does not need to use the
>> i8253_lock (see Xenomai). So let's remove the hunks that harden this
>> lock for no good (upcoming 2.6.24 would otherwise require even
>> _extended_ patching). Patch addresses i386, but this cleanup should be
>> applicable to x86_64 likewise.
>>
>> Jan
>
> PS: voyager hunk was uncompilable anyway.
>
It's not the hunk, it's even the entire Voyager platform which we never
supported actually. This hunk was plainly useless indeed.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Adeos-main mailing list
> Adeos-main@domain.hid
> https://mail.gna.org/listinfo/adeos-main
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-30 9:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 21:31 [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion Jan Kiszka
2007-10-29 21:42 ` Jan Kiszka
2007-10-30 9:44 ` Philippe Gerum
2007-10-30 9:42 ` Philippe Gerum
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.