diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-04 11:42:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-04 11:42:44 -0400 |
commit | 2a475501b81f06f64c474cfad66f8807294b4534 (patch) | |
tree | e189fbd7807a222b7012754c1aaf4ad15ab9c728 /arch | |
parent | 3d7e5fc37f91c3ad4974262e173d9ba36139652a (diff) | |
parent | eb86b5fd505cb97743d84226140cf247d91a2f03 (diff) |
Merge branch 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/asmlinkage changes from Ingo Molnar:
"As a preparation for Andi Kleen's LTO patchset (link time
optimizations using GCC's -flto which build time optimization has
steadily increased in quality over the past few years and might
eventually be usable for the kernel too) this tree includes a handful
of preparatory patches that make function calling convention
annotations consistent again:
- Mark every function without arguments (or 64bit only) that is used
by assembly code with asmlinkage()
- Mark every function with parameters or variables that is used by
assembly code as __visible.
For the vanilla kernel this has documentation, consistency and
debuggability advantages, for the time being"
* 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/asmlinkage: Fix warning in xen asmlinkage change
x86, asmlinkage, vdso: Mark vdso variables __visible
x86, asmlinkage, power: Make various symbols used by the suspend asm code visible
x86, asmlinkage: Make dump_stack visible
x86, asmlinkage: Make 64bit checksum functions visible
x86, asmlinkage, paravirt: Add __visible/asmlinkage to xen paravirt ops
x86, asmlinkage, apm: Make APM data structure used from assembler visible
x86, asmlinkage: Make syscall tables visible
x86, asmlinkage: Make several variables used from assembler/linker script visible
x86, asmlinkage: Make kprobes code visible and fix assembler code
x86, asmlinkage: Make various syscalls asmlinkage
x86, asmlinkage: Make 32bit/64bit __switch_to visible
x86, asmlinkage: Make _*_start_kernel visible
x86, asmlinkage: Make all interrupt handlers asmlinkage / __visible
x86, asmlinkage: Change dotraplinkage into __visible on 32bit
x86: Fix sys_call_table type in asm/syscall.h
Diffstat (limited to 'arch')
37 files changed, 145 insertions, 152 deletions
diff --git a/arch/x86/include/asm/checksum_64.h b/arch/x86/include/asm/checksum_64.h index 9bfdc41629ec..e6fd8a026c7b 100644 --- a/arch/x86/include/asm/checksum_64.h +++ b/arch/x86/include/asm/checksum_64.h | |||
@@ -133,7 +133,7 @@ extern __wsum csum_partial(const void *buff, int len, __wsum sum); | |||
133 | 133 | ||
134 | 134 | ||
135 | /* Do not call this directly. Use the wrappers below */ | 135 | /* Do not call this directly. Use the wrappers below */ |
136 | extern __wsum csum_partial_copy_generic(const void *src, const void *dst, | 136 | extern __visible __wsum csum_partial_copy_generic(const void *src, const void *dst, |
137 | int len, __wsum sum, | 137 | int len, __wsum sum, |
138 | int *src_err_ptr, int *dst_err_ptr); | 138 | int *src_err_ptr, int *dst_err_ptr); |
139 | 139 | ||
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index e4ac559c4a24..92b3bae08b74 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -26,56 +26,56 @@ | |||
26 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
27 | 27 | ||
28 | /* Interrupt handlers registered during init_IRQ */ | 28 | /* Interrupt handlers registered during init_IRQ */ |
29 | extern void apic_timer_interrupt(void); | 29 | extern asmlinkage void apic_timer_interrupt(void); |
30 | extern void x86_platform_ipi(void); | 30 | extern asmlinkage void x86_platform_ipi(void); |
31 | extern void kvm_posted_intr_ipi(void); | 31 | extern asmlinkage void kvm_posted_intr_ipi(void); |
32 | extern void error_interrupt(void); | 32 | extern asmlinkage void error_interrupt(void); |
33 | extern void irq_work_interrupt(void); | 33 | extern asmlinkage void irq_work_interrupt(void); |
34 | 34 | ||
35 | extern void spurious_interrupt(void); | 35 | extern asmlinkage void spurious_interrupt(void); |
36 | extern void thermal_interrupt(void); | 36 | extern asmlinkage void thermal_interrupt(void); |
37 | extern void reschedule_interrupt(void); | 37 | extern asmlinkage void reschedule_interrupt(void); |
38 | 38 | ||
39 | extern void invalidate_interrupt(void); | 39 | extern asmlinkage void invalidate_interrupt(void); |
40 | extern void invalidate_interrupt0(void); | 40 | extern asmlinkage void invalidate_interrupt0(void); |
41 | extern void invalidate_interrupt1(void); | 41 | extern asmlinkage void invalidate_interrupt1(void); |
42 | extern void invalidate_interrupt2(void); | 42 | extern asmlinkage void invalidate_interrupt2(void); |
43 | extern void invalidate_interrupt3(void); | 43 | extern asmlinkage void invalidate_interrupt3(void); |
44 | extern void invalidate_interrupt4(void); | 44 | extern asmlinkage void invalidate_interrupt4(void); |
45 | extern void invalidate_interrupt5(void); | 45 | extern asmlinkage void invalidate_interrupt5(void); |
46 | extern void invalidate_interrupt6(void); | 46 | extern asmlinkage void invalidate_interrupt6(void); |
47 | extern void invalidate_interrupt7(void); | 47 | extern asmlinkage void invalidate_interrupt7(void); |
48 | extern void invalidate_interrupt8(void); | 48 | extern asmlinkage void invalidate_interrupt8(void); |
49 | extern void invalidate_interrupt9(void); | 49 | extern asmlinkage void invalidate_interrupt9(void); |
50 | extern void invalidate_interrupt10(void); | 50 | extern asmlinkage void invalidate_interrupt10(void); |
51 | extern void invalidate_interrupt11(void); | 51 | extern asmlinkage void invalidate_interrupt11(void); |
52 | extern void invalidate_interrupt12(void); | 52 | extern asmlinkage void invalidate_interrupt12(void); |
53 | extern void invalidate_interrupt13(void); | 53 | extern asmlinkage void invalidate_interrupt13(void); |
54 | extern void invalidate_interrupt14(void); | 54 | extern asmlinkage void invalidate_interrupt14(void); |
55 | extern void invalidate_interrupt15(void); | 55 | extern asmlinkage void invalidate_interrupt15(void); |
56 | extern void invalidate_interrupt16(void); | 56 | extern asmlinkage void invalidate_interrupt16(void); |
57 | extern void invalidate_interrupt17(void); | 57 | extern asmlinkage void invalidate_interrupt17(void); |
58 | extern void invalidate_interrupt18(void); | 58 | extern asmlinkage void invalidate_interrupt18(void); |
59 | extern void invalidate_interrupt19(void); | 59 | extern asmlinkage void invalidate_interrupt19(void); |
60 | extern void invalidate_interrupt20(void); | 60 | extern asmlinkage void invalidate_interrupt20(void); |
61 | extern void invalidate_interrupt21(void); | 61 | extern asmlinkage void invalidate_interrupt21(void); |
62 | extern void invalidate_interrupt22(void); | 62 | extern asmlinkage void invalidate_interrupt22(void); |
63 | extern void invalidate_interrupt23(void); | 63 | extern asmlinkage void invalidate_interrupt23(void); |
64 | extern void invalidate_interrupt24(void); | 64 | extern asmlinkage void invalidate_interrupt24(void); |
65 | extern void invalidate_interrupt25(void); | 65 | extern asmlinkage void invalidate_interrupt25(void); |
66 | extern void invalidate_interrupt26(void); | 66 | extern asmlinkage void invalidate_interrupt26(void); |
67 | extern void invalidate_interrupt27(void); | 67 | extern asmlinkage void invalidate_interrupt27(void); |
68 | extern void invalidate_interrupt28(void); | 68 | extern asmlinkage void invalidate_interrupt28(void); |
69 | extern void invalidate_interrupt29(void); | 69 | extern asmlinkage void invalidate_interrupt29(void); |
70 | extern void invalidate_interrupt30(void); | 70 | extern asmlinkage void invalidate_interrupt30(void); |
71 | extern void invalidate_interrupt31(void); | 71 | extern asmlinkage void invalidate_interrupt31(void); |
72 | 72 | ||
73 | extern void irq_move_cleanup_interrupt(void); | 73 | extern asmlinkage void irq_move_cleanup_interrupt(void); |
74 | extern void reboot_interrupt(void); | 74 | extern asmlinkage void reboot_interrupt(void); |
75 | extern void threshold_interrupt(void); | 75 | extern asmlinkage void threshold_interrupt(void); |
76 | 76 | ||
77 | extern void call_function_interrupt(void); | 77 | extern asmlinkage void call_function_interrupt(void); |
78 | extern void call_function_single_interrupt(void); | 78 | extern asmlinkage void call_function_single_interrupt(void); |
79 | 79 | ||
80 | #ifdef CONFIG_TRACING | 80 | #ifdef CONFIG_TRACING |
81 | /* Interrupt handlers registered during init_IRQ */ | 81 | /* Interrupt handlers registered during init_IRQ */ |
@@ -172,22 +172,18 @@ extern atomic_t irq_mis_count; | |||
172 | extern void eisa_set_level_irq(unsigned int irq); | 172 | extern void eisa_set_level_irq(unsigned int irq); |
173 | 173 | ||
174 | /* SMP */ | 174 | /* SMP */ |
175 | extern void smp_apic_timer_interrupt(struct pt_regs *); | 175 | extern __visible void smp_apic_timer_interrupt(struct pt_regs *); |
176 | extern void smp_spurious_interrupt(struct pt_regs *); | 176 | extern __visible void smp_spurious_interrupt(struct pt_regs *); |
177 | extern void smp_x86_platform_ipi(struct pt_regs *); | 177 | extern __visible void smp_x86_platform_ipi(struct pt_regs *); |
178 | extern void smp_error_interrupt(struct pt_regs *); | 178 | extern __visible void smp_error_interrupt(struct pt_regs *); |
179 | #ifdef CONFIG_X86_IO_APIC | 179 | #ifdef CONFIG_X86_IO_APIC |
180 | extern asmlinkage void smp_irq_move_cleanup_interrupt(void); | 180 | extern asmlinkage void smp_irq_move_cleanup_interrupt(void); |
181 | #endif | 181 | #endif |
182 | #ifdef CONFIG_SMP | 182 | #ifdef CONFIG_SMP |
183 | extern void smp_reschedule_interrupt(struct pt_regs *); | 183 | extern __visible void smp_reschedule_interrupt(struct pt_regs *); |
184 | extern void smp_call_function_interrupt(struct pt_regs *); | 184 | extern __visible void smp_call_function_interrupt(struct pt_regs *); |
185 | extern void smp_call_function_single_interrupt(struct pt_regs *); | 185 | extern __visible void smp_call_function_single_interrupt(struct pt_regs *); |
186 | #ifdef CONFIG_X86_32 | 186 | extern __visible void smp_invalidate_interrupt(struct pt_regs *); |
187 | extern void smp_invalidate_interrupt(struct pt_regs *); | ||
188 | #else | ||
189 | extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *); | ||
190 | #endif | ||
191 | #endif | 187 | #endif |
192 | 188 | ||
193 | extern void (*__initconst interrupt[NR_VECTORS-FIRST_EXTERNAL_VECTOR])(void); | 189 | extern void (*__initconst interrupt[NR_VECTORS-FIRST_EXTERNAL_VECTOR])(void); |
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h index 57873beb3292..0ea10f27d613 100644 --- a/arch/x86/include/asm/irq.h +++ b/arch/x86/include/asm/irq.h | |||
@@ -33,7 +33,7 @@ extern void (*x86_platform_ipi_callback)(void); | |||
33 | extern void native_init_IRQ(void); | 33 | extern void native_init_IRQ(void); |
34 | extern bool handle_irq(unsigned irq, struct pt_regs *regs); | 34 | extern bool handle_irq(unsigned irq, struct pt_regs *regs); |
35 | 35 | ||
36 | extern unsigned int do_IRQ(struct pt_regs *regs); | 36 | extern __visible unsigned int do_IRQ(struct pt_regs *regs); |
37 | 37 | ||
38 | /* Interrupt vector management */ | 38 | /* Interrupt vector management */ |
39 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); | 39 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); |
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h index 5a6d2873f80e..9454c167629f 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h | |||
@@ -49,10 +49,10 @@ typedef u8 kprobe_opcode_t; | |||
49 | #define flush_insn_slot(p) do { } while (0) | 49 | #define flush_insn_slot(p) do { } while (0) |
50 | 50 | ||
51 | /* optinsn template addresses */ | 51 | /* optinsn template addresses */ |
52 | extern kprobe_opcode_t optprobe_template_entry; | 52 | extern __visible kprobe_opcode_t optprobe_template_entry; |
53 | extern kprobe_opcode_t optprobe_template_val; | 53 | extern __visible kprobe_opcode_t optprobe_template_val; |
54 | extern kprobe_opcode_t optprobe_template_call; | 54 | extern __visible kprobe_opcode_t optprobe_template_call; |
55 | extern kprobe_opcode_t optprobe_template_end; | 55 | extern __visible kprobe_opcode_t optprobe_template_end; |
56 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) | 56 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) |
57 | #define MAX_OPTINSN_SIZE \ | 57 | #define MAX_OPTINSN_SIZE \ |
58 | (((unsigned long)&optprobe_template_end - \ | 58 | (((unsigned long)&optprobe_template_end - \ |
@@ -62,7 +62,7 @@ extern kprobe_opcode_t optprobe_template_end; | |||
62 | extern const int kretprobe_blacklist_size; | 62 | extern const int kretprobe_blacklist_size; |
63 | 63 | ||
64 | void arch_remove_kprobe(struct kprobe *p); | 64 | void arch_remove_kprobe(struct kprobe *p); |
65 | void kretprobe_trampoline(void); | 65 | asmlinkage void kretprobe_trampoline(void); |
66 | 66 | ||
67 | /* Architecture specific copy of original instruction*/ | 67 | /* Architecture specific copy of original instruction*/ |
68 | struct arch_specific_insn { | 68 | struct arch_specific_insn { |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 0db1fcac668c..0617ff241e8f 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -387,7 +387,8 @@ extern struct pv_lock_ops pv_lock_ops; | |||
387 | 387 | ||
388 | /* Simple instruction patching code. */ | 388 | /* Simple instruction patching code. */ |
389 | #define DEF_NATIVE(ops, name, code) \ | 389 | #define DEF_NATIVE(ops, name, code) \ |
390 | extern const char start_##ops##_##name[], end_##ops##_##name[]; \ | 390 | extern const char start_##ops##_##name[] __visible, \ |
391 | end_##ops##_##name[] __visible; \ | ||
391 | asm("start_" #ops "_" #name ": " code "; end_" #ops "_" #name ":") | 392 | asm("start_" #ops "_" #name ": " code "; end_" #ops "_" #name ":") |
392 | 393 | ||
393 | unsigned paravirt_patch_nop(void); | 394 | unsigned paravirt_patch_nop(void); |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 1c00631164c2..8d16befdec88 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -22,7 +22,8 @@ | |||
22 | * ZERO_PAGE is a global shared page that is always zero: used | 22 | * ZERO_PAGE is a global shared page that is always zero: used |
23 | * for zero-mapped memory areas etc.. | 23 | * for zero-mapped memory areas etc.. |
24 | */ | 24 | */ |
25 | extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; | 25 | extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] |
26 | __visible; | ||
26 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) | 27 | #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) |
27 | 28 | ||
28 | extern spinlock_t pgd_lock; | 29 | extern spinlock_t pgd_lock; |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 4f4a3d98c170..4c2d31d941ea 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -412,7 +412,7 @@ union irq_stack_union { | |||
412 | }; | 412 | }; |
413 | }; | 413 | }; |
414 | 414 | ||
415 | DECLARE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union); | 415 | DECLARE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union) __visible; |
416 | DECLARE_INIT_PER_CPU(irq_stack_union); | 416 | DECLARE_INIT_PER_CPU(irq_stack_union); |
417 | 417 | ||
418 | DECLARE_PER_CPU(char *, irq_stack_ptr); | 418 | DECLARE_PER_CPU(char *, irq_stack_ptr); |
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index b7bf3505e1ec..347555492dad 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | #define COMMAND_LINE_SIZE 2048 | 7 | #define COMMAND_LINE_SIZE 2048 |
8 | 8 | ||
9 | #include <linux/linkage.h> | ||
10 | |||
9 | #ifdef __i386__ | 11 | #ifdef __i386__ |
10 | 12 | ||
11 | #include <linux/pfn.h> | 13 | #include <linux/pfn.h> |
@@ -108,11 +110,11 @@ void *extend_brk(size_t size, size_t align); | |||
108 | extern void probe_roms(void); | 110 | extern void probe_roms(void); |
109 | #ifdef __i386__ | 111 | #ifdef __i386__ |
110 | 112 | ||
111 | void __init i386_start_kernel(void); | 113 | asmlinkage void __init i386_start_kernel(void); |
112 | 114 | ||
113 | #else | 115 | #else |
114 | void __init x86_64_start_kernel(char *real_mode); | 116 | asmlinkage void __init x86_64_start_kernel(char *real_mode); |
115 | void __init x86_64_start_reservations(char *real_mode_data); | 117 | asmlinkage void __init x86_64_start_reservations(char *real_mode_data); |
116 | 118 | ||
117 | #endif /* __i386__ */ | 119 | #endif /* __i386__ */ |
118 | #endif /* _SETUP */ | 120 | #endif /* _SETUP */ |
diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h index 2f4d924fe6c9..645cad2c95ff 100644 --- a/arch/x86/include/asm/special_insns.h +++ b/arch/x86/include/asm/special_insns.h | |||
@@ -101,7 +101,7 @@ static inline void native_wbinvd(void) | |||
101 | asm volatile("wbinvd": : :"memory"); | 101 | asm volatile("wbinvd": : :"memory"); |
102 | } | 102 | } |
103 | 103 | ||
104 | extern void native_load_gs_index(unsigned); | 104 | extern asmlinkage void native_load_gs_index(unsigned); |
105 | 105 | ||
106 | #ifdef CONFIG_PARAVIRT | 106 | #ifdef CONFIG_PARAVIRT |
107 | #include <asm/paravirt.h> | 107 | #include <asm/paravirt.h> |
diff --git a/arch/x86/include/asm/switch_to.h b/arch/x86/include/asm/switch_to.h index 4ec45b3abba1..d7f3b3b78ac3 100644 --- a/arch/x86/include/asm/switch_to.h +++ b/arch/x86/include/asm/switch_to.h | |||
@@ -2,8 +2,8 @@ | |||
2 | #define _ASM_X86_SWITCH_TO_H | 2 | #define _ASM_X86_SWITCH_TO_H |
3 | 3 | ||
4 | struct task_struct; /* one of the stranger aspects of C forward declarations */ | 4 | struct task_struct; /* one of the stranger aspects of C forward declarations */ |
5 | struct task_struct *__switch_to(struct task_struct *prev, | 5 | __visible struct task_struct *__switch_to(struct task_struct *prev, |
6 | struct task_struct *next); | 6 | struct task_struct *next); |
7 | struct tss_struct; | 7 | struct tss_struct; |
8 | void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, | 8 | void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, |
9 | struct tss_struct *tss); | 9 | struct tss_struct *tss); |
diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h index 2e188d68397c..aea284b41312 100644 --- a/arch/x86/include/asm/syscall.h +++ b/arch/x86/include/asm/syscall.h | |||
@@ -20,7 +20,8 @@ | |||
20 | #include <asm/thread_info.h> /* for TS_COMPAT */ | 20 | #include <asm/thread_info.h> /* for TS_COMPAT */ |
21 | #include <asm/unistd.h> | 21 | #include <asm/unistd.h> |
22 | 22 | ||
23 | extern const unsigned long sys_call_table[]; | 23 | typedef void (*sys_call_ptr_t)(void); |
24 | extern const sys_call_ptr_t sys_call_table[]; | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * Only the low 32 bits of orig_ax are meaningful, so we return int. | 27 | * Only the low 32 bits of orig_ax are meaningful, so we return int. |
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index 2917a6452c49..592a6a672e07 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
@@ -24,7 +24,7 @@ asmlinkage long sys_iopl(unsigned int); | |||
24 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); | 24 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); |
25 | 25 | ||
26 | /* kernel/signal.c */ | 26 | /* kernel/signal.c */ |
27 | long sys_rt_sigreturn(void); | 27 | asmlinkage long sys_rt_sigreturn(void); |
28 | 28 | ||
29 | /* kernel/tls.c */ | 29 | /* kernel/tls.c */ |
30 | asmlinkage long sys_set_thread_area(struct user_desc __user *); | 30 | asmlinkage long sys_set_thread_area(struct user_desc __user *); |
@@ -34,7 +34,7 @@ asmlinkage long sys_get_thread_area(struct user_desc __user *); | |||
34 | #ifdef CONFIG_X86_32 | 34 | #ifdef CONFIG_X86_32 |
35 | 35 | ||
36 | /* kernel/signal.c */ | 36 | /* kernel/signal.c */ |
37 | unsigned long sys_sigreturn(void); | 37 | asmlinkage unsigned long sys_sigreturn(void); |
38 | 38 | ||
39 | /* kernel/vm86_32.c */ | 39 | /* kernel/vm86_32.c */ |
40 | asmlinkage long sys_vm86old(struct vm86_struct __user *); | 40 | asmlinkage long sys_vm86old(struct vm86_struct __user *); |
@@ -44,7 +44,7 @@ asmlinkage long sys_vm86(unsigned long, unsigned long); | |||
44 | 44 | ||
45 | /* X86_64 only */ | 45 | /* X86_64 only */ |
46 | /* kernel/process_64.c */ | 46 | /* kernel/process_64.c */ |
47 | long sys_arch_prctl(int, unsigned long); | 47 | asmlinkage long sys_arch_prctl(int, unsigned long); |
48 | 48 | ||
49 | /* kernel/sys_x86_64.c */ | 49 | /* kernel/sys_x86_64.c */ |
50 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, | 50 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, |
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h index 88eae2aec619..7036cb60cd87 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h | |||
@@ -6,11 +6,7 @@ | |||
6 | #include <asm/debugreg.h> | 6 | #include <asm/debugreg.h> |
7 | #include <asm/siginfo.h> /* TRAP_TRACE, ... */ | 7 | #include <asm/siginfo.h> /* TRAP_TRACE, ... */ |
8 | 8 | ||
9 | #ifdef CONFIG_X86_32 | 9 | #define dotraplinkage __visible |
10 | #define dotraplinkage | ||
11 | #else | ||
12 | #define dotraplinkage asmlinkage | ||
13 | #endif | ||
14 | 10 | ||
15 | asmlinkage void divide_error(void); | 11 | asmlinkage void divide_error(void); |
16 | asmlinkage void debug(void); | 12 | asmlinkage void debug(void); |
diff --git a/arch/x86/include/asm/vvar.h b/arch/x86/include/asm/vvar.h index de656ac2af41..d76ac40da206 100644 --- a/arch/x86/include/asm/vvar.h +++ b/arch/x86/include/asm/vvar.h | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #define DEFINE_VVAR(type, name) \ | 36 | #define DEFINE_VVAR(type, name) \ |
37 | type name \ | 37 | type name \ |
38 | __attribute__((section(".vvar_" #name), aligned(16))) | 38 | __attribute__((section(".vvar_" #name), aligned(16))) __visible |
39 | 39 | ||
40 | #define VVAR(name) (*vvaraddr_ ## name) | 40 | #define VVAR(name) (*vvaraddr_ ## name) |
41 | 41 | ||
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index eca89c53a7f5..a7eb82d9b012 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -913,7 +913,7 @@ static void local_apic_timer_interrupt(void) | |||
913 | * [ if a single-CPU system runs an SMP kernel then we call the local | 913 | * [ if a single-CPU system runs an SMP kernel then we call the local |
914 | * interrupt as well. Thus we cannot inline the local irq ... ] | 914 | * interrupt as well. Thus we cannot inline the local irq ... ] |
915 | */ | 915 | */ |
916 | void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) | 916 | __visible void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) |
917 | { | 917 | { |
918 | struct pt_regs *old_regs = set_irq_regs(regs); | 918 | struct pt_regs *old_regs = set_irq_regs(regs); |
919 | 919 | ||
@@ -932,7 +932,7 @@ void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) | |||
932 | set_irq_regs(old_regs); | 932 | set_irq_regs(old_regs); |
933 | } | 933 | } |
934 | 934 | ||
935 | void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs) | 935 | __visible void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs) |
936 | { | 936 | { |
937 | struct pt_regs *old_regs = set_irq_regs(regs); | 937 | struct pt_regs *old_regs = set_irq_regs(regs); |
938 | 938 | ||
@@ -1946,14 +1946,14 @@ static inline void __smp_spurious_interrupt(void) | |||
1946 | "should never happen.\n", smp_processor_id()); | 1946 | "should never happen.\n", smp_processor_id()); |
1947 | } | 1947 | } |
1948 | 1948 | ||
1949 | void smp_spurious_interrupt(struct pt_regs *regs) | 1949 | __visible void smp_spurious_interrupt(struct pt_regs *regs) |
1950 | { | 1950 | { |
1951 | entering_irq(); | 1951 | entering_irq(); |
1952 | __smp_spurious_interrupt(); | 1952 | __smp_spurious_interrupt(); |
1953 | exiting_irq(); | 1953 | exiting_irq(); |
1954 | } | 1954 | } |
1955 | 1955 | ||
1956 | void smp_trace_spurious_interrupt(struct pt_regs *regs) | 1956 | __visible void smp_trace_spurious_interrupt(struct pt_regs *regs) |
1957 | { | 1957 | { |
1958 | entering_irq(); | 1958 | entering_irq(); |
1959 | trace_spurious_apic_entry(SPURIOUS_APIC_VECTOR); | 1959 | trace_spurious_apic_entry(SPURIOUS_APIC_VECTOR); |
@@ -2002,14 +2002,14 @@ static inline void __smp_error_interrupt(struct pt_regs *regs) | |||
2002 | 2002 | ||
2003 | } | 2003 | } |
2004 | 2004 | ||
2005 | void smp_error_interrupt(struct pt_regs *regs) | 2005 | __visible void smp_error_interrupt(struct pt_regs *regs) |
2006 | { | 2006 | { |
2007 | entering_irq(); | 2007 | entering_irq(); |
2008 | __smp_error_interrupt(regs); | 2008 | __smp_error_interrupt(regs); |
2009 | exiting_irq(); | 2009 | exiting_irq(); |
2010 | } | 2010 | } |
2011 | 2011 | ||
2012 | void smp_trace_error_interrupt(struct pt_regs *regs) | 2012 | __visible void smp_trace_error_interrupt(struct pt_regs *regs) |
2013 | { | 2013 | { |
2014 | entering_irq(); | 2014 | entering_irq(); |
2015 | trace_error_apic_entry(ERROR_APIC_VECTOR); | 2015 | trace_error_apic_entry(ERROR_APIC_VECTOR); |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 53a4e2744846..3ab03430211d 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -392,7 +392,7 @@ static struct cpuidle_device apm_cpuidle_device; | |||
392 | /* | 392 | /* |
393 | * Local variables | 393 | * Local variables |
394 | */ | 394 | */ |
395 | static struct { | 395 | __visible struct { |
396 | unsigned long offset; | 396 | unsigned long offset; |
397 | unsigned short segment; | 397 | unsigned short segment; |
398 | } apm_bios_entry; | 398 | } apm_bios_entry; |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 08a089043ccf..903a264af981 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -66,8 +66,8 @@ static inline int wrmsrl_amd_safe(unsigned msr, unsigned long long val) | |||
66 | * performance at the same time.. | 66 | * performance at the same time.. |
67 | */ | 67 | */ |
68 | 68 | ||
69 | extern void vide(void); | 69 | extern __visible void vide(void); |
70 | __asm__(".align 4\nvide: ret"); | 70 | __asm__(".globl vide\n\t.align 4\nvide: ret"); |
71 | 71 | ||
72 | static void init_amd_k5(struct cpuinfo_x86 *c) | 72 | static void init_amd_k5(struct cpuinfo_x86 *c) |
73 | { | 73 | { |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 25eb2747b063..2793d1f095a2 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -1076,7 +1076,7 @@ struct desc_ptr debug_idt_descr = { NR_VECTORS * 16 - 1, | |||
1076 | (unsigned long) debug_idt_table }; | 1076 | (unsigned long) debug_idt_table }; |
1077 | 1077 | ||
1078 | DEFINE_PER_CPU_FIRST(union irq_stack_union, | 1078 | DEFINE_PER_CPU_FIRST(union irq_stack_union, |
1079 | irq_stack_union) __aligned(PAGE_SIZE); | 1079 | irq_stack_union) __aligned(PAGE_SIZE) __visible; |
1080 | 1080 | ||
1081 | /* | 1081 | /* |
1082 | * The following four percpu variables are hot. Align current_task to | 1082 | * The following four percpu variables are hot. Align current_task to |
@@ -1093,7 +1093,7 @@ EXPORT_PER_CPU_SYMBOL(kernel_stack); | |||
1093 | DEFINE_PER_CPU(char *, irq_stack_ptr) = | 1093 | DEFINE_PER_CPU(char *, irq_stack_ptr) = |
1094 | init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; | 1094 | init_per_cpu_var(irq_stack_union.irq_stack) + IRQ_STACK_SIZE - 64; |
1095 | 1095 | ||
1096 | DEFINE_PER_CPU(unsigned int, irq_count) = -1; | 1096 | DEFINE_PER_CPU(unsigned int, irq_count) __visible = -1; |
1097 | 1097 | ||
1098 | DEFINE_PER_CPU(struct task_struct *, fpu_owner_task); | 1098 | DEFINE_PER_CPU(struct task_struct *, fpu_owner_task); |
1099 | 1099 | ||
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c index 138463a24877..06f87bece92a 100644 --- a/arch/x86/kernel/head32.c +++ b/arch/x86/kernel/head32.c | |||
@@ -29,7 +29,7 @@ static void __init i386_default_early_setup(void) | |||
29 | reserve_ebda_region(); | 29 | reserve_ebda_region(); |
30 | } | 30 | } |
31 | 31 | ||
32 | void __init i386_start_kernel(void) | 32 | asmlinkage void __init i386_start_kernel(void) |
33 | { | 33 | { |
34 | sanitize_boot_params(&boot_params); | 34 | sanitize_boot_params(&boot_params); |
35 | 35 | ||
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 55b67614ed94..1be8e43b669e 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -137,7 +137,7 @@ static void __init copy_bootdata(char *real_mode_data) | |||
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | void __init x86_64_start_kernel(char * real_mode_data) | 140 | asmlinkage void __init x86_64_start_kernel(char * real_mode_data) |
141 | { | 141 | { |
142 | int i; | 142 | int i; |
143 | 143 | ||
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 3a8185c042a2..22d0687e7fda 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -177,7 +177,7 @@ u64 arch_irq_stat(void) | |||
177 | * SMP cross-CPU interrupts have their own specific | 177 | * SMP cross-CPU interrupts have their own specific |
178 | * handlers). | 178 | * handlers). |
179 | */ | 179 | */ |
180 | unsigned int __irq_entry do_IRQ(struct pt_regs *regs) | 180 | __visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs) |
181 | { | 181 | { |
182 | struct pt_regs *old_regs = set_irq_regs(regs); | 182 | struct pt_regs *old_regs = set_irq_regs(regs); |
183 | 183 | ||
@@ -215,7 +215,7 @@ void __smp_x86_platform_ipi(void) | |||
215 | x86_platform_ipi_callback(); | 215 | x86_platform_ipi_callback(); |
216 | } | 216 | } |
217 | 217 | ||
218 | void smp_x86_platform_ipi(struct pt_regs *regs) | 218 | __visible void smp_x86_platform_ipi(struct pt_regs *regs) |
219 | { | 219 | { |
220 | struct pt_regs *old_regs = set_irq_regs(regs); | 220 | struct pt_regs *old_regs = set_irq_regs(regs); |
221 | 221 | ||
@@ -229,7 +229,7 @@ void smp_x86_platform_ipi(struct pt_regs *regs) | |||
229 | /* | 229 | /* |
230 | * Handler for POSTED_INTERRUPT_VECTOR. | 230 | * Handler for POSTED_INTERRUPT_VECTOR. |
231 | */ | 231 | */ |
232 | void smp_kvm_posted_intr_ipi(struct pt_regs *regs) | 232 | __visible void smp_kvm_posted_intr_ipi(struct pt_regs *regs) |
233 | { | 233 | { |
234 | struct pt_regs *old_regs = set_irq_regs(regs); | 234 | struct pt_regs *old_regs = set_irq_regs(regs); |
235 | 235 | ||
@@ -247,7 +247,7 @@ void smp_kvm_posted_intr_ipi(struct pt_regs *regs) | |||
247 | } | 247 | } |
248 | #endif | 248 | #endif |
249 | 249 | ||
250 | void smp_trace_x86_platform_ipi(struct pt_regs *regs) | 250 | __visible void smp_trace_x86_platform_ipi(struct pt_regs *regs) |
251 | { | 251 | { |
252 | struct pt_regs *old_regs = set_irq_regs(regs); | 252 | struct pt_regs *old_regs = set_irq_regs(regs); |
253 | 253 | ||
diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c index 636a55e4a13c..1de84e3ab4e0 100644 --- a/arch/x86/kernel/irq_work.c +++ b/arch/x86/kernel/irq_work.c | |||
@@ -22,14 +22,14 @@ static inline void __smp_irq_work_interrupt(void) | |||
22 | irq_work_run(); | 22 | irq_work_run(); |
23 | } | 23 | } |
24 | 24 | ||
25 | void smp_irq_work_interrupt(struct pt_regs *regs) | 25 | __visible void smp_irq_work_interrupt(struct pt_regs *regs) |
26 | { | 26 | { |
27 | irq_work_entering_irq(); | 27 | irq_work_entering_irq(); |
28 | __smp_irq_work_interrupt(); | 28 | __smp_irq_work_interrupt(); |
29 | exiting_irq(); | 29 | exiting_irq(); |
30 | } | 30 | } |
31 | 31 | ||
32 | void smp_trace_irq_work_interrupt(struct pt_regs *regs) | 32 | __visible void smp_trace_irq_work_interrupt(struct pt_regs *regs) |
33 | { | 33 | { |
34 | irq_work_entering_irq(); | 34 | irq_work_entering_irq(); |
35 | trace_irq_work_entry(IRQ_WORK_VECTOR); | 35 | trace_irq_work_entry(IRQ_WORK_VECTOR); |
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index cd49b2c96d32..79a3f9682871 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c | |||
@@ -661,7 +661,7 @@ static void __used __kprobes kretprobe_trampoline_holder(void) | |||
661 | /* | 661 | /* |
662 | * Called from kretprobe_trampoline | 662 | * Called from kretprobe_trampoline |
663 | */ | 663 | */ |
664 | static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | 664 | __visible __used __kprobes void *trampoline_handler(struct pt_regs *regs) |
665 | { | 665 | { |
666 | struct kretprobe_instance *ri = NULL; | 666 | struct kretprobe_instance *ri = NULL; |
667 | struct hlist_head *head, empty_rp; | 667 | struct hlist_head *head, empty_rp; |
diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c index d71e99439376..898160b42e43 100644 --- a/arch/x86/kernel/kprobes/opt.c +++ b/arch/x86/kernel/kprobes/opt.c | |||
@@ -88,9 +88,7 @@ static void __kprobes synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long v | |||
88 | *(unsigned long *)addr = val; | 88 | *(unsigned long *)addr = val; |
89 | } | 89 | } |
90 | 90 | ||
91 | static void __used __kprobes kprobes_optinsn_template_holder(void) | 91 | asm ( |
92 | { | ||
93 | asm volatile ( | ||
94 | ".global optprobe_template_entry\n" | 92 | ".global optprobe_template_entry\n" |
95 | "optprobe_template_entry:\n" | 93 | "optprobe_template_entry:\n" |
96 | #ifdef CONFIG_X86_64 | 94 | #ifdef CONFIG_X86_64 |
@@ -129,7 +127,6 @@ static void __used __kprobes kprobes_optinsn_template_holder(void) | |||
129 | #endif | 127 | #endif |
130 | ".global optprobe_template_end\n" | 128 | ".global optprobe_template_end\n" |
131 | "optprobe_template_end:\n"); | 129 | "optprobe_template_end:\n"); |
132 | } | ||
133 | 130 | ||
134 | #define TMPL_MOVE_IDX \ | 131 | #define TMPL_MOVE_IDX \ |
135 | ((long)&optprobe_template_val - (long)&optprobe_template_entry) | 132 | ((long)&optprobe_template_val - (long)&optprobe_template_entry) |
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index cd6de64cc480..884aa4053313 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -324,7 +324,7 @@ struct pv_time_ops pv_time_ops = { | |||
324 | .steal_clock = native_steal_clock, | 324 | .steal_clock = native_steal_clock, |
325 | }; | 325 | }; |
326 | 326 | ||
327 | struct pv_irq_ops pv_irq_ops = { | 327 | __visible struct pv_irq_ops pv_irq_ops = { |
328 | .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl), | 328 | .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl), |
329 | .restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl), | 329 | .restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl), |
330 | .irq_disable = __PV_IS_CALLEE_SAVE(native_irq_disable), | 330 | .irq_disable = __PV_IS_CALLEE_SAVE(native_irq_disable), |
@@ -336,7 +336,7 @@ struct pv_irq_ops pv_irq_ops = { | |||
336 | #endif | 336 | #endif |
337 | }; | 337 | }; |
338 | 338 | ||
339 | struct pv_cpu_ops pv_cpu_ops = { | 339 | __visible struct pv_cpu_ops pv_cpu_ops = { |
340 | .cpuid = native_cpuid, | 340 | .cpuid = native_cpuid, |
341 | .get_debugreg = native_get_debugreg, | 341 | .get_debugreg = native_get_debugreg, |
342 | .set_debugreg = native_set_debugreg, | 342 | .set_debugreg = native_set_debugreg, |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 83369e5a1d27..c83516be1052 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -36,7 +36,7 @@ | |||
36 | * section. Since TSS's are completely CPU-local, we want them | 36 | * section. Since TSS's are completely CPU-local, we want them |
37 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. | 37 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. |
38 | */ | 38 | */ |
39 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; | 39 | __visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; |
40 | 40 | ||
41 | #ifdef CONFIG_X86_64 | 41 | #ifdef CONFIG_X86_64 |
42 | static DEFINE_PER_CPU(unsigned char, is_idle); | 42 | static DEFINE_PER_CPU(unsigned char, is_idle); |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index f8adefca71dc..884f98f69354 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -247,7 +247,7 @@ EXPORT_SYMBOL_GPL(start_thread); | |||
247 | * the task-switch, and shows up in ret_from_fork in entry.S, | 247 | * the task-switch, and shows up in ret_from_fork in entry.S, |
248 | * for example. | 248 | * for example. |
249 | */ | 249 | */ |
250 | __notrace_funcgraph struct task_struct * | 250 | __visible __notrace_funcgraph struct task_struct * |
251 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | 251 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) |
252 | { | 252 | { |
253 | struct thread_struct *prev = &prev_p->thread, | 253 | struct thread_struct *prev = &prev_p->thread, |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 05646bab4ca6..bb1dc51bab05 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -52,7 +52,7 @@ | |||
52 | 52 | ||
53 | asmlinkage extern void ret_from_fork(void); | 53 | asmlinkage extern void ret_from_fork(void); |
54 | 54 | ||
55 | DEFINE_PER_CPU(unsigned long, old_rsp); | 55 | asmlinkage DEFINE_PER_CPU(unsigned long, old_rsp); |
56 | 56 | ||
57 | /* Prints also some state that isn't saved in the pt_regs */ | 57 | /* Prints also some state that isn't saved in the pt_regs */ |
58 | void __show_regs(struct pt_regs *regs, int all) | 58 | void __show_regs(struct pt_regs *regs, int all) |
@@ -274,7 +274,7 @@ void start_thread_ia32(struct pt_regs *regs, u32 new_ip, u32 new_sp) | |||
274 | * Kprobes not supported here. Set the probe on schedule instead. | 274 | * Kprobes not supported here. Set the probe on schedule instead. |
275 | * Function graph tracer not supported too. | 275 | * Function graph tracer not supported too. |
276 | */ | 276 | */ |
277 | __notrace_funcgraph struct task_struct * | 277 | __visible __notrace_funcgraph struct task_struct * |
278 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | 278 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) |
279 | { | 279 | { |
280 | struct thread_struct *prev = &prev_p->thread; | 280 | struct thread_struct *prev = &prev_p->thread; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index f8ec57815c05..dfa55afccf5e 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -206,9 +206,9 @@ EXPORT_SYMBOL(boot_cpu_data); | |||
206 | 206 | ||
207 | 207 | ||
208 | #if !defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64) | 208 | #if !defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64) |
209 | unsigned long mmu_cr4_features; | 209 | __visible unsigned long mmu_cr4_features; |
210 | #else | 210 | #else |
211 | unsigned long mmu_cr4_features = X86_CR4_PAE; | 211 | __visible unsigned long mmu_cr4_features = X86_CR4_PAE; |
212 | #endif | 212 | #endif |
213 | 213 | ||
214 | /* Boot loader ID and version as integers, for the benefit of proc_dointvec */ | 214 | /* Boot loader ID and version as integers, for the benefit of proc_dointvec */ |
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index cf913587d4dd..6a9acc667d20 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -533,7 +533,7 @@ static int x32_setup_rt_frame(struct ksignal *ksig, | |||
533 | * Do a signal return; undo the signal stack. | 533 | * Do a signal return; undo the signal stack. |
534 | */ | 534 | */ |
535 | #ifdef CONFIG_X86_32 | 535 | #ifdef CONFIG_X86_32 |
536 | unsigned long sys_sigreturn(void) | 536 | asmlinkage unsigned long sys_sigreturn(void) |
537 | { | 537 | { |
538 | struct pt_regs *regs = current_pt_regs(); | 538 | struct pt_regs *regs = current_pt_regs(); |
539 | struct sigframe __user *frame; | 539 | struct sigframe __user *frame; |
@@ -562,7 +562,7 @@ badframe: | |||
562 | } | 562 | } |
563 | #endif /* CONFIG_X86_32 */ | 563 | #endif /* CONFIG_X86_32 */ |
564 | 564 | ||
565 | long sys_rt_sigreturn(void) | 565 | asmlinkage long sys_rt_sigreturn(void) |
566 | { | 566 | { |
567 | struct pt_regs *regs = current_pt_regs(); | 567 | struct pt_regs *regs = current_pt_regs(); |
568 | struct rt_sigframe __user *frame; | 568 | struct rt_sigframe __user *frame; |
@@ -728,7 +728,7 @@ static void do_signal(struct pt_regs *regs) | |||
728 | * notification of userspace execution resumption | 728 | * notification of userspace execution resumption |
729 | * - triggered by the TIF_WORK_MASK flags | 729 | * - triggered by the TIF_WORK_MASK flags |
730 | */ | 730 | */ |
731 | void | 731 | __visible void |
732 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | 732 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) |
733 | { | 733 | { |
734 | user_exit(); | 734 | user_exit(); |
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index cdaa347dfcad..7c3a5a61f2e4 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -256,7 +256,7 @@ static inline void __smp_reschedule_interrupt(void) | |||
256 | scheduler_ipi(); | 256 | scheduler_ipi(); |
257 | } | 257 | } |
258 | 258 | ||
259 | void smp_reschedule_interrupt(struct pt_regs *regs) | 259 | __visible void smp_reschedule_interrupt(struct pt_regs *regs) |
260 | { | 260 | { |
261 | ack_APIC_irq(); | 261 | ack_APIC_irq(); |
262 | __smp_reschedule_interrupt(); | 262 | __smp_reschedule_interrupt(); |
@@ -271,7 +271,7 @@ static inline void smp_entering_irq(void) | |||
271 | irq_enter(); | 271 | irq_enter(); |
272 | } | 272 | } |
273 | 273 | ||
274 | void smp_trace_reschedule_interrupt(struct pt_regs *regs) | 274 | __visible void smp_trace_reschedule_interrupt(struct pt_regs *regs) |
275 | { | 275 | { |
276 | /* | 276 | /* |
277 | * Need to call irq_enter() before calling the trace point. | 277 | * Need to call irq_enter() before calling the trace point. |
@@ -295,14 +295,14 @@ static inline void __smp_call_function_interrupt(void) | |||
295 | inc_irq_stat(irq_call_count); | 295 | inc_irq_stat(irq_call_count); |
296 | } | 296 | } |
297 | 297 | ||
298 | void smp_call_function_interrupt(struct pt_regs *regs) | 298 | __visible void smp_call_function_interrupt(struct pt_regs *regs) |
299 | { | 299 | { |
300 | smp_entering_irq(); | 300 | smp_entering_irq(); |
301 | __smp_call_function_interrupt(); | 301 | __smp_call_function_interrupt(); |
302 | exiting_irq(); | 302 | exiting_irq(); |
303 | } | 303 | } |
304 | 304 | ||
305 | void smp_trace_call_function_interrupt(struct pt_regs *regs) | 305 | __visible void smp_trace_call_function_interrupt(struct pt_regs *regs) |
306 | { | 306 | { |
307 | smp_entering_irq(); | 307 | smp_entering_irq(); |
308 | trace_call_function_entry(CALL_FUNCTION_VECTOR); | 308 | trace_call_function_entry(CALL_FUNCTION_VECTOR); |
@@ -317,14 +317,14 @@ static inline void __smp_call_function_single_interrupt(void) | |||
317 | inc_irq_stat(irq_call_count); | 317 | inc_irq_stat(irq_call_count); |
318 | } | 318 | } |
319 | 319 | ||
320 | void smp_call_function_single_interrupt(struct pt_regs *regs) | 320 | __visible void smp_call_function_single_interrupt(struct pt_regs *regs) |
321 | { | 321 | { |
322 | smp_entering_irq(); | 322 | smp_entering_irq(); |
323 | __smp_call_function_single_interrupt(); | 323 | __smp_call_function_single_interrupt(); |
324 | exiting_irq(); | 324 | exiting_irq(); |
325 | } | 325 | } |
326 | 326 | ||
327 | void smp_trace_call_function_single_interrupt(struct pt_regs *regs) | 327 | __visible void smp_trace_call_function_single_interrupt(struct pt_regs *regs) |
328 | { | 328 | { |
329 | smp_entering_irq(); | 329 | smp_entering_irq(); |
330 | trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR); | 330 | trace_call_function_single_entry(CALL_FUNCTION_SINGLE_VECTOR); |
diff --git a/arch/x86/kernel/syscall_32.c b/arch/x86/kernel/syscall_32.c index 147fcd4941c4..e9bcd57d8a9e 100644 --- a/arch/x86/kernel/syscall_32.c +++ b/arch/x86/kernel/syscall_32.c | |||
@@ -15,7 +15,7 @@ typedef asmlinkage void (*sys_call_ptr_t)(void); | |||
15 | 15 | ||
16 | extern asmlinkage void sys_ni_syscall(void); | 16 | extern asmlinkage void sys_ni_syscall(void); |
17 | 17 | ||
18 | const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { | 18 | __visible const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { |
19 | /* | 19 | /* |
20 | * Smells like a compiler bug -- it doesn't work | 20 | * Smells like a compiler bug -- it doesn't work |
21 | * when the & below is removed. | 21 | * when the & below is removed. |
diff --git a/arch/x86/kernel/syscall_64.c b/arch/x86/kernel/syscall_64.c index 5c7f8c20da74..4ac730b37f0b 100644 --- a/arch/x86/kernel/syscall_64.c +++ b/arch/x86/kernel/syscall_64.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/sys.h> | 4 | #include <linux/sys.h> |
5 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
6 | #include <asm/asm-offsets.h> | 6 | #include <asm/asm-offsets.h> |
7 | #include <asm/syscall.h> | ||
7 | 8 | ||
8 | #define __SYSCALL_COMMON(nr, sym, compat) __SYSCALL_64(nr, sym, compat) | 9 | #define __SYSCALL_COMMON(nr, sym, compat) __SYSCALL_64(nr, sym, compat) |
9 | 10 | ||
@@ -19,11 +20,9 @@ | |||
19 | 20 | ||
20 | #define __SYSCALL_64(nr, sym, compat) [nr] = sym, | 21 | #define __SYSCALL_64(nr, sym, compat) [nr] = sym, |
21 | 22 | ||
22 | typedef void (*sys_call_ptr_t)(void); | ||
23 | |||
24 | extern void sys_ni_syscall(void); | 23 | extern void sys_ni_syscall(void); |
25 | 24 | ||
26 | const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { | 25 | asmlinkage const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { |
27 | /* | 26 | /* |
28 | * Smells like a compiler bug -- it doesn't work | 27 | * Smells like a compiler bug -- it doesn't work |
29 | * when the & below is removed. | 28 | * when the & below is removed. |
diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c index 906fea315791..c905e89e19fe 100644 --- a/arch/x86/lib/usercopy_64.c +++ b/arch/x86/lib/usercopy_64.c | |||
@@ -68,7 +68,7 @@ EXPORT_SYMBOL(copy_in_user); | |||
68 | * Since protection fault in copy_from/to_user is not a normal situation, | 68 | * Since protection fault in copy_from/to_user is not a normal situation, |
69 | * it is not necessary to optimize tail handling. | 69 | * it is not necessary to optimize tail handling. |
70 | */ | 70 | */ |
71 | unsigned long | 71 | __visible unsigned long |
72 | copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest) | 72 | copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest) |
73 | { | 73 | { |
74 | char c; | 74 | char c; |
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 1cf5b300305e..424f4c97a44d 100644 --- a/arch/x86/power/cpu.c +++ b/arch/x86/power/cpu.c | |||
@@ -25,10 +25,10 @@ | |||
25 | #include <asm/cpu.h> | 25 | #include <asm/cpu.h> |
26 | 26 | ||
27 | #ifdef CONFIG_X86_32 | 27 | #ifdef CONFIG_X86_32 |
28 | unsigned long saved_context_ebx; | 28 | __visible unsigned long saved_context_ebx; |
29 | unsigned long saved_context_esp, saved_context_ebp; | 29 | __visible unsigned long saved_context_esp, saved_context_ebp; |
30 | unsigned long saved_context_esi, saved_context_edi; | 30 | __visible unsigned long saved_context_esi, saved_context_edi; |
31 | unsigned long saved_context_eflags; | 31 | __visible unsigned long saved_context_eflags; |
32 | #endif | 32 | #endif |
33 | struct saved_context saved_context; | 33 | struct saved_context saved_context; |
34 | 34 | ||
diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c index a0fde91c16cf..304fca20d96e 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c | |||
@@ -20,26 +20,26 @@ | |||
20 | #include <asm/suspend.h> | 20 | #include <asm/suspend.h> |
21 | 21 | ||
22 | /* References to section boundaries */ | 22 | /* References to section boundaries */ |
23 | extern const void __nosave_begin, __nosave_end; | 23 | extern __visible const void __nosave_begin, __nosave_end; |
24 | 24 | ||
25 | /* Defined in hibernate_asm_64.S */ | 25 | /* Defined in hibernate_asm_64.S */ |
26 | extern int restore_image(void); | 26 | extern asmlinkage int restore_image(void); |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * Address to jump to in the last phase of restore in order to get to the image | 29 | * Address to jump to in the last phase of restore in order to get to the image |
30 | * kernel's text (this value is passed in the image header). | 30 | * kernel's text (this value is passed in the image header). |
31 | */ | 31 | */ |
32 | unsigned long restore_jump_address; | 32 | unsigned long restore_jump_address __visible; |
33 | 33 | ||
34 | /* | 34 | /* |
35 | * Value of the cr3 register from before the hibernation (this value is passed | 35 | * Value of the cr3 register from before the hibernation (this value is passed |
36 | * in the image header). | 36 | * in the image header). |
37 | */ | 37 | */ |
38 | unsigned long restore_cr3; | 38 | unsigned long restore_cr3 __visible; |
39 | 39 | ||
40 | pgd_t *temp_level4_pgt; | 40 | pgd_t *temp_level4_pgt __visible; |
41 | 41 | ||
42 | void *relocated_restore_code; | 42 | void *relocated_restore_code __visible; |
43 | 43 | ||
44 | static void *alloc_pgt_page(void *context) | 44 | static void *alloc_pgt_page(void *context) |
45 | { | 45 | { |
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h index 86782c5d7e2a..95f8c6142328 100644 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h | |||
@@ -105,9 +105,9 @@ static inline void __init xen_init_apic(void) | |||
105 | /* Declare an asm function, along with symbols needed to make it | 105 | /* Declare an asm function, along with symbols needed to make it |
106 | inlineable */ | 106 | inlineable */ |
107 | #define DECL_ASM(ret, name, ...) \ | 107 | #define DECL_ASM(ret, name, ...) \ |
108 | ret name(__VA_ARGS__); \ | 108 | __visible ret name(__VA_ARGS__); \ |
109 | extern char name##_end[]; \ | 109 | extern char name##_end[] __visible; \ |
110 | extern char name##_reloc[] \ | 110 | extern char name##_reloc[] __visible |
111 | 111 | ||
112 | DECL_ASM(void, xen_irq_enable_direct, void); | 112 | DECL_ASM(void, xen_irq_enable_direct, void); |
113 | DECL_ASM(void, xen_irq_disable_direct, void); | 113 | DECL_ASM(void, xen_irq_disable_direct, void); |
@@ -115,11 +115,11 @@ DECL_ASM(unsigned long, xen_save_fl_direct, void); | |||
115 | DECL_ASM(void, xen_restore_fl_direct, unsigned long); | 115 | DECL_ASM(void, xen_restore_fl_direct, unsigned long); |
116 | 116 | ||
117 | /* These are not functions, and cannot be called normally */ | 117 | /* These are not functions, and cannot be called normally */ |
118 | void xen_iret(void); | 118 | __visible void xen_iret(void); |
119 | void xen_sysexit(void); | 119 | __visible void xen_sysexit(void); |
120 | void xen_sysret32(void); | 120 | __visible void xen_sysret32(void); |
121 | void xen_sysret64(void); | 121 | __visible void xen_sysret64(void); |
122 | void xen_adjust_exception_frame(void); | 122 | __visible void xen_adjust_exception_frame(void); |
123 | 123 | ||
124 | extern int xen_panic_handler_init(void); | 124 | extern int xen_panic_handler_init(void); |
125 | 125 | ||