LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] include/linux/compiler*.h: add version detection to asm_volatile_goto
@ 2018-10-31 18:29 ndesaulniers
  2018-10-31 18:36 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: ndesaulniers @ 2018-10-31 18:29 UTC (permalink / raw)
  To: torvalds
  Cc: akpm, miguel.ojeda.sandonis, Nick Desaulniers, Masahiro Yamada,
	Paul Burton, Arnd Bergmann, Greg Kroah-Hartman, Kees Cook,
	linux-kernel

asm_volatile_goto should also be defined for other compilers that support
asm goto.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
V1 -> V2: drop changes to include/linux/compiler-gcc.h.

 include/linux/compiler_types.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 97cfe29b3f0a..6f1cb84a687b 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -151,6 +151,10 @@ struct ftrace_likely_data {
 #define __assume_aligned(a, ...)
 #endif
 
+#ifndef asm_volatile_goto
+#define asm_volatile_goto(x...) asm goto(x)
+#endif
+
 /* Are two types/vars the same type (ignoring qualifiers)? */
 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
 
-- 
2.19.1.568.g152ad8e336-goog


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

* Re: [PATCH v2] include/linux/compiler*.h: add version detection to asm_volatile_goto
  2018-10-31 18:29 [PATCH v2] include/linux/compiler*.h: add version detection to asm_volatile_goto ndesaulniers
@ 2018-10-31 18:36 ` Linus Torvalds
  2018-10-31 19:39   ` [PATCH v3] include/linux/compiler*.h: define asm_volatile_goto ndesaulniers
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2018-10-31 18:36 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Andrew Morton, miguel.ojeda.sandonis, yamada.masahiro,
	paul.burton, Arnd Bergmann, Greg KH, Kees Cook,
	Linux Kernel Mailing List

On Wed, Oct 31, 2018 at 11:29 AM <ndesaulniers@google.com> wrote:
>
> V1 -> V2: drop changes to include/linux/compiler-gcc.h.

Now the subject line of the patch doesn't match the patch any more..

                Linus

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

* [PATCH v3] include/linux/compiler*.h: define asm_volatile_goto
  2018-10-31 18:36 ` Linus Torvalds
@ 2018-10-31 19:39   ` ndesaulniers
  2018-11-03 13:10     ` Miguel Ojeda
  0 siblings, 1 reply; 4+ messages in thread
From: ndesaulniers @ 2018-10-31 19:39 UTC (permalink / raw)
  To: torvalds
  Cc: akpm, miguel.ojeda.sandonis, Nick Desaulniers, Masahiro Yamada,
	Paul Burton, Greg Kroah-Hartman, Arnd Bergmann, linux-kernel

asm_volatile_goto should also be defined for other compilers that support
asm goto.

Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h
mutually exclusive").

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
V2 -> V3: update subject line & add reference to fixed commit.
V1 -> V2: drop changes to include/linux/compiler-gcc.h.


 include/linux/compiler_types.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 97cfe29b3f0a..6f1cb84a687b 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -151,6 +151,10 @@ struct ftrace_likely_data {
 #define __assume_aligned(a, ...)
 #endif
 
+#ifndef asm_volatile_goto
+#define asm_volatile_goto(x...) asm goto(x)
+#endif
+
 /* Are two types/vars the same type (ignoring qualifiers)? */
 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
 
-- 
2.19.1.568.g152ad8e336-goog


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

* Re: [PATCH v3] include/linux/compiler*.h: define asm_volatile_goto
  2018-10-31 19:39   ` [PATCH v3] include/linux/compiler*.h: define asm_volatile_goto ndesaulniers
@ 2018-11-03 13:10     ` Miguel Ojeda
  0 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2018-11-03 13:10 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Linus Torvalds, Andrew Morton, Masahiro Yamada, Paul Burton,
	Greg KH, Arnd Bergmann, linux-kernel

On Wed, Oct 31, 2018 at 8:39 PM <ndesaulniers@google.com> wrote:
>
> asm_volatile_goto should also be defined for other compilers that support
> asm goto.

Picking this up into compiler-attributes.

Cheers,
Miguel

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

end of thread, other threads:[~2018-11-03 13:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 18:29 [PATCH v2] include/linux/compiler*.h: add version detection to asm_volatile_goto ndesaulniers
2018-10-31 18:36 ` Linus Torvalds
2018-10-31 19:39   ` [PATCH v3] include/linux/compiler*.h: define asm_volatile_goto ndesaulniers
2018-11-03 13:10     ` Miguel Ojeda

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