[PATCH v2 3/6] tools: add __used and enable to override
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: hpa@xxxxxxxxx, acme@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, jpoimboe@xxxxxxxxxx, bp@xxxxxxxxx, npiggin@xxxxxxxxx, mhiramat@xxxxxxxxxx, masami.hiramatsu.pt@xxxxxxxxxxx, jbaron@xxxxxxxxxx, heiko.carstens@xxxxxxxxxx, ananth@xxxxxxxxxxxxxxxxxx, anil.s.keshavamurthy@xxxxxxxxx, davem@xxxxxxxxxxxxx, realmz6@xxxxxxxxx, dalias@xxxxxxxx, linux@xxxxxxxxxxxxxxxx
- Subject: [PATCH v2 3/6] tools: add __used and enable to override
- From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- Date: Wed, 21 Dec 2016 18:39:55 -0800
- Cc: x86@xxxxxxxxxx, luto@xxxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, linux@xxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, gnomes@xxxxxxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, arnd@xxxxxxxx, ming.lei@xxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, pebolle@xxxxxxxxxx, fontana@xxxxxxxxxxxxxxx, david.vrabel@xxxxxxxxxx, konrad.wilk@xxxxxxxxxx, mcb30@xxxxxxxx, jgross@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, dvhart@xxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, mmarek@xxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, jkosina@xxxxxxx, korea.drzix@xxxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, tony.luck@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will.deacon@xxxxxxx, rostedt@xxxxxxxxxxx, jani.nikula@xxxxxxxxx, mchehab@xxxxxxxxxxxxxxx, markus.heiser@xxxxxxxxxxx, jolsa@xxxxxxxxxx, msalter@xxxxxxxxxx, chris@xxxxxxxxxx, jcmvbkbc@xxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, adrian.hunter@xxxxxxxxx, dsahern@xxxxxxxxx, namhyung@xxxxxxxxxx, wangnan0@xxxxxxxxxx, dmitry.torokhov@xxxxxxxxx, joro@xxxxxxxxxx, paulus@xxxxxxxxx, mpe@xxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- In-reply-to: <20161222023958.21306-1-mcgrof@kernel.org>
- References: <1471642875-5957-1-git-send-email-mcgrof@kernel.org> <20161222023958.21306-1-mcgrof@kernel.org>
This adds __used, to be used later in the userspace linker-tables
sandbox. If any userspace applicaiton wants to override they can
add their own definition and then use include_next.
This definition should probably suffice for most uses cases though.
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
---
tools/include/linux/compiler.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
index e33fc1df3935..556c991de212 100644
--- a/tools/include/linux/compiler.h
+++ b/tools/include/linux/compiler.h
@@ -5,6 +5,12 @@
/* The "volatile" is due to gcc bugs */
#define barrier() __asm__ __volatile__("": : :"memory")
+
+/* You can override as you see fit on your userspace tool */
+#ifndef __used
+#define __used __attribute__((__used__))
+#endif
+
#ifndef __always_inline
# define __always_inline inline __attribute__((always_inline))
#endif
--
2.10.1
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]