mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
um: registers: Rename function names to avoid conflicts and build problems
The function names init_registers() and restore_registers() are used in several net/ethernet/ and gpu/drm/ drivers for other purposes (not calls to UML functions), so rename them. This fixes multiple build errors. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: Richard Weinberger <richard@nod.at> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Cc: linux-um@lists.infradead.org Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
8bd18ef9ea
commit
077b732094
@ -16,8 +16,8 @@ extern int restore_fp_registers(int pid, unsigned long *fp_regs);
|
||||
extern int save_fpx_registers(int pid, unsigned long *fp_regs);
|
||||
extern int restore_fpx_registers(int pid, unsigned long *fp_regs);
|
||||
extern int save_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int restore_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int init_registers(int pid);
|
||||
extern int restore_pid_registers(int pid, struct uml_pt_regs *regs);
|
||||
extern int init_pid_registers(int pid);
|
||||
extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs);
|
||||
extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
|
||||
extern int get_fp_registers(int pid, unsigned long *regs);
|
||||
|
@ -21,7 +21,7 @@ int save_registers(int pid, struct uml_pt_regs *regs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int restore_registers(int pid, struct uml_pt_regs *regs)
|
||||
int restore_pid_registers(int pid, struct uml_pt_regs *regs)
|
||||
{
|
||||
int err;
|
||||
|
||||
@ -36,7 +36,7 @@ int restore_registers(int pid, struct uml_pt_regs *regs)
|
||||
static unsigned long exec_regs[MAX_REG_NR];
|
||||
static unsigned long exec_fp_regs[FP_SIZE];
|
||||
|
||||
int init_registers(int pid)
|
||||
int init_pid_registers(int pid)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@ -368,7 +368,7 @@ void __init os_early_checks(void)
|
||||
check_tmpexec();
|
||||
|
||||
pid = start_ptraced_child();
|
||||
if (init_registers(pid))
|
||||
if (init_pid_registers(pid))
|
||||
fatal("Failed to initialize default registers");
|
||||
stop_ptraced_child(pid, 1, 1);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/prctl.h> /* XXX This should get the constants from libc */
|
||||
#include <os.h>
|
||||
#include <registers.h>
|
||||
|
||||
long arch_prctl(struct task_struct *task, int option,
|
||||
unsigned long __user *arg2)
|
||||
@ -35,7 +36,7 @@ long arch_prctl(struct task_struct *task, int option,
|
||||
switch (option) {
|
||||
case ARCH_SET_FS:
|
||||
case ARCH_SET_GS:
|
||||
ret = restore_registers(pid, ¤t->thread.regs.regs);
|
||||
ret = restore_pid_registers(pid, ¤t->thread.regs.regs);
|
||||
if (ret)
|
||||
return ret;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user