[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH v3 3/6] tools: add __used and enable to override
- 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
- From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- Date: Mon, 9 Jan 2017 07:02:46 -0800
- Cc: gnomes@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, jkosina@xxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, ming.lei@xxxxxxxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, paulus@xxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, wangnan0@xxxxxxxxxx, mchehab@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, markus.heiser@xxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, msalter@xxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, mpe@xxxxxxxxxxxxxx, joro@xxxxxxxxxx, x86@xxxxxxxxxx, fontana@xxxxxxxxxxxxxxx, dsahern@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, dvhart@xxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, linux@xxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, keescook@xxxxxxxxxxxx, arnd@xxxxxxxx, jani.nikula@xxxxxxxxx, will.deacon@xxxxxxx, rusty@xxxxxxxxxxxxxxx, rostedt@xxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, namhyung@xxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, mcb30@xxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, jgross@xxxxxxxx, chris@xxxxxxxxxx, pebolle@xxxxxxxxxx, tony.luck@xxxxxxxxx, jcmvbkbc@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, dmitry.torokhov@xxxxxxxxx, adrian.hunter@xxxxxxxxx, luto@xxxxxxxxxxxxxx, "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, mmarek@xxxxxxxx, david.vrabel@xxxxxxxxxx, jolsa@xxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, korea.drzix@xxxxxxxxx
- Delivery-date: Mon, 09 Jan 2017 15:03:18 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.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.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|