~ubuntu-branches/ubuntu/trusty/apex/trusty

« back to all changes in this revision

Viewing changes to include/linux/linkage.h

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2009-11-10 11:55:15 UTC
  • mfrom: (2.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091110115515-6jjsf6rc8py35awe
Tags: 1.6.10ubuntu1
* Merge from debian testing, remaining changes:
  - Move apex VMA address to 4MiB to leave enough space for the ubuntu
  kernel and not overwrite apex in ram when loading.
  - nslu2 configuration: set CONFIG_RAMDISK_SIZE=0x0055FFF0 instead of
  0x005FFFF0 to make enough room for ubuntu initramfs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef _LINUX_LINKAGE_H
2
2
#define _LINUX_LINKAGE_H
3
3
 
4
 
#include <linux/config.h>
5
4
#include <asm/linkage.h>
6
5
 
7
6
#ifdef __cplusplus
14
13
#define asmlinkage CPP_ASMLINKAGE
15
14
#endif
16
15
 
 
16
#ifndef asmregparm
 
17
# define asmregparm
 
18
#endif
 
19
 
 
20
/*
 
21
 * This is used by architectures to keep arguments on the stack
 
22
 * untouched by the compiler by keeping them live until the end.
 
23
 * The argument stack may be owned by the assembly-language
 
24
 * caller, not the callee, and gcc doesn't always understand
 
25
 * that.
 
26
 *
 
27
 * We have the return value, and a maximum of six arguments.
 
28
 *
 
29
 * This should always be followed by a "return ret" for the
 
30
 * protection to work (ie no more work that the compiler might
 
31
 * end up needing stack temporaries for).
 
32
 */
 
33
/* Assembly files may be compiled with -traditional .. */
 
34
#ifndef __ASSEMBLY__
 
35
#ifndef asmlinkage_protect
 
36
# define asmlinkage_protect(n, ret, args...)    do { } while (0)
 
37
#endif
 
38
#endif
 
39
 
17
40
#ifndef __ALIGN
18
41
#define __ALIGN         .align 4,0x90
19
42
#define __ALIGN_STR     ".align 4,0x90"
24
47
#define ALIGN __ALIGN
25
48
#define ALIGN_STR __ALIGN_STR
26
49
 
 
50
#ifndef ENTRY
27
51
#define ENTRY(name) \
28
52
  .globl name; \
29
53
  ALIGN; \
30
54
  name:
 
55
#endif
 
56
 
 
57
#ifndef WEAK
 
58
#define WEAK(name)         \
 
59
        .weak name;        \
 
60
        name:
 
61
#endif
 
62
 
 
63
#define KPROBE_ENTRY(name) \
 
64
  .pushsection .kprobes.text, "ax"; \
 
65
  ENTRY(name)
 
66
 
 
67
#define KPROBE_END(name) \
 
68
  END(name);             \
 
69
  .popsection
 
70
 
 
71
#ifndef END
 
72
#define END(name) \
 
73
  .size name, .-name
 
74
#endif
 
75
 
 
76
/* If symbol 'name' is treated as a subroutine (gets called, and returns)
 
77
 * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of
 
78
 * static analysis tools such as stack depth analyzer.
 
79
 */
 
80
#ifndef ENDPROC
 
81
#define ENDPROC(name) \
 
82
  .type name, @function; \
 
83
  END(name)
 
84
#endif
31
85
 
32
86
#endif
33
87
 
35
89
#define ATTRIB_NORET  __attribute__((noreturn))
36
90
#define NORET_AND     noreturn,
37
91
 
38
 
#ifndef FASTCALL
39
 
#define FASTCALL(x)     x
40
 
#define fastcall
41
 
#endif
42
 
 
43
92
#endif