perf tools: use ansi versions of asm and volatile
PATCH 1/1 perf tools: use ansi versions of asm and volatile
asm and volatile are provided for backward compatibility; use the ansi versions __asm__ and __volatile__.
--- tools/perf/tests/rdpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/rdpmc.c +1 -1
@@ -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) {
Signature · 1 line
1.8.4.477.g5d89aa9
Peter Zijlstra
maintainerQuoted 3 lines · Ramkumar Ramachandra
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 :-)
Quoted 8 lines · Peter Zijlstra
Quoted 3 lines · Ramkumar Ramachandra
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.
Peter Zijlstra
maintainerQuoted 2 lines · Ramkumar Ramachandra
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