CVS commit: src/sys/arch/sparc64/dev

2021-01-06 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Thu Jan  7 07:40:39 UTC 2021

Modified Files:
src/sys/arch/sparc64/dev: psycho.c

Log Message:
The "available" property requires a variable length buffer, so
leave free(9) until prom_getprop is changed to use kmem_alloc(9)
instead of malloc(9).


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/sparc64/dev/psycho.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/sparc64/dev/psycho.c
diff -u src/sys/arch/sparc64/dev/psycho.c:1.130 src/sys/arch/sparc64/dev/psycho.c:1.131
--- src/sys/arch/sparc64/dev/psycho.c:1.130	Wed Jan  6 20:04:30 2021
+++ src/sys/arch/sparc64/dev/psycho.c	Thu Jan  7 07:40:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $	*/
+/*	$NetBSD: psycho.c,v 1.131 2021/01/07 07:40:39 nakayama Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -55,7 +55,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.131 2021/01/07 07:40:39 nakayama Exp $");
 
 #include "opt_ddb.h"
 
@@ -81,6 +81,7 @@ int psycho_debug = 0x0;
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -769,7 +770,7 @@ psycho_alloc_chipset(struct psycho_pbm *
 static struct extent *
 psycho_alloc_extent(struct psycho_pbm *pp, int node, int ss, const char *name)
 {
-	struct psycho_registers *pa = kmem_zalloc(sizeof *pa, KM_SLEEP);
+	struct psycho_registers *pa = NULL;
 	struct psycho_ranges *pr;
 	struct extent *ex;
 	bus_addr_t baddr, addr;
@@ -833,7 +834,7 @@ psycho_alloc_extent(struct psycho_pbm *p
 
 ret:
 	/* return extent */
-	kmem_free(pa, sizeof(*pa));
+	free(pa, M_DEVBUF);
 	return ex;
 }
 



CVS commit: src/tests/usr.bin/xlint/lint1

2021-01-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Thu Jan  7 00:38:46 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_093.c msg_093.exp msg_094.c
msg_094.exp msg_095.c msg_095.exp msg_096.c msg_096.exp msg_097.c
msg_097.exp msg_098.c msg_098.exp msg_099.c msg_099.exp

Log Message:
lint: add tests for messages 93, 94, 95, 96, 97, 98, 99


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/msg_093.c \
src/tests/usr.bin/xlint/lint1/msg_093.exp \
src/tests/usr.bin/xlint/lint1/msg_094.c \
src/tests/usr.bin/xlint/lint1/msg_094.exp \
src/tests/usr.bin/xlint/lint1/msg_095.c \
src/tests/usr.bin/xlint/lint1/msg_095.exp \
src/tests/usr.bin/xlint/lint1/msg_096.c \
src/tests/usr.bin/xlint/lint1/msg_096.exp \
src/tests/usr.bin/xlint/lint1/msg_097.c \
src/tests/usr.bin/xlint/lint1/msg_097.exp \
src/tests/usr.bin/xlint/lint1/msg_098.c \
src/tests/usr.bin/xlint/lint1/msg_098.exp \
src/tests/usr.bin/xlint/lint1/msg_099.c \
src/tests/usr.bin/xlint/lint1/msg_099.exp

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_093.c
diff -u src/tests/usr.bin/xlint/lint1/msg_093.c:1.1 src/tests/usr.bin/xlint/lint1/msg_093.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_093.c:1.1	Sat Jan  2 10:22:43 2021
+++ src/tests/usr.bin/xlint/lint1/msg_093.c	Thu Jan  7 00:38:46 2021
@@ -1,7 +1,12 @@
-/*	$NetBSD: msg_093.c,v 1.1 2021/01/02 10:22:43 rillig Exp $	*/
+/*	$NetBSD: msg_093.c,v 1.2 2021/01/07 00:38:46 rillig Exp $	*/
 # 3 "msg_093.c"
 
 // Test for message: dubious static function at block level: %s [93]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+void
+example(void)
+{
+	static void nested(void);
+
+	nested();
+}
Index: src/tests/usr.bin/xlint/lint1/msg_093.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_093.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_093.exp:1.2
--- src/tests/usr.bin/xlint/lint1/msg_093.exp:1.1	Sat Jan  2 10:22:43 2021
+++ src/tests/usr.bin/xlint/lint1/msg_093.exp	Thu Jan  7 00:38:46 2021
@@ -1 +1 @@
-msg_093.c(6): syntax error ':' [249]
+msg_093.c(9): warning: dubious static function at block level: nested [93]
Index: src/tests/usr.bin/xlint/lint1/msg_094.c
diff -u src/tests/usr.bin/xlint/lint1/msg_094.c:1.1 src/tests/usr.bin/xlint/lint1/msg_094.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_094.c:1.1	Sat Jan  2 10:22:43 2021
+++ src/tests/usr.bin/xlint/lint1/msg_094.c	Thu Jan  7 00:38:46 2021
@@ -1,7 +1,12 @@
-/*	$NetBSD: msg_094.c,v 1.1 2021/01/02 10:22:43 rillig Exp $	*/
+/*	$NetBSD: msg_094.c,v 1.2 2021/01/07 00:38:46 rillig Exp $	*/
 # 3 "msg_094.c"
 
 // Test for message: function has illegal storage class: %s [94]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+register int
