linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tools: use ansi versions of asm and volatile
@ 2013-10-15 10:46 Ramkumar Ramachandra
  2013-10-15 11:04 ` Peter Zijlstra
  2013-10-15 11:15 ` Peter Zijlstra
  0 siblings, 2 replies; 4+ messages in thread
From: Ramkumar Ramachandra @ 2013-10-15 10:46 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo

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>
---
 tools/perf/tests/rdpmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/rdpmc.c b/tools/perf/tests/rdpmc.c
index ff94886..a05be61 100644
--- a/tools/perf/tests/rdpmc.c
+++ b/tools/perf/tests/rdpmc.c
@@ -9,7 +9,7 @@
 
 #if defined(__x86_64__) || defined(__i386__)
 
-#define barrier() asm volatile("" ::: "memory")
+#define barrier() __asm__ __volatile__("" ::: "memory")
 
 static u64 rdpmc(unsigned int counter)
 {
-- 
1.8.4.477.g5d89aa9


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf tools: use ansi versions of asm and volatile
  2013-10-15 10:46 [PATCH] perf tools: use ansi versions of asm and volatile Ramkumar Ramachandra
@ 2013-10-15 11:04 ` Peter Zijlstra
  2013-10-15 11:14   ` Ramkumar Ramachandra
  2013-10-15 11:15 ` Peter Zijlstra
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2013-10-15 11:04 UTC (permalink / raw)
  To: Ramkumar Ramachandra
  Cc: LKML, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo

On Tue, Oct 15, 2013 at 04:16:26PM +0530, Ramkumar Ramachandra wrote:
> asm and volatile are provided for backward compatibility; use the ansi
> versions __asm__ and __volatile__.
> 

I won't object much to this; but I have to note that the entire kernel
tree is loaded with the non-ansi variant and thus we're fairly certain
it will continue working :-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf tools: use ansi versions of asm and volatile
  2013-10-15 11:04 ` Peter Zijlstra
@ 2013-10-15 11:14   ` Ramkumar Ramachandra
  0 siblings, 0 replies; 4+ messages in thread
From: Ramkumar Ramachandra @ 2013-10-15 11:14 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: LKML, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo

Peter Zijlstra wrote:
> On Tue, Oct 15, 2013 at 04:16:26PM +0530, Ramkumar Ramachandra wrote:
>> asm and volatile are provided for backward compatibility; use the ansi
>> versions __asm__ and __volatile__.
>>
>
> I won't object much to this; but I have to note that the entire kernel
> tree is loaded with the non-ansi variant and thus we're fairly certain
> it will continue working :-)

Oh well, atleast the definition of barrier() is consistent with the
one in linux/compiler-gcc.h.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf tools: use ansi versions of asm and volatile
  2013-10-15 10:46 [PATCH] perf tools: use ansi versions of asm and volatile Ramkumar Ramachandra
  2013-10-15 11:04 ` Peter Zijlstra
@ 2013-10-15 11:15 ` Peter Zijlstra
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2013-10-15 11:15 UTC (permalink / raw)
  To: Ramkumar Ramachandra
  Cc: LKML, Paul Mackerras, Ingo Molnar, Arnaldo Carvalho de Melo

On Tue, Oct 15, 2013 at 04:16:26PM +0530, Ramkumar Ramachandra wrote:
> asm and volatile are provided for backward compatibility; use the ansi
> versions __asm__ and __volatile__.

Also, you seem to have 'forgotten' to convert the 31 other instances :-)

# git grep -E "[[:space:]]asm[([:space:]]" tools/perf/ | wc -l
32

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-15 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-15 10:46 [PATCH] perf tools: use ansi versions of asm and volatile Ramkumar Ramachandra
2013-10-15 11:04 ` Peter Zijlstra
2013-10-15 11:14   ` Ramkumar Ramachandra
2013-10-15 11:15 ` Peter Zijlstra

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).