aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-04 11:42:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-04 11:42:44 -0400
commit2a475501b81f06f64c474cfad66f8807294b4534 (patch)
treee189fbd7807a222b7012754c1aaf4ad15ab9c728 /arch
parent3d7e5fc37f91c3ad4974262e173d9ba36139652a (diff)
parenteb86b5fd505cb97743d84226140cf247d91a2f03 (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')
-rw-r--r--arch/x86/include/asm/checksum_64.h2
-rw-r--r--arch/x86/include/asm/hw_irq.h120
-rw-r--r--arch/x86/include/asm/irq.h2
-rw-r--r--arch/x86/include/asm/kprobes.h10
-rw-r--r--arch/x86/include/asm/paravirt_types.h3
-rw-r--r--arch/x86/include/asm/pgtable.h3
-rw-r--r--arch/x86/include/asm/processor.h2
-rw-r--r--arch/x86/include/asm/setup.h8
-rw-r--r--arch/x86/include/asm/special_insns.h2
-rw-r--r--arch/x86/include/asm/switch_to.h4
-rw-r--r--arch/x86/include/asm/syscall.h3
-rw-r--r--arch/x86/include/asm/syscalls.h6
-rw-r--r--arch/x86/include/asm/traps.h6
-rw-r--r--arch/x86/include/asm/vvar.h2
-rw-r--r--arch/x86/kernel/apic/apic.c12
-rw-r--r--arch/x86/kernel/apm_32.c2
-rw-r--r--arch/x86/kernel/cpu/amd.c4
-rw-r--r--arch/x86/kernel/cpu/common.c4
-rw-r--r--arch/x86/kernel/head32.c2
-rw-r--r--arch/x86/kernel/head64.c2
-rw-r--r--arch/x86/kernel/irq.c8
-rw-r--r--arch/x86/kernel/irq_work.c4
-rw-r--r--arch/x86/kernel/kprobes/core.c2
-rw-r--r--arch/x86/kernel/kprobes/opt.c5
-rw-r--r--arch/x86/kernel/paravirt.c4
-rw-r--r--arch/x86/kernel/process.c2
-rw-r--r--arch/x86/kernel/process_32.c2
-rw-r--r--arch/x86/kernel/process_64.c4
-rw-r--r--arch/x86/kernel/setup.c4
-rw-r--r--arch/x86/kernel/signal.c6
-rw-r--r--arch/x86/kernel/smp.c12
-rw-r--r--arch/x86/kernel/syscall_32.c2
-rw-r--r--arch/x86/kernel/syscall_64.c5
-rw-r--r--arch/x86/lib/usercopy_64.c2
-rw-r--r--arch/x86/power/cpu.c8
-rw-r--r--arch/x86/power/hibernate_64.c12
-rw-r--r--arch/x86/xen/xen-ops.h16
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 */
136extern __wsum csum_partial_copy_generic(const void *src, const void *dst, 136extern __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 */
29extern void apic_timer_interrupt(void); 29extern asmlinkage void apic_timer_interrupt(void);
30extern void x86_platform_ipi(void); 30extern asmlinkage void x86_platform_ipi(void);
31extern void kvm_posted_intr_ipi(void); 31extern asmlinkage void kvm_posted_intr_ipi(void);
32extern void error_interrupt(void); 32extern asmlinkage void error_interrupt(void);
33extern void irq_work_interrupt(void); 33extern asmlinkage void irq_work_interrupt(void);
34 34
35extern void spurious_interrupt(void); 35extern asmlinkage void spurious_interrupt(void);
36extern void thermal_interrupt(void); 36extern asmlinkage void thermal_interrupt(void);
37extern void reschedule_interrupt(void); 37extern asmlinkage void reschedule_interrupt(void);
38 38
39extern void invalidate_interrupt(void); 39extern asmlinkage void invalidate_interrupt(void);
40extern void invalidate_interrupt0(void); 40extern asmlinkage void invalidate_interrupt0(void);
41extern void invalidate_interrupt1(void); 41extern asmlinkage void invalidate_interrupt1(void);
42extern void invalidate_interrupt2(void); 42extern asmlinkage void invalidate_interrupt2(void);
43extern void invalidate_interrupt3(void); 43extern asmlinkage void invalidate_interrupt3(void);
44extern void invalidate_interrupt4(void); 44extern asmlinkage void invalidate_interrupt4(void);
45extern void invalidate_interrupt5(void); 45extern asmlinkage void invalidate_interrupt5(void);
46extern void invalidate_interrupt6(void); 46extern asmlinkage void invalidate_interrupt6(void);
47extern void invalidate_interrupt7(void); 47extern asmlinkage void invalidate_interrupt7(void);
48extern void invalidate_interrupt8(void); 48extern asmlinkage void invalidate_interrupt8(void);
49extern void invalidate_interrupt9(void); 49extern asmlinkage void invalidate_interrupt9(void);
50extern void invalidate_interrupt10(void); 50extern asmlinkage void invalidate_interrupt10(void);
51extern void invalidate_interrupt11(void); 51extern asmlinkage void invalidate_interrupt11(void);
52extern void invalidate_interrupt12(void); 52extern asmlinkage void invalidate_interrupt12(void);
53extern void invalidate_interrupt13(void); 53extern asmlinkage void invalidate_interrupt13(void);
54extern void invalidate_interrupt14(void); 54extern asmlinkage void invalidate_interrupt14(void);
55extern void invalidate_interrupt15(void); 55extern asmlinkage void invalidate_interrupt15(void);
56extern void invalidate_interrupt16(void); 56extern asmlinkage void invalidate_interrupt16(void);
57extern void invalidate_interrupt17(void); 57extern asmlinkage void invalidate_interrupt17(void);
58extern void invalidate_interrupt18(void); 58extern asmlinkage void invalidate_interrupt18(void);
59extern void invalidate_interrupt19(void); 59extern asmlinkage void invalidate_interrupt19(void);
60extern void invalidate_interrupt20(void); 60extern asmlinkage void invalidate_interrupt20(void);
61extern void invalidate_interrupt21(void); 61extern asmlinkage void invalidate_interrupt21(void);
62extern void invalidate_interrupt22(void); 62extern asmlinkage void invalidate_interrupt22(void);
63extern void invalidate_interrupt23(void); 63extern asmlinkage void invalidate_interrupt23(void);
64extern void invalidate_interrupt24(void); 64extern asmlinkage void invalidate_interrupt24(void);
65extern void invalidate_interrupt25(void); 65extern asmlinkage void invalidate_interrupt25(void);
66extern void invalidate_interrupt26(void); 66extern asmlinkage void invalidate_interrupt26(void);
67extern void invalidate_interrupt27(void); 67extern asmlinkage void invalidate_interrupt27(void);
68extern void invalidate_interrupt28(void); 68extern asmlinkage void invalidate_interrupt28(void);
69extern void invalidate_interrupt29(void); 69extern asmlinkage void invalidate_interrupt29(void);
70extern void invalidate_interrupt30(void); 70extern asmlinkage void invalidate_interrupt30(void);
71extern void invalidate_interrupt31(void); 71extern asmlinkage void invalidate_interrupt31(void);
72 72
73extern void irq_move_cleanup_interrupt(void); 73extern asmlinkage void irq_move_cleanup_interrupt(void);
74extern void reboot_interrupt(void); 74extern asmlinkage void reboot_interrupt(void);
75extern void threshold_interrupt(void); 75extern asmlinkage void threshold_interrupt(void);
76 76
77extern void call_function_interrupt(void); 77extern asmlinkage void call_function_interrupt(void);
78extern void call_function_single_interrupt(void); 78extern 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;
172extern void eisa_set_level_irq(unsigned int irq); 172extern void eisa_set_level_irq(unsigned int irq);
173 173
174/* SMP */ 174/* SMP */
175extern void smp_apic_timer_interrupt(struct pt_regs *); 175extern __visible void smp_apic_timer_interrupt(struct pt_regs *);
176extern void smp_spurious_interrupt(struct pt_regs *); 176extern __visible void smp_spurious_interrupt(struct pt_regs *);
177extern void smp_x86_platform_ipi(struct pt_regs *); 177extern __visible void smp_x86_platform_ipi(struct pt_regs *);
178extern void smp_error_interrupt(struct pt_regs *); 178extern __visible void smp_error_interrupt(struct pt_regs *);
179#ifdef CONFIG_X86_IO_APIC 179#ifdef CONFIG_X86_IO_APIC
180extern asmlinkage void smp_irq_move_cleanup_interrupt(void); 180extern asmlinkage void smp_irq_move_cleanup_interrupt(void);
181#endif 181#endif
182#ifdef CONFIG_SMP 182#ifdef CONFIG_SMP
183extern void smp_reschedule_interrupt(struct pt_regs *); 183extern __visible void smp_reschedule_interrupt(struct pt_regs *);
184extern void smp_call_function_interrupt(struct pt_regs *); 184extern __visible void smp_call_function_interrupt(struct pt_regs *);
185extern void smp_call_function_single_interrupt(struct pt_regs *); 185extern __visible void smp_call_function_single_interrupt(struct pt_regs *);
186#ifdef CONFIG_X86_32 186extern __visible void smp_invalidate_interrupt(struct pt_regs *);
187extern void smp_invalidate_interrupt(struct pt_regs *);
188#else
189extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *);
190#endif
191#endif 187#endif
192 188
193extern void (*__initconst interrupt[NR_VECTORS-FIRST_EXTERNAL_VECTOR])(void); 189extern 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);
33extern void native_init_IRQ(void); 33extern void native_init_IRQ(void);
34extern bool handle_irq(unsigned irq, struct pt_regs *regs); 34extern bool handle_irq(unsigned irq, struct pt_regs *regs);
35 35
36extern unsigned int do_IRQ(struct pt_regs *regs); 36extern __visible unsigned int do_IRQ(struct pt_regs *regs);
37 37
38/* Interrupt vector management */ 38/* Interrupt vector management */
39extern DECLARE_BITMAP(used_vectors, NR_VECTORS); 39extern 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 */
52extern kprobe_opcode_t optprobe_template_entry; 52extern __visible kprobe_opcode_t optprobe_template_entry;
53extern kprobe_opcode_t optprobe_template_val; 53extern __visible kprobe_opcode_t optprobe_template_val;
54extern kprobe_opcode_t optprobe_template_call; 54extern __visible kprobe_opcode_t optprobe_template_call;
55extern kprobe_opcode_t optprobe_template_end; 55extern __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;
62extern const int kretprobe_blacklist_size; 62extern const int kretprobe_blacklist_size;
63 63
64void arch_remove_kprobe(struct kprobe *p); 64void arch_remove_kprobe(struct kprobe *p);
65void kretprobe_trampoline(void); 65asmlinkage void kretprobe_trampoline(void);
66 66
67/* Architecture specific copy of original instruction*/ 67/* Architecture specific copy of original instruction*/
68struct arch_specific_insn { 68struct 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
393unsigned paravirt_patch_nop(void); 394unsigned 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 */
25extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; 25extern 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
28extern spinlock_t pgd_lock; 29extern 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
415DECLARE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union); 415DECLARE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union) __visible;
416DECLARE_INIT_PER_CPU(irq_stack_union); 416DECLARE_INIT_PER_CPU(irq_stack_union);
417 417
418DECLARE_PER_CPU(char *, irq_stack_ptr); 418DECLARE_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);
108extern void probe_roms(void); 110extern void probe_roms(void);
109#ifdef __i386__ 111#ifdef __i386__
110 112
111void __init i386_start_kernel(void); 113asmlinkage void __init i386_start_kernel(void);
112 114
113#else 115#else
114void __init x86_64_start_kernel(char *real_mode); 116asmlinkage void __init x86_64_start_kernel(char *real_mode);
115void __init x86_64_start_reservations(char *real_mode_data); 117asmlinkage 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
104extern void native_load_gs_index(unsigned); 104extern 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
4struct task_struct; /* one of the stranger aspects of C forward declarations */ 4struct task_struct; /* one of the stranger aspects of C forward declarations */
5struct 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);
7struct tss_struct; 7struct tss_struct;
8void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, 8void __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
23extern const unsigned long sys_call_table[]; 23typedef void (*sys_call_ptr_t)(void);
24extern 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);
24asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); 24asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);
25 25
26/* kernel/signal.c */ 26/* kernel/signal.c */
27long sys_rt_sigreturn(void); 27asmlinkage long sys_rt_sigreturn(void);
28 28
29/* kernel/tls.c */ 29/* kernel/tls.c */
30asmlinkage long sys_set_thread_area(struct user_desc __user *); 30asmlinkage 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 */
37unsigned long sys_sigreturn(void); 37asmlinkage unsigned long sys_sigreturn(void);
38 38
39/* kernel/vm86_32.c */ 39/* kernel/vm86_32.c */
40asmlinkage long sys_vm86old(struct vm86_struct __user *); 40asmlinkage 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 */
47long sys_arch_prctl(int, unsigned long); 47asmlinkage long sys_arch_prctl(int, unsigned long);
48 48
49/* kernel/sys_x86_64.c */ 49/* kernel/sys_x86_64.c */
50asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, 50asmlinkage 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
15asmlinkage void divide_error(void); 11asmlinkage void divide_error(void);
16asmlinkage void debug(void); 12asmlinkage 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 */
916void __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
935void __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
1949void 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
1956void 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
2005void 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
2012void 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 */
395static 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
69extern void vide(void); 69extern __visible void vide(void);
70__asm__(".align 4\nvide: ret"); 70__asm__(".globl vide\n\t.align 4\nvide: ret");
71 71
72static void init_amd_k5(struct cpuinfo_x86 *c) 72static 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
1078DEFINE_PER_CPU_FIRST(union irq_stack_union, 1078DEFINE_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);
1093DEFINE_PER_CPU(char *, irq_stack_ptr) = 1093DEFINE_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
1096DEFINE_PER_CPU(unsigned int, irq_count) = -1; 1096DEFINE_PER_CPU(unsigned int, irq_count) __visible = -1;
1097 1097
1098DEFINE_PER_CPU(struct task_struct *, fpu_owner_task); 1098DEFINE_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
32void __init i386_start_kernel(void) 32asmlinkage 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
140void __init x86_64_start_kernel(char * real_mode_data) 140asmlinkage 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 */
180unsigned 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
218void 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 */
232void 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
250void 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
25void 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
32void 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 */
664static __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
91static void __used __kprobes kprobes_optinsn_template_holder(void) 91asm (
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
327struct 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
339struct 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 */
39DEFINE_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
42static DEFINE_PER_CPU(unsigned char, is_idle); 42static 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
53asmlinkage extern void ret_from_fork(void); 53asmlinkage extern void ret_from_fork(void);
54 54
55DEFINE_PER_CPU(unsigned long, old_rsp); 55asmlinkage 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 */
58void __show_regs(struct pt_regs *regs, int all) 58void __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)
209unsigned long mmu_cr4_features; 209__visible unsigned long mmu_cr4_features;
210#else 210#else
211unsigned 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
536unsigned long sys_sigreturn(void) 536asmlinkage 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
565long sys_rt_sigreturn(void) 565asmlinkage 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 */
731void 731__visible void
732do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) 732do_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
259void 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
274void 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
298void 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
305void 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
320void 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
327void 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
16extern asmlinkage void sys_ni_syscall(void); 16extern asmlinkage void sys_ni_syscall(void);
17 17
18const 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
22typedef void (*sys_call_ptr_t)(void);
23
24extern void sys_ni_syscall(void); 23extern void sys_ni_syscall(void);
25 24
26const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = { 25asmlinkage 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 */
71unsigned long 71__visible unsigned long
72copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest) 72copy_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
28unsigned long saved_context_ebx; 28__visible unsigned long saved_context_ebx;
29unsigned long saved_context_esp, saved_context_ebp; 29__visible unsigned long saved_context_esp, saved_context_ebp;
30unsigned long saved_context_esi, saved_context_edi; 30__visible unsigned long saved_context_esi, saved_context_edi;
31unsigned long saved_context_eflags; 31__visible unsigned long saved_context_eflags;
32#endif 32#endif
33struct saved_context saved_context; 33struct 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 */
23extern const void __nosave_begin, __nosave_end; 23extern __visible const void __nosave_begin, __nosave_end;
24 24
25/* Defined in hibernate_asm_64.S */ 25/* Defined in hibernate_asm_64.S */
26extern int restore_image(void); 26extern 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 */
32unsigned long restore_jump_address; 32unsigned 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 */
38unsigned long restore_cr3; 38unsigned long restore_cr3 __visible;
39 39
40pgd_t *temp_level4_pgt; 40pgd_t *temp_level4_pgt __visible;
41 41
42void *relocated_restore_code; 42void *relocated_restore_code __visible;
43 43
44static void *alloc_pgt_page(void *context) 44static 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
112DECL_ASM(void, xen_irq_enable_direct, void); 112DECL_ASM(void, xen_irq_enable_direct, void);
113DECL_ASM(void, xen_irq_disable_direct, void); 113DECL_ASM(void, xen_irq_disable_direct, void);
@@ -115,11 +115,11 @@ DECL_ASM(unsigned long, xen_save_fl_direct, void);
115DECL_ASM(void, xen_restore_fl_direct, unsigned long); 115DECL_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 */
118void xen_iret(void); 118__visible void xen_iret(void);
119void xen_sysexit(void); 119__visible void xen_sysexit(void);
120void xen_sysret32(void); 120__visible void xen_sysret32(void);
121void xen_sysret64(void); 121__visible void xen_sysret64(void);
122void xen_adjust_exception_frame(void); 122__visible void xen_adjust_exception_frame(void);
123 123
124extern int xen_panic_handler_init(void); 124extern int xen_panic_handler_init(void);
125 125