x86/asmlinkage changes for v3.12
Subsystems (8)
Linus,
Please pull the latest x86-asmlinkage-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-asmlinkage-for-linus
HEAD: eb86b5fd505cb97743d84226140cf247d91a2f03 x86/asmlinkage: Fix warning in xen asmlinkage change
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.
out-of-topic modifications in x86-asmlinkage-for-linus:
-------------------------------------------------------
include/linux/printk.h # b6c035d: x86, asmlinkage: Make dump_stack kernel/power/hibernate.c # d6efc2f: x86, asmlinkage, power: Make vari lib/dump_stack.c # b6c035d: x86, asmlinkage: Make dump_stack
Thanks,
Ingo
------------------>
Andi Kleen (16):
x86: Fix sys_call_table type in asm/syscall.h
x86, asmlinkage: Change dotraplinkage into __visible on 32bit
x86, asmlinkage: Make all interrupt handlers asmlinkage / __visible x86, asmlinkage: Make _*_start_kernel visible
x86, asmlinkage: Make 32bit/64bit __switch_to visible
x86, asmlinkage: Make various syscalls asmlinkage
x86, asmlinkage: Make kprobes code visible and fix assembler code x86, asmlinkage: Make several variables used from assembler/linker script visible x86, asmlinkage: Make syscall tables visible
x86, asmlinkage, apm: Make APM data structure used from assembler visible x86, asmlinkage, paravirt: Add __visible/asmlinkage to xen paravirt ops x86, asmlinkage: Make 64bit checksum functions visible
x86, asmlinkage: Make dump_stack visible
x86, asmlinkage, power: Make various symbols used by the suspend asm code visible x86, asmlinkage, vdso: Mark vdso variables __visible x86/asmlinkage: Fix warning in xen asmlinkage change
arch/x86/include/asm/checksum_64.h | 2 +- arch/x86/include/asm/hw_irq.h | 120 ++++++++++++++++------------------ arch/x86/include/asm/irq.h | 2 +- arch/x86/include/asm/kprobes.h | 10 +-- arch/x86/include/asm/paravirt_types.h | 3 +- arch/x86/include/asm/pgtable.h | 3 +- arch/x86/include/asm/processor.h | 2 +- arch/x86/include/asm/setup.h | 8 ++- arch/x86/include/asm/special_insns.h | 2 +- arch/x86/include/asm/switch_to.h | 4 +- arch/x86/include/asm/syscall.h | 3 +- arch/x86/include/asm/syscalls.h | 6 +- arch/x86/include/asm/traps.h | 6 +- arch/x86/include/asm/vvar.h | 2 +- arch/x86/kernel/apic/apic.c | 12 ++-- arch/x86/kernel/apm_32.c | 2 +- arch/x86/kernel/cpu/amd.c | 4 +- arch/x86/kernel/cpu/common.c | 4 +- arch/x86/kernel/head32.c | 2 +- arch/x86/kernel/head64.c | 2 +- arch/x86/kernel/irq.c | 8 +-- arch/x86/kernel/irq_work.c | 4 +- arch/x86/kernel/kprobes/core.c | 2 +- arch/x86/kernel/kprobes/opt.c | 5 +- arch/x86/kernel/paravirt.c | 4 +- arch/x86/kernel/process.c | 2 +- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 4 +- arch/x86/kernel/setup.c | 4 +- arch/x86/kernel/signal.c | 6 +- arch/x86/kernel/smp.c | 12 ++-- arch/x86/kernel/syscall_32.c | 2 +- arch/x86/kernel/syscall_64.c | 5 +- arch/x86/lib/usercopy_64.c | 2 +- arch/x86/power/cpu.c | 8 +-- arch/x86/power/hibernate_64.c | 12 ++-- arch/x86/xen/xen-ops.h | 16 ++--- include/linux/printk.h | 2 +- kernel/power/hibernate.c | 2 +- lib/dump_stack.c | 4 +- 40 files changed, 149 insertions(+), 156 deletions(-)
arch/x86/include/asm/checksum_64.h +1 -1
@@ -133,7 +133,7 @@ extern __wsum csum_partial(const void *buff, int len, __wsum sum);/* Do not call this directly. Use the wrappers below */ -extern __wsum csum_partial_copy_generic (const void *src,const void *dst, +extern __visible __wsum csum_partial_copy_generic(const void *src, const void *dst,int len,__wsum sum,int *src_err_ptr,int *dst_err_ptr);
arch/x86/include/asm/hw_irq.h +58 -62
136 lines not on this page · raw message
arch/x86/include/asm/irq.h +1 -1
@@ -33,7 +33,7 @@ extern void (*x86_platform_ipi_callback)(void);extern void native_init_IRQ (void );extern bool handle_irq (unsigned irq,struct pt_regs *regs); -extern unsigned int do_IRQ (struct pt_regs *regs); +extern __visible unsigned int do_IRQ(struct pt_regs *regs);/* Interrupt vector management */ extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
arch/x86/include/asm/kprobes.h +5 -5
@@ -49,10 +49,10 @@ typedef u8 kprobe_opcode_t;#define flush_insn_slot (p) do { } while (0)/* optinsn template addresses */ -extern kprobe_opcode_t optprobe_template_entry; -extern kprobe_opcode_t optprobe_template_val; -extern kprobe_opcode_t optprobe_template_call; -extern kprobe_opcode_t optprobe_template_end; +extern __visible kprobe_opcode_t optprobe_template_entry; +extern __visible kprobe_opcode_t optprobe_template_val; +extern __visible kprobe_opcode_t optprobe_template_call; +extern __visible kprobe_opcode_t optprobe_template_end;#define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE)#define MAX_OPTINSN_SIZE \ (((unsigned long)&optprobe_template_end - \
@@ -62,7 +62,7 @@ extern kprobe_opcode_t optprobe_template_end;extern const int kretprobe_blacklist_size;void arch_remove_kprobe (struct kprobe *p); -void kretprobe_trampoline (void ); +asmlinkage void kretprobe_trampoline(void);/* Architecture specific copy of original instruction*/ struct arch_specific_insn {
arch/x86/include/asm/paravirt_types.h +2 -1
@@ -387,7 +387,8 @@ extern struct pv_lock_ops pv_lock_ops;/* Simple instruction patching code. */ #define DEF_NATIVE (ops, name, code) \ - extern const char start_##ops##_##name[], end_##ops##_##name[]; \ + extern const char start_##ops##_##name[] __visible, \ + end_##ops##_##name[] __visible; \ asm("start_" #ops "_" #name ": " code "; end_" #ops "_" #name ":")unsigned paravirt_patch_nop (void );
arch/x86/include/asm/pgtable.h +2 -1
@@ -22,7 +22,8 @@* ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. */ -extern unsigned long empty_zero_page[PAGE_SIZE /sizeof (unsigned long )]; +extern unsigned long empty_zero_page[PAGE_SIZE /sizeof (unsigned long )] + __visible;#define ZERO_PAGE (vaddr) (virt_to_page(empty_zero_page))extern spinlock_t pgd_lock;
arch/x86/include/asm/processor.h +1 -1
@@ -412,7 +412,7 @@ union irq_stack_union { }; }; -DECLARE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union); +DECLARE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union) __visible;DECLARE_INIT_PER_CPU (irq_stack_union); DECLARE_PER_CPU(char *, irq_stack_ptr);
arch/x86/include/asm/setup.h +5 -3
@@ -6,6 +6,8 @@#define COMMAND_LINE_SIZE 2048 +#include <linux/linkage.h> +#ifdef __i386__#include <linux/pfn.h>
@@ -108,11 +110,11 @@ void *extend_brk(size_t size, size_t align);extern void probe_roms (void );#ifdef __i386__ -void __init i386_start_kernel (void ); +asmlinkage void __init i386_start_kernel(void);#else -void __init x86_64_start_kernel (char *real_mode); -void __init x86_64_start_reservations (char *real_mode_data); +asmlinkage void __init x86_64_start_kernel(char *real_mode); +asmlinkage void __init x86_64_start_reservations(char *real_mode_data);#endif /* __i386__ */ #endif /* _SETUP */
arch/x86/include/asm/special_insns.h +1 -1
@@ -101,7 +101,7 @@ static inline void native_wbinvd(void) asmvolatile ("wbinvd" : : :"memory" ); } -extern void native_load_gs_index (unsigned ); +extern asmlinkage void native_load_gs_index(unsigned);#ifdef CONFIG_PARAVIRT #include <asm/paravirt.h>
arch/x86/include/asm/switch_to.h +2 -2
@@ -2,8 +2,8 @@#define _ASM_X86_SWITCH_TO_Hstruct task_struct ;/* one of the stranger aspects of C forward declarations */ -struct task_struct *__switch_to (struct task_struct *prev, -struct task_struct *next); +__visible struct task_struct *__switch_to(struct task_struct *prev, +struct task_struct *next);struct tss_struct ;void __switch_to_xtra (struct task_struct *prev_p,struct task_struct *next_p,struct tss_struct *tss);
arch/x86/include/asm/syscall.h +2 -1
@@ -20,7 +20,8 @@#include <asm/thread_info.h> /* for TS_COMPAT */ #include <asm/unistd.h> -extern const unsigned long sys_call_table[]; +typedef void (*sys_call_ptr_t )(void ); +extern const sys_call_ptr_t sys_call_table[];/* * Only the low 32 bits of orig_ax are meaningful, so we return int.
arch/x86/include/asm/syscalls.h +3 -3
@@ -24,7 +24,7 @@ asmlinkage long sys_iopl(unsigned int); asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);/* kernel/signal.c */ -long sys_rt_sigreturn (void ); +asmlinkage long sys_rt_sigreturn (void );/* kernel/tls.c */ asmlinkage long sys_set_thread_area (struct user_desc __user *);
@@ -34,7 +34,7 @@ asmlinkage long sys_get_thread_area(struct user_desc __user *);#ifdef CONFIG_X86_32 /* kernel/signal.c */ -unsigned long sys_sigreturn (void ); +asmlinkage unsigned long sys_sigreturn (void );/* kernel/vm86_32.c */ asmlinkage long sys_vm86old (struct vm86_struct __user *);
@@ -44,7 +44,7 @@ asmlinkage long sys_vm86(unsigned long, unsigned long);/* X86_64 only */ /* kernel/process_64.c */ -long sys_arch_prctl (int ,unsigned long ); +asmlinkage long sys_arch_prctl (int ,unsigned long );/* kernel/sys_x86_64.c */ asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
arch/x86/include/asm/traps.h +1 -5
@@ -6,11 +6,7 @@#include <asm/debugreg.h> #include <asm/siginfo.h> /* TRAP_TRACE, ... */ -#ifdef CONFIG_X86_32 -#define dotraplinkage -#else -#define dotraplinkage asmlinkage -#endif +#define dotraplinkage __visible asmlinkage void divide_error(void); asmlinkage void debug(void);
arch/x86/include/asm/vvar.h +1 -1
@@ -35,7 +35,7 @@#define DEFINE_VVAR (type, name) \ type name \ - __attribute__((section(".vvar_" #name), aligned(16))) + __attribute__((section(".vvar_" #name), aligned(16))) __visible#define VVAR (name) (*vvaraddr_ ## name)
arch/x86/kernel/apic/apic.c +6 -6
@@ -913,7 +913,7 @@ static void local_apic_timer_interrupt(void)* [ if a single-CPU system runs an SMP kernel then we call the local * interrupt as well. Thus we cannot inline the local irq ... ] */ -void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) +__visible void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
@@ -932,7 +932,7 @@ void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs)set_irq_regs (old_regs); } -void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs) +__visible void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
@@ -1946,14 +1946,14 @@ static inline void __smp_spurious_interrupt(void) "should never happen.\n", smp_processor_id()); } -void smp_spurious_interrupt (struct pt_regs *regs) +__visible void smp_spurious_interrupt(struct pt_regs *regs) {entering_irq ();__smp_spurious_interrupt ();exiting_irq (); } -void smp_trace_spurious_interrupt (struct pt_regs *regs) +__visible void smp_trace_spurious_interrupt(struct pt_regs *regs) {entering_irq ();trace_spurious_apic_entry (SPURIOUS_APIC_VECTOR );
@@ -2002,14 +2002,14 @@ static inline void __smp_error_interrupt(struct pt_regs *regs) } -void smp_error_interrupt (struct pt_regs *regs) +__visible void smp_error_interrupt(struct pt_regs *regs) {entering_irq ();__smp_error_interrupt (regs);exiting_irq (); } -void smp_trace_error_interrupt (struct pt_regs *regs) +__visible void smp_trace_error_interrupt(struct pt_regs *regs) {entering_irq ();trace_error_apic_entry (ERROR_APIC_VECTOR );
arch/x86/kernel/apm_32.c +1 -1
@@ -392,7 +392,7 @@ static struct cpuidle_device apm_cpuidle_device;/* * Local variables */ -static struct { +__visible struct {unsigned long offset;unsigned short segment; } apm_bios_entry;
arch/x86/kernel/cpu/amd.c +2 -2
@@ -66,8 +66,8 @@ static inline int wrmsrl_amd_safe(unsigned msr, unsigned long long val)* performance at the same time.. */ -extern void vide (void ); -__asm__(".align 4\nvide: ret" ); +extern __visible void vide(void); +__asm__(".globl vide\n\t.align 4\nvide: ret" );static void init_amd_k5 (struct cpuinfo_x86 *c) {
arch/x86/kernel/cpu/common.c +2 -2
@@ -1076,7 +1076,7 @@ struct desc_ptr debug_idt_descr = { NR_VECTORS * 16 - 1, (unsigned long) debug_idt_table }; DEFINE_PER_CPU_FIRST(union irq_stack_union, - irq_stack_union)__aligned(PAGE_SIZE) ; + irq_stack_union)__aligned(PAGE_SIZE) __visible;/* * The following four percpu variables are hot. Align current_task to
@@ -1093,7 +1093,7 @@ EXPORT_PER_CPU_SYMBOL(kernel_stack); DEFINE_PER_CPU(char *, irq_stack_ptr) =init_per_cpu_var (irq_stack_union.irq_stack) +IRQ_STACK_SIZE -64 ; -DEFINE_PER_CPU(unsigned int, irq_count) = -1; +DEFINE_PER_CPU(unsigned int, irq_count) __visible = -1; DEFINE_PER_CPU(struct task_struct *, fpu_owner_task);
arch/x86/kernel/head32.c +1 -1
@@ -29,7 +29,7 @@ static void __init i386_default_early_setup(void)reserve_ebda_region (); } -void __init i386_start_kernel (void ) +asmlinkage void __init i386_start_kernel(void) {sanitize_boot_params (&boot_params);
arch/x86/kernel/head64.c +1 -1
@@ -137,7 +137,7 @@ static void __init copy_bootdata(char *real_mode_data) } } -void __init x86_64_start_kernel (char * real_mode_data) +asmlinkage void __init x86_64_start_kernel(char * real_mode_data) {int i;
arch/x86/kernel/irq.c +4 -4
@@ -177,7 +177,7 @@ u64 arch_irq_stat(void)* SMP cross-CPU interrupts have their own specific * handlers). */ -unsigned int __irq_entry do_IRQ(struct pt_regs *regs) +__visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
@@ -215,7 +215,7 @@ void __smp_x86_platform_ipi(void)x86_platform_ipi_callback (); } -void smp_x86_platform_ipi (struct pt_regs *regs) +__visible void smp_x86_platform_ipi(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
@@ -229,7 +229,7 @@ void smp_x86_platform_ipi(struct pt_regs *regs)/* * Handler for POSTED_INTERRUPT_VECTOR. */ -void smp_kvm_posted_intr_ipi (struct pt_regs *regs) +__visible void smp_kvm_posted_intr_ipi(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
@@ -247,7 +247,7 @@ void smp_kvm_posted_intr_ipi(struct pt_regs *regs) }#endif -void smp_trace_x86_platform_ipi (struct pt_regs *regs) +__visible void smp_trace_x86_platform_ipi(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
arch/x86/kernel/irq_work.c +2 -2
@@ -22,14 +22,14 @@ static inline void __smp_irq_work_interrupt(void)irq_work_run (); } -void smp_irq_work_interrupt (struct pt_regs *regs) +__visible void smp_irq_work_interrupt(struct pt_regs *regs) {irq_work_entering_irq ();__smp_irq_work_interrupt ();exiting_irq (); } -void smp_trace_irq_work_interrupt (struct pt_regs *regs) +__visible void smp_trace_irq_work_interrupt(struct pt_regs *regs) {irq_work_entering_irq ();trace_irq_work_entry (IRQ_WORK_VECTOR );
arch/x86/kernel/kprobes/core.c +1 -1
@@ -661,7 +661,7 @@ static void __used __kprobes kretprobe_trampoline_holder(void)/* * Called from kretprobe_trampoline */ -static __used __kprobes void *trampoline_handler (struct pt_regs *regs) +__visible __used __kprobes void *trampoline_handler(struct pt_regs *regs) {struct kretprobe_instance *ri =NULL ;struct hlist_head *head, empty_rp;
arch/x86/kernel/kprobes/opt.c +1 -4
@@ -88,9 +88,7 @@ static void __kprobes synthesize_set_arg1(kprobe_opcode_t *addr, unsigned long v *(unsigned long *)addr = val; } -static void __used __kprobes kprobes_optinsn_template_holder (void ) -{ - asm volatile ( +asm ( ".global optprobe_template_entry\n" "optprobe_template_entry:\n"#ifdef CONFIG_X86_64
@@ -129,7 +127,6 @@ static void __used __kprobes kprobes_optinsn_template_holder(void)#endif ".global optprobe_template_end\n" "optprobe_template_end:\n"); -}#define TMPL_MOVE_IDX \ ((long)&optprobe_template_val - (long)&optprobe_template_entry)
arch/x86/kernel/paravirt.c +2 -2
@@ -324,7 +324,7 @@ struct pv_time_ops pv_time_ops = { .steal_clock = native_steal_clock, }; -struct pv_irq_ops pv_irq_ops = { +__visible struct pv_irq_ops pv_irq_ops = { .save_fl =__PV_IS_CALLEE_SAVE (native_save_fl), .restore_fl =__PV_IS_CALLEE_SAVE (native_restore_fl), .irq_disable =__PV_IS_CALLEE_SAVE (native_irq_disable),
@@ -336,7 +336,7 @@ struct pv_irq_ops pv_irq_ops = {#endif }; -struct pv_cpu_ops pv_cpu_ops = { +__visible struct pv_cpu_ops pv_cpu_ops = { .cpuid = native_cpuid, .get_debugreg = native_get_debugreg, .set_debugreg = native_set_debugreg,
arch/x86/kernel/process.c +1 -1
@@ -36,7 +36,7 @@* section. Since TSS's are completely CPU-local, we want them * on exact cacheline boundaries, to eliminate cacheline ping-pong. */ -DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; +__visible DEFINE_PER_CPU_SHARED_ALIGNED (struct tss_struct ,init_tss ) =INIT_TSS ;#ifdef CONFIG_X86_64 static DEFINE_PER_CPU(unsigned char, is_idle);
arch/x86/kernel/process_32.c +1 -1
@@ -247,7 +247,7 @@ EXPORT_SYMBOL_GPL(start_thread);* the task-switch, and shows up in ret_from_fork in entry.S, * for example. */ -__notrace_funcgraph struct task_struct * +__visible __notrace_funcgraph struct task_struct *__switch_to (struct task_struct *prev_p,struct task_struct *next_p) { struct thread_struct *prev = &prev_p->thread,
arch/x86/kernel/process_64.c +2 -2
@@ -52,7 +52,7 @@ asmlinkage extern void ret_from_fork(void); -DEFINE_PER_CPU(unsigned long, old_rsp); +asmlinkage DEFINE_PER_CPU (unsigned long ,old_rsp );/* Prints also some state that isn't saved in the pt_regs */ 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)* Kprobes not supported here. Set the probe on schedule instead. * Function graph tracer not supported too. */ -__notrace_funcgraph struct task_struct * +__visible __notrace_funcgraph struct task_struct *__switch_to (struct task_struct *prev_p,struct task_struct *next_p) {struct thread_struct *prev = &prev_p->thread;
arch/x86/kernel/setup.c +2 -2
@@ -206,9 +206,9 @@ EXPORT_SYMBOL(boot_cpu_data);#if !defined(CONFIG_X86_PAE ) || defined(CONFIG_X86_64 ) -unsigned long mmu_cr4_features; +__visible unsigned long mmu_cr4_features;#else -unsigned long mmu_cr4_features =X86_CR4_PAE ; +__visible unsigned long mmu_cr4_features =X86_CR4_PAE ;#endif /* Boot loader ID and version as integers, for the benefit of proc_dointvec */
arch/x86/kernel/signal.c +3 -3
@@ -533,7 +533,7 @@ static int x32_setup_rt_frame(struct ksignal *ksig,* Do a signal return; undo the signal stack. */ #ifdef CONFIG_X86_32 -unsigned long sys_sigreturn (void ) +asmlinkage unsigned long sys_sigreturn (void ) {struct pt_regs *regs =current_pt_regs ();struct sigframe __user *frame;
@@ -562,7 +562,7 @@ badframe: }#endif /* CONFIG_X86_32 */ -long sys_rt_sigreturn (void ) +asmlinkage long sys_rt_sigreturn (void ) {struct pt_regs *regs =current_pt_regs ();struct rt_sigframe __user *frame;
@@ -728,7 +728,7 @@ static void do_signal(struct pt_regs *regs)* notification of userspace execution resumption * - triggered by the TIF_WORK_MASK flags */ -void +__visible voiddo_notify_resume (struct pt_regs *regs,void *unused,__u32 thread_info_flags) {user_exit ();
arch/x86/kernel/smp.c +6 -6
@@ -256,7 +256,7 @@ static inline void __smp_reschedule_interrupt(void)scheduler_ipi (); } -void smp_reschedule_interrupt (struct pt_regs *regs) +__visible void smp_reschedule_interrupt(struct pt_regs *regs) {ack_APIC_irq ();__smp_reschedule_interrupt ();
@@ -271,7 +271,7 @@ static inline void smp_entering_irq(void)irq_enter (); } -void smp_trace_reschedule_interrupt (struct pt_regs *regs) +__visible void smp_trace_reschedule_interrupt(struct pt_regs *regs) {/* * Need to call irq_enter() before calling the trace point.
@@ -295,14 +295,14 @@ static inline void __smp_call_function_interrupt(void)inc_irq_stat (irq_call_count); } -void smp_call_function_interrupt (struct pt_regs *regs) +__visible void smp_call_function_interrupt(struct pt_regs *regs) {smp_entering_irq ();__smp_call_function_interrupt ();exiting_irq (); } -void smp_trace_call_function_interrupt (struct pt_regs *regs) +__visible void smp_trace_call_function_interrupt(struct pt_regs *regs) {smp_entering_irq ();trace_call_function_entry (CALL_FUNCTION_VECTOR );
@@ -317,14 +317,14 @@ static inline void __smp_call_function_single_interrupt(void)inc_irq_stat (irq_call_count); } -void smp_call_function_single_interrupt (struct pt_regs *regs) +__visible void smp_call_function_single_interrupt(struct pt_regs *regs) {smp_entering_irq ();__smp_call_function_single_interrupt ();exiting_irq (); } -void smp_trace_call_function_single_interrupt (struct pt_regs *regs) +__visible void smp_trace_call_function_single_interrupt(struct pt_regs *regs) {smp_entering_irq ();trace_call_function_single_entry (CALL_FUNCTION_SINGLE_VECTOR );
arch/x86/kernel/syscall_32.c +1 -1
@@ -15,7 +15,7 @@ typedef asmlinkage void (*sys_call_ptr_t)(void); extern asmlinkage void sys_ni_syscall(void); -const sys_call_ptr_t sys_call_table[__NR_syscall_max+1 ] = { +__visible const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {/* * Smells like a compiler bug -- it doesn't work * when the & below is removed.
arch/x86/kernel/syscall_64.c +2 -3
@@ -4,6 +4,7 @@#include <linux/sys.h> #include <linux/cache.h> #include <asm/asm-offsets.h> +#include <asm/syscall.h> #define __SYSCALL_COMMON (nr, sym, compat) __SYSCALL_64(nr, sym, compat)
@@ -19,11 +20,9 @@#define __SYSCALL_64 (nr, sym, compat) [nr] = sym, -typedef void (*sys_call_ptr_t )(void ); -extern void sys_ni_syscall (void ); -const sys_call_ptr_t sys_call_table[__NR_syscall_max+1 ] = { +asmlinkage const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {/* * Smells like a compiler bug -- it doesn't work * when the & below is removed.
arch/x86/lib/usercopy_64.c +1 -1
@@ -68,7 +68,7 @@ EXPORT_SYMBOL(copy_in_user);* Since protection fault in copy_from/to_user is not a normal situation, * it is not necessary to optimize tail handling. */ -unsigned long +__visible unsigned long copy_user_handle_tail (char *to,char *from,unsigned len,unsigned zerorest) {char c;
arch/x86/power/cpu.c +4 -4
@@ -25,10 +25,10 @@#include <asm/cpu.h> #ifdef CONFIG_X86_32 -unsigned long saved_context_ebx; -unsigned long saved_context_esp, saved_context_ebp; -unsigned long saved_context_esi, saved_context_edi; -unsigned long saved_context_eflags; +__visible unsigned long saved_context_ebx; +__visible unsigned long saved_context_esp, saved_context_ebp; +__visible unsigned long saved_context_esi, saved_context_edi; +__visible unsigned long saved_context_eflags;#endif struct saved_context saved_context;
arch/x86/power/hibernate_64.c +6 -6
@@ -20,26 +20,26 @@#include <asm/suspend.h> /* References to section boundaries */ -extern const void __nosave_begin, __nosave_end; +extern __visible const void __nosave_begin, __nosave_end;/* Defined in hibernate_asm_64.S */ -extern int restore_image (void ); +extern asmlinkage int restore_image(void);/* * Address to jump to in the last phase of restore in order to get to the image * kernel's text (this value is passed in the image header). */ -unsigned long restore_jump_address; +unsigned long restore_jump_address __visible;/* * Value of the cr3 register from before the hibernation (this value is passed * in the image header). */ -unsigned long restore_cr3; +unsigned long restore_cr3 __visible; -pgd_t *temp_level4_pgt; +pgd_t *temp_level4_pgt __visible; -void *relocated_restore_code; +void *relocated_restore_code __visible;static void *alloc_pgt_page (void *context) {
arch/x86/xen/xen-ops.h +8 -8
@@ -105,9 +105,9 @@ static inline void __init xen_init_apic(void)/* Declare an asm function, along with symbols needed to make it inlineable */ #define DECL_ASM (ret, name, ...) \ - ret name(__VA_ARGS__); \ - extern char name##_end[]; \ - extern char name##_reloc[] \ + __visible ret name(__VA_ARGS__); \ + extern char name##_end[] __visible; \ + extern char name##_reloc[] __visibleDECL_ASM (void, xen_irq_enable_direct, void);DECL_ASM (void, xen_irq_disable_direct, void);
@@ -115,11 +115,11 @@ DECL_ASM(unsigned long, xen_save_fl_direct, void); DECL_ASM(void, xen_restore_fl_direct, unsigned long);/* These are not functions, and cannot be called normally */ -void xen_iret (void ); -void xen_sysexit (void ); -void xen_sysret32 (void ); -void xen_sysret64 (void ); -void xen_adjust_exception_frame (void ); +__visible void xen_iret(void); +__visible void xen_sysexit(void); +__visible void xen_sysret32(void); +__visible void xen_sysret64(void); +__visible void xen_adjust_exception_frame(void);extern int xen_panic_handler_init (void );
include/linux/printk.h +1 -1
@@ -200,7 +200,7 @@ static inline void show_regs_print_info(const char *log_lvl) }#endif -extern void dump_stack (void )__cold ; +extern asmlinkage void dump_stack(void) __cold;#ifndef pr_fmt#define pr_fmt (fmt) fmt
kernel/power/hibernate.c +1 -1
@@ -39,7 +39,7 @@ static int resume_delay;static char resume_file[256 ] =CONFIG_PM_STD_PARTITION ;dev_t swsusp_resume_device;sector_t swsusp_resume_block; -int in_suspend __nosavedata; +__visible int in_suspend __nosavedata;enum {HIBERNATION_INVALID ,
lib/dump_stack.c +2 -2
@@ -23,7 +23,7 @@ static void __dump_stack(void)#ifdef CONFIG_SMP static atomic_t dump_lock =ATOMIC_INIT (-1 ); -void dump_stack (void ) +asmlinkage void dump_stack(void) {int was_locked;int old;
@@ -55,7 +55,7 @@ retry:preempt_enable (); }#else -void dump_stack (void ) +asmlinkage void dump_stack(void) {__dump_stack (); }
Quoted 2 lines · Ingo Molnar
Please pull the latest x86-asmlinkage-for-linus git tree from:
Grr. This one seems to introduce this annoying warning:
arch/x86/kernel/paravirt.c:66:0: warning: "DEF_NATIVE" redefined [enabled by default]
#define DEF_NATIVE(ops, name, code) \
^
In file included from /home/torvalds/v2.6/linux/arch/x86/include/asm/ptrace.h:65:0,
from/home/torvalds/v2.6/linux/arch/x86/include/asm/alternative.h:8,
from/home/torvalds/v2.6/linux/arch/x86/include/asm/bitops.h:16,
from include/linux/bitops.h:22,
from include/linux/kernel.h:10,
from include/linux/cache.h:4,
from include/linux/time.h:4,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from arch/x86/kernel/paravirt.c:22:/home/torvalds/v2.6/linux/arch/x86/include/asm/paravirt_types.h:389:0:
note: this is the location of the previous definition
#define DEF_NATIVE(ops, name, code) \
^
when doing an allmodconfig.
Maybe it gets fixed later in the series (I am about a third through your pull requests), but it's clearly bogus.
What the heck is wrong with that macro anyway? It is used in one single file, and it is _defined_ twice - in two other files. Somebody was very very confused when they wrote that code.
I'm going to let the pull stand, since it doesn't seem to actually break anything, but this needs to be fixed.
Linus
H. Peter Anvin
reviewerQuoted 33 lines · Linus Torvalds
Quoted 2 lines · Ingo Molnar
Please pull the latest x86-asmlinkage-for-linus git tree from:
Grr. This one seems to introduce this annoying warning:
arch/x86/kernel/paravirt.c:66:0: warning: "DEF_NATIVE" redefined [enabled by default]
#defineDEF_NATIVE(ops, name, code)\
^
In file included from/home/torvalds/v2.6/linux/arch/x86/include/asm/ptrace.h:65:0,
from/home/torvalds/v2.6/linux/arch/x86/include/asm/alternative.h:8,
from/home/torvalds/v2.6/linux/arch/x86/include/asm/bitops.h:16,from include/linux/bitops.h:22, from include/linux/kernel.h:10, from include/linux/cache.h:4, from include/linux/time.h:4, from include/linux/stat.h:18, from include/linux/module.h:10, from arch/x86/kernel/paravirt.c:22:
/home/torvalds/v2.6/linux/arch/x86/include/asm/paravirt_types.h:389:0:
note: this is the location of the previous definition
#defineDEF_NATIVE(ops, name, code)\
^when doing an allmodconfig.
Maybe it gets fixed later in the series (I am about a third through your pull requests), but it's clearly bogus.
Quoted 7 lines
What the heck is wrong with that macro anyway? It is used in one single file, and it is _defined_ twice - in two other files. Somebody was very very confused when they wrote that code.
I'm going to let the pull stand, since it doesn't seem to actually break anything, but this needs to be fixed.
This is actually a very old bug (the macro is defined in a .c and a .h file, but this patchset makes them different.)
The definition in the .c file should be removed, I believe.
It is used in two files (paravirt_patch_{32,64}.c) but not in paravirt.c proper.
This also exposes an interesting problem with Fengguang's build robot.
One build:
[tip:x86/asmlinkage] 28596b6a8779b736829ad837f95fdc2e81bdd1ee BUILD DONE 28596b6a8779b736829ad837f95fdc2e81bdd1ee x86, asmlinkage, vdso: Mark vdso variables __visible
... flags the warnings. The next build for the branch looks clean:
[tip:x86/asmlinkage] eb86b5fd505cb97743d84226140cf247d91a2f03 BUILD SUCCESS eb86b5fd505cb97743d84226140cf247d91a2f03 x86/asmlinkage: Fix warning in xen asmlinkage change
("DONE" means warnings or errors.)
A human observer would assume that the problem was fixed, since the patch says "fix warnings", but the problem is that it didn't actually fix *all* the warnings. However, the bot has flagged the warnings as preexisting from the previous build, and thus no new warnings were introduced.
It would be better if the bot reported any warnings not present in upstream.
-hpa
On Wed, Sep 04, 2013 at 09:45:29AM -0700, H. Peter Anvin wrote:
[snip]
Quoted 12 lines
This also exposes an interesting problem with Fengguang's build robot.
One build:
[tip:x86/asmlinkage]28596b6a8779b736829ad837f95fdc2e81bdd1eeBUILD DONE28596b6a8779b736829ad837f95fdc2e81bdd1eex86, asmlinkage, vdso: Mark vdso variables__visible... flags the warnings. The next build for the branch looks clean:
[tip:x86/asmlinkage]eb86b5fd505cb97743d84226140cf247d91a2f03BUILD SUCCESSeb86b5fd505cb97743d84226140cf247d91a2f03x86/asmlinkage: Fix warning in xen asmlinkage change
Quoted 7 lines
("DONE" means warnings or errors.)
A human observer would assume that the problem was fixed, since the patch says "fix warnings", but the problem is that it didn't actually fix *all* the warnings. However, the bot has flagged the warnings as preexisting from the previous build, and thus no new warnings were introduced.
Yeah sorry! The build robot silently ignored any reported errors, which is not the expected behavior when sending BUILD SUCCESS notifications.
Quoted 1 line
It would be better if the bot reported any warnings not present in upstream.
I've fixed the robot to remember which tree/branch first introduced the build error/warning. If the problem still remains in that branch's new HEAD, the robot will be able to send out BUILD DONE reports which will include the old error/warning message in the email body.
Sorry for the delay! This feature was added shortly after your report, however took long time to confirm that it actually works.
Thanks,
Fengguang
H. Peter Anvin
reviewerPerfectly understandable.
Quoted 43 lines · Fengguang Wu
On Wed, Sep 04, 2013 at 09:45:29AM -0700, H. Peter Anvin wrote:
[snip]Quoted 1 line
This also exposes an interesting problem with Fengguang's build
robot.
Quoted 3 lines
One build:
[tip:x86/asmlinkage]28596b6a8779b736829ad837f95fdc2e81bdd1eeBUILDDONE
Quoted 5 lines
28596b6a8779b736829ad837f95fdc2e81bdd1eex86, asmlinkage, vdso: Mark vdso variables__visible... flags the warnings. The next build for the branch looks clean:
[tip:x86/asmlinkage]eb86b5fd505cb97743d84226140cf247d91a2f03BUILDSUCCESS
Quoted 1 line
eb86b5fd505cb97743d84226140cf247d91a2f03x86/asmlinkage: Fix warningin
Quoted 9 lines
xen asmlinkage change
("DONE" means warnings or errors.)
A human observer would assume that the problem was fixed, since the patch says "fix warnings", but the problem is that it didn't actually fix *all* the warnings. However, the bot has flagged the warnings as preexisting from the previous build, and thus no new warnings were introduced.
Yeah sorry! The build robot silently ignored any reported errors, which is not the expected behavior when sending BUILD SUCCESS notifications.
Quoted 1 line
It would be better if the bot reported any warnings not present in
upstream.
I've fixed the robot to remember which tree/branch first introduced the build error/warning. If the problem still remains in that branch's new HEAD, the robot will be able to send out BUILD DONE reports which will include the old error/warning message in the email body.
Sorry for the delay! This feature was added shortly after your report, however took long time to confirm that it actually works.
Thanks,
Fengguang
Signature · 1 line
Sent from my mobile phone. Please pardon brevity and lack of formatting.
H. Peter Anvin
reviewerThank you for addressing this... you are taking what has already been a key piece of infrastructure for the Linux kernel community and making it even better!
Quoted 43 lines · Fengguang Wu
On Wed, Sep 04, 2013 at 09:45:29AM -0700, H. Peter Anvin wrote:
[snip]Quoted 1 line
This also exposes an interesting problem with Fengguang's build
robot.
Quoted 3 lines
One build:
[tip:x86/asmlinkage]28596b6a8779b736829ad837f95fdc2e81bdd1eeBUILDDONE
Quoted 5 lines
28596b6a8779b736829ad837f95fdc2e81bdd1eex86, asmlinkage, vdso: Mark vdso variables__visible... flags the warnings. The next build for the branch looks clean:
[tip:x86/asmlinkage]eb86b5fd505cb97743d84226140cf247d91a2f03BUILDSUCCESS
Quoted 1 line
eb86b5fd505cb97743d84226140cf247d91a2f03x86/asmlinkage: Fix warningin
Quoted 9 lines
xen asmlinkage change
("DONE" means warnings or errors.)
A human observer would assume that the problem was fixed, since the patch says "fix warnings", but the problem is that it didn't actually fix *all* the warnings. However, the bot has flagged the warnings as preexisting from the previous build, and thus no new warnings were introduced.
Yeah sorry! The build robot silently ignored any reported errors, which is not the expected behavior when sending BUILD SUCCESS notifications.
Quoted 1 line
It would be better if the bot reported any warnings not present in
upstream.
I've fixed the robot to remember which tree/branch first introduced the build error/warning. If the problem still remains in that branch's new HEAD, the robot will be able to send out BUILD DONE reports which will include the old error/warning message in the email body.
Sorry for the delay! This feature was added shortly after your report, however took long time to confirm that it actually works.
Thanks,
Fengguang
Signature · 1 line
Sent from my mobile phone. Please pardon brevity and lack of formatting.
tip-bot for H. Peter Anvin
merge bot[tip:x86/asmlinkage] x86, paravirt: Remove duplicate definition for DEF_NATIVE
In reply to Linus Torvaldsx86, paravirt: Remove duplicate definition for DEF_NATIVE
Commit-ID: f2a7b303d6e0bfb75b611b560af218608e50011f Gitweb: http://git.kernel.org/tip/f2a7b303d6e0bfb75b611b560af218608e50011f Author: H. Peter Anvin <[email protected]> AuthorDate: Wed, 4 Sep 2013 09:43:30 -0700 Committer: H. Peter Anvin <[email protected]> CommitDate: Wed, 4 Sep 2013 09:46:43 -0700
x86, paravirt: Remove duplicate definition for DEF_NATIVE
DEF_NATIVE() is defined in paravirt_types.h, remove duplicate definition in paravirt.c
--- arch/x86/kernel/paravirt.c | 5 ----- 1 file changed, 5 deletions(-)
arch/x86/kernel/paravirt.c +0 -5
@@ -62,11 +62,6 @@ void __init default_banner(void) pv_info.name); } -/* Simple instruction patching code. */ -#define DEF_NATIVE (ops, name, code) \ - extern const char start_##ops##_##name[], end_##ops##_##name[]; \ - asm("start_" #ops "_" #name ": " code "; end_" #ops "_" #name ":") -/* Undefined instruction for dealing with missing ops pointers. */ static const unsigned char ud2a[] = {0x0f ,0x0b };
Quoted 24 lines · On Wed, 4 Sep 2013 08:58:25 -0700 Linus Torvalds…
Quoted 2 lines · Ingo Molnar
Please pull the latest x86-asmlinkage-for-linus git tree from:
Grr. This one seems to introduce this annoying warning:
arch/x86/kernel/paravirt.c:66:0: warning: "DEF_NATIVE" redefined [enabled by default]
#defineDEF_NATIVE(ops, name, code)\
^
In file included from/home/torvalds/v2.6/linux/arch/x86/include/asm/ptrace.h:65:0,
from/home/torvalds/v2.6/linux/arch/x86/include/asm/alternative.h:8,
from/home/torvalds/v2.6/linux/arch/x86/include/asm/bitops.h:16,from include/linux/bitops.h:22, from include/linux/kernel.h:10, from include/linux/cache.h:4, from include/linux/time.h:4, from include/linux/stat.h:18, from include/linux/module.h:10, from arch/x86/kernel/paravirt.c:22:
Quoted 4 lines
/home/torvalds/v2.6/linux/arch/x86/include/asm/paravirt_types.h:389:0:
note: this is the location of the previous definition
#defineDEF_NATIVE(ops, name, code)\
^
See thread here: https://lkml.org/lkml/2013/8/19/12
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]