Re: CVS commit: src/lib/libarch/i386

2017-08-12 Thread Maxime Villard

Le 12/08/2017 à 23:07, matthew green a écrit :

"Maxime Villard" writes:

Module Name:src
Committed By:   maxv
Date:   Sat Aug 12 19:48:28 UTC 2017

Modified Files:
src/lib/libarch/i386: shlib_version

Log Message:
Bump - removal of i386_vm86 and i386_pmc.


i didn't check the build, but this also needs set lists updates
normally.  eg:

base/md.amd64:./usr/lib/i386/libi386.so.1   
base-compat-shlib   compat,pic
base/md.amd64:./usr/lib/i386/libi386.so.1.0 
base-compat-shlib   compat,pic
base/md.i386:./usr/lib/libi386.so.1 base-sys-shlib  
pic
base/md.i386:./usr/lib/libi386.so.1.0   base-sys-shlib  
pic
debug/md.amd64:./usr/libdata/debug/usr/lib/i386/libi386.so.1.0.debug
comp-compat-shlib   compat,pic,debug
debug/md.i386:./usr/libdata/debug/usr/lib/libi386.so.1.0.debug  comp-sys-debug  
pic,debug


Sorry about this. I came back home yesterday just minutes before you sent your
mail, and when I saw it, I just committed the bump without thinking much before
leaving again.

Initially I hesitated about modifying the i386_mtrr API too, hence the delay.

Maxime


CVS commit: src/lib/libarch/i386

2017-08-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 12 19:48:28 UTC 2017

Modified Files:
src/lib/libarch/i386: shlib_version

Log Message:
Bump - removal of i386_vm86 and i386_pmc.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libarch/i386/shlib_version

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

Modified files:

Index: src/lib/libarch/i386/shlib_version
diff -u src/lib/libarch/i386/shlib_version:1.6 src/lib/libarch/i386/shlib_version:1.7
--- src/lib/libarch/i386/shlib_version:1.6	Thu Sep 11 19:19:31 2003
+++ src/lib/libarch/i386/shlib_version	Sat Aug 12 19:48:28 2017
@@ -1,5 +1,5 @@
-#	$NetBSD: shlib_version,v 1.6 2003/09/11 19:19:31 christos Exp $
+#	$NetBSD: shlib_version,v 1.7 2017/08/12 19:48:28 maxv Exp $
 #	Remember to update distrib/sets/lists/base/md.i386 when changing
 #
-major=1
+major=2
 minor=0



CVS commit: src/lib/libarch/i386

2017-08-12 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 12 19:48:28 UTC 2017

Modified Files:
src/lib/libarch/i386: shlib_version

Log Message:
Bump - removal of i386_vm86 and i386_pmc.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libarch/i386/shlib_version

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



CVS commit: src/lib/libarch/i386

2017-08-06 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Aug  6 08:00:40 UTC 2017

Modified Files:
src/lib/libarch/i386: i386_pmc_info.2

Log Message:
Deprecate.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libarch/i386/i386_pmc_info.2

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



CVS commit: src/lib/libarch/i386

2017-08-06 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Aug  6 08:00:40 UTC 2017

Modified Files:
src/lib/libarch/i386: i386_pmc_info.2

Log Message:
Deprecate.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libarch/i386/i386_pmc_info.2

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

Modified files:

Index: src/lib/libarch/i386/i386_pmc_info.2
diff -u src/lib/libarch/i386/i386_pmc_info.2:1.11 src/lib/libarch/i386/i386_pmc_info.2:1.12
--- src/lib/libarch/i386/i386_pmc_info.2:1.11	Wed Apr 30 13:10:50 2008
+++ src/lib/libarch/i386/i386_pmc_info.2	Sun Aug  6 08:00:40 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: i386_pmc_info.2,v 1.11 2008/04/30 13:10:50 martin Exp $
+.\" $NetBSD: i386_pmc_info.2,v 1.12 2017/08/06 08:00:40 maxv Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 10, 2001
+.Dd August 6, 2017
 .Dt I386_PMC_INFO 2 i386
 .Os
 .Sh NAME
@@ -48,110 +48,8 @@
 .Ft int
 .Fn i386_pmc_read "struct i386_pmc_read_args *ra"
 .Sh DESCRIPTION
-These functions provide an interface to the CPU performance counters
-on the 586-class and 686-class processors.
-.Pp
-.Fn i386_pmc_info
-will return information about the available CPU counters.
-The information is returned in
-.Fa ia
-having the following structure:
-.Bd -literal
-struct i386_pmc_info_args {
-int type;
-int flags;
-};
-.Ed
-.Pp
-The
-.Em type
-member describes the class of performance counters available.
-Valid values are:
-.Pp
-.Bl -tag -offset indent -width PMC_INFO_HASTSC -compact
-.It PMC_TYPE_NONE
-No PMC support
-.It PMC_TYPE_I586
-586-class CPUs
-.It PMC_TYPE_I686
-686-class Intel CPUs
-.It PMC_TYPE_K7
-686-class AMD CPUs
-.El
-.Pp
-The
-.Em flags
-member describes additional capabilities of the processor.
-Valid values are:
-.Pp
-.Bl -tag -offset indent -width PMC_INFO_HASTSC -compact
-.It PMC_INFO_HASTSC
-CPU has time-stamp counter
-.El
-.Pp
-.Fn i386_pmc_startstop
-is used to start and stop the measurement of the CPU performance counters.
-The argument
-.Fa ssa
-has the following structure:
-.Bd -literal
-struct i386_pmc_startstop_args {
-int counter;
-uint64_t val;
-uint8_t event;
-uint8_t unit;
-uint8_t compare;
-uint8_t flags;
-};
-.Ed
-.Pp
-The counter specified by the member
-.Em counter
-is started if the member
-.Em flags
-has PMC_SETUP_KERNEL or PMC_SETUP_USER set, otherwise the counter is
-stopped.
-The initial value of the counter is set to
-.Em val .
-Additional values for the
-.Em flags
-member are PMC_SETUP_EDGE and PMC_SETUP_INV.
-The
-.Em event
-member specifies some event written to the control register.
-The
-.Em unit
-member specifies the measurement units.
-The
-.Em compare
-member is a mask for the counter.
-.Pp
-.Fn i386_pmc_read
-will return information about a specific CPU counter measured during
-the last measurement period determined by the calling of
-.Fn i386_pmc_startstop .
-The information is returned in
-.Fa ra
-having the following structure:
-.Bd -literal
-struct i386_pmc_read_args {
-int counter;
-uint64_t val;
-uint64_t time;
-};
-.Ed
-.Pp
-The counter to read should be specified by the
-.Em counter
-member.
-Counters are numbered from 0 to
-.Dv PMC_NCOUNTERS .
-The value of the counter is returned in the
-.Em val
-member.
-The time since epoch, measured in CPU clock cycles, is returned in the
-.Em time
-member.
+These functions used to provide an interface to the CPU performance counters.
+They are now deprecated, and always fail.
 .Sh RETURN VALUES
 Upon successful completion zero is returned, otherwise \-1 is returned
 on failure.



CVS commit: src/lib/libarch/i386

2017-03-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Mar  8 16:09:27 UTC 2017

Modified Files:
src/lib/libarch/i386: i386_pmc.c

Log Message:
Deprecate the pmc functions in libi386. The parameters will be updated,
and we are not interested in maintaining this anyway. Now i386's pmc
interface is opaque, which is good.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libarch/i386/i386_pmc.c

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

Modified files:

Index: src/lib/libarch/i386/i386_pmc.c
diff -u src/lib/libarch/i386/i386_pmc.c:1.3 src/lib/libarch/i386/i386_pmc.c:1.4
--- src/lib/libarch/i386/i386_pmc.c:1.3	Wed Sep 13 05:22:12 2000
+++ src/lib/libarch/i386/i386_pmc.c	Wed Mar  8 16:09:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_pmc.c,v 1.3 2000/09/13 05:22:12 thorpej Exp $	*/
+/*	$NetBSD: i386_pmc.c,v 1.4 2017/03/08 16:09:27 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -44,29 +44,17 @@
 int
 i386_pmc_info(struct i386_pmc_info_args *args)
 {
-
-	if (sysarch(I386_PMC_INFO, args) == -1)
-		return (-1);
-
-	return (0);
+	return -1;
 }
 
 int
 i386_pmc_startstop(struct i386_pmc_startstop_args *args)
 {
-
-	if (sysarch(I386_PMC_STARTSTOP, args) == -1)
-		return (-1);
-
-	return (0);
+	return -1;
 }
 
 int
 i386_pmc_read(struct i386_pmc_read_args *args)
 {
-
-	if (sysarch(I386_PMC_READ, args) == -1)
-		return (-1);
-
-	return (0);
+	return -1;
 }



CVS commit: src/lib/libarch/i386

2017-03-08 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Mar  8 16:09:27 UTC 2017

Modified Files:
src/lib/libarch/i386: i386_pmc.c

Log Message:
Deprecate the pmc functions in libi386. The parameters will be updated,
and we are not interested in maintaining this anyway. Now i386's pmc
interface is opaque, which is good.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libarch/i386/i386_pmc.c

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



CVS commit: src/lib/libarch/i386

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 21:37:29 UTC 2012

Modified Files:
src/lib/libarch/i386: i386_get_ioperm.c i386_get_ldt.c i386_iopl.c
i386_set_ioperm.c i386_set_ldt.c i386_vm86.c

Log Message:
c89 prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libarch/i386/i386_get_ioperm.c \
src/lib/libarch/i386/i386_get_ldt.c \
src/lib/libarch/i386/i386_set_ioperm.c \
src/lib/libarch/i386/i386_set_ldt.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libarch/i386/i386_iopl.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libarch/i386/i386_vm86.c

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

Modified files:

Index: src/lib/libarch/i386/i386_get_ioperm.c
diff -u src/lib/libarch/i386/i386_get_ioperm.c:1.6 src/lib/libarch/i386/i386_get_ioperm.c:1.7
--- src/lib/libarch/i386/i386_get_ioperm.c:1.6	Mon Apr 28 16:22:55 2008
+++ src/lib/libarch/i386/i386_get_ioperm.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_get_ioperm.c,v 1.6 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: i386_get_ioperm.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,8 +37,7 @@
 int i386_get_ioperm(u_long *);
 
 int
-i386_get_ioperm(iomap)
-	u_long *iomap;
+i386_get_ioperm(u_long *iomap)
 {
 	struct i386_get_ioperm_args p;
 
Index: src/lib/libarch/i386/i386_get_ldt.c
diff -u src/lib/libarch/i386/i386_get_ldt.c:1.6 src/lib/libarch/i386/i386_get_ldt.c:1.7
--- src/lib/libarch/i386/i386_get_ldt.c:1.6	Fri Jul  2 11:14:07 1999
+++ src/lib/libarch/i386/i386_get_ldt.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_get_ldt.c,v 1.6 1999/07/02 15:14:07 simonb Exp $	*/
+/*	$NetBSD: i386_get_ldt.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*
  *  Copyright (c) 1993 John Brezak
@@ -36,10 +36,7 @@
 #include machine/sysarch.h
 
 int
-i386_get_ldt(start, desc, num)
-	int start;
-	union descriptor *desc;
-	int num;
+i386_get_ldt(int start, union descriptor *desc, int num)
 {
 	struct i386_get_ldt_args p;
 
Index: src/lib/libarch/i386/i386_set_ioperm.c
diff -u src/lib/libarch/i386/i386_set_ioperm.c:1.6 src/lib/libarch/i386/i386_set_ioperm.c:1.7
--- src/lib/libarch/i386/i386_set_ioperm.c:1.6	Mon Apr 28 16:22:55 2008
+++ src/lib/libarch/i386/i386_set_ioperm.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_set_ioperm.c,v 1.6 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: i386_set_ioperm.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,8 +37,7 @@
 int i386_set_ioperm(u_long *);
 
 int
-i386_set_ioperm(iomap)
-	u_long *iomap;
+i386_set_ioperm(u_long *iomap)
 {
 	struct i386_set_ioperm_args p;
 
Index: src/lib/libarch/i386/i386_set_ldt.c
diff -u src/lib/libarch/i386/i386_set_ldt.c:1.6 src/lib/libarch/i386/i386_set_ldt.c:1.7
--- src/lib/libarch/i386/i386_set_ldt.c:1.6	Fri Jul  2 11:14:07 1999
+++ src/lib/libarch/i386/i386_set_ldt.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_set_ldt.c,v 1.6 1999/07/02 15:14:07 simonb Exp $	*/
+/*	$NetBSD: i386_set_ldt.c,v 1.7 2012/03/21 21:37:29 christos Exp $	*/
 
 /*
  *  Copyright (c) 1993 John Brezak
@@ -36,10 +36,7 @@
 #include machine/sysarch.h
 
 int
-i386_set_ldt(start, desc, num)
-	int start;
-	union descriptor *desc;
-	int num;
+i386_set_ldt(int start, union descriptor *desc, int num)
 {
 	struct i386_set_ldt_args p;
 

Index: src/lib/libarch/i386/i386_iopl.c
diff -u src/lib/libarch/i386/i386_iopl.c:1.5 src/lib/libarch/i386/i386_iopl.c:1.6
--- src/lib/libarch/i386/i386_iopl.c:1.5	Mon Apr 28 16:22:55 2008
+++ src/lib/libarch/i386/i386_iopl.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_iopl.c,v 1.5 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: i386_iopl.c,v 1.6 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -35,8 +35,7 @@
 #include machine/sysarch.h
 
 int
-i386_iopl(iopl)
-	int iopl;
+i386_iopl(int iopl)
 {
 	struct i386_iopl_args p;
 

Index: src/lib/libarch/i386/i386_vm86.c
diff -u src/lib/libarch/i386/i386_vm86.c:1.9 src/lib/libarch/i386/i386_vm86.c:1.10
--- src/lib/libarch/i386/i386_vm86.c:1.9	Sun Oct 26 03:05:00 2008
+++ src/lib/libarch/i386/i386_vm86.c	Wed Mar 21 17:37:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386_vm86.c,v 1.9 2008/10/26 07:05:00 mrg Exp $	*/
+/*	$NetBSD: i386_vm86.c,v 1.10 2012/03/21 21:37:29 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -38,8 +38,7 @@
 #include i386/vm86.h
 
 int
-i386_vm86(vmcp)
-	struct vm86_struct *vmcp;
+i386_vm86(struct vm86_struct *vmcp)
 {
 
 	return sysarch(I386_VM86, (void *)vmcp);



CVS commit: src/lib/libarch/i386

2012-03-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 21 21:37:29 UTC 2012

Modified Files:
src/lib/libarch/i386: i386_get_ioperm.c i386_get_ldt.c i386_iopl.c
i386_set_ioperm.c i386_set_ldt.c i386_vm86.c

Log Message:
c89 prototypes


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libarch/i386/i386_get_ioperm.c \
src/lib/libarch/i386/i386_get_ldt.c \
src/lib/libarch/i386/i386_set_ioperm.c \
src/lib/libarch/i386/i386_set_ldt.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libarch/i386/i386_iopl.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libarch/i386/i386_vm86.c

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