Skip to contentSkip to conversation

um: Include kbuild.h instead of duplicating its macros

PATCH Applied Matthias Kaehlcke 4 participants 5 messages Apr 3, 2017 – May 3, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 um: Include kbuild.h instead of duplicating its macros

---
 arch/x86/um/shared/sysdep/kernel-offsets.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/x86/um/shared/sysdep/kernel-offsets.h +1 -8
index 46a9df99f3c5..7e1d35b6ad5c 100644
@@ -2,16 +2,9 @@
 #include <linux/sched.h>
 #include <linux/elf.h>
 #include <linux/crypto.h>
+#include <linux/kbuild.h>
 #include <asm/mman.h>
 
-#define DEFINE(sym, val) \
-	asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
-#define OFFSET(sym, str, mem) \
-	DEFINE(sym, offsetof(struct str, mem));
-
 void foo(void)
 {
 #include <common-offsets.h>
Signature · 1 line
2.12.2.564.g063fe858b8-goog
#1 lore raw

El Mon, Apr 03, 2017 at 12:54:58PM -0700 Matthias Kaehlcke ha dit:

Quoted 18 lines
---
 arch/x86/um/shared/sysdep/kernel-offsets.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/x86/um/shared/sysdep/kernel-offsets.h +1 -1
index 46a9df99f3c5..7e1d35b6ad5c 100644
@@ -2,16 +2,9 @@
 #include <linux/sched.h>
 #include <linux/elf.h>
 #include <linux/crypto.h>
+#include <linux/kbuild.h>
 #include <asm/mman.h>
 
-#define DEFINE(sym, val) \

arch/x86/um/shared/sysdep/kernel-offsets.h line 10

Quoted 10 lines
arch/x86/um/shared/sysdep/kernel-offsets.h +0 -7
-	asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
-#define OFFSET(sym, str, mem) \
-	DEFINE(sym, offsetof(struct str, mem));
-
 void foo(void)
 {
 #include <common-offsets.h>

Ping, any comment on this patch?

Cheers

Matthias

#2 lore raw

Matthias,

Am 17.04.2017 um 22:37 schrieb Matthias Kaehlcke:

Quoted 18 lines

El Mon, Apr 03, 2017 at 12:54:58PM -0700 Matthias Kaehlcke ha dit:

Quoted 16 lines
---
 arch/x86/um/shared/sysdep/kernel-offsets.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/x86/um/shared/sysdep/kernel-offsets.h +1 -0
index 46a9df99f3c5..7e1d35b6ad5c 100644
@@ -2,16 +2,9 @@
 #include <linux/sched.h>
 #include <linux/elf.h>
 #include <linux/crypto.h>
+#include <linux/kbuild.h>
 #include <asm/mman.h>
 
Quoted 14 lines

arch/x86/um/shared/sysdep/kernel-offsets.h line 10

Quoted 12 lines
arch/x86/um/shared/sysdep/kernel-offsets.h +0 -8
-#define DEFINE(sym, val) \
-	asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
-#define OFFSET(sym, str, mem) \
-	DEFINE(sym, offsetof(struct str, mem));
-
 void foo(void)
 {
 #include <common-offsets.h>

Ping, any comment on this patch?

Looks good, nothing exploded while a quick test.
I'll queue it for the next merge window. :-)

Thanks,
//richard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reviewed-by
#3 lore raw

2017-04-18 16:44 GMT+09:00 Richard Weinberger <[email protected]>:

Quoted 36 lines

Matthias,

Am 17.04.2017 um 22:37 schrieb Matthias Kaehlcke:

Quoted 18 lines

El Mon, Apr 03, 2017 at 12:54:58PM -0700 Matthias Kaehlcke ha dit:

Quoted 16 lines
---
 arch/x86/um/shared/sysdep/kernel-offsets.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/x86/um/shared/sysdep/kernel-offsets.h +1 -0
index 46a9df99f3c5..7e1d35b6ad5c 100644
@@ -2,16 +2,9 @@
 #include <linux/sched.h>
 #include <linux/elf.h>
 #include <linux/crypto.h>
+#include <linux/kbuild.h>
 #include <asm/mman.h>
 
Quoted 14 lines

arch/x86/um/shared/sysdep/kernel-offsets.h

Quoted 12 lines
arch/x86/um/shared/sysdep/kernel-offsets.h +0 -9
-#define DEFINE(sym, val) \
-    asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
-#define OFFSET(sym, str, mem) \
-    DEFINE(sym, offsetof(struct str, mem));
-
 void foo(void)
 {
 #include <common-offsets.h>
--

Ping, any comment on this patch?

Quoted 5 lines

Looks good, nothing exploded while a quick test.
I'll queue it for the next merge window. :-)

Thanks,
//richard

If not too late, please feel free to add my

Signature · 2 lines
Best Regards
Masahiro Yamada
#4 lore raw
In reply to Matthias Kaehlcke
Quoted 28 lines · Matthias Kaehlcke
---
 arch/x86/um/shared/sysdep/kernel-offsets.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
arch/x86/um/shared/sysdep/kernel-offsets.h +1 -9
index 46a9df99f3c5..7e1d35b6ad5c 100644
@@ -2,16 +2,9 @@
 #include <linux/sched.h>
 #include <linux/elf.h>
 #include <linux/crypto.h>
+#include <linux/kbuild.h>
 #include <asm/mman.h>
 
-#define DEFINE(sym, val) \
-       asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
-#define OFFSET(sym, str, mem) \
-       DEFINE(sym, offsetof(struct str, mem));
-
 void foo(void)
 {
 #include <common-offsets.h>
--
Quoted 2 lines

2.12.2.564.g063fe858b8-goog

Applied.

Signature · 10 lines
Thanks,
//richard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel