Commit e04462fb authored by Miguel Ojeda's avatar Miguel Ojeda

Compiler Attributes: remove uses of __attribute__ from compiler.h

Suggested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # on top of v4.19-rc5, clang 7
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Reviewed-by: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
parent 06e3727e
...@@ -23,8 +23,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, ...@@ -23,8 +23,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
#define __branch_check__(x, expect, is_constant) ({ \ #define __branch_check__(x, expect, is_constant) ({ \
long ______r; \ long ______r; \
static struct ftrace_likely_data \ static struct ftrace_likely_data \
__attribute__((__aligned__(4))) \ __aligned(4) \
__attribute__((__section__("_ftrace_annotated_branch"))) \ __section("_ftrace_annotated_branch") \
______f = { \ ______f = { \
.data.func = __func__, \ .data.func = __func__, \
.data.file = __FILE__, \ .data.file = __FILE__, \
...@@ -59,8 +59,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, ...@@ -59,8 +59,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
({ \ ({ \
int ______r; \ int ______r; \
static struct ftrace_branch_data \ static struct ftrace_branch_data \
__attribute__((__aligned__(4))) \ __aligned(4) \
__attribute__((__section__("_ftrace_branch"))) \ __section("_ftrace_branch") \
______f = { \ ______f = { \
.func = __func__, \ .func = __func__, \
.file = __FILE__, \ .file = __FILE__, \
...@@ -146,7 +146,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, ...@@ -146,7 +146,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
extern typeof(sym) sym; \ extern typeof(sym) sym; \
static const unsigned long __kentry_##sym \ static const unsigned long __kentry_##sym \
__used \ __used \
__attribute__((__section__("___kentry" "+" #sym ))) \ __section("___kentry" "+" #sym ) \
= (unsigned long)&sym; = (unsigned long)&sym;
#endif #endif
...@@ -287,7 +287,7 @@ unsigned long read_word_at_a_time(const void *addr) ...@@ -287,7 +287,7 @@ unsigned long read_word_at_a_time(const void *addr)
* visible to the compiler. * visible to the compiler.
*/ */
#define __ADDRESSABLE(sym) \ #define __ADDRESSABLE(sym) \
static void * __attribute__((__section__(".discard.addressable"), used)) \ static void * __section(".discard.addressable") __used \
__PASTE(__addressable_##sym, __LINE__) = (void *)&sym; __PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment