devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: linux-kernel@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	devicetree-discuss@lists.ozlabs.org,
	Will Deacon <will.deacon@arm.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Paul Mackerras <paulus@samba.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Ingo Molnar <mingo@elte.hu>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 1/9] arm: avoid using on_each_cpu hard coded ret value
Date: Mon, 9 Jan 2012 09:28:15 +0100	[thread overview]
Message-ID: <20120109082815.GB14252@pengutronix.de> (raw)
In-Reply-To: <1325600353-10895-2-git-send-email-gilad@benyossef.com>

On Tue, Jan 03, 2012 at 04:19:05PM +0200, Gilad Ben-Yossef wrote:
> on_each_cpu always returns a hard coded return code of zero.
> 
> Removing all tests based on this return value saves run time
> cycles for compares and code bloat for branches.
> 
> Cc: Michal Nazarewicz <mina86@mina86.com>
> CC: Will Deacon <will.deacon@arm.com>
> CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
> CC: Paul Mackerras <paulus@samba.org>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> CC: Russell King <linux@arm.linux.org.uk>
> CC: Grant Likely <grant.likely@secretlab.ca>
> CC: Rob Herring <rob.herring@calxeda.com>
> CC: linux-arm-kernel@lists.infradead.org
> CC: devicetree-discuss@lists.ozlabs.org
> ---
>  arch/arm/kernel/perf_event.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
> index 88b0941..bfd58d8 100644
> --- a/arch/arm/kernel/perf_event.c
> +++ b/arch/arm/kernel/perf_event.c
> @@ -617,7 +617,7 @@ static int __init
>  cpu_pmu_reset(void)
>  {
>  	if (cpu_pmu && cpu_pmu->reset)
> -		return on_each_cpu(cpu_pmu->reset, NULL, 1);
> +		on_each_cpu(cpu_pmu->reset, NULL, 1);
>  	return 0;
>  }
>  arch_initcall(cpu_pmu_reset);
This patch results in no binary change for my test build with SMP=n and
it saves one instruction on SMP=y.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2012-01-09  8:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 14:19 [RFC PATCH 0/9] Remove useless on_each_cpu return value Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 1/9] arm: avoid using on_each_cpu hard coded ret value Gilad Ben-Yossef
2012-01-09  8:28   ` Uwe Kleine-König [this message]
2012-01-03 14:19 ` [RFC PATCH 5/9] ppc: " Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 8/9] smp: refactor on_each_cpu to void returning func Gilad Ben-Yossef
2012-01-03 14:25 ` [RFC PATCH 0/9] Remove useless on_each_cpu return value Michal Nazarewicz
2012-01-03 16:08   ` Gilad Ben-Yossef
2012-01-06 13:03 ` Peter Zijlstra
2012-01-08 16:10   ` Gilad Ben-Yossef

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=20120109082815.GB14252@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gilad@benyossef.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mina86@mina86.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=rob.herring@calxeda.com \
    --cc=will.deacon@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).