diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/Kbuild.asm | 5 | ||||
-rw-r--r-- | include/asm-generic/cputime.h | 1 | ||||
-rw-r--r-- | include/asm-generic/device.h | 3 | ||||
-rw-r--r-- | include/asm-generic/fcntl.h | 13 | ||||
-rw-r--r-- | include/asm-generic/gpio.h | 8 | ||||
-rw-r--r-- | include/asm-generic/kmap_types.h | 47 | ||||
-rw-r--r-- | include/asm-generic/mman-common.h | 4 | ||||
-rw-r--r-- | include/asm-generic/mman.h | 1 | ||||
-rw-r--r-- | include/asm-generic/pci.h | 13 | ||||
-rw-r--r-- | include/asm-generic/sections.h | 16 | ||||
-rw-r--r-- | include/asm-generic/siginfo.h | 8 | ||||
-rw-r--r-- | include/asm-generic/syscall.h | 8 | ||||
-rw-r--r-- | include/asm-generic/topology.h | 17 | ||||
-rw-r--r-- | include/asm-generic/unistd.h | 4 | ||||
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 29 |
15 files changed, 124 insertions, 53 deletions
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index 290910e4ede4..96d7c9804dc1 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm | |||
@@ -3,6 +3,11 @@ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ | |||
3 | header-y += kvm.h | 3 | header-y += kvm.h |
4 | endif | 4 | endif |
5 | 5 | ||
6 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ | ||
7 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),) | ||
8 | header-y += kvm_para.h | ||
9 | endif | ||
10 | |||
6 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | 11 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
7 | $(srctree)/include/asm-$(SRCARCH)/a.out.h),) | 12 | $(srctree)/include/asm-$(SRCARCH)/a.out.h),) |
8 | unifdef-y += a.out.h | 13 | unifdef-y += a.out.h |
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h index 1c1fa422d18a..ca0f239f0e13 100644 --- a/include/asm-generic/cputime.h +++ b/include/asm-generic/cputime.h | |||
@@ -7,6 +7,7 @@ | |||
7 | typedef unsigned long cputime_t; | 7 | typedef unsigned long cputime_t; |
8 | 8 | ||
9 | #define cputime_zero (0UL) | 9 | #define cputime_zero (0UL) |
10 | #define cputime_one_jiffy jiffies_to_cputime(1) | ||
10 | #define cputime_max ((~0UL >> 1) - 1) | 11 | #define cputime_max ((~0UL >> 1) - 1) |
11 | #define cputime_add(__a, __b) ((__a) + (__b)) | 12 | #define cputime_add(__a, __b) ((__a) + (__b)) |
12 | #define cputime_sub(__a, __b) ((__a) - (__b)) | 13 | #define cputime_sub(__a, __b) ((__a) - (__b)) |
diff --git a/include/asm-generic/device.h b/include/asm-generic/device.h index c17c9600f220..d7c76bba640d 100644 --- a/include/asm-generic/device.h +++ b/include/asm-generic/device.h | |||
@@ -9,4 +9,7 @@ | |||
9 | struct dev_archdata { | 9 | struct dev_archdata { |
10 | }; | 10 | }; |
11 | 11 | ||
12 | struct pdev_archdata { | ||
13 | }; | ||
14 | |||
12 | #endif /* _ASM_GENERIC_DEVICE_H */ | 15 | #endif /* _ASM_GENERIC_DEVICE_H */ |
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index 4d3e48373e74..0c3dd8603927 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h | |||
@@ -73,6 +73,19 @@ | |||
73 | #define F_SETSIG 10 /* for sockets. */ | 73 | #define F_SETSIG 10 /* for sockets. */ |
74 | #define F_GETSIG 11 /* for sockets. */ | 74 | #define F_GETSIG 11 /* for sockets. */ |
75 | #endif | 75 | #endif |
76 | #ifndef F_SETOWN_EX | ||
77 | #define F_SETOWN_EX 12 | ||
78 | #define F_GETOWN_EX 13 | ||
79 | #endif | ||
80 | |||
81 | #define F_OWNER_TID 0 | ||
82 | #define F_OWNER_PID 1 | ||
83 | #define F_OWNER_GID 2 | ||
84 | |||
85 | struct f_owner_ex { | ||
86 | int type; | ||
87 | pid_t pid; | ||
88 | }; | ||
76 | 89 | ||
77 | /* for F_[GET|SET]FL */ | 90 | /* for F_[GET|SET]FL */ |
78 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | 91 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index d6c379dc64fa..9cca3785cab8 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -141,6 +141,8 @@ extern int __gpio_to_irq(unsigned gpio); | |||
141 | * but more typically is configured entirely from userspace. | 141 | * but more typically is configured entirely from userspace. |
142 | */ | 142 | */ |
143 | extern int gpio_export(unsigned gpio, bool direction_may_change); | 143 | extern int gpio_export(unsigned gpio, bool direction_may_change); |
144 | extern int gpio_export_link(struct device *dev, const char *name, | ||
145 | unsigned gpio); | ||
144 | extern void gpio_unexport(unsigned gpio); | 146 | extern void gpio_unexport(unsigned gpio); |
145 | 147 | ||
146 | #endif /* CONFIG_GPIO_SYSFS */ | 148 | #endif /* CONFIG_GPIO_SYSFS */ |
@@ -185,6 +187,12 @@ static inline int gpio_export(unsigned gpio, bool direction_may_change) | |||
185 | return -ENOSYS; | 187 | return -ENOSYS; |
186 | } | 188 | } |
187 | 189 | ||
190 | static inline int gpio_export_link(struct device *dev, const char *name, | ||
191 | unsigned gpio) | ||
192 | { | ||
193 | return -ENOSYS; | ||
194 | } | ||
195 | |||
188 | static inline void gpio_unexport(unsigned gpio) | 196 | static inline void gpio_unexport(unsigned gpio) |
189 | { | 197 | { |
190 | } | 198 | } |
diff --git a/include/asm-generic/kmap_types.h b/include/asm-generic/kmap_types.h index eddbce0f9fb9..e5f234a08540 100644 --- a/include/asm-generic/kmap_types.h +++ b/include/asm-generic/kmap_types.h | |||
@@ -2,34 +2,35 @@ | |||
2 | #define _ASM_GENERIC_KMAP_TYPES_H | 2 | #define _ASM_GENERIC_KMAP_TYPES_H |
3 | 3 | ||
4 | #ifdef __WITH_KM_FENCE | 4 | #ifdef __WITH_KM_FENCE |
5 | # define D(n) __KM_FENCE_##n , | 5 | # define KMAP_D(n) __KM_FENCE_##n , |
6 | #else | 6 | #else |
7 | # define D(n) | 7 | # define KMAP_D(n) |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | enum km_type { | 10 | enum km_type { |
11 | D(0) KM_BOUNCE_READ, | 11 | KMAP_D(0) KM_BOUNCE_READ, |
12 | D(1) KM_SKB_SUNRPC_DATA, | 12 | KMAP_D(1) KM_SKB_SUNRPC_DATA, |
13 | D(2) KM_SKB_DATA_SOFTIRQ, | 13 | KMAP_D(2) KM_SKB_DATA_SOFTIRQ, |
14 | D(3) KM_USER0, | 14 | KMAP_D(3) KM_USER0, |
15 | D(4) KM_USER1, | 15 | KMAP_D(4) KM_USER1, |
16 | D(5) KM_BIO_SRC_IRQ, | 16 | KMAP_D(5) KM_BIO_SRC_IRQ, |
17 | D(6) KM_BIO_DST_IRQ, | 17 | KMAP_D(6) KM_BIO_DST_IRQ, |
18 | D(7) KM_PTE0, | 18 | KMAP_D(7) KM_PTE0, |
19 | D(8) KM_PTE1, | 19 | KMAP_D(8) KM_PTE1, |
20 | D(9) KM_IRQ0, | 20 | KMAP_D(9) KM_IRQ0, |
21 | D(10) KM_IRQ1, | 21 | KMAP_D(10) KM_IRQ1, |
22 | D(11) KM_SOFTIRQ0, | 22 | KMAP_D(11) KM_SOFTIRQ0, |
23 | D(12) KM_SOFTIRQ1, | 23 | KMAP_D(12) KM_SOFTIRQ1, |
24 | D(13) KM_SYNC_ICACHE, | 24 | KMAP_D(13) KM_SYNC_ICACHE, |
25 | D(14) KM_SYNC_DCACHE, | 25 | KMAP_D(14) KM_SYNC_DCACHE, |
26 | D(15) KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ | 26 | /* UML specific, for copy_*_user - used in do_op_one_page */ |
27 | D(16) KM_IRQ_PTE, | 27 | KMAP_D(15) KM_UML_USERCOPY, |
28 | D(17) KM_NMI, | 28 | KMAP_D(16) KM_IRQ_PTE, |
29 | D(18) KM_NMI_PTE, | 29 | KMAP_D(17) KM_NMI, |
30 | D(19) KM_TYPE_NR | 30 | KMAP_D(18) KM_NMI_PTE, |
31 | KMAP_D(19) KM_TYPE_NR | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | #undef D | 34 | #undef KMAP_D |
34 | 35 | ||
35 | #endif | 36 | #endif |
diff --git a/include/asm-generic/mman-common.h b/include/asm-generic/mman-common.h index 3b69ad34189a..5ee13b2fd223 100644 --- a/include/asm-generic/mman-common.h +++ b/include/asm-generic/mman-common.h | |||
@@ -34,6 +34,10 @@ | |||
34 | #define MADV_REMOVE 9 /* remove these pages & resources */ | 34 | #define MADV_REMOVE 9 /* remove these pages & resources */ |
35 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | 35 | #define MADV_DONTFORK 10 /* don't inherit across fork */ |
36 | #define MADV_DOFORK 11 /* do inherit across fork */ | 36 | #define MADV_DOFORK 11 /* do inherit across fork */ |
37 | #define MADV_HWPOISON 100 /* poison a page for testing */ | ||
38 | |||
39 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | ||
40 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | ||
37 | 41 | ||
38 | /* compatibility flags */ | 42 | /* compatibility flags */ |
39 | #define MAP_FILE 0 | 43 | #define MAP_FILE 0 |
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h index 7cab4de2bca6..32c8bd6a196d 100644 --- a/include/asm-generic/mman.h +++ b/include/asm-generic/mman.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
13 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | 13 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ |
14 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
14 | 15 | ||
15 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
16 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h index b4326b5466eb..26373cff4546 100644 --- a/include/asm-generic/pci.h +++ b/include/asm-generic/pci.h | |||
@@ -30,7 +30,18 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | |||
30 | res->end = region->end; | 30 | res->end = region->end; |
31 | } | 31 | } |
32 | 32 | ||
33 | #define pcibios_scan_all_fns(a, b) 0 | 33 | static inline struct resource * |
34 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
35 | { | ||
36 | struct resource *root = NULL; | ||
37 | |||
38 | if (res->flags & IORESOURCE_IO) | ||
39 | root = &ioport_resource; | ||
40 | if (res->flags & IORESOURCE_MEM) | ||
41 | root = &iomem_resource; | ||
42 | |||
43 | return root; | ||
44 | } | ||
34 | 45 | ||
35 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ | 46 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ |
36 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 47 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index d083561337f2..b3bfabc258f3 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -23,4 +23,20 @@ extern char __ctors_start[], __ctors_end[]; | |||
23 | #define dereference_function_descriptor(p) (p) | 23 | #define dereference_function_descriptor(p) (p) |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | /* random extra sections (if any). Override | ||
27 | * in asm/sections.h */ | ||
28 | #ifndef arch_is_kernel_text | ||
29 | static inline int arch_is_kernel_text(unsigned long addr) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | #endif | ||
34 | |||
35 | #ifndef arch_is_kernel_data | ||
36 | static inline int arch_is_kernel_data(unsigned long addr) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | #endif | ||
41 | |||
26 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 42 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index c840719a8c59..942d30b5aab1 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
@@ -82,6 +82,7 @@ typedef struct siginfo { | |||
82 | #ifdef __ARCH_SI_TRAPNO | 82 | #ifdef __ARCH_SI_TRAPNO |
83 | int _trapno; /* TRAP # which caused the signal */ | 83 | int _trapno; /* TRAP # which caused the signal */ |
84 | #endif | 84 | #endif |
85 | short _addr_lsb; /* LSB of the reported address */ | ||
85 | } _sigfault; | 86 | } _sigfault; |
86 | 87 | ||
87 | /* SIGPOLL */ | 88 | /* SIGPOLL */ |
@@ -112,6 +113,7 @@ typedef struct siginfo { | |||
112 | #ifdef __ARCH_SI_TRAPNO | 113 | #ifdef __ARCH_SI_TRAPNO |
113 | #define si_trapno _sifields._sigfault._trapno | 114 | #define si_trapno _sifields._sigfault._trapno |
114 | #endif | 115 | #endif |
116 | #define si_addr_lsb _sifields._sigfault._addr_lsb | ||
115 | #define si_band _sifields._sigpoll._band | 117 | #define si_band _sifields._sigpoll._band |
116 | #define si_fd _sifields._sigpoll._fd | 118 | #define si_fd _sifields._sigpoll._fd |
117 | 119 | ||
@@ -192,7 +194,11 @@ typedef struct siginfo { | |||
192 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | 194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ |
193 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ | 195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ |
194 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | 196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ |
195 | #define NSIGBUS 3 | 197 | /* hardware memory error consumed on a machine check: action required */ |
198 | #define BUS_MCEERR_AR (__SI_FAULT|4) | ||
199 | /* hardware memory error detected in process but not consumed: action optional*/ | ||
200 | #define BUS_MCEERR_AO (__SI_FAULT|5) | ||
201 | #define NSIGBUS 5 | ||
196 | 202 | ||
197 | /* | 203 | /* |
198 | * SIGTRAP si_codes | 204 | * SIGTRAP si_codes |
diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h index ea8087b55ffc..5c122ae6bfa6 100644 --- a/include/asm-generic/syscall.h +++ b/include/asm-generic/syscall.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Access to user system call parameters and results | 2 | * Access to user system call parameters and results |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Red Hat, Inc. All rights reserved. | 4 | * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. |
5 | * | 5 | * |
6 | * This copyrighted material is made available to anyone wishing to use, | 6 | * This copyrighted material is made available to anyone wishing to use, |
7 | * modify, copy, or redistribute it subject to the terms and conditions | 7 | * modify, copy, or redistribute it subject to the terms and conditions |
@@ -32,9 +32,13 @@ struct pt_regs; | |||
32 | * If @task is not executing a system call, i.e. it's blocked | 32 | * If @task is not executing a system call, i.e. it's blocked |
33 | * inside the kernel for a fault or signal, returns -1. | 33 | * inside the kernel for a fault or signal, returns -1. |
34 | * | 34 | * |
35 | * Note this returns int even on 64-bit machines. Only 32 bits of | ||
36 | * system call number can be meaningful. If the actual arch value | ||
37 | * is 64 bits, this truncates to 32 bits so 0xffffffff means -1. | ||
38 | * | ||
35 | * It's only valid to call this when @task is known to be blocked. | 39 | * It's only valid to call this when @task is known to be blocked. |
36 | */ | 40 | */ |
37 | long syscall_get_nr(struct task_struct *task, struct pt_regs *regs); | 41 | int syscall_get_nr(struct task_struct *task, struct pt_regs *regs); |
38 | 42 | ||
39 | /** | 43 | /** |
40 | * syscall_rollback - roll back registers after an aborted system call | 44 | * syscall_rollback - roll back registers after an aborted system call |
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 88bada2ebc4b..510df36dd5d4 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h | |||
@@ -37,9 +37,6 @@ | |||
37 | #ifndef parent_node | 37 | #ifndef parent_node |
38 | #define parent_node(node) ((void)(node),0) | 38 | #define parent_node(node) ((void)(node),0) |
39 | #endif | 39 | #endif |
40 | #ifndef node_to_cpumask | ||
41 | #define node_to_cpumask(node) ((void)node, cpu_online_map) | ||
42 | #endif | ||
43 | #ifndef cpumask_of_node | 40 | #ifndef cpumask_of_node |
44 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) | 41 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) |
45 | #endif | 42 | #endif |
@@ -55,18 +52,4 @@ | |||
55 | 52 | ||
56 | #endif /* CONFIG_NUMA */ | 53 | #endif /* CONFIG_NUMA */ |
57 | 54 | ||
58 | /* | ||
59 | * returns pointer to cpumask for specified node | ||
60 | * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)" | ||
61 | */ | ||
62 | #ifndef node_to_cpumask_ptr | ||
63 | |||
64 | #define node_to_cpumask_ptr(v, node) \ | ||
65 | cpumask_t _##v = node_to_cpumask(node); \ | ||
66 | const cpumask_t *v = &_##v | ||
67 | |||
68 | #define node_to_cpumask_ptr_next(v, node) \ | ||
69 | _##v = node_to_cpumask(node) | ||
70 | #endif | ||
71 | |||
72 | #endif /* _ASM_GENERIC_TOPOLOGY_H */ | 55 | #endif /* _ASM_GENERIC_TOPOLOGY_H */ |
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 1125e5a1ee5d..d76b66acea95 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -620,8 +620,8 @@ __SYSCALL(__NR_move_pages, sys_move_pages) | |||
620 | 620 | ||
621 | #define __NR_rt_tgsigqueueinfo 240 | 621 | #define __NR_rt_tgsigqueueinfo 240 |
622 | __SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) | 622 | __SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) |
623 | #define __NR_perf_counter_open 241 | 623 | #define __NR_perf_event_open 241 |
624 | __SYSCALL(__NR_perf_counter_open, sys_perf_counter_open) | 624 | __SYSCALL(__NR_perf_event_open, sys_perf_event_open) |
625 | 625 | ||
626 | #undef __NR_syscalls | 626 | #undef __NR_syscalls |
627 | #define __NR_syscalls 242 | 627 | #define __NR_syscalls 242 |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 6ad76bf5fb40..29ca8f53ffbe 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -33,13 +33,10 @@ | |||
33 | * BSS_SECTION(0, 0, 0) | 33 | * BSS_SECTION(0, 0, 0) |
34 | * _end = .; | 34 | * _end = .; |
35 | * | 35 | * |
36 | * /DISCARD/ : { | ||
37 | * EXIT_TEXT | ||
38 | * EXIT_DATA | ||
39 | * EXIT_CALL | ||
40 | * } | ||
41 | * STABS_DEBUG | 36 | * STABS_DEBUG |
42 | * DWARF_DEBUG | 37 | * DWARF_DEBUG |
38 | * | ||
39 | * DISCARDS // must be the last | ||
43 | * } | 40 | * } |
44 | * | 41 | * |
45 | * [__init_begin, __init_end] is the init section that may be freed after init | 42 | * [__init_begin, __init_end] is the init section that may be freed after init |
@@ -91,7 +88,8 @@ | |||
91 | #endif | 88 | #endif |
92 | 89 | ||
93 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD | 90 | #ifdef CONFIG_FTRACE_MCOUNT_RECORD |
94 | #define MCOUNT_REC() VMLINUX_SYMBOL(__start_mcount_loc) = .; \ | 91 | #define MCOUNT_REC() . = ALIGN(8); \ |
92 | VMLINUX_SYMBOL(__start_mcount_loc) = .; \ | ||
95 | *(__mcount_loc) \ | 93 | *(__mcount_loc) \ |
96 | VMLINUX_SYMBOL(__stop_mcount_loc) = .; | 94 | VMLINUX_SYMBOL(__stop_mcount_loc) = .; |
97 | #else | 95 | #else |
@@ -331,7 +329,6 @@ | |||
331 | /* __*init sections */ \ | 329 | /* __*init sections */ \ |
332 | __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \ | 330 | __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \ |
333 | *(.ref.rodata) \ | 331 | *(.ref.rodata) \ |
334 | MCOUNT_REC() \ | ||
335 | DEV_KEEP(init.rodata) \ | 332 | DEV_KEEP(init.rodata) \ |
336 | DEV_KEEP(exit.rodata) \ | 333 | DEV_KEEP(exit.rodata) \ |
337 | CPU_KEEP(init.rodata) \ | 334 | CPU_KEEP(init.rodata) \ |
@@ -455,6 +452,7 @@ | |||
455 | MEM_DISCARD(init.data) \ | 452 | MEM_DISCARD(init.data) \ |
456 | KERNEL_CTORS() \ | 453 | KERNEL_CTORS() \ |
457 | *(.init.rodata) \ | 454 | *(.init.rodata) \ |
455 | MCOUNT_REC() \ | ||
458 | DEV_DISCARD(init.rodata) \ | 456 | DEV_DISCARD(init.rodata) \ |
459 | CPU_DISCARD(init.rodata) \ | 457 | CPU_DISCARD(init.rodata) \ |
460 | MEM_DISCARD(init.rodata) | 458 | MEM_DISCARD(init.rodata) |
@@ -626,6 +624,23 @@ | |||
626 | #define INIT_RAM_FS | 624 | #define INIT_RAM_FS |
627 | #endif | 625 | #endif |
628 | 626 | ||
627 | /* | ||
628 | * Default discarded sections. | ||
629 | * | ||
630 | * Some archs want to discard exit text/data at runtime rather than | ||
631 | * link time due to cross-section references such as alt instructions, | ||
632 | * bug table, eh_frame, etc. DISCARDS must be the last of output | ||
633 | * section definitions so that such archs put those in earlier section | ||
634 | * definitions. | ||
635 | */ | ||
636 | #define DISCARDS \ | ||
637 | /DISCARD/ : { \ | ||
638 | EXIT_TEXT \ | ||
639 | EXIT_DATA \ | ||
640 | EXIT_CALL \ | ||
641 | *(.discard) \ | ||
642 | } | ||
643 | |||
629 | /** | 644 | /** |
630 | * PERCPU_VADDR - define output section for percpu area | 645 | * PERCPU_VADDR - define output section for percpu area |
631 | * @vaddr: explicit base address (optional) | 646 | * @vaddr: explicit base address (optional) |