[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131015131805.GE2402@gmail.com>
Date: Tue, 15 Oct 2013 15:18:05 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Ramkumar Ramachandra <artagnon@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2] perf tools: use ansi versions of asm and volatile
* Ramkumar Ramachandra <artagnon@...il.com> wrote:
> asm and volatile are provided for backward compatibility; use the ansi
> versions __asm__ and __volatile__.
>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
> Signed-off-by: Ramkumar Ramachandra <artagnon@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists