aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2017-11-06 08:17:38 -0500
committerIngo Molnar <mingo@kernel.org>2017-11-07 04:48:22 -0500
commit10259821ac47dbefa6f83ae57f1fa9f1f2c54b3d (patch)
tree0cbd4a8933e83a85d6b0348332dda890b62fd46c
parentd0c2e691d1cbe43662df3a08a4933f13acc352c3 (diff)
objtool: Make unreachable annotation inline asms explicitly volatile
Add 'volatile' to the unreachable annotation macro inline asm statements. They're already implicitly volatile because they don't have output constraints, but it's clearer and more robust to make them explicitly volatile. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/28659257b7a6adf4a7f65920dad70b2b0226e996.1509974104.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--include/linux/compiler.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index f8734fca54ce..4fac29cdffd1 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -193,16 +193,16 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
193 * unique, to convince GCC not to merge duplicate inline asm statements. 193 * unique, to convince GCC not to merge duplicate inline asm statements.
194 */ 194 */
195#define annotate_reachable() ({ \ 195#define annotate_reachable() ({ \
196 asm("%c0:\n\t" \ 196 asm volatile("%c0:\n\t" \
197 ".pushsection .discard.reachable\n\t" \ 197 ".pushsection .discard.reachable\n\t" \
198 ".long %c0b - .\n\t" \ 198 ".long %c0b - .\n\t" \
199 ".popsection\n\t" : : "i" (__COUNTER__)); \ 199 ".popsection\n\t" : : "i" (__COUNTER__)); \
200}) 200})
201#define annotate_unreachable() ({ \ 201#define annotate_unreachable() ({ \
202 asm("%c0:\n\t" \ 202 asm volatile("%c0:\n\t" \
203 ".pushsection .discard.unreachable\n\t" \ 203 ".pushsection .discard.unreachable\n\t" \
204 ".long %c0b - .\n\t" \ 204 ".long %c0b - .\n\t" \
205 ".popsection\n\t" : : "i" (__COUNTER__)); \ 205 ".popsection\n\t" : : "i" (__COUNTER__)); \
206}) 206})
207#define ASM_UNREACHABLE \ 207#define ASM_UNREACHABLE \
208 "999:\n\t" \ 208 "999:\n\t" \