projects/linux·commit ab7efcc9

[PATCH] abstract type/size specification for assembly

ab7efcc9 · Jan Beulich <[email protected]> · 2006-03-24 03:16:17 -08:00

Provide abstraction for generating type and size information of assembly
routines and data, while permitting architectures to override these
defaults.

Signed-off-by: Jan Beulich <[email protected]>
Cc: "Russell King" <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: "Andi Kleen" <[email protected]>
Cc: "Luck, Tony" <[email protected]>
Cc: Miles Bader <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
ab7efcc97ebc92e03c0474dfd38f9c7b84b84115
Parents
09fe316a

Changes

4 files changed · +27 −5

include/asm-ia64/linkage.h

View file
diff --git a/include/asm-ia64/linkage.h b/include/asm-ia64/linkage.h
index 14cd72c..ef22a45 100644
--- a/include/asm-ia64/linkage.h
+++ b/include/asm-ia64/linkage.h
@@ -1,6 +1,14 @@
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H
+#ifndef __ASSEMBLY__
+
#define asmlinkage CPP_ASMLINKAGE __attribute__((syscall_linkage))
+#else
+
+#include <asm/asmmacro.h>
+
+#endif
+
#endif

include/asm-mips/linkage.h

View file
diff --git a/include/asm-mips/linkage.h b/include/asm-mips/linkage.h
index 291c2d0..b6185d3 100644
--- a/include/asm-mips/linkage.h
+++ b/include/asm-mips/linkage.h
@@ -1,6 +1,8 @@
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H
-/* Nothing to see here... */
+#ifdef __ASSEMBLY__
+#include <asm/asm.h>
+#endif
#endif

include/asm-v850/linkage.h

View file
diff --git a/include/asm-v850/linkage.h b/include/asm-v850/linkage.h
index 291c2d0..b6185d3 100644
--- a/include/asm-v850/linkage.h
+++ b/include/asm-v850/linkage.h
@@ -1,6 +1,8 @@
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H
-/* Nothing to see here... */
+#ifdef __ASSEMBLY__
+#include <asm/asm.h>
+#endif
#endif

include/linux/linkage.h

View file
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 147eb01..c08c998 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -28,17 +28,27 @@
#define ALIGN __ALIGN
#define ALIGN_STR __ALIGN_STR
+#ifndef ENTRY
#define ENTRY(name) \
.globl name; \
ALIGN; \
name:
+#endif
#define KPROBE_ENTRY(name) \
.section .kprobes.text, "ax"; \
- .globl name; \
- ALIGN; \
- name:
+ ENTRY(name)
+#ifndef END
+#define END(name) \
+ .size name, .-name
+#endif
+
+#ifndef ENDPROC
+#define ENDPROC(name) \
+ .type name, @function; \
+ END(name)
+#endif
#endif