public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v2] perf tools: use ansi versions of asm and volatile
Date: Tue, 15 Oct 2013 15:18:05 +0200	[thread overview]
Message-ID: <20131015131805.GE2402@gmail.com> (raw)
In-Reply-To: <1381835960-22900-1-git-send-email-artagnon@gmail.com>


* Ramkumar Ramachandra <artagnon@gmail.com> wrote:

> asm and volatile are provided for backward compatibility; use the ansi
> versions __asm__ and __volatile__.
> 
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  Thanks to Peter for pointing out the instances I missed.
> 
>  tools/perf/arch/powerpc/util/header.c |  2 +-
>  tools/perf/perf.h                     | 54 +++++++++++++++++------------------
>  tools/perf/tests/perf-time-to-tsc.c   |  2 +-
>  tools/perf/tests/rdpmc.c              |  6 ++--
>  4 files changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
> index 2f7073d..4b0a302 100644
> --- a/tools/perf/arch/powerpc/util/header.c
> +++ b/tools/perf/arch/powerpc/util/header.c
> @@ -10,7 +10,7 @@
>  #define __stringify(x)          __stringify_1(x)
>  
>  #define mfspr(rn)       ({unsigned long rval; \
> -			 asm volatile("mfspr %0," __stringify(rn) \
> +			 __asm__ __volatile__("mfspr %0," __stringify(rn) \

The thing is, there's a few thousand more 'nonstandard' cases in the 
kernel source:

  comet:~/tip> git grep -w 'asm.*(' | wc -l
  2617

  comet:~/tip> git grep -w '__asm__.*(' | wc -l
  2376

So unless all of them are converted I'm not convinced at all about the 
necessity of this change.

It's not like GCC will (be able to) reuse 'asm' and 'volatile' for some 
other purpose anytime soon (read: within decades, or ever), so this change 
brings not much useful to the table AFAICS.

I personally find 'asm volatile' plenty readable, the underscores don't 
add any extra info.

Thanks,

	Ingo

      reply	other threads:[~2013-10-15 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 11:19 [PATCH v2] perf tools: use ansi versions of asm and volatile Ramkumar Ramachandra
2013-10-15 13:18 ` Ingo Molnar [this message]

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=20131015131805.GE2402@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=akpm@linux-foundation.org \
    --cc=artagnon@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=torvalds@linux-foundation.org \
    /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