Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751514AbZIJO5o (ORCPT ); Thu, 10 Sep 2009 10:57:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751290AbZIJO5n (ORCPT ); Thu, 10 Sep 2009 10:57:43 -0400 Received: from casper.infradead.org ([85.118.1.10]:34607 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbZIJO5n (ORCPT ); Thu, 10 Sep 2009 10:57:43 -0400 Subject: Re: [PATCH 4/5] hw-breakpoints: Arbitrate access to pmu following registers constraints From: Peter Zijlstra To: Daniel Walker Cc: Frederic Weisbecker , Ingo Molnar , LKML , Prasad , Alan Stern , Arnaldo Carvalho de Melo , Steven Rostedt , Jan Kiszka , Jiri Slaby , Li Zefan , Avi Kivity , Paul Mackerras , Mike Galbraith , Masami Hiramatsu In-Reply-To: <1252593698.30578.176.camel@desktop> References: <1252571367-25876-1-git-send-email-fweisbec@gmail.com> <1252571367-25876-5-git-send-email-fweisbec@gmail.com> <1252593698.30578.176.camel@desktop> Content-Type: text/plain Date: Thu, 10 Sep 2009 16:57:15 +0200 Message-Id: <1252594635.7205.39.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 975 Lines: 30 On Thu, 2009-09-10 at 07:41 -0700, Daniel Walker wrote: > On Thu, 2009-09-10 at 10:29 +0200, Frederic Weisbecker wrote: > > > +static unsigned int max_task_bp_pinned(int cpu) > > { > > - if (atomic_inc_return(&bp_slot) == HBP_NUM) { > > - atomic_dec(&bp_slot); > > + int i; > > + unsigned int *tsk_pinned = per_cpu(task_bp_pinned, cpu); > > > > - return -ENOSPC; > > + for (i = HBP_NUM -1; i >= 0; i--) { > > + if (tsk_pinned[i] > 0) > > + return i + 1; > > } > > One checkpatch error in the code above.. > > ERROR: need consistent spacing around '-' (ctx:WxV) > #206: FILE: kernel/hw_breakpoint.c:81: > + for (i = HBP_NUM -1; i >= 0; i--) { > ^ Don't you have anything useful to do? -- 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/