All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: mingo@elte.hu, David Miller <davem@davemloft.net>,
	acme@redhat.com, paulus@samba.org, Mike Galbraith <efault@gmx.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@l>
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [patch 3/3] sched: Use local_irq_save_nmi() in cpu_clock()
Date: Tue, 06 Apr 2010 15:28:10 +0200	[thread overview]
Message-ID: <20100406133141.039454288@chello.nl> (raw)
In-Reply-To: 20100406132807.698467930@chello.nl

[-- Attachment #1: sched-clock-nmi.patch --]
[-- Type: text/plain, Size: 704 bytes --]

Since we can call cpu_clock() from NMI context fix up the IRQ
disabling to conform to the new rules.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 kernel/sched_clock.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/kernel/sched_clock.c
===================================================================
--- linux-2.6.orig/kernel/sched_clock.c
+++ linux-2.6/kernel/sched_clock.c
@@ -241,9 +241,9 @@ unsigned long long cpu_clock(int cpu)
 	unsigned long long clock;
 	unsigned long flags;
 
-	local_irq_save(flags);
+	local_irq_save_nmi(flags);
 	clock = sched_clock_cpu(cpu);
-	local_irq_restore(flags);
+	local_irq_restore_nmi(flags);
 
 	return clock;
 }

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: mingo@elte.hu, David Miller <davem@davemloft.net>,
	acme@redhat.com, paulus@samba.org, Mike Galbraith <efault@gmx.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [patch 3/3] sched: Use local_irq_save_nmi() in cpu_clock()
Date: Tue, 06 Apr 2010 15:28:10 +0200	[thread overview]
Message-ID: <20100406133141.039454288@chello.nl> (raw)
Message-ID: <20100406132810.CaajkTuT6nxhht7295AM5xDBGemIUTS2wIHlH56hVIc@z> (raw)
In-Reply-To: 20100406132807.698467930@chello.nl

[-- Attachment #1: sched-clock-nmi.patch --]
[-- Type: text/plain, Size: 706 bytes --]

Since we can call cpu_clock() from NMI context fix up the IRQ
disabling to conform to the new rules.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 kernel/sched_clock.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/kernel/sched_clock.c
===================================================================
--- linux-2.6.orig/kernel/sched_clock.c
+++ linux-2.6/kernel/sched_clock.c
@@ -241,9 +241,9 @@ unsigned long long cpu_clock(int cpu)
 	unsigned long long clock;
 	unsigned long flags;
 
-	local_irq_save(flags);
+	local_irq_save_nmi(flags);
 	clock = sched_clock_cpu(cpu);
-	local_irq_restore(flags);
+	local_irq_restore_nmi(flags);
 
 	return clock;
 }



WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: mingo@elte.hu, David Miller <davem@davemloft.net>,
	acme@redhat.com, paulus@samba.org, Mike Galbraith <efault@gmx.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@l>
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [patch 3/3] sched: Use local_irq_save_nmi() in cpu_clock()
Date: Tue, 06 Apr 2010 13:28:10 +0000	[thread overview]
Message-ID: <20100406133141.039454288@chello.nl> (raw)
In-Reply-To: 20100406132807.698467930@chello.nl

Since we can call cpu_clock() from NMI context fix up the IRQ
disabling to conform to the new rules.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 kernel/sched_clock.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/kernel/sched_clock.c
=================================--- linux-2.6.orig/kernel/sched_clock.c
+++ linux-2.6/kernel/sched_clock.c
@@ -241,9 +241,9 @@ unsigned long long cpu_clock(int cpu)
 	unsigned long long clock;
 	unsigned long flags;
 
-	local_irq_save(flags);
+	local_irq_save_nmi(flags);
 	clock = sched_clock_cpu(cpu);
-	local_irq_restore(flags);
+	local_irq_restore_nmi(flags);
 
 	return clock;
 }



  parent reply	other threads:[~2010-04-06 13:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06 13:28 [patch 0/3] IRQ disable vs NMI Peter Zijlstra
2010-04-06 13:28 ` Peter Zijlstra
2010-04-06 13:28 ` Peter Zijlstra
2010-04-06 13:28 ` [patch 1/3] kernel: local_irq_{save,restore}_nmi() Peter Zijlstra
2010-04-06 13:28   ` Peter Zijlstra
2010-04-06 13:28   ` Peter Zijlstra
2010-04-07  1:13   ` Steven Rostedt
2010-04-07  1:13     ` Steven Rostedt
2010-04-07  1:19     ` David Miller
2010-04-07  1:19       ` David Miller
2010-04-07  1:23       ` Steven Rostedt
2010-04-07  1:23         ` Steven Rostedt
2010-04-06 13:28 ` [patch 2/3] perf: Use local_irq_save_nmi() Peter Zijlstra
2010-04-06 13:28   ` Peter Zijlstra
2010-04-06 13:28   ` Peter Zijlstra
2010-04-06 13:28 ` Peter Zijlstra [this message]
2010-04-06 13:28   ` [patch 3/3] sched: Use local_irq_save_nmi() in cpu_clock() Peter Zijlstra
2010-04-06 13:28   ` Peter Zijlstra
2010-04-07 11:27   ` Frederic Weisbecker
2010-04-07 11:27     ` Frederic Weisbecker
2010-04-07 11:31     ` Peter Zijlstra
2010-04-07 11:31       ` Peter Zijlstra
2010-04-07 11:44       ` Frederic Weisbecker
2010-04-07 11:44         ` Frederic Weisbecker
2010-04-06 17:54 ` [patch 0/3] IRQ disable vs NMI David Miller
2010-04-06 17:54   ` David Miller
2010-04-06 23:39 ` David Miller
2010-04-06 23:39   ` David Miller

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=20100406133141.039454288@chello.nl \
    --to=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@l \
    /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.