diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/Kbuild.asm | 5 | ||||
-rw-r--r-- | include/asm-generic/device.h | 3 | ||||
-rw-r--r-- | include/asm-generic/dma-mapping-common.h | 6 | ||||
-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 | 3 | ||||
-rw-r--r-- | include/asm-generic/mman.h | 1 | ||||
-rw-r--r-- | include/asm-generic/pci.h | 13 | ||||
-rw-r--r-- | include/asm-generic/percpu.h | 3 | ||||
-rw-r--r-- | include/asm-generic/sections.h | 16 | ||||
-rw-r--r-- | include/asm-generic/socket.h | 3 | ||||
-rw-r--r-- | include/asm-generic/syscall.h | 8 | ||||
-rw-r--r-- | include/asm-generic/unistd.h | 4 | ||||
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 29 |
14 files changed, 108 insertions, 41 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/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/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index 5406a601185c..e694263445f7 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h | |||
@@ -103,7 +103,6 @@ static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, | |||
103 | if (ops->sync_single_for_cpu) | 103 | if (ops->sync_single_for_cpu) |
104 | ops->sync_single_for_cpu(dev, addr, size, dir); | 104 | ops->sync_single_for_cpu(dev, addr, size, dir); |
105 | debug_dma_sync_single_for_cpu(dev, addr, size, dir); | 105 | debug_dma_sync_single_for_cpu(dev, addr, size, dir); |
106 | flush_write_buffers(); | ||
107 | } | 106 | } |
108 | 107 | ||
109 | static inline void dma_sync_single_for_device(struct device *dev, | 108 | static inline void dma_sync_single_for_device(struct device *dev, |
@@ -116,7 +115,6 @@ static inline void dma_sync_single_for_device(struct device *dev, | |||
116 | if (ops->sync_single_for_device) | 115 | if (ops->sync_single_for_device) |
117 | ops->sync_single_for_device(dev, addr, size, dir); | 116 | ops->sync_single_for_device(dev, addr, size, dir); |
118 | debug_dma_sync_single_for_device(dev, addr, size, dir); | 117 | debug_dma_sync_single_for_device(dev, addr, size, dir); |
119 | flush_write_buffers(); | ||
120 | } | 118 | } |
121 | 119 | ||
122 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | 120 | static inline void dma_sync_single_range_for_cpu(struct device *dev, |
@@ -132,7 +130,6 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev, | |||
132 | ops->sync_single_range_for_cpu(dev, addr, offset, size, dir); | 130 | ops->sync_single_range_for_cpu(dev, addr, offset, size, dir); |
133 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); | 131 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); |
134 | 132 | ||
135 | flush_write_buffers(); | ||
136 | } else | 133 | } else |
137 | dma_sync_single_for_cpu(dev, addr, size, dir); | 134 | dma_sync_single_for_cpu(dev, addr, size, dir); |
138 | } | 135 | } |
@@ -150,7 +147,6 @@ static inline void dma_sync_single_range_for_device(struct device *dev, | |||
150 | ops->sync_single_range_for_device(dev, addr, offset, size, dir); | 147 | ops->sync_single_range_for_device(dev, addr, offset, size, dir); |
151 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); | 148 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); |
152 | 149 | ||
153 | flush_write_buffers(); | ||
154 | } else | 150 | } else |
155 | dma_sync_single_for_device(dev, addr, size, dir); | 151 | dma_sync_single_for_device(dev, addr, size, dir); |
156 | } | 152 | } |
@@ -165,7 +161,6 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
165 | if (ops->sync_sg_for_cpu) | 161 | if (ops->sync_sg_for_cpu) |
166 | ops->sync_sg_for_cpu(dev, sg, nelems, dir); | 162 | ops->sync_sg_for_cpu(dev, sg, nelems, dir); |
167 | debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir); | 163 | debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir); |
168 | flush_write_buffers(); | ||
169 | } | 164 | } |
170 | 165 | ||
171 | static inline void | 166 | static inline void |
@@ -179,7 +174,6 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
179 | ops->sync_sg_for_device(dev, sg, nelems, dir); | 174 | ops->sync_sg_for_device(dev, sg, nelems, dir); |
180 | debug_dma_sync_sg_for_device(dev, sg, nelems, dir); | 175 | debug_dma_sync_sg_for_device(dev, sg, nelems, dir); |
181 | 176 | ||
182 | flush_write_buffers(); | ||
183 | } | 177 | } |
184 | 178 | ||
185 | #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL) | 179 | #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL) |
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..dd63bd38864b 100644 --- a/include/asm-generic/mman-common.h +++ b/include/asm-generic/mman-common.h | |||
@@ -35,6 +35,9 @@ | |||
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 | 37 | ||
38 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | ||
39 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | ||
40 | |||
38 | /* compatibility flags */ | 41 | /* compatibility flags */ |
39 | #define MAP_FILE 0 | 42 | #define MAP_FILE 0 |
40 | 43 | ||
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/percpu.h b/include/asm-generic/percpu.h index aa00800adacc..90079c373f1c 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -81,14 +81,17 @@ extern void setup_per_cpu_areas(void); | |||
81 | 81 | ||
82 | #ifdef MODULE | 82 | #ifdef MODULE |
83 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | 83 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
84 | #define PER_CPU_ALIGNED_SECTION "" | ||
84 | #else | 85 | #else |
85 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" | 86 | #define PER_CPU_SHARED_ALIGNED_SECTION ".shared_aligned" |
87 | #define PER_CPU_ALIGNED_SECTION ".shared_aligned" | ||
86 | #endif | 88 | #endif |
87 | #define PER_CPU_FIRST_SECTION ".first" | 89 | #define PER_CPU_FIRST_SECTION ".first" |
88 | 90 | ||
89 | #else | 91 | #else |
90 | 92 | ||
91 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | 93 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
94 | #define PER_CPU_ALIGNED_SECTION ".shared_aligned" | ||
92 | #define PER_CPU_FIRST_SECTION "" | 95 | #define PER_CPU_FIRST_SECTION "" |
93 | 96 | ||
94 | #endif | 97 | #endif |
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/socket.h b/include/asm-generic/socket.h index 5d79e409241c..538991cef6f0 100644 --- a/include/asm-generic/socket.h +++ b/include/asm-generic/socket.h | |||
@@ -60,4 +60,7 @@ | |||
60 | #define SO_TIMESTAMPING 37 | 60 | #define SO_TIMESTAMPING 37 |
61 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | 61 | #define SCM_TIMESTAMPING SO_TIMESTAMPING |
62 | 62 | ||
63 | #define SO_PROTOCOL 38 | ||
64 | #define SO_DOMAIN 39 | ||
65 | |||
63 | #endif /* __ASM_GENERIC_SOCKET_H */ | 66 | #endif /* __ASM_GENERIC_SOCKET_H */ |
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/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) |