Skip to content

Commit

Permalink
[PATCH] abstract type/size specification for assembly
Browse files Browse the repository at this point in the history
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 <jbeulich@novell.com>
Cc: "Russell King" <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: "Andi Kleen" <ak@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jan Beulich authored and Linus Torvalds committed Mar 24, 2006
1 parent 09fe316 commit ab7efcc
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
8 changes: 8 additions & 0 deletions include/asm-ia64/linkage.h
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion include/asm-mips/linkage.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H

/* Nothing to see here... */
#ifdef __ASSEMBLY__
#include <asm/asm.h>
#endif

#endif
4 changes: 3 additions & 1 deletion include/asm-v850/linkage.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef __ASM_LINKAGE_H
#define __ASM_LINKAGE_H

/* Nothing to see here... */
#ifdef __ASSEMBLY__
#include <asm/asm.h>
#endif

#endif
16 changes: 13 additions & 3 deletions include/linux/linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ab7efcc

Please sign in to comment.