Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86 localify
details: https://anonhg.NetBSD.org/src/rev/f16ff6186167
branches: trunk
changeset: 934798:f16ff6186167
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Jun 19 16:20:22 2020 +0000
description:
localify
diffstat:
sys/arch/x86/include/cpu.h | 8 +-------
sys/arch/x86/include/sysarch.h | 6 +-----
sys/arch/x86/x86/sys_machdep.c | 34 ++++++++++++++++++----------------
3 files changed, 20 insertions(+), 28 deletions(-)
diffs (164 lines):
diff -r fef171f4608f -r f16ff6186167 sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h Fri Jun 19 16:11:14 2020 +0000
+++ b/sys/arch/x86/include/cpu.h Fri Jun 19 16:20:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.125 2020/05/02 16:44:35 bouyer Exp $ */
+/* $NetBSD: cpu.h,v 1.126 2020/06/19 16:20:22 maxv Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -565,12 +565,6 @@
void cpu_proc_fork(struct proc *, struct proc *);
paddr_t kvtop(void *);
-#ifdef USER_LDT
-/* sys_machdep.h */
-int x86_get_ldt(struct lwp *, void *, register_t *);
-int x86_set_ldt(struct lwp *, void *, register_t *);
-#endif
-
/* isa_machdep.c */
void isa_defaultirq(void);
int isa_nmi(void);
diff -r fef171f4608f -r f16ff6186167 sys/arch/x86/include/sysarch.h
--- a/sys/arch/x86/include/sysarch.h Fri Jun 19 16:11:14 2020 +0000
+++ b/sys/arch/x86/include/sysarch.h Fri Jun 19 16:20:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysarch.h,v 1.14 2018/07/13 09:37:32 maxv Exp $ */
+/* $NetBSD: sysarch.h,v 1.15 2020/06/19 16:20:22 maxv Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -125,11 +125,7 @@
#ifdef _KERNEL
int x86_iopl(struct lwp *, void *, register_t *);
-int x86_get_mtrr(struct lwp *, void *, register_t *);
-int x86_set_mtrr(struct lwp *, void *, register_t *);
-int x86_get_ldt(struct lwp *, void *, register_t *);
int x86_get_ldt1(struct lwp *, struct x86_get_ldt_args *, union descriptor *);
-int x86_set_ldt(struct lwp *, void *, register_t *);
int x86_set_ldt1(struct lwp *, struct x86_set_ldt_args *, union descriptor *);
int x86_set_sdbase(void *, char, lwp_t *, bool);
int x86_get_sdbase(void *, char);
diff -r fef171f4608f -r f16ff6186167 sys/arch/x86/x86/sys_machdep.c
--- a/sys/arch/x86/x86/sys_machdep.c Fri Jun 19 16:11:14 2020 +0000
+++ b/sys/arch/x86/x86/sys_machdep.c Fri Jun 19 16:20:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_machdep.c,v 1.55 2020/04/25 15:26:18 bouyer Exp $ */
+/* $NetBSD: sys_machdep.c,v 1.56 2020/06/19 16:20:22 maxv Exp $ */
/*
* Copyright (c) 1998, 2007, 2009, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.55 2020/04/25 15:26:18 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.56 2020/06/19 16:20:22 maxv Exp $");
#include "opt_mtrr.h"
#include "opt_user_ldt.h"
@@ -75,16 +75,15 @@
extern struct vm_map *kernel_map;
-int x86_get_ioperm(struct lwp *, void *, register_t *);
-int x86_set_ioperm(struct lwp *, void *, register_t *);
-int x86_get_mtrr(struct lwp *, void *, register_t *);
-int x86_set_mtrr(struct lwp *, void *, register_t *);
-int x86_set_sdbase32(void *, char, lwp_t *, bool);
+static int x86_get_ioperm(struct lwp *, void *, register_t *);
+static int x86_set_ioperm(struct lwp *, void *, register_t *);
+static int x86_set_sdbase32(void *, char, lwp_t *, bool);
int x86_set_sdbase(void *, char, lwp_t *, bool);
-int x86_get_sdbase32(void *, char);
+static int x86_get_sdbase32(void *, char);
int x86_get_sdbase(void *, char);
-int
+#ifdef i386
+static int
x86_get_ldt(struct lwp *l, void *args, register_t *retval)
{
#ifndef USER_LDT
@@ -113,6 +112,7 @@
return error;
#endif
}
+#endif
int
x86_get_ldt1(struct lwp *l, struct x86_get_ldt_args *ua, union descriptor *cp)
@@ -175,7 +175,8 @@
#endif
}
-int
+#ifdef i386
+static int
x86_set_ldt(struct lwp *l, void *args, register_t *retval)
{
#ifndef USER_LDT
@@ -201,6 +202,7 @@
return error;
#endif
}
+#endif
int
x86_set_ldt1(struct lwp *l, struct x86_set_ldt_args *ua,
@@ -388,7 +390,7 @@
return 0;
}
-int
+static int
x86_get_ioperm(struct lwp *l, void *args, register_t *retval)
{
#ifdef IOPERM
@@ -421,7 +423,7 @@
#endif
}
-int
+static int
x86_set_ioperm(struct lwp *l, void *args, register_t *retval)
{
#ifdef IOPERM
@@ -467,7 +469,7 @@
#endif
}
-int
+static int
x86_get_mtrr(struct lwp *l, void *args, register_t *retval)
{
#ifdef MTRR
@@ -502,7 +504,7 @@
#endif
}
-int
+static int
x86_set_mtrr(struct lwp *l, void *args, register_t *retval)
{
#ifdef MTRR
@@ -545,7 +547,7 @@
#define segment_descriptor mem_segment_descriptor
#endif
-int
+static int
x86_set_sdbase32(void *arg, char which, lwp_t *l, bool direct)
{
struct trapframe *tf = l->l_md.md_regs;
@@ -644,7 +646,7 @@
#endif
}
-int
+static int
x86_get_sdbase32(void *arg, char which)
{
struct segment_descriptor *sd;
Home |
Main Index |
Thread Index |
Old Index