Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86, asmlinkage: Make 32bit/64bit __switch_to visible

This function is called from inline assembler, so has to be visible.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1375740170-7446-6-git-send-email-andi@firstfloor.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

authored by

Andi Kleen and committed by
H. Peter Anvin
35ea7903 a1ed4ddf

+4 -4
+2 -2
arch/x86/include/asm/switch_to.h
··· 2 2 #define _ASM_X86_SWITCH_TO_H 3 3 4 4 struct task_struct; /* one of the stranger aspects of C forward declarations */ 5 - struct task_struct *__switch_to(struct task_struct *prev, 6 - struct task_struct *next); 5 + __visible struct task_struct *__switch_to(struct task_struct *prev, 6 + struct task_struct *next); 7 7 struct tss_struct; 8 8 void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, 9 9 struct tss_struct *tss);
+1 -1
arch/x86/kernel/process_32.c
··· 247 247 * the task-switch, and shows up in ret_from_fork in entry.S, 248 248 * for example. 249 249 */ 250 - __notrace_funcgraph struct task_struct * 250 + __visible __notrace_funcgraph struct task_struct * 251 251 __switch_to(struct task_struct *prev_p, struct task_struct *next_p) 252 252 { 253 253 struct thread_struct *prev = &prev_p->thread,
+1 -1
arch/x86/kernel/process_64.c
··· 274 274 * Kprobes not supported here. Set the probe on schedule instead. 275 275 * Function graph tracer not supported too. 276 276 */ 277 - __notrace_funcgraph struct task_struct * 277 + __visible __notrace_funcgraph struct task_struct * 278 278 __switch_to(struct task_struct *prev_p, struct task_struct *next_p) 279 279 { 280 280 struct thread_struct *prev = &prev_p->thread;