+global_example(int arg)
+{
+	register int register_example(int);
+
+	return arg;
+}
Index: src/tests/usr.bin/xlint/lint1/msg_094.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_094.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_094.exp:1.2
--- src/tests/usr.bin/xlint/lint1/msg_094.exp:1.1	Sat Jan  2 10:22:43 2021
+++ src/tests/usr.bin/xlint/lint1/msg_094.exp	Thu Jan  7 00:38:46 2021
@@ -1 +1,2 @@
-msg_094.c(6): syntax error ':' [249]
+msg_094.c(7): illegal storage class [8]
+msg_094.c(9): function has illegal storage class: register_example [94]
Index: src/tests/usr.bin/xlint/lint1/msg_095.c
diff -u src/tests/usr.bin/xlint/lint1/msg_095.c:1.1 src/tests/usr.bin/xlint/lint1/msg_095.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_095.c:1.1	Sat Jan  2 10:22:43 2021
+++ src/tests/usr.bin/xlint/lint1/msg_095.c	Thu Jan  7 00:38:46 2021
@@ -1,7 +1,19 @@
-/*	$NetBSD: msg_095.c,v 1.1 2021/01/02 10:22:43 rillig Exp $	*/
+/*	$NetBSD: msg_095.c,v 1.2 2021/01/07 00:38:46 rillig Exp $	*/
 # 3 "msg_095.c"
 
 // Test for message: declaration hides earlier one: %s [95]
 
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+/* lint1-flags: -ghSw */
+
+int identifier;
+
+int
+example(int identifier)
+{
+
+	{
+		int identifier = 3;
+	}
+
+	return identifier;
+}
Index: src/tests/usr.bin/xlint/lint1/msg_095.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_095.exp:1.1 src/tests/usr.bin/xlint/lint1/msg_095.exp:1.2
--- src/tests/usr.bin/xlint/lint1/msg_095.exp:1.1	Sat Jan  2 10:22:43 2021
+++ src/tests/usr.bin/xlint/lint1/msg_095.exp	Thu Jan  7 00:38:46 2021
@@ -1 +1 @@
-msg_095.c(6): syntax error ':' [249]
+msg_095.c(15): warning: declaration hides earlier one: identifier [95]
Index: src/tests/usr.bin/xlint/lint1/msg_096.c
diff -u src/tests/usr.bin/xlint/lint1/msg_096.c:1.1 src/tests/usr.bin/xlint/lint1/msg_096.c:1.2
--- src/tests/usr.bin/xlint/lint1/msg_096.c:1.1	Sat Jan  2 10:22:43 2021
+++ 

CVS commit: src/bin/df

2021-01-06 Thread Brian Ginsbach
Module Name:src
Committed By:   ginsbach
Date:   Wed Jan  6 20:38:09 UTC 2021

Modified Files:
src/bin/df: df.1

Log Message:
df: bump man page date


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/bin/df/df.1

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

Modified files:

Index: src/bin/df/df.1
diff -u src/bin/df/df.1:1.55 src/bin/df/df.1:1.56
--- src/bin/df/df.1:1.55	Sun Jan  3 01:43:12 2021
+++ src/bin/df/df.1	Wed Jan  6 20:38:09 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: df.1,v 1.55 2021/01/03 01:43:12 ginsbach Exp $
+.\"	$NetBSD: df.1,v 1.56 2021/01/06 20:38:09 ginsbach Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)df.1	8.2 (Berkeley) 1/13/92
 .\"
-.Dd September 23, 2019
+.Dd January 2, 2021
 .Dt DF 1
 .Os
 .Sh NAME



CVS commit: src/sys/arch/sparc64/dev

2021-01-06 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Wed Jan  6 20:04:30 UTC 2021

Modified Files:
src/sys/arch/sparc64/dev: psycho.c

Log Message:
psycho: explicit allocation of memory using kmem(9) instead of using the buffer 
indirectly allocted in the prom_getprop() function (which is still using 
malloc(9) for memory allocation


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/arch/sparc64/dev/psycho.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/sparc64/dev/psycho.c
diff -u src/sys/arch/sparc64/dev/psycho.c:1.129 src/sys/arch/sparc64/dev/psycho.c:1.130
--- src/sys/arch/sparc64/dev/psycho.c:1.129	Mon Jan  4 14:48:51 2021
+++ src/sys/arch/sparc64/dev/psycho.c	Wed Jan  6 20:04:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: psycho.c,v 1.129 2021/01/04 14:48:51 thorpej Exp $	*/
+/*	$NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -55,7 +55,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.129 2021/01/04 14:48:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $");
 
 #include "opt_ddb.h"
 
@@ -769,7 +769,7 @@ psycho_alloc_chipset(struct psycho_pbm *
 static struct extent *
 psycho_alloc_extent(struct psycho_pbm *pp, int node, int ss, const char *name)
 {
-	struct psycho_registers *pa = NULL;
+	struct psycho_registers *pa = kmem_zalloc(sizeof *pa, KM_SLEEP);
 	struct psycho_ranges *pr;
 	struct extent *ex;
 	bus_addr_t baddr, addr;



CVS commit: src/share/man/man4

2021-01-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan  6 18:05:58 UTC 2021

Modified Files:
src/share/man/man4: dk.4

Log Message:
Simplify macro usage.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/dk.4

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

Modified files:

Index: src/share/man/man4/dk.4
diff -u src/share/man/man4/dk.4:1.12 src/share/man/man4/dk.4:1.13
--- src/share/man/man4/dk.4:1.12	Wed Jan  6 17:22:36 2021
+++ src/share/man/man4/dk.4	Wed Jan  6 18:05:58 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dk.4,v 1.12 2021/01/06 17:22:36 pgoyette Exp $
+.\"	$NetBSD: dk.4,v 1.13 2021/01/06 18:05:58 wiz Exp $
 .\"
 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -80,16 +80,16 @@ a wedge is created and named after the
 field followed by
 .Sq \&/
 and the partition letter
-.So a Sc Ns \&.. Ns So p Sc Ns \&.
+.So a Sc Ns \&.. Ns So p Sc .
 .Pp
 When the
 .Va d_packname
 is empty or has the value
-.Do fictitious Dc Ns \&,
+.Dq fictitious ,
 the regular partition names
 are used as wedge names, i.e. the device name, unit number and
 partition letter, for example
-.Do wd0a Dc Ns \&.
+.Dq wd0a .
 .It Dv DKWEDGE_METHOD_GPT
 Extensible Firmware Interface Globally Unique Identifier Partition Table
 (GPT) detection method.
@@ -105,11 +105,11 @@ with support for Extended MBRs.
 For every partition in the MBR a wedge is created and named like a
 regular partition name, i.e. the device name, unit number and a
 partition letter, for example
-.Do wd0e Dc Ns \&.
+.Dq wd0e .
 Primary partitions start with
-.So e Sc Ns \&,
+.Sq e ,
 extended partitions start with
-.So i Sc Ns \&.
+.Sq i .
 .It Dv DKWEDGE_METHOD_RDB
 Amiga Rigid Disk Block (RDB) partitioning detection method.
 .It Dv DKWEDGE_METHOD_APPLE



CVS commit: src/share/man/man4

2021-01-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Jan  6 17:22:36 UTC 2021

Modified Files:
src/share/man/man4: dk.4

Log Message:
Grammar fix for the grammer fix.  Plural subject needs plural verb.  :)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/dk.4

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

Modified files:

Index: src/share/man/man4/dk.4
diff -u src/share/man/man4/dk.4:1.11 src/share/man/man4/dk.4:1.12
--- src/share/man/man4/dk.4:1.11	Wed Jan  6 17:13:23 2021
+++ src/share/man/man4/dk.4	Wed Jan  6 17:22:36 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dk.4,v 1.11 2021/01/06 17:13:23 kre Exp $
+.\"	$NetBSD: dk.4,v 1.12 2021/01/06 17:22:36 pgoyette Exp $
 .\"
 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -54,7 +54,7 @@ Wedges may be configured manually with
 .Xr dkctl 8
 or automatically by the kernel upon the attachment of the physical disk.
 .Pp
-Wedges need to have a unique name.
+Wedges need to have unique names.
 If a duplicate name is detected during
 auto-discovery, that partition is ignored.
 .Sh KERNEL OPTIONS



CVS commit: src/share/man/man4

2021-01-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jan  6 17:13:23 UTC 2021

Modified Files:
src/share/man/man4: dk.4

Log Message:
Minor grammar fix, more markup, and update date (Dd).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/dk.4

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

Modified files:

Index: src/share/man/man4/dk.4
diff -u src/share/man/man4/dk.4:1.10 src/share/man/man4/dk.4:1.11
--- src/share/man/man4/dk.4:1.10	Wed Jan  6 14:07:43 2021
+++ src/share/man/man4/dk.4	Wed Jan  6 17:13:23 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dk.4,v 1.10 2021/01/06 14:07:43 wiz Exp $
+.\"	$NetBSD: dk.4,v 1.11 2021/01/06 17:13:23 kre Exp $
 .\"
 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\" Jonathan A. Kollasch used vnd(4) as the template for this man page.
 .\"
-.Dd October 26, 2020
+.Dd January 6, 2021
 .Dt DK 4
 .Os
 .Sh NAME
@@ -54,7 +54,7 @@ Wedges may be configured manually with
 .Xr dkctl 8
 or automatically by the kernel upon the attachment of the physical disk.
 .Pp
-Wedges needs to have a unique name.
+Wedges need to have a unique name.
 If a duplicate name is detected during
 auto-discovery, that partition is ignored.
 .Sh KERNEL OPTIONS
@@ -77,13 +77,19 @@ that is not of type
 .Dv FS_UNUSED ,
 a wedge is created and named after the
 .Va d_packname
-field followed by "/" and the partition letter a..p.
+field followed by
+.Sq \&/
+and the partition letter
+.So a Sc Ns \&.. Ns So p Sc Ns \&.
 .Pp
 When the
 .Va d_packname
-is empty or has the value "fictitious", the regular partition names
+is empty or has the value
+.Do fictitious Dc Ns \&,
+the regular partition names
 are used as wedge names, i.e. the device name, unit number and
-partition letter, for example "wd0a".
+partition letter, for example
+.Do wd0a Dc Ns \&.
 .It Dv DKWEDGE_METHOD_GPT
 Extensible Firmware Interface Globally Unique Identifier Partition Table
 (GPT) detection method.
@@ -98,8 +104,12 @@ with support for Extended MBRs.
 .Pp
 For every partition in the MBR a wedge is created and named like a
 regular partition name, i.e. the device name, unit number and a
-partition letter, for example "wd0e".
-Primary partitions start with "e", extended partitions start with "i".
+partition letter, for example
+.Do wd0e Dc Ns \&.
+Primary partitions start with
+.So e Sc Ns \&,
+extended partitions start with
+.So i Sc Ns \&.
 .It Dv DKWEDGE_METHOD_RDB
 Amiga Rigid Disk Block (RDB) partitioning detection method.
 .It Dv DKWEDGE_METHOD_APPLE



CVS commit: src/share/man/man4

2021-01-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan  6 14:07:43 UTC 2021

Modified Files:
src/share/man/man4: dk.4

Log Message:
Add some paragraph breaks.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/dk.4

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

Modified files:

Index: src/share/man/man4/dk.4
diff -u src/share/man/man4/dk.4:1.9 src/share/man/man4/dk.4:1.10
--- src/share/man/man4/dk.4:1.9	Wed Jan  6 10:19:27 2021
+++ src/share/man/man4/dk.4	Wed Jan  6 14:07:43 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dk.4,v 1.9 2021/01/06 10:19:27 wiz Exp $
+.\"	$NetBSD: dk.4,v 1.10 2021/01/06 14:07:43 wiz Exp $
 .\"
 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -53,6 +53,7 @@ to an area of a physical disk.
 Wedges may be configured manually with
 .Xr dkctl 8
 or automatically by the kernel upon the attachment of the physical disk.
+.Pp
 Wedges needs to have a unique name.
 If a duplicate name is detected during
 auto-discovery, that partition is ignored.
@@ -60,11 +61,13 @@ auto-discovery, that partition is ignore
 .Bl -tag -width DKWEDGE_METHOD_BSDLABEL
 .It Dv DKWEDGE_AUTODISCOVER
 Automatically detect and configure wedges using any available methods.
+.Pp
 Currently only
 .Dv DKWEDGE_METHOD_GPT
 and
 .Dv DKWEDGE_METHOD_APPLE
 are enabled by default.
+.Pp
 For each partition found, a wedge with a corresponding name is created.
 .It Dv DKWEDGE_METHOD_BSDLABEL
 BSD disklabel detection method.
@@ -75,6 +78,7 @@ that is not of type
 a wedge is created and named after the
 .Va d_packname
 field followed by "/" and the partition letter a..p.
+.Pp
 When the
 .Va d_packname
 is empty or has the value "fictitious", the regular partition names
@@ -83,6 +87,7 @@ partition letter, for example "wd0a".
 .It Dv DKWEDGE_METHOD_GPT
 Extensible Firmware Interface Globally Unique Identifier Partition Table
 (GPT) detection method.
+.Pp
 For every GPT partition a wedge is created and named after the
 partition label.
 GPT partitions are UTF-16-encoded, this is converted into UTF-8.
@@ -90,6 +95,7 @@ If a partition has no label, its UUID is
 .It Dv DKWEDGE_METHOD_MBR
 IBM PC-compatible Master Boot Record (MBR) partitioning detection method,
 with support for Extended MBRs.
+.Pp
 For every partition in the MBR a wedge is created and named like a
 regular partition name, i.e. the device name, unit number and a
 partition letter, for example "wd0e".



CVS commit: src/sys/arch/amiga/dev

2021-01-06 Thread Jukka Andberg
Module Name:src
Committed By:   jandberg
Date:   Wed Jan  6 13:00:51 UTC 2021

Modified Files:
src/sys/arch/amiga/dev: amidisplaycc.c

Log Message:
Implement the WSDISPLAYIO_GET_FBINFO ioctl, needed by X wsfb driver.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amiga/dev/amidisplaycc.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/amiga/dev/amidisplaycc.c
diff -u src/sys/arch/amiga/dev/amidisplaycc.c:1.32 src/sys/arch/amiga/dev/amidisplaycc.c:1.33
--- src/sys/arch/amiga/dev/amidisplaycc.c:1.32	Mon Sep  3 16:29:22 2018
+++ src/sys/arch/amiga/dev/amidisplaycc.c	Wed Jan  6 13:00:51 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: amidisplaycc.c,v 1.32 2018/09/03 16:29:22 riastradh Exp $ */
+/*	$NetBSD: amidisplaycc.c,v 1.33 2021/01/06 13:00:51 jandberg Exp $ */
 
 /*-
  * Copyright (c) 2000 Jukka Andberg.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.32 2018/09/03 16:29:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.33 2021/01/06 13:00:51 jandberg Exp $");
 
 /*
  * wscons interface to amiga custom chips. Contains the necessary functions
@@ -116,7 +116,9 @@ static int amidisplaycc_setemulcmap(stru
 static int amidisplaycc_cmapioctl(view_t *, u_long, struct wsdisplay_cmap *);
 static int amidisplaycc_setcmap(view_t *, struct wsdisplay_cmap *);
 static int amidisplaycc_getcmap(view_t *, struct wsdisplay_cmap *);
-static int amidisplaycc_gfxscreen(struct amidisplaycc_softc *, int);
+static int amidisplaycc_setgfxview(struct amidisplaycc_softc *, int);
+static void amidisplaycc_initgfxview(struct amidisplaycc_softc *);
+static int amidisplaycc_getfbinfo(struct amidisplaycc_softc *, struct wsdisplayio_fbinfo *);
 
 static int amidisplaycc_setfont(struct amidisplaycc_screen *, const char *);
 static const struct wsdisplay_font * amidisplaycc_getbuiltinfont(void);
@@ -365,8 +367,6 @@ amidisplaycc_cninit(struct consdev  * cd
 	int x;
 	int y;
 
-	/* Yeah, we got the console! */
-
 	/*
 	 * This will do the basic stuff we also need.
 	 */
@@ -1042,9 +1042,9 @@ amidisplaycc_ioctl(void *dp, void *vs, u
 
 	case WSDISPLAYIO_SMODE:
 		if (INTDATA == WSDISPLAYIO_MODE_EMUL)
-			return amidisplaycc_gfxscreen(adp, 0);
+			return amidisplaycc_setgfxview(adp, 0);
 		if (INTDATA == WSDISPLAYIO_MODE_MAPPED)
-			return amidisplaycc_gfxscreen(adp, 1);
+			return amidisplaycc_setgfxview(adp, 1);
 		return (EINVAL);
 
 	case WSDISPLAYIO_GINFO:
@@ -1059,6 +1059,9 @@ amidisplaycc_ioctl(void *dp, void *vs, u
 		return (amidisplaycc_cmapioctl(adp->gfxview,
 	   cmd,
 	   (struct wsdisplay_cmap*)data));
+	case WSDISPLAYIO_GET_FBINFO:
+		amidisplaycc_initgfxview(adp);
+		return amidisplaycc_getfbinfo(adp, data);
 	}
 
 	return (EPASSTHROUGH);
@@ -1068,6 +1071,52 @@ amidisplaycc_ioctl(void *dp, void *vs, u
 #undef FBINFO
 }
 
+static int
+amidisplaycc_getfbinfo(struct amidisplaycc_softc *adp, struct wsdisplayio_fbinfo *fbinfo)
+{
+	bmap_t *bm;
+
+	KASSERT(adp);
+
+	if (adp->gfxview == NULL) {
+		return ENOMEM;
+	}
+
+	bm = adp->gfxview->bitmap;
+	KASSERT(bm);
+
+	/* Depth 1 since current X wsfb driver doesn't support multiple bitplanes */
+	memset(fbinfo, 0, sizeof(*fbinfo));
+	fbinfo->fbi_fbsize = bm->bytes_per_row * bm->rows;
+	fbinfo->fbi_fboffset = 0;
+	fbinfo->fbi_width = bm->bytes_per_row * 8;
+	fbinfo->fbi_height = bm->rows;
+	fbinfo->fbi_stride = bm->bytes_per_row;
+	fbinfo->fbi_bitsperpixel = 1;
+	fbinfo->fbi_pixeltype = WSFB_CI;
+	fbinfo->fbi_flags = 0;
+	fbinfo->fbi_subtype.fbi_cmapinfo.cmap_entries = 1 << adp->gfxdepth;
+
+	return (0);
+}
+
+/*
+ * Initialize (but not display) the view used for graphics.
+ */
+static void
+amidisplaycc_initgfxview(struct amidisplaycc_softc *adp)
+{
+	dimen_t dimension;
+
+	if (adp->gfxview == NULL) {
+		/* First time here, create the screen */
+		dimension.width = adp->gfxwidth;
+		dimension.height = adp->gfxheight;
+		adp->gfxview = grf_alloc_view(NULL,
+			,
+			adp->gfxdepth);
+	}
+}
 
 /*
  * Switch to either emulation (text) or mapped (graphics) mode
@@ -1076,12 +1125,9 @@ amidisplaycc_ioctl(void *dp, void *vs, u
  *
  * Once the extra screen is created, it never goes away.
  */
-
 static int
-amidisplaycc_gfxscreen(struct amidisplaycc_softc *adp, int on)
+amidisplaycc_setgfxview(struct amidisplaycc_softc *adp, int on)
 {
-	dimen_t  dimension;
-
 	dprintf("amidisplaycc: switching to %s mode.\n",
 		on ? "mapped" : "emul");
 
@@ -1105,22 +1151,7 @@ amidisplaycc_gfxscreen(struct amidisplay
 	}
 
 	/* switch to mapped mode then */
-
-	if (adp->gfxview == NULL) {
-		/* First time here, create the screen */
-
-		dimension.width = adp->gfxwidth;
-		dimension.height = adp->gfxheight;
-
-		dprintf("amidisplaycc: preparing mapped screen %dx%dx%d\n",
-			dimension.width,
-			dimension.height,
-			adp->gfxdepth);
-
-		adp->gfxview = grf_alloc_view(NULL,
-	  ,
-	  

CVS commit: src/share/man/man4

2021-01-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jan  6 10:19:27 UTC 2021

Modified Files:
src/share/man/man4: dk.4

Log Message:
Markup improvements and typo fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/dk.4

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

Modified files:

Index: src/share/man/man4/dk.4
diff -u src/share/man/man4/dk.4:1.8 src/share/man/man4/dk.4:1.9
--- src/share/man/man4/dk.4:1.8	Tue Jan  5 22:17:40 2021
+++ src/share/man/man4/dk.4	Wed Jan  6 10:19:27 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dk.4,v 1.8 2021/01/05 22:17:40 mlelstv Exp $
+.\"	$NetBSD: dk.4,v 1.9 2021/01/06 10:19:27 wiz Exp $
 .\"
 .\" Copyright (c) 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -53,48 +53,46 @@ to an area of a physical disk.
 Wedges may be configured manually with
 .Xr dkctl 8
 or automatically by the kernel upon the attachment of the physical disk.
-
-Wedges needs to have a unique name. If a duplicate name is detected during
-autodiscovery, that partition is ignored.
+Wedges needs to have a unique name.
+If a duplicate name is detected during
+auto-discovery, that partition is ignored.
 .Sh KERNEL OPTIONS
 .Bl -tag -width DKWEDGE_METHOD_BSDLABEL
 .It Dv DKWEDGE_AUTODISCOVER
 Automatically detect and configure wedges using any available methods.
-Currently only DKWEDGE_METHOD_GPT and DKWEDGE_METHOD_APPLE are enabled
-by default.
-
+Currently only
+.Dv DKWEDGE_METHOD_GPT
+and
+.Dv DKWEDGE_METHOD_APPLE
+are enabled by default.
 For each partition found, a wedge with a corresponding name is created.
 .It Dv DKWEDGE_METHOD_BSDLABEL
 BSD disklabel detection method.
-
 For each configured partition in the
 .Xr disklabel 5
 that is not of type
-.Va FS_UNUSED,
+.Dv FS_UNUSED ,
 a wedge is created and named after the
 .Va d_packname
 field followed by "/" and the partition letter a..p.
-
 When the
 .Va d_packname
-is empty or has the value "fictitious" the regular partition names
+is empty or has the value "fictitious", the regular partition names
 are used as wedge names, i.e. the device name, unit number and
 partition letter, for example "wd0a".
 .It Dv DKWEDGE_METHOD_GPT
 Extensible Firmware Interface Globally Unique Identifier Partition Table
 (GPT) detection method.
-
 For every GPT partition a wedge is created and named after the
 partition label.
 GPT partitions are UTF-16-encoded, this is converted into UTF-8.
-If a partition has no label, it's UUID is used instead.
+If a partition has no label, its UUID is used instead.
 .It Dv DKWEDGE_METHOD_MBR
 IBM PC-compatible Master Boot Record (MBR) partitioning detection method,
 with support for Extended MBRs.
-
 For every partition in the MBR a wedge is created and named like a
 regular partition name, i.e. the device name, unit number and a
-parititon letter, for example "wd0e".
+partition letter, for example "wd0e".
 Primary partitions start with "e", extended partitions start with "i".
 .It Dv DKWEDGE_METHOD_RDB
 Amiga Rigid Disk Block (RDB) partitioning detection method.



CVS commit: src/tests/usr.bin/xlint/lint1

2021-01-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jan  6 09:23:05 UTC 2021

Modified Files:
src/tests/usr.bin/xlint/lint1: msg_324.c msg_324.exp

Log Message:
lint: fix test for message 324 on i386

i386 is an ILP32 platform (arch/i386/targparam.h).  On these platforms,
int and long have the same size, and even with the -p option for
portability checks, INT_RSIZE in inittyp.c is defined to 4, not 3.

Because of this, in check_integer_conversion, psize(nt) was not greater
than psize(ot), and the warning was not issued.

To make the test behave the same on all platforms, changed the long
variables to long long, since long long is 64-bit on all platforms, and
int is 32-bit.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_324.c
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_324.exp

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/msg_324.c
diff -u src/tests/usr.bin/xlint/lint1/msg_324.c:1.3 src/tests/usr.bin/xlint/lint1/msg_324.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_324.c:1.3	Tue Jan  5 23:20:53 2021
+++ src/tests/usr.bin/xlint/lint1/msg_324.c	Wed Jan  6 09:23:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_324.c,v 1.3 2021/01/05 23:20:53 rillig Exp $	*/
+/*	$NetBSD: msg_324.c,v 1.4 2021/01/06 09:23:04 rillig Exp $	*/
 # 3 "msg_324.c"
 
 // Test for message: suggest cast from '%s' to '%s' on op %s to avoid overflow [324]
@@ -19,34 +19,34 @@
 void
 example(char c, int i, unsigned u)
 {
-	long l;
-	unsigned long ul;
+	long long ll;
+	unsigned long long ull;
 
-	l = c + i;
-	l = i - c;
-	ul = c * u;
-	ul = u + c;
-	ul = i - u;
-	ul = u * i;
-	l = i << c;
+	ll = c + i;
+	ll = i - c;
+	ull = c * u;
+	ull = u + c;
+	ull = i - u;
+	ull = u * i;
+	ll = i << c;
 
 	/*
 	 * The operators SHR, DIV and MOD cannot produce an overflow,
 	 * therefore no warning is necessary for them.
 	 */
-	l = i >> c;
-	ul = u / c;
-	ul = u % c;
+	ll = i >> c;
+	ull = u / c;
+	ull = u % c;
 
 	/*
 	 * Assigning the result of an increment or decrement operator to a
 	 * differently-sized type is no unusual that there is no need to warn
 	 * about it.  It's also more unlikely that there is an actual loss
 	 * since this only happens for a single value of the old type, unlike
-	 * "ul = u * u", which has many more possibilities for overflowing.
+	 * "ull = u * u", which has many more possibilities for overflowing.
 	 */
-	ul = u++;
-	ul = ++u;
-	ul = u--;
-	ul = --u;
+	ull = u++;
+	ull = ++u;
+	ull = u--;
+	ull = --u;
 }

Index: src/tests/usr.bin/xlint/lint1/msg_324.exp
diff -u src/tests/usr.bin/xlint/lint1/msg_324.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_324.exp:1.3
--- src/tests/usr.bin/xlint/lint1/msg_324.exp:1.2	Tue Jan  5 22:38:51 2021
+++ src/tests/usr.bin/xlint/lint1/msg_324.exp	Wed Jan  6 09:23:04 2021
@@ -1,7 +1,7 @@
-msg_324.c(25): warning: suggest cast from 'int' to 'long' on op + to avoid overflow [324]
-msg_324.c(26): warning: suggest cast from 'int' to 'long' on op - to avoid overflow [324]
-msg_324.c(27): warning: suggest cast from 'unsigned int' to 'unsigned long' on op * to avoid overflow [324]
-msg_324.c(28): warning: suggest cast from 'unsigned int' to 'unsigned long' on op + to avoid overflow [324]
-msg_324.c(29): warning: suggest cast from 'unsigned int' to 'unsigned long' on op - to avoid overflow [324]
-msg_324.c(30): warning: suggest cast from 'unsigned int' to 'unsigned long' on op * to avoid overflow [324]
-msg_324.c(31): warning: suggest cast from 'int' to 'long' on op << to avoid overflow [324]
+msg_324.c(25): warning: suggest cast from 'int' to 'long long' on op + to avoid overflow [324]
+msg_324.c(26): warning: suggest cast from 'int' to 'long long' on op - to avoid overflow [324]
+msg_324.c(27): warning: suggest cast from 'unsigned int' to 'unsigned long long' on op * to avoid overflow [324]
+msg_324.c(28): warning: suggest cast from 'unsigned int' to 'unsigned long long' on op + to avoid overflow [324]
+msg_324.c(29): warning: suggest cast from 'unsigned int' to 'unsigned long long' on op - to avoid overflow [324]
+msg_324.c(30): warning: suggest cast from 'unsigned int' to 'unsigned long long' on op * to avoid overflow [324]
+msg_324.c(31): warning: suggest cast from 'int' to 'long long' on op << to avoid overflow [324]



CVS commit: src/usr.bin/ftp

2021-01-06 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Wed Jan  6 09:15:59 UTC 2021

Modified Files:
src/usr.bin/ftp: cmds.c ftp.1

Log Message:
ftp(1): fix description of "debug"

"debug" command and documentation got accidentally renamed
to "ftp_debug" 13 years ago, and was only partially fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.142 -r1.143 src/usr.bin/ftp/ftp.1

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

Modified files:

Index: src/usr.bin/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.140 src/usr.bin/ftp/cmds.c:1.141
--- src/usr.bin/ftp/cmds.c:1.140	Wed Feb  6 07:56:42 2019
+++ src/usr.bin/ftp/cmds.c	Wed Jan  6 09:15:59 2021
@@ -1,7 +1,7 @@
-/*	$NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $	*/
+/*	$NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp $	*/
 
 /*-
- * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
+ * Copyright (c) 1996-2021 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -96,7 +96,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c	8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.140 2019/02/06 07:56:42 martin Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -1131,7 +1131,7 @@ setdebug(int argc, char *argv[])
 		options |= SO_DEBUG;
 	else
 		options &= ~SO_DEBUG;
-	fprintf(ttyout, "Debugging %s (ftp_debug=%d).\n", onoff(ftp_debug), ftp_debug);
+	fprintf(ttyout, "Debugging %s (debug=%d).\n", onoff(ftp_debug), ftp_debug);
 	code = ftp_debug > 0;
 }
 

Index: src/usr.bin/ftp/ftp.1
diff -u src/usr.bin/ftp/ftp.1:1.142 src/usr.bin/ftp/ftp.1:1.143
--- src/usr.bin/ftp/ftp.1:1.142	Sat Jul 18 03:00:37 2020
+++ src/usr.bin/ftp/ftp.1	Wed Jan  6 09:15:59 2021
@@ -1,6 +1,6 @@
-.\" 	$NetBSD: ftp.1,v 1.142 2020/07/18 03:00:37 lukem Exp $
+.\" 	$NetBSD: ftp.1,v 1.143 2021/01/06 09:15:59 lukem Exp $
 .\"
-.\" Copyright (c) 1996-2020 The NetBSD Foundation, Inc.
+.\" Copyright (c) 1996-2021 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -57,7 +57,7 @@
 .\"
 .\"	@(#)ftp.1	8.3 (Berkeley) 10/9/94
 .\"
-.Dd July 18, 2020
+.Dd January 6, 2021
 .Dt FTP 1
 .Os
 .Sh NAME
@@ -455,6 +455,16 @@ when an ascii type transfer is made, the
 distinguished from a record delimiter only when
 .Ic \
 is off.
+.It Ic debug Op Ar debug-value
+Toggle debugging mode.
+If an optional
+.Ar debug-value
+is specified it is used to set the debugging level.
+When debugging is on,
+.Nm
+prints each command sent to the remote machine, preceded
+by the string
+.Ql \-\-> .
 .It Ic delete Ar remote-file
 Delete the file
 .Ar remote-file
@@ -530,16 +540,6 @@ format is
 .It Ic ftp Ar host Op Ar port
 A synonym for
 .Ic open .
-.It Ic ftp_debug Op Ar ftp_debug-value
-Toggle debugging mode.
-If an optional
-.Ar ftp_debug-value
-is specified it is used to set the debugging level.
-When debugging is on,
-.Nm
-prints each command sent to the remote machine, preceded
-by the string
-.Ql \-\-> .
 .It Ic gate Op Ar host Op Ar port
 Toggle gate-ftp mode, which used to connect through the
 TIS FWTK and Gauntlet ftp proxies.



CVS commit: src/sys/arch/powerpc

2021-01-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jan  6 08:17:46 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: vmparam.h
src/sys/arch/powerpc/pci: pciconf_indirect.c pciconf_ofmethod.c

Log Message:
Drop unused headers. No functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/include/vmparam.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/pci/pciconf_indirect.c \
src/sys/arch/powerpc/pci/pciconf_ofmethod.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/powerpc/include/vmparam.h
diff -u src/sys/arch/powerpc/include/vmparam.h:1.24 src/sys/arch/powerpc/include/vmparam.h:1.25
--- src/sys/arch/powerpc/include/vmparam.h:1.24	Mon Jul  6 08:26:10 2020
+++ src/sys/arch/powerpc/include/vmparam.h	Wed Jan  6 08:17:46 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.24 2020/07/06 08:26:10 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.25 2021/01/06 08:17:46 rin Exp $	*/
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -6,7 +6,6 @@
 #ifdef _KERNEL_OPT
 #include "opt_modular.h"
 #include "opt_ppcarch.h"
-#include "opt_uvm.h"
 #endif
 
 /*

Index: src/sys/arch/powerpc/pci/pciconf_indirect.c
diff -u src/sys/arch/powerpc/pci/pciconf_indirect.c:1.6 src/sys/arch/powerpc/pci/pciconf_indirect.c:1.7
--- src/sys/arch/powerpc/pci/pciconf_indirect.c:1.6	Fri Oct  2 05:22:52 2015
+++ src/sys/arch/powerpc/pci/pciconf_indirect.c	Wed Jan  6 08:17:46 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pciconf_indirect.c,v 1.6 2015/10/02 05:22:52 msaitoh Exp $ */
+/* $NetBSD: pciconf_indirect.c,v 1.7 2021/01/06 08:17:46 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pciconf_indirect.c,v 1.6 2015/10/02 05:22:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciconf_indirect.c,v 1.7 2021/01/06 08:17:46 rin Exp $");
 
 #define _POWERPC_BUS_DMA_PRIVATE
 
@@ -52,10 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: pciconf_indi
 
 #include 
 
-#if NISA > 0
-#include 
-#endif
-
 #include 
 #include 
 #include 
Index: src/sys/arch/powerpc/pci/pciconf_ofmethod.c
diff -u src/sys/arch/powerpc/pci/pciconf_ofmethod.c:1.6 src/sys/arch/powerpc/pci/pciconf_ofmethod.c:1.7
--- src/sys/arch/powerpc/pci/pciconf_ofmethod.c:1.6	Mon Jul  6 09:34:17 2020
+++ src/sys/arch/powerpc/pci/pciconf_ofmethod.c	Wed Jan  6 08:17:46 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pciconf_ofmethod.c,v 1.6 2020/07/06 09:34:17 rin Exp $ */
+/* $NetBSD: pciconf_ofmethod.c,v 1.7 2021/01/06 08:17:46 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #define _POWERPC_BUS_DMA_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pciconf_ofmethod.c,v 1.6 2020/07/06 09:34:17 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciconf_ofmethod.c,v 1.7 2021/01/06 08:17:46 rin Exp $");
 
 #include 
 #include 
@@ -55,10 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: pciconf_ofme
 #include 
 #include 
 
-#if NISA > 0
-#include 
-#endif
-
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/powerpc/include

2021-01-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jan  6 08:14:35 UTC 2021

Modified Files:
src/sys/arch/powerpc/include: db_machdep.h

Log Message:
Switch DDB for powerpc/booke into SOFTWARE_SSTEP.

SR_SINGLESTEP aka PSL_SE bit in MSR is only available for oea, and HW
debug facilities for booke are significantly different from oea.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/include/db_machdep.h

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/powerpc/include/db_machdep.h
diff -u src/sys/arch/powerpc/include/db_machdep.h:1.28 src/sys/arch/powerpc/include/db_machdep.h:1.29
--- src/sys/arch/powerpc/include/db_machdep.h:1.28	Mon Jul  6 09:34:17 2020
+++ src/sys/arch/powerpc/include/db_machdep.h	Wed Jan  6 08:14:34 2021
@@ -1,5 +1,5 @@
 /*	$OpenBSD: db_machdep.h,v 1.2 1997/03/21 00:48:48 niklas Exp $	*/
-/*	$NetBSD: db_machdep.h,v 1.28 2020/07/06 09:34:17 rin Exp $	*/
+/*	$NetBSD: db_machdep.h,v 1.29 2021/01/06 08:14:34 rin Exp $	*/
 
 /* 
  * Mach Operating System
@@ -71,8 +71,8 @@ extern	db_regs_t	ddb_regs;		/* register 
 #define	BKPT_SIZE	(4)		/* size of breakpoint inst */
 #define	BKPT_SET(inst, addr)	(BKPT_INST)
 
-#ifndef PPC_IBM4XX
-#define SR_SINGLESTEP	0x400
+#if !defined(PPC_BOOKE) && !defined(PPC_IBM4XX)
+#define	SR_SINGLESTEP	0x400		/* PSL_SE, available only for oea */
 #define	db_clear_single_step(regs)	((regs)->msr &= ~SR_SINGLESTEP)
 #define	db_set_single_step(regs)	((regs)->msr |=  SR_SINGLESTEP)
 #else



CVS commit: src/sys/arch/powerpc/ibm4xx

2021-01-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jan  6 08:07:36 UTC 2021

Modified Files:
src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c

Log Message:
Sort headers. No functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/ibm4xx/ibm4xx_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/powerpc/ibm4xx/ibm4xx_machdep.c
diff -u src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.32 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.33
--- src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.32	Mon Jul  6 13:10:19 2020
+++ src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c	Wed Jan  6 08:07:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibm4xx_machdep.c,v 1.32 2020/07/06 13:10:19 rin Exp $	*/
+/*	$NetBSD: ibm4xx_machdep.c,v 1.33 2021/01/06 08:07:36 rin Exp $	*/
 /*	Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
 
 /*
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.32 2020/07/06 13:10:19 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.33 2021/01/06 08:07:36 rin Exp $");
 
 #include "ksyms.h"
 
@@ -79,10 +79,10 @@ __KERNEL_RCSID(0, "$NetBSD: ibm4xx_machd
 #endif
 
 #include 
-#include 
-#include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -96,13 +96,13 @@ __KERNEL_RCSID(0, "$NetBSD: ibm4xx_machd
 #endif
 
 #include 
-#include 
 #include 
 
+#include 
 #include 
-#include 
 
 #include 
+#include 
 
 /*
  * Global variables used here and there



CVS commit: src/sys/arch/powerpc/booke

2021-01-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Jan  6 08:04:58 UTC 2021

Modified Files:
src/sys/arch/powerpc/booke: trap.c

Log Message:
Sort headers. Also, use  instead of db_interface.h and
db_machdep.h in order not to be bothered by subtle include order.

No functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/booke/trap.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/powerpc/booke/trap.c
diff -u src/sys/arch/powerpc/booke/trap.c:1.35 src/sys/arch/powerpc/booke/trap.c:1.36
--- src/sys/arch/powerpc/booke/trap.c:1.35	Thu Sep 10 02:45:28 2020
+++ src/sys/arch/powerpc/booke/trap.c	Wed Jan  6 08:04:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.35 2020/09/10 02:45:28 rin Exp $	*/
+/*	$NetBSD: trap.c,v 1.36 2021/01/06 08:04:57 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.35 2020/09/10 02:45:28 rin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.36 2021/01/06 08:04:57 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -43,34 +43,32 @@ __KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.3
 #endif
 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
+#include 
+#include 
 #include 
+#include 
+#include 
+
+#include 
 
 #include 
 
+#include 		/* use same interface for SPE */
+#include 
 #include 
-#include 
 #include 
-#include 
-#include 		/* use same interface for SPE */
-
 #include 
-#include 
-#include 
+#include 
+#include 
 
 #include 
 
-#include 
-#include 
-
-#include 
-#include 
+#include 
 #include 
+#include 
+#include 
 
 void trap(enum ppc_booke_exceptions, struct trapframe *);