Module Name:    src
Committed By:   maxv
Date:           Fri Jun 19 16:20:22 UTC 2020

Modified Files:
        src/sys/arch/x86/include: cpu.h sysarch.h
        src/sys/arch/x86/x86: sys_machdep.c

Log Message:
localify


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x86/include/sysarch.h
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/x86/x86/sys_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/include/cpu.h
diff -u src/sys/arch/x86/include/cpu.h:1.125 src/sys/arch/x86/include/cpu.h:1.126
--- src/sys/arch/x86/include/cpu.h:1.125	Sat May  2 16:44:35 2020
+++ src/sys/arch/x86/include/cpu.h	Fri Jun 19 16:20:22 2020
@@ -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_probe_features(struct cpu_info 
 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);

Index: src/sys/arch/x86/include/sysarch.h
diff -u src/sys/arch/x86/include/sysarch.h:1.14 src/sys/arch/x86/include/sysarch.h:1.15
--- src/sys/arch/x86/include/sysarch.h:1.14	Fri Jul 13 09:37:32 2018
+++ src/sys/arch/x86/include/sysarch.h	Fri Jun 19 16:20:22 2020
@@ -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 @@ struct mtrr;
 
 #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);

Index: src/sys/arch/x86/x86/sys_machdep.c
diff -u src/sys/arch/x86/x86/sys_machdep.c:1.55 src/sys/arch/x86/x86/sys_machdep.c:1.56
--- src/sys/arch/x86/x86/sys_machdep.c:1.55	Sat Apr 25 15:26:18 2020
+++ src/sys/arch/x86/x86/sys_machdep.c	Fri Jun 19 16:20:22 2020
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sys_machdep.
 
 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 @@ x86_get_ldt(struct lwp *l, void *args, r
 	return error;
 #endif
 }
+#endif
 
 int
 x86_get_ldt1(struct lwp *l, struct x86_get_ldt_args *ua, union descriptor *cp)
@@ -175,7 +175,8 @@ x86_get_ldt1(struct lwp *l, struct x86_g
 #endif
 }
 
-int
+#ifdef i386
+static int
 x86_set_ldt(struct lwp *l, void *args, register_t *retval)
 {
 #ifndef USER_LDT
@@ -201,6 +202,7 @@ x86_set_ldt(struct lwp *l, void *args, r
 	return error;
 #endif
 }
+#endif
 
 int
 x86_set_ldt1(struct lwp *l, struct x86_set_ldt_args *ua,
@@ -388,7 +390,7 @@ x86_iopl(struct lwp *l, void *args, regi
 	return 0;
 }
 
-int
+static int
 x86_get_ioperm(struct lwp *l, void *args, register_t *retval)
 {
 #ifdef IOPERM
@@ -421,7 +423,7 @@ x86_get_ioperm(struct lwp *l, void *args
 #endif
 }
 
-int
+static int
 x86_set_ioperm(struct lwp *l, void *args, register_t *retval)
 {
 #ifdef IOPERM
@@ -467,7 +469,7 @@ x86_set_ioperm(struct lwp *l, void *args
 #endif
 }
 
-int
+static int
 x86_get_mtrr(struct lwp *l, void *args, register_t *retval)
 {
 #ifdef MTRR
@@ -502,7 +504,7 @@ x86_get_mtrr(struct lwp *l, void *args, 
 #endif
 }
 
-int
+static int
 x86_set_mtrr(struct lwp *l, void *args, register_t *retval)
 {
 #ifdef MTRR
@@ -545,7 +547,7 @@ x86_set_mtrr(struct lwp *l, void *args, 
 #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 @@ x86_set_sdbase(void *arg, char which, lw
 #endif
 }
 
-int
+static int
 x86_get_sdbase32(void *arg, char which)
 {
 	struct segment_descriptor *sd;

Reply via email to