Skip to contentSkip to conversation

openrisc: use kbuild.h instead of defining macros in asm-offset.c

PATCH In review James Hogan 2 participants 2 messages Oct 11, 2012 – Oct 25, 2012 Openrisc architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openrisc: use kbuild.h instead of defining macros in asm-offset.c

This is modelled on commits such as the one below:

Commit fc1c3a003edb8a6778e64e10ef671a38c76c969e ("sh: use kbuild.h instead of defining macros in asm-offsets.c") introduced in v2.6.26.

---
Note I haven't tested compilation on openrisc. I'd appreciate if somebody could check it doesn't break anything.

 arch/openrisc/kernel/asm-offsets.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
arch/openrisc/kernel/asm-offsets.c +1 -5
index 1a242a0..ddb7368 100644
@@ -34,15 +34,11 @@
 #include <linux/mm.h>
 #include <linux/io.h>
 #include <linux/thread_info.h>
+#include <linux/kbuild.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 
-#define DEFINE(sym, val) \
-		asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
 int main(void)
 {
 	/* offsets into the task_struct */
Signature · 1 line
1.7.7.6
maintainer
#1 lore raw
Quoted 6 lines · James Hogan

This is modelled on commits such as the one below:

Commit fc1c3a003edb8a6778e64e10ef671a38c76c969e ("sh: use kbuild.h instead of defining macros in asm-offsets.c") introduced in v2.6.26.

Thanks, looks good. Will take this for 3.8.
/Jonas

Quoted 28 lines

---
Note I haven't tested compilation on openrisc. I'd appreciate if somebody could check it doesn't break anything.

 arch/openrisc/kernel/asm-offsets.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
arch/openrisc/kernel/asm-offsets.c +1 -5
index 1a242a0..ddb7368 100644
@@ -34,15 +34,11 @@
 #include <linux/mm.h>
 #include <linux/io.h>
 #include <linux/thread_info.h>
+#include <linux/kbuild.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 
-#define DEFINE(sym, val) \
-		asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
 int main(void)
 {
 	/* offsets into the task_struct */