Commit 3144013e authored by Tiwei Bie's avatar Tiwei Bie Committed by Richard Weinberger

um: Fix the -Wmissing-prototypes warning for get_thread_reg

The get_thread_reg function is defined in the user code, and is
called by the kernel code. It should be declared in a shared header.

Fixes: dbba7f70 ("um: stop polluting the namespace with registers.h contents")
Signed-off-by: default avatarTiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 2cbade17
...@@ -94,7 +94,6 @@ extern struct cpuinfo_um boot_cpu_data; ...@@ -94,7 +94,6 @@ extern struct cpuinfo_um boot_cpu_data;
#define current_cpu_data boot_cpu_data #define current_cpu_data boot_cpu_data
#define cache_line_size() (boot_cpu_data.cache_alignment) #define cache_line_size() (boot_cpu_data.cache_alignment)
extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf) #define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
extern unsigned long __get_wchan(struct task_struct *p); extern unsigned long __get_wchan(struct task_struct *p);
......
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#ifndef __X86_UM_SYSDEP_ARCHSETJMP_H
#define __X86_UM_SYSDEP_ARCHSETJMP_H
#ifdef __i386__ #ifdef __i386__
#include "archsetjmp_32.h" #include "archsetjmp_32.h"
#else #else
#include "archsetjmp_64.h" #include "archsetjmp_64.h"
#endif #endif
unsigned long get_thread_reg(int reg, jmp_buf *buf);
#endif /* __X86_UM_SYSDEP_ARCHSETJMP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment