login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
28
Re: [PATCH] Optimize i8259 code a bit.
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Thomas Gleixner <tglx@...>
To: Ralf Baechle <ralf@...>
Cc: Andrew Morton <akpm@...>, <linux-kernel@...>
Subject:
Re: [PATCH] Optimize i8259 code a bit.
Date: Sunday, October 28, 2007 - 12:54 pm
On Sun, 28 Oct 2007, Ralf Baechle wrote:
quoted text
> The timer code always calls the clock_event_device set_net_event and > set_mode methods with interrupts disabled, so no need to use > spin_lock_irqsave / spin_unlock_irqrestore for those.
Good point, Acked-by:Thomas Gleixner <tglx@linutronix.de>
quoted text
> diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c > index 5d9830d..1b54674 100644 > --- a/arch/mips/kernel/i8253.c > +++ b/arch/mips/kernel/i8253.c > @@ -23,9 +23,7 @@ static DEFINE_SPINLOCK(i8253_lock); > static void init_pit_timer(enum clock_event_mode mode, > struct clock_event_device *evt) > { > - unsigned long flags; > - > - spin_lock_irqsave(&i8253_lock, flags); > + spin_lock(&i8253_lock); > > switch(mode) { > case CLOCK_EVT_MODE_PERIODIC: > @@ -54,7 +52,7 @@ static void init_pit_timer(enum clock_event_mode mode, > /* Nothing to do here */ > break; > } > - spin_unlock_irqrestore(&i8253_lock, flags); > + spin_unlock(&i8253_lock); > } > > /* > @@ -64,12 +62,10 @@ static void init_pit_timer(enum clock_event_mode mode, > */ > static int pit_next_event(unsigned long delta, struct clock_event_device *evt) > { > - unsigned long flags; > - > - spin_lock_irqsave(&i8253_lock, flags); > + spin_lock(&i8253_lock); > outb_p(delta & 0xff , PIT_CH0); /* LSB */ > outb(delta >> 8 , PIT_CH0); /* MSB */ > - spin_unlock_irqrestore(&i8253_lock, flags); > + spin_unlock(&i8253_lock); > > return 0; > } > diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c > index a42c807..5246515 100644 > --- a/arch/x86/kernel/i8253.c > +++ b/arch/x86/kernel/i8253.c > @@ -31,9 +31,7 @@ struct clock_event_device *global_clock_event; > static void init_pit_timer(enum clock_event_mode mode, > struct clock_event_device *evt) > { > - unsigned long flags; > - > - spin_lock_irqsave(&i8253_lock, flags); > + spin_lock(&i8253_lock); > > switch(mode) { > case CLOCK_EVT_MODE_PERIODIC: > @@ -62,7 +60,7 @@ static void init_pit_timer(enum clock_event_mode mode, > /* Nothing to do here */ > break; > } > - spin_unlock_irqrestore(&i8253_lock, flags); > + spin_unlock(&i8253_lock); > } > > /* > @@ -72,12 +70,10 @@ static void init_pit_timer(enum clock_event_mode mode, > */ > static int pit_next_event(unsigned long delta, struct clock_event_device *evt) > { > - unsigned long flags; > - > - spin_lock_irqsave(&i8253_lock, flags); > + spin_lock(&i8253_lock); > outb_p(delta & 0xff , PIT_CH0); /* LSB */ > outb(delta >> 8 , PIT_CH0); /* MSB */ > - spin_unlock_irqrestore(&i8253_lock, flags); > + spin_unlock(&i8253_lock); > > return 0; > } >
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] Optimize i8259 code a bit.
, Ralf Baechle
, (Sun Oct 28, 7:11 pm)
Re: [PATCH] Optimize i8259 code a bit.
, Thomas Gleixner
, (Sun Oct 28, 12:54 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Amit K. Arora
[RFC] Heads up on sys_fallocate()
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
561 guests
online.
Syndicate