* [Patch (block.git) 1/2] Add irqsave to spinlocks in call function single interrupt
@ 2008-03-17 16:34 Alan D. Brunelle
2008-03-17 19:27 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Alan D. Brunelle @ 2008-03-17 16:34 UTC (permalink / raw)
To: linux-kernel; +Cc: Jens Axboe, npiggin, dgc
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
kernel/smp.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/smp.c b/kernel/smp.c
index 852abd3..7232e1c 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -24,12 +24,13 @@ void __cpuinit generic_init_call_single_data(void)
void generic_smp_call_function_single_interrupt(void)
{
struct call_single_queue *q;
+ unsigned long flags;
LIST_HEAD(list);
q = &__get_cpu_var(call_single_queue);
- spin_lock(&q->lock);
+ spin_lock_irqsave(&q->lock, flags);
list_replace_init(&q->list, &list);
- spin_unlock(&q->lock);
+ spin_unlock_irqrestore(&q->lock, flags);
while (!list_empty(&list)) {
struct call_single_data *data;
--
1.5.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch (block.git) 1/2] Add irqsave to spinlocks in call function single interrupt
2008-03-17 16:34 [Patch (block.git) 1/2] Add irqsave to spinlocks in call function single interrupt Alan D. Brunelle
@ 2008-03-17 19:27 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2008-03-17 19:27 UTC (permalink / raw)
To: Alan D. Brunelle; +Cc: linux-kernel, npiggin, dgc
On Mon, Mar 17 2008, Alan D. Brunelle wrote:
>
> Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
> ---
> kernel/smp.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/smp.c b/kernel/smp.c
> index 852abd3..7232e1c 100644
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -24,12 +24,13 @@ void __cpuinit generic_init_call_single_data(void)
> void generic_smp_call_function_single_interrupt(void)
> {
> struct call_single_queue *q;
> + unsigned long flags;
> LIST_HEAD(list);
>
> q = &__get_cpu_var(call_single_queue);
> - spin_lock(&q->lock);
> + spin_lock_irqsave(&q->lock, flags);
> list_replace_init(&q->list, &list);
> - spin_unlock(&q->lock);
> + spin_unlock_irqrestore(&q->lock, flags);
>
> while (!list_empty(&list)) {
> struct call_single_data *data;
This is included in the later series.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-17 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-17 16:34 [Patch (block.git) 1/2] Add irqsave to spinlocks in call function single interrupt Alan D. Brunelle
2008-03-17 19:27 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox