From patchwork Tue Apr 6 13:28:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 49515 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 13412B7CF0 for ; Tue, 6 Apr 2010 23:40:11 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756290Ab0DFNjZ (ORCPT ); Tue, 6 Apr 2010 09:39:25 -0400 Received: from casper.infradead.org ([85.118.1.10]:49338 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756177Ab0DFNjO (ORCPT ); Tue, 6 Apr 2010 09:39:14 -0400 Received: from e35131.upc-e.chello.nl ([213.93.35.131] helo=twins) by casper.infradead.org with esmtpsa (Exim 4.69 #1 (Red Hat Linux)) id 1Nz8zc-0007T2-4A; Tue, 06 Apr 2010 13:39:00 +0000 Received: by twins (Postfix, from userid 0) id 5792D180240AA; Tue, 6 Apr 2010 15:38:00 +0200 (CEST) Message-Id: <20100406133141.039454288@chello.nl> User-Agent: quilt/0.47-1 Date: Tue, 06 Apr 2010 15:28:10 +0200 From: Peter Zijlstra To: mingo@elte.hu, David Miller , acme@redhat.com, paulus@samba.org, Mike Galbraith , Frederic Weisbecker , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, Peter Zijlstra Subject: [patch 3/3] sched: Use local_irq_save_nmi() in cpu_clock() References: <20100406132807.698467930@chello.nl> Content-Disposition: inline; filename=sched-clock-nmi.patch Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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 --- kernel/sched_clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }