From: Jan Kiszka <jan.kiszka@domain.hid>
To: adeos-main@gna.org
Cc: Philippe Gerum <rpm@xenomai.org>
Subject: [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion
Date: Mon, 29 Oct 2007 22:31:41 +0100 [thread overview]
Message-ID: <4726513D.9020308@domain.hid> (raw)
[-- 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 --]
next reply other threads:[~2007-10-29 21:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-29 21:31 Jan Kiszka [this message]
2007-10-29 21:42 ` [Adeos-main] [PATCH] janitorial: remove i8253_lock conversion Jan Kiszka
2007-10-30 9:44 ` Philippe Gerum
2007-10-30 9:42 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4726513D.9020308@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=adeos-main@gna.org \
--cc=rpm@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.