CVS commit: src/sys/kern

2021-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jan 27 06:59:08 UTC 2021

Modified Files:
src/sys/kern: kern_event.c

Log Message:
Fix non-DIAGNOSTIC build


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/kern/kern_event.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/kern/kern_event.c
diff -u src/sys/kern/kern_event.c:1.116 src/sys/kern/kern_event.c:1.117
--- src/sys/kern/kern_event.c:1.116	Tue Jan 26 19:09:18 2021
+++ src/sys/kern/kern_event.c	Wed Jan 27 06:59:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_event.c,v 1.116 2021/01/26 19:09:18 jdolecek Exp $	*/
+/*	$NetBSD: kern_event.c,v 1.117 2021/01/27 06:59:08 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.116 2021/01/26 19:09:18 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.117 2021/01/27 06:59:08 skrll Exp $");
 
 #include 
 #include 
@@ -835,10 +835,9 @@ filt_user(struct knote *kn, long hint)
 static void
 filt_usertouch(struct knote *kn, struct kevent *kev, long type)
 {
-	struct kqueue *kq = kn->kn_kq;
 	int ffctrl;
 
-	KASSERT(mutex_owned(>kq_lock));
+	KASSERT(mutex_owned(>kn_kq->kq_lock));
 
 	switch (type) {
 	case EVENT_REGISTER:



CVS commit: src/doc

2021-01-26 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Jan 27 05:27:01 UTC 2021

Modified Files:
src/doc: CHANGES

Log Message:
Note support for QEMU "mipssim" emulator.


To generate a diff of this commit:
cvs rdiff -u -r1.2777 -r1.2778 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2777 src/doc/CHANGES:1.2778
--- src/doc/CHANGES:1.2777	Sun Jan 24 22:08:37 2021
+++ src/doc/CHANGES	Wed Jan 27 05:27:01 2021
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2777 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2778 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -329,3 +329,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	evbarm: Add support for Amlogic G12 family SoCs. [ryo 20210101]
 	pppd(8): updated to version 2.4.9. [christos 20210109]
 	tzdata updated to 2021a [kre 20210124] 
+	evbmips: Add support for QEMU "mipssim" emulator. [simonb 20210127]



CVS commit: src/sys/arch/evbmips

2021-01-26 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Jan 27 05:24:16 UTC 2021

Added Files:
src/sys/arch/evbmips/conf: MIPSSIM MIPSSIM64 files.mipssim std.mipssim
src/sys/arch/evbmips/mipssim: autoconf.c autoconf.h com_mainbus.c
if_mipsnetreg.h machdep.c mainbus.c mipssim_bus_io.c mipssim_intr.c
mipssimreg.h mipssimvar.h

Log Message:
Add support for the QEMU MIPS "mipssim" simulator.
TODO- mipsnet network driver (root on md(4) only for now).


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbmips/conf/MIPSSIM \
src/sys/arch/evbmips/conf/MIPSSIM64 \
src/sys/arch/evbmips/conf/files.mipssim \
src/sys/arch/evbmips/conf/std.mipssim
cvs rdiff -u -r0 -r1.1 src/sys/arch/evbmips/mipssim/autoconf.c \
src/sys/arch/evbmips/mipssim/autoconf.h \
src/sys/arch/evbmips/mipssim/com_mainbus.c \
src/sys/arch/evbmips/mipssim/if_mipsnetreg.h \
src/sys/arch/evbmips/mipssim/machdep.c \
src/sys/arch/evbmips/mipssim/mainbus.c \
src/sys/arch/evbmips/mipssim/mipssim_bus_io.c \
src/sys/arch/evbmips/mipssim/mipssim_intr.c \
src/sys/arch/evbmips/mipssim/mipssimreg.h \
src/sys/arch/evbmips/mipssim/mipssimvar.h

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

Added files:

Index: src/sys/arch/evbmips/conf/MIPSSIM
diff -u /dev/null src/sys/arch/evbmips/conf/MIPSSIM:1.1
--- /dev/null	Wed Jan 27 05:24:16 2021
+++ src/sys/arch/evbmips/conf/MIPSSIM	Wed Jan 27 05:24:16 2021
@@ -0,0 +1,128 @@
+# $NetBSD: MIPSSIM,v 1.1 2021/01/27 05:24:16 simonb Exp $
+#
+# Kernel config for the QEMU MIPS "mipssim" simulator
+
+include 	"arch/evbmips/conf/std.mipssim"
+
+#ident 		"GENERIC-$Revision: 1.1 $"
+
+maxusers	32
+
+options 	MIPS32
+options 	MIPS32R2
+options 	NOFPU		# No FPU
+options 	FPEMUL		# emulate FPU insn
+options 	HZ=512		# for profiling
+
+#options 	LOCKDEBUG
+options 	SOSEND_COUNTERS
+options 	INET_CSUM_COUNTERS
+options 	TCP_CSUM_COUNTERS
+options 	UDP_CSUM_COUNTERS
+options 	TCP_OUTPUT_COUNTERS
+
+#options 	NTP		# network time protocol
+
+# Debugging options
+options 	DIAGNOSTIC	# extra kernel sanity checking
+options 	DEBUG		# extra kernel debugging support
+options 	DDB		# kernel dynamic debugger
+options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
+makeoptions 	DEBUG="-g"	# compile full symbol table
+makeoptions	COPY_SYMTAB=1	# size for embedded symbol table
+
+pseudo-device	md# memory disk device
+options 	MEMORY_DISK_HOOKS
+options 	MEMORY_DISK_IS_ROOT		# Force root on ram-disk
+options 	MEMORY_DISK_ROOT_SIZE=32768	# size of memory disk, in blocks
+
+# Compatibility options
+include "conf/compat_netbsd50.config"
+#options 	EXEC_ECOFF	# exec ECOFF binaries
+#options 	COMPAT_ULTRIX	# binary compatibility with Ultrix
+
+# File systems
+file-system	FFS		# Berkeley Fast Filesystem
+#file-system	MFS		# memory-based filesystem
+#file-system 	EXT2FS		# second extended file system (linux)
+file-system	NFS		# Sun NFS-compatible filesystem client
+#file-system	KERNFS		# kernel data-structure filesystem
+#file-system	NULLFS		# NULL layered filesystem
+#file-system 	OVERLAY		# overlay file system
+#file-system	FDESC		# user file descriptor filesystem
+#file-system	UMAPFS		# uid/gid remapping filesystem
+#file-system	LFS		# Log-based filesystem (still experimental)
+#file-system	PROCFS		# /proc
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+#file-system	UNION		# union file system
+#file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
+#file-system 	CODA		# Coda File System; also needs vcoda (below)
+file-system	PTYFS		# /dev/pts/N support
+
+# File system options
+#options 	NFSSERVER	# Sun NFS-compatible filesystem server
+#options 	QUOTA		# legacy UFS quotas
+#options 	QUOTA2		# new, in-filesystem UFS quotas
+#options 	DISKLABEL_EI	# disklabel Endian Independent support
+#options 	FFS_EI		# FFS Endian Independent support
+#options 	WAPBL		# File system journaling support
+#options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
+# immutable) behave as system flags.
+
+# Alternate buffer queue strategies for better responsiveness under high
+# disk I/O load.
+#options 	BUFQ_READPRIO
+#options 	BUFQ_PRIOCSCAN
+
+# Networking options
+#options 	GATEWAY		# IP packet forwarding
+options 	INET		# Internet protocols
+#options 	INET6		# IPV6
+#options 	IPSEC		# IP security
+#options 	IPSEC_DEBUG	# debug for IP security
+#options 	MROUTING	# packet forwarding of multicast packets
+#options 	NETATALK	# AppleTalk (over Ethernet) protocol
+#options 	PIM		# Protocol Independent Multicast
+#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+#options 	PPP_DEFLATE	# Deflate compression support for PPP
+#options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
+
+# JIT compiler for bpfilter
+#options	SLJIT
+#options	BPFJIT
+
+# These options enable verbose messages for several subsystems.
+# Warning, these may 

CVS commit: src/sys/dev/acpi

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 05:11:54 UTC 2021

Modified Files:
src/sys/dev/acpi: acpi_util.c acpivar.h

Log Message:
Introduce weighted matching for ACPI autoconfiguration, and provide
acpi_compatible_match() based around device_compatible_entry.  Matches
against _HID score big, matches against _CID are weighted in the
standard most-to-least-specific ordering, less than _HID.

Also provide a maching value for _CLS, that's always less than _HID
and _CID matches, and use that in acpi_match_class().

Also provide acpi_compatible_lookup(), that returing the matching
entry based on the same criteria.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/acpi_util.c
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/acpi/acpivar.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/dev/acpi/acpi_util.c
diff -u src/sys/dev/acpi/acpi_util.c:1.22 src/sys/dev/acpi/acpi_util.c:1.23
--- src/sys/dev/acpi/acpi_util.c:1.22	Tue Jan 26 00:23:16 2021
+++ src/sys/dev/acpi/acpi_util.c	Wed Jan 27 05:11:54 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.c,v 1.22 2021/01/26 00:23:16 jmcneill Exp $ */
+/*	$NetBSD: acpi_util.c,v 1.23 2021/01/27 05:11:54 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007, 2021 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.22 2021/01/26 00:23:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.23 2021/01/27 05:11:54 thorpej Exp $");
 
 #include 
 #include 
@@ -306,7 +306,7 @@ acpi_name(ACPI_HANDLE handle)
 }
 
 /*
- * Pack _HID and _CID ID strings into an OpenFirmware-like
+ * Pack _HID and _CID ID strings into an OpenFirmware-style
  * string list.
  */
 char *
@@ -314,49 +314,143 @@ acpi_pack_compat_list(ACPI_DEVICE_INFO *
 {
 	KASSERT(sizep != NULL);
 
-	char *strlist, *cp;
-	size_t len = 0;
+	char *sl = NULL;
+	size_t slsize = 0;
 	uint32_t i;
 
-	/*
-	 * First calculate the total size required.
-	 * N.B. PNP Device ID length includes terminating NUL.
-	 */
 	if ((ad->Valid & ACPI_VALID_HID) != 0) {
-		len += ad->HardwareId.Length;
+		strlist_append(, , ad->HardwareId.String);
 	}
 
 	if ((ad->Valid & ACPI_VALID_CID) != 0) {
 		for (i = 0; i < ad->CompatibleIdList.Count; i++) {
-			len += ad->CompatibleIdList.Ids[i].Length;
+			strlist_append(, ,
+			ad->CompatibleIdList.Ids[i].String);
 		}
 	}
 
-	*sizep = len;
-	if (len == 0) {
-		return NULL;
+	*sizep = slsize;
+	return sl;
+}
+
+/*
+ * The ACPI_PNP_DEVICE_ID type is somewhat inconvenient for us to
+ * use.  We'll need some temporary space to pack it into an array
+ * of C strings.  Room for 8 should be plenty, but we can allocate
+ * more if necessary.
+ */
+#define	ACPI_COMPATSTR_MAX	8
+
+static const char **
+acpi_compatible_alloc_strarray(ACPI_PNP_DEVICE_ID *ids,
+unsigned int count, const char **buf)
+{
+	unsigned int i;
+
+	buf = kmem_tmpbuf_alloc(count * sizeof(const char *),
+	buf, ACPI_COMPATSTR_MAX * sizeof(const char *), KM_SLEEP);
+	for (i = 0; i < count; i++) {
+		buf[i] = ids[i].String;
+	}
+	return buf;
+}
+
+static void
+acpi_compatible_free_strarray(const char **cpp, unsigned int count,
+const char **buf)
+{
+	kmem_tmpbuf_free(cpp, count * sizeof(const char *), buf);
+}
+
+/*
+ * acpi_compatible_match --
+ *
+ *	Returns a weighted match value, comparing the _HID and _CID
+ *	IDs against a driver's compatbility data.
+ */
+int
+acpi_compatible_match(const struct acpi_attach_args * const aa,
+const struct device_compatible_entry * const dce)
+{
+	const char *strings[ACPI_COMPATSTR_MAX * sizeof(const char *)];
+	const char **cpp;
+
+	if (aa->aa_node->ad_type != ACPI_TYPE_DEVICE) {
+		return 0;
 	}
 
-	cp = strlist = kmem_alloc(len, KM_SLEEP);
+	ACPI_DEVICE_INFO *ad = aa->aa_node->ad_devinfo;
 
 	if ((ad->Valid & ACPI_VALID_HID) != 0) {
-		memcpy(cp, ad->HardwareId.String, ad->HardwareId.Length);
-		cp += ad->HardwareId.Length;
+		strings[0] = ad->HardwareId.String;
+
+		/* Matching _HID wins big. */
+		if (device_compatible_pmatch(strings, 1, dce) != 0) {
+			return ACPI_MATCHSCORE_HID;
+		}
 	}
 
 	if ((ad->Valid & ACPI_VALID_CID) != 0) {
-		for (i = 0; i < ad->CompatibleIdList.Count; i++) {
-			memcpy(cp, ad->CompatibleIdList.Ids[i].String,
-			ad->CompatibleIdList.Ids[i].Length);
-			cp += ad->CompatibleIdList.Ids[i].Length;
+		cpp = acpi_compatible_alloc_strarray(ad->CompatibleIdList.Ids,
+		ad->CompatibleIdList.Count, strings);
+		int rv;
+
+		rv = device_compatible_pmatch(cpp,
+		ad->CompatibleIdList.Count, dce);
+		acpi_compatible_free_strarray(cpp, ad->CompatibleIdList.Count,
+		strings);
+		if (rv) {
+			rv = (rv - 1) + ACPI_MATCHSCORE_CID;
+			if (rv > ACPI_MATCHSCORE_CID_MAX) {
+rv = ACPI_MATCHSCORE_CID_MAX;
+			}
+			return rv;
 		}
 	}
 
-	KASSERT((size_t)(cp - strlist) == len);
-
-	return strlist;
+	return 0;
 }
 
+/*
+ * acpi_compatible_lookup 

CVS commit: src/sys/dev/pci

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 05:00:16 UTC 2021

Modified Files:
src/sys/dev/pci: pci_subr.c pcivar.h

Log Message:
Introduce autoconfiguration helpers based around device_compatible_entry:
- pci_compatible_match(): matches against the PCI ID.
- pci_compatible_match_subsys(): matches against PCI SUBSYS ID.
- pci_compatible_lookup(): look up entry by PCI ID.
- pci_compatible_lookup_subsys(): look up entry by PCI SUBSYS ID.
- pci_compatible_lookup_id(): look up entry by an arbitrary ID using the
  PCI ID code conventions.

- Define PCI_COMPAT_EOL as a compat data array sentinel.


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/pci/pcivar.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/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.224 src/sys/dev/pci/pci_subr.c:1.225
--- src/sys/dev/pci/pci_subr.c:1.224	Sat May 30 10:43:46 2020
+++ src/sys/dev/pci/pci_subr.c	Wed Jan 27 05:00:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.224 2020/05/30 10:43:46 jdolecek Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.225 2021/01/27 05:00:15 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.224 2020/05/30 10:43:46 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.225 2021/01/27 05:00:15 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -84,6 +84,50 @@ static int pci_conf_find_extcap(const pc
 static void pci_conf_print_pcie_power(uint8_t, unsigned int);
 #define PCIREG_SHIFTOUT(a, b) ((pcireg_t)__SHIFTOUT((a), (b)))
 
+#ifdef _KERNEL
+/*
+ * Common routines used to match a compatible device by its PCI ID code.
+ */
+
+const struct device_compatible_entry *
+pci_compatible_lookup_id(pcireg_t const id,
+const struct device_compatible_entry *dce)
+{
+	return device_compatible_lookup_id(id, PCI_COMPAT_EOL_VALUE, dce);
+}
+
+const struct device_compatible_entry *
+pci_compatible_lookup(const struct pci_attach_args * const pa,
+const struct device_compatible_entry * const dce)
+{
+	return pci_compatible_lookup_id(pa->pa_id, dce);
+}
+
+const struct device_compatible_entry *
+pci_compatible_lookup_subsys(const struct pci_attach_args * const pa,
+const struct device_compatible_entry * const dce)
+{
+	const pcireg_t subsysid =
+	pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
+
+	return pci_compatible_lookup_id(subsysid, dce);
+}
+
+int
+pci_compatible_match(const struct pci_attach_args * const pa,
+const struct device_compatible_entry * const dce)
+{
+	return pci_compatible_lookup(pa, dce) != NULL;
+}
+
+int
+pci_compatible_match_subsys(const struct pci_attach_args * const pa,
+const struct device_compatible_entry * const dce)
+{
+	return pci_compatible_lookup_subsys(pa, dce) != NULL;
+}
+#endif /* _KERNEL */
+
 /*
  * Descriptions of known PCI classes and subclasses.
  *

Index: src/sys/dev/pci/pcivar.h
diff -u src/sys/dev/pci/pcivar.h:1.113 src/sys/dev/pci/pcivar.h:1.114
--- src/sys/dev/pci/pcivar.h:1.113	Sat Dec  1 01:23:24 2018
+++ src/sys/dev/pci/pcivar.h	Wed Jan 27 05:00:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcivar.h,v 1.113 2018/12/01 01:23:24 msaitoh Exp $	*/
+/*	$NetBSD: pcivar.h,v 1.114 2021/01/27 05:00:16 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -298,7 +298,6 @@ int	pci_mapreg_submap(const struct pci_a
 	bus_size_t, bus_size_t, bus_space_tag_t *, bus_space_handle_t *, 
 	bus_addr_t *, bus_size_t *);
 
-
 int pci_find_rom(const struct pci_attach_args *, bus_space_tag_t,
 	bus_space_handle_t, bus_size_t,
 	int, bus_space_handle_t *, bus_size_t *);
@@ -315,6 +314,23 @@ int	pci_msix_count(pci_chipset_tag_t, pc
 /*
  * Helper functions for autoconfiguration.
  */
+
+#define	PCI_COMPAT_EOL_VALUE	(0xU)
+#define	PCI_COMPAT_EOL		{ .id = PCI_COMPAT_EOL_VALUE }
+
+const struct device_compatible_entry *
+	pci_compatible_lookup_id(pcireg_t,
+	const struct device_compatible_entry *);
+const struct device_compatible_entry *
+	pci_compatible_lookup(const struct pci_attach_args *,
+	const struct device_compatible_entry *);
+int	pci_compatible_match(const struct pci_attach_args *,
+	const struct device_compatible_entry *);
+const struct device_compatible_entry *
+	pci_compatible_lookup_subsys(const struct pci_attach_args *,
+	const struct device_compatible_entry *);
+int	pci_compatible_match_subsys(const struct pci_attach_args *,
+	const struct device_compatible_entry *);
 #ifndef PCI_MACHDEP_ENUMERATE_BUS
 int	pci_enumerate_bus(struct pci_softc *, const int *,
 	int (*)(const struct pci_attach_args *), struct pci_attach_args *);



CVS commit: src/sys/dev/ofw

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 04:55:42 UTC 2021

Modified Files:
src/sys/dev/ofw: ofw_subr.c openfirm.h

Log Message:
G/C of_match_compatible().


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/ofw/ofw_subr.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ofw/openfirm.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/dev/ofw/ofw_subr.c
diff -u src/sys/dev/ofw/ofw_subr.c:1.54 src/sys/dev/ofw/ofw_subr.c:1.55
--- src/sys/dev/ofw/ofw_subr.c:1.54	Wed Jan 27 03:10:21 2021
+++ src/sys/dev/ofw/ofw_subr.c	Wed Jan 27 04:55:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_subr.c,v 1.54 2021/01/27 03:10:21 thorpej Exp $	*/
+/*	$NetBSD: ofw_subr.c,v 1.55 2021/01/27 04:55:42 thorpej Exp $	*/
 
 /*
  * Copyright 1998
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.54 2021/01/27 03:10:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.55 2021/01/27 04:55:42 thorpej Exp $");
 
 #include 
 #include 
@@ -130,18 +130,6 @@ of_compatible(int phandle, const char * 
 }
 
 /*
- * int of_match_compatible(phandle, strings)
- *
- * This function is equivalent to of_compatible(), and its use
- * is deprecated.
- */
-int
-of_match_compatible(int phandle, const char * const *strings)
-{
-	return of_compatible(phandle, strings);
-}
-
-/*
  * int of_compatible_match(phandle, compat_data)
  *
  * This routine searches an array of device_compatible_entry structures

Index: src/sys/dev/ofw/openfirm.h
diff -u src/sys/dev/ofw/openfirm.h:1.43 src/sys/dev/ofw/openfirm.h:1.44
--- src/sys/dev/ofw/openfirm.h:1.43	Wed Jan 27 03:10:21 2021
+++ src/sys/dev/ofw/openfirm.h	Wed Jan 27 04:55:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: openfirm.h,v 1.43 2021/01/27 03:10:21 thorpej Exp $	*/
+/*	$NetBSD: openfirm.h,v 1.44 2021/01/27 04:55:42 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -106,7 +106,6 @@ int	openfirmware(void *);
 struct device_compatible_entry;
 
 int	of_compatible(int, const char * const *);
-int	of_match_compatible(int, const char * const *);
 int	of_compatible_match(int, const struct device_compatible_entry *);
 const struct device_compatible_entry *
 	of_compatible_lookup(int, const struct device_compatible_entry *);



CVS commit: src/sys

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 04:54:08 UTC 2021

Modified Files:
src/sys/kern: subr_autoconf.c
src/sys/sys: device.h

Log Message:
Add device_compatible_match_id() and device_compatible_lookup_id(), which
are like device_compatible_match() and device_compatible_lookup(), but
take a single scalar value as an ID.

Add a "uintptr_t id" field to device_compatible_entry, in an anonymous
union with the existing "const char *compat" field.


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/sys/kern/subr_autoconf.c
cvs rdiff -u -r1.163 -r1.164 src/sys/sys/device.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/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.276 src/sys/kern/subr_autoconf.c:1.277
--- src/sys/kern/subr_autoconf.c:1.276	Sun Jan 24 17:42:36 2021
+++ src/sys/kern/subr_autoconf.c	Wed Jan 27 04:54:08 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.276 2021/01/24 17:42:36 thorpej Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.277 2021/01/27 04:54:08 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.276 2021/01/24 17:42:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277 2021/01/27 04:54:08 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -2345,7 +2345,7 @@ strarray_match_internal(const char ** co
 	unsigned int i;
 
 	if (strings == NULL || nstrings == 0) {
-		return 0;
+		return false;
 	}
 
 	for (i = 0; i < nstrings; i++) {
@@ -2499,6 +2499,43 @@ device_compatible_pmatch_strlist(
 	device_compatsize, driver_compats, NULL, strlist_pmatch);
 }
 
+static int
+device_compatible_match_id_internal(
+uintptr_t const id, uintptr_t const mask, uintptr_t const sentinel_id,
+const struct device_compatible_entry *driver_compats,
+const struct device_compatible_entry **matching_entryp)
+{
+	const struct device_compatible_entry *dce = NULL;
+
+	if (mask == 0)
+		return 0;
+
+	for (dce = driver_compats; dce->id != sentinel_id; dce++) {
+		if ((id & mask) == dce->id) {
+			if (matching_entryp != NULL) {
+*matching_entryp = dce;
+			}
+			return 1;
+		}
+	}
+	return 0;
+}
+
+/*
+ * device_compatible_match_id:
+ *
+ *	Like device_compatible_match(), but takes a single
+ *	unsigned integer device ID.
+ */
+int
+device_compatible_match_id(
+uintptr_t const id, uintptr_t const sentinel_id,
+const struct device_compatible_entry *driver_compats)
+{
+	return device_compatible_match_id_internal(id, (uintptr_t)-1,
+	sentinel_id, driver_compats, NULL);
+}
+
 /*
  * device_compatible_lookup:
  *
@@ -2580,6 +2617,26 @@ device_compatible_plookup_strlist(
 }
 
 /*
+ * device_compatible_lookup_id:
+ *
+ *	Like device_compatible_lookup(), but takes a single
+ *	unsigned integer device ID.
+ */
+const struct device_compatible_entry *
+device_compatible_lookup_id(
+uintptr_t const id, uintptr_t const sentinel_id,
+const struct device_compatible_entry *driver_compats)
+{
+	const struct device_compatible_entry *dce;
+
+	if (device_compatible_match_id_internal(id, (uintptr_t)-1,
+	sentinel_id, driver_compats, )) {
+		return dce;
+	}
+	return NULL;
+}
+
+/*
  * Power management related functions.
  */
 

Index: src/sys/sys/device.h
diff -u src/sys/sys/device.h:1.163 src/sys/sys/device.h:1.164
--- src/sys/sys/device.h:1.163	Wed Jan 27 01:00:05 2021
+++ src/sys/sys/device.h	Wed Jan 27 04:54:08 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.163 2021/01/27 01:00:05 thorpej Exp $ */
+/* $NetBSD: device.h,v 1.164 2021/01/27 04:54:08 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -124,7 +124,10 @@ typedef struct cfattach *cfattach_t;
 
 #if defined(_KERNEL) || defined(_KMEMUSER)
 struct device_compatible_entry {
-	const char	*compat;
+	union {
+		const char *compat;
+		uintptr_t id;
+	};
 	union {
 		const void *data;
 		uintptr_t value;
@@ -567,6 +570,12 @@ const struct device_compatible_entry *
 		device_compatible_plookup_strlist(const char *, size_t,
 const struct device_compatible_entry *);
 
+int		device_compatible_match_id(uintptr_t const, uintptr_t const,
+const struct device_compatible_entry *);
+const struct device_compatible_entry *
+		device_compatible_lookup_id(uintptr_t const, uintptr_t const,
+const struct device_compatible_entry *);
+
 bool		device_pmf_is_registered(device_t);
 bool		device_pmf_is_registered(device_t);
 



CVS commit: src/sys/dev/eisa

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 04:35:15 UTC 2021

Modified Files:
src/sys/dev/eisa: ahb.c ahc_eisa.c bha_eisa.c cac_eisa.c dpt_eisa.c
if_ep_eisa.c if_tlp_eisa.c mlx_eisa.c uha_eisa.c

Log Message:
Use eisa_compatible_{match,lookup}().


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/eisa/ahb.c
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/eisa/ahc_eisa.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/eisa/bha_eisa.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/eisa/cac_eisa.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/eisa/dpt_eisa.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/eisa/if_ep_eisa.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/eisa/if_tlp_eisa.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/eisa/mlx_eisa.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/eisa/uha_eisa.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/dev/eisa/ahb.c
diff -u src/sys/dev/eisa/ahb.c:1.64 src/sys/dev/eisa/ahb.c:1.65
--- src/sys/dev/eisa/ahb.c:1.64	Thu Jul 14 04:00:45 2016
+++ src/sys/dev/eisa/ahb.c	Wed Jan 27 04:35:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahb.c,v 1.64 2016/07/14 04:00:45 msaitoh Exp $	*/
+/*	$NetBSD: ahb.c,v 1.65 2021/01/27 04:35:15 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.64 2016/07/14 04:00:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.65 2021/01/27 04:35:15 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -142,6 +142,14 @@ CFATTACH_DECL_NEW(ahb, sizeof(struct ahb
 
 #define	AHB_ABORT_TIMEOUT	2000	/* time to wait for abort (mSec) */
 
+static const struct device_compatible_entry compat_data[] = {
+	{ .compat = "ADP",	.data = EISA_PRODUCT_ADP },
+	{ .compat = "ADP0001",	.data = EISA_PRODUCT_ADP0001 },
+	{ .compat = "ADP0002",	.data = EISA_PRODUCT_ADP0002 },
+	{ .compat = "ADP0400",	.data = EISA_PRODUCT_ADP0400 },
+	DEVICE_COMPAT_EOL
+};
+
 /*
  * Check the slots looking for a board we recognise
  * If we find one, note its address (slot) and call
@@ -155,11 +163,7 @@ ahbmatch(device_t parent, cfdata_t match
 	bus_space_handle_t ioh;
 	int rv;
 
-	/* must match one of our known ID strings */
-	if (strcmp(ea->ea_idstring, "ADP") &&
-	strcmp(ea->ea_idstring, "ADP0001") &&
-	strcmp(ea->ea_idstring, "ADP0002") &&
-	strcmp(ea->ea_idstring, "ADP0400"))
+	if (!eisa_compatible_match(ea, compat_data))
 		return (0);
 
 	if (bus_space_map(iot,
@@ -182,11 +186,12 @@ ahbattach(device_t parent, device_t self
 {
 	struct eisa_attach_args *ea = aux;
 	struct ahb_softc *sc = device_private(self);
+	const struct device_compatible_entry *dce;
 	bus_space_tag_t iot = ea->ea_iot;
 	bus_space_handle_t ioh;
 	eisa_chipset_tag_t ec = ea->ea_ec;
 	eisa_intr_handle_t ih;
-	const char *model, *intrstr;
+	const char *intrstr;
 	struct ahb_probe_data apd;
 	struct scsipi_adapter *adapt = >sc_adapter;
 	struct scsipi_channel *chan = >sc_channel;
@@ -194,18 +199,11 @@ ahbattach(device_t parent, device_t self
 
 	sc->sc_dev = self;
 
-	if (!strcmp(ea->ea_idstring, "ADP"))
-		model = EISA_PRODUCT_ADP;
-	else if (!strcmp(ea->ea_idstring, "ADP0001"))
-		model = EISA_PRODUCT_ADP0001;
-	else if (!strcmp(ea->ea_idstring, "ADP0002"))
-		model = EISA_PRODUCT_ADP0002;
-	else if (!strcmp(ea->ea_idstring, "ADP0400"))
-		model = EISA_PRODUCT_ADP0400;
-	else
-		model = "unknown model!";
+	dce = eisa_compatible_lookup(ea, compat_data);
+	KASSERT(dce != NULL);
+
 	aprint_naive("\n");
-	aprint_normal(": %s\n", model);
+	aprint_normal(": %s\n", (const char *)dce->data);
 
 	if (bus_space_map(iot,
 	EISA_SLOT_ADDR(ea->ea_slot) + AHB_EISA_SLOT_OFFSET,

Index: src/sys/dev/eisa/ahc_eisa.c
diff -u src/sys/dev/eisa/ahc_eisa.c:1.41 src/sys/dev/eisa/ahc_eisa.c:1.42
--- src/sys/dev/eisa/ahc_eisa.c:1.41	Mon Jul 11 11:31:50 2016
+++ src/sys/dev/eisa/ahc_eisa.c	Wed Jan 27 04:35:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahc_eisa.c,v 1.41 2016/07/11 11:31:50 msaitoh Exp $	*/
+/*	$NetBSD: ahc_eisa.c,v 1.42 2021/01/27 04:35:15 thorpej Exp $	*/
 
 /*
  * Product specific probe and attach routines for:
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahc_eisa.c,v 1.41 2016/07/11 11:31:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahc_eisa.c,v 1.42 2021/01/27 04:35:15 thorpej Exp $");
 
 #include 
 #include 
@@ -63,6 +63,12 @@ static void	ahc_eisa_attach(device_t, de
 CFATTACH_DECL_NEW(ahc_eisa, sizeof(struct ahc_softc),
 ahc_eisa_match, ahc_eisa_attach, NULL, NULL);
 
+static const struct device_compatible_entry compat_data[] = {
+	{ .compat = "ADP7770",	.data = EISA_PRODUCT_ADP7770 },
+	{ .compat = "ADP7771",	.data = EISA_PRODUCT_ADP7771 },
+	DEVICE_COMPAT_EOL
+};
+
 /*
  * Check the slots looking for a board we recognise
  * If we find one, note its address (slot) and call
@@ -76,9 +82,7 @@ ahc_eisa_match(device_t parent, cfdata_t
 	bus_space_handle_t ioh;
 	

CVS commit: src/sys/dev/eisa

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 04:31:36 UTC 2021

Modified Files:
src/sys/dev/eisa: eisa.c eisavar.h

Log Message:
Add eisa_compatible_match() and eisa_compatible_lookup().


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/eisa/eisa.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/eisa/eisavar.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/dev/eisa/eisa.c
diff -u src/sys/dev/eisa/eisa.c:1.46 src/sys/dev/eisa/eisa.c:1.47
--- src/sys/dev/eisa/eisa.c:1.46	Mon Jul 11 11:31:50 2016
+++ src/sys/dev/eisa/eisa.c	Wed Jan 27 04:31:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: eisa.c,v 1.46 2016/07/11 11:31:50 msaitoh Exp $	*/
+/*	$NetBSD: eisa.c,v 1.47 2021/01/27 04:31:36 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.46 2016/07/11 11:31:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eisa.c,v 1.47 2021/01/27 04:31:36 thorpej Exp $");
 
 #include "opt_eisaverbose.h"
 
@@ -186,6 +186,24 @@ eisaattach(device_t parent, device_t sel
 	}
 }
 
+int
+eisa_compatible_match(const struct eisa_attach_args * const ea,
+const struct device_compatible_entry *dce)
+{
+	const char *idstring = ea->ea_idstring;
+
+	return device_compatible_pmatch(, 1, dce);
+}
+
+const struct device_compatible_entry *
+eisa_compatible_lookup(const struct eisa_attach_args * const ea,
+const struct device_compatible_entry *dce)
+{
+	const char *idstring = ea->ea_idstring;
+
+	return device_compatible_plookup(, 1, dce);
+}
+
 #ifdef EISAVERBOSE
 /*
  * Descriptions of of known vendors and devices ("products").

Index: src/sys/dev/eisa/eisavar.h
diff -u src/sys/dev/eisa/eisavar.h:1.24 src/sys/dev/eisa/eisavar.h:1.25
--- src/sys/dev/eisa/eisavar.h:1.24	Mon Apr 28 20:23:48 2008
+++ src/sys/dev/eisa/eisavar.h	Wed Jan 27 04:31:36 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: eisavar.h,v 1.24 2008/04/28 20:23:48 martin Exp $	*/
+/*	$NetBSD: eisavar.h,v 1.25 2021/01/27 04:31:36 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -158,4 +158,12 @@ struct eisa_cfg_io {
 	int ecio_shared;
 };
 
+#ifdef _KERNEL
+int	eisa_compatible_match(const struct eisa_attach_args *,
+	const struct device_compatible_entry *);
+const struct device_compatible_entry *
+	eisa_compatible_lookup(const struct eisa_attach_args *,
+	const struct device_compatible_entry *);
+#endif /* _KERNEL */
+
 #endif /* _DEV_EISA_EISAVAR_H_ */



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

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 03:17:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/powerpc: ofw_machdep.c

Log Message:
There is not much point in of_compatible() returning -1 for "no match"
and >= 0 for "match".  Just make it return 0 for "no match" and >0 for
"match" so it can be treated like a boolean expression.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/powerpc/ofw_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/powerpc/ofw_machdep.c
diff -u src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.25 src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.26
--- src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.25	Fri Feb 28 05:44:39 2014
+++ src/sys/arch/powerpc/powerpc/ofw_machdep.c	Wed Jan 27 03:17:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_machdep.c,v 1.25 2014/02/28 05:44:39 matt Exp $	*/
+/*	$NetBSD: ofw_machdep.c,v 1.26 2021/01/27 03:17:24 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.25 2014/02/28 05:44:39 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.26 2021/01/27 03:17:24 thorpej Exp $");
 
 #include 
 #include 
@@ -151,7 +151,7 @@ mem_regions(struct mem_region **memp, st
 	 * according to comments in FreeBSD all Apple OF has 32bit values in
 	 * "available", no matter what the cell sizes are
 	 */
-	if (of_compatible(hroot, macrisc) != -1) {
+	if (of_compatible(hroot, macrisc)) {
 		DPRINTF("this appears to be a mac...\n");
 		acells = 1;
 		scells = 1;



CVS commit: src/sys/arch/arm/samsung

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 03:16:37 UTC 2021

Modified Files:
src/sys/arch/arm/samsung: exynos_platform.c

Log Message:
Rename of_match_compat_data() to of_compatible_match().  Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/samsung/exynos_platform.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/arm/samsung/exynos_platform.c
diff -u src/sys/arch/arm/samsung/exynos_platform.c:1.35 src/sys/arch/arm/samsung/exynos_platform.c:1.36
--- src/sys/arch/arm/samsung/exynos_platform.c:1.35	Wed Jan 27 02:01:53 2021
+++ src/sys/arch/arm/samsung/exynos_platform.c	Wed Jan 27 03:16:37 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.35 2021/01/27 02:01:53 thorpej Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.36 2021/01/27 03:16:37 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -35,7 +35,7 @@
 #include "ukbd.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.35 2021/01/27 02:01:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.36 2021/01/27 03:16:37 thorpej Exp $");
 
 
 /*
@@ -208,7 +208,7 @@ exynos_platform_mpstart(void)
 	int (*mp_start)(void) = NULL;
 
 	const struct device_compatible_entry *cd =
-	of_search_compatible(OF_finddevice("/"), mp_compat_data);
+	of_compatible_lookup(OF_finddevice("/"), mp_compat_data);
 	if (cd)
 		mp_start = cd->data;
 
@@ -339,7 +339,7 @@ exynos5_platform_bootstrap(void)
 
 #if defined(MULTIPROCESSOR) && defined(EXYNOS5422_DISABLE_CA7_CLUSTER)
 	const struct device_compatible_entry *cd =
-	of_search_compatible(OF_finddevice("/"), mp_compat_data);
+	of_compatible_lookup(OF_finddevice("/"), mp_compat_data);
 	if (cd && cd->data == exynos5800_mpstart) {
 		void *fdt_data = __UNCONST(fdtbus_get_data());
 		int cpu_off, cpus_off, len;



CVS commit: src/sys/dev/spi

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:32:31 UTC 2021

Modified Files:
src/sys/dev/spi: m25p.c oj6sh.c ssdfb_spi.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/spi/m25p.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/spi/oj6sh.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/spi/ssdfb_spi.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/dev/spi/m25p.c
diff -u src/sys/dev/spi/m25p.c:1.16 src/sys/dev/spi/m25p.c:1.17
--- src/sys/dev/spi/m25p.c:1.16	Sun Jan 17 21:42:35 2021
+++ src/sys/dev/spi/m25p.c	Wed Jan 27 02:32:31 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: m25p.c,v 1.16 2021/01/17 21:42:35 thorpej Exp $ */
+/* $NetBSD: m25p.c,v 1.17 2021/01/27 02:32:31 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.16 2021/01/17 21:42:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.17 2021/01/27 02:32:31 thorpej Exp $");
 
 #include 
 #include 
@@ -118,8 +118,7 @@ static const struct m25p_info {
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "jedec,spi-nor" },
-
-	{ 0 }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/dev/spi/oj6sh.c
diff -u src/sys/dev/spi/oj6sh.c:1.6 src/sys/dev/spi/oj6sh.c:1.7
--- src/sys/dev/spi/oj6sh.c:1.6	Sun Jan 17 21:42:35 2021
+++ src/sys/dev/spi/oj6sh.c	Wed Jan 27 02:32:31 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: oj6sh.c,v 1.6 2021/01/17 21:42:35 thorpej Exp $	*/
+/*	$NetBSD: oj6sh.c,v 1.7 2021/01/27 02:32:31 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.6 2021/01/17 21:42:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.7 2021/01/27 02:32:31 thorpej Exp $");
 
 #include "opt_oj6sh.h"
 
@@ -128,8 +128,7 @@ static const struct wsmouse_accessops oj
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "oj6sh" },
-
-	{ 0 }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/dev/spi/ssdfb_spi.c
diff -u src/sys/dev/spi/ssdfb_spi.c:1.4 src/sys/dev/spi/ssdfb_spi.c:1.5
--- src/sys/dev/spi/ssdfb_spi.c:1.4	Sun Jan 17 21:42:35 2021
+++ src/sys/dev/spi/ssdfb_spi.c	Wed Jan 27 02:32:31 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ssdfb_spi.c,v 1.4 2021/01/17 21:42:35 thorpej Exp $ */
+/* $NetBSD: ssdfb_spi.c,v 1.5 2021/01/27 02:32:31 thorpej Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ssdfb_spi.c,v 1.4 2021/01/17 21:42:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssdfb_spi.c,v 1.5 2021/01/27 02:32:31 thorpej Exp $");
 
 #include 
 #include 
@@ -75,8 +75,7 @@ CFATTACH_DECL_NEW(ssdfb_spi, sizeof(stru
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "solomon,ssd1322" },
-
-	{ 0 }
+	DEVICE_COMPAT_EOL
 };
 
 static int



CVS commit: src/sys/dev/ofw

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:31:35 UTC 2021

Modified Files:
src/sys/dev/ofw: ofw_network_subr.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ofw/ofw_network_subr.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/dev/ofw/ofw_network_subr.c
diff -u src/sys/dev/ofw/ofw_network_subr.c:1.9 src/sys/dev/ofw/ofw_network_subr.c:1.10
--- src/sys/dev/ofw/ofw_network_subr.c:1.9	Sun Jan 24 20:09:03 2021
+++ src/sys/dev/ofw/ofw_network_subr.c	Wed Jan 27 02:31:35 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_network_subr.c,v 1.9 2021/01/24 20:09:03 thorpej Exp $	*/
+/*	$NetBSD: ofw_network_subr.c,v 1.10 2021/01/27 02:31:35 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2021 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_network_subr.c,v 1.9 2021/01/24 20:09:03 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_network_subr.c,v 1.10 2021/01/27 02:31:35 thorpej Exp $");
 
 #include 
 #include 
@@ -63,7 +63,7 @@ static const struct device_compatible_en
 	{ .compat = "ethernet,100,rj45,full",
 	  .value = IFM_ETHER | IFM_100_TX | IFM_FDX },
 
-	{ 0 }
+	DEVICE_COMPAT_EOL
 };
 
 /*



CVS commit: src/sys/dev/ofisa

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:31:03 UTC 2021

Modified Files:
src/sys/dev/ofisa: atppc_ofisa.c com_ofisa.c ess_ofisa.c if_cs_ofisa.c
joy_ofisa.c lpt_ofisa.c ofisa.c pckbc_ofisa.c sb_ofisa.c
wdc_ofisa.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/ofisa/atppc_ofisa.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ofisa/com_ofisa.c \
src/sys/dev/ofisa/joy_ofisa.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ofisa/ess_ofisa.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ofisa/if_cs_ofisa.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ofisa/lpt_ofisa.c \
src/sys/dev/ofisa/pckbc_ofisa.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ofisa/ofisa.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ofisa/sb_ofisa.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ofisa/wdc_ofisa.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/dev/ofisa/atppc_ofisa.c
diff -u src/sys/dev/ofisa/atppc_ofisa.c:1.12 src/sys/dev/ofisa/atppc_ofisa.c:1.13
--- src/sys/dev/ofisa/atppc_ofisa.c:1.12	Mon Jan 25 16:21:41 2021
+++ src/sys/dev/ofisa/atppc_ofisa.c	Wed Jan 27 02:31:03 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc_ofisa.c,v 1.12 2021/01/25 16:21:41 thorpej Exp $ */
+/* $NetBSD: atppc_ofisa.c,v 1.13 2021/01/27 02:31:03 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.12 2021/01/25 16:21:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc_ofisa.c,v 1.13 2021/01/27 02:31:03 thorpej Exp $");
 
 #include "opt_atppc.h"
 
@@ -76,7 +76,7 @@ static void atppc_ofisa_dma_free(device_
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "pnpPNP,401" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 /*

Index: src/sys/dev/ofisa/com_ofisa.c
diff -u src/sys/dev/ofisa/com_ofisa.c:1.18 src/sys/dev/ofisa/com_ofisa.c:1.19
--- src/sys/dev/ofisa/com_ofisa.c:1.18	Mon Jan 25 16:21:41 2021
+++ src/sys/dev/ofisa/com_ofisa.c	Wed Jan 27 02:31:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: com_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $	*/
+/*	$NetBSD: com_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $	*/
 
 /*
  * Copyright 1997, 1998
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: com_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $");
 
 #include 
 #include 
@@ -70,7 +70,7 @@ CFATTACH_DECL_NEW(com_ofisa, sizeof(stru
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "pnpPNP,501" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 int
Index: src/sys/dev/ofisa/joy_ofisa.c
diff -u src/sys/dev/ofisa/joy_ofisa.c:1.18 src/sys/dev/ofisa/joy_ofisa.c:1.19
--- src/sys/dev/ofisa/joy_ofisa.c:1.18	Mon Jan 25 16:21:41 2021
+++ src/sys/dev/ofisa/joy_ofisa.c	Wed Jan 27 02:31:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: joy_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $	*/
+/*	$NetBSD: joy_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1998, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c,v 1.18 2021/01/25 16:21:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: joy_ofisa.c,v 1.19 2021/01/27 02:31:03 thorpej Exp $");
 
 #include 
 #include 
@@ -60,7 +60,7 @@ CFATTACH_DECL_NEW(joy_ofisa, sizeof(stru
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "pnpPNP,b02f" },	/* generic joystick */
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/dev/ofisa/ess_ofisa.c
diff -u src/sys/dev/ofisa/ess_ofisa.c:1.30 src/sys/dev/ofisa/ess_ofisa.c:1.31
--- src/sys/dev/ofisa/ess_ofisa.c:1.30	Mon Jan 25 16:21:41 2021
+++ src/sys/dev/ofisa/ess_ofisa.c	Wed Jan 27 02:31:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ess_ofisa.c,v 1.30 2021/01/25 16:21:41 thorpej Exp $	*/
+/*	$NetBSD: ess_ofisa.c,v 1.31 2021/01/27 02:31:03 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.30 2021/01/25 16:21:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.31 2021/01/27 02:31:03 thorpej Exp $");
 
 #include 
 #include 
@@ -60,7 +60,7 @@ static const struct device_compatible_en
 	{ .compat = "ESST,es1887-codec" },	/* ESS 1887 */
 	{ .compat = "ESST,es1888-codec" },	/* ESS 1888 */
 	{ .compat = "ESST,es888-codec" },	/* ESS 888 */
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 int

Index: src/sys/dev/ofisa/if_cs_ofisa.c
diff -u src/sys/dev/ofisa/if_cs_ofisa.c:1.29 src/sys/dev/ofisa/if_cs_ofisa.c:1.30
--- src/sys/dev/ofisa/if_cs_ofisa.c:1.29	Mon Jan 25 16:21:41 2021
+++ src/sys/dev/ofisa/if_cs_ofisa.c	Wed Jan 27 02:31:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cs_ofisa.c,v 1.29 2021/01/25 16:21:41 thorpej Exp $	*/
+/*	$NetBSD: if_cs_ofisa.c,v 1.30 2021/01/27 02:31:03 thorpej Exp $	

CVS commit: src/sys/dev/i2c

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:29:48 UTC 2021

Modified Files:
src/sys/dev/i2c: ac100.c adadc.c adm1021.c adm1026.c anxedp.c as3722.c
asms.c at24cxx.c axp20x.c axp22x.c axppmic.c cwfg.c dbcool.c
ds1307.c dstemp.c em3027.c es8316ac.c fan53555.c fcu.c hytp14.c
ihidev.c lm75.c lm87.c m41st84.c max77620.c pca9685.c pcagpio.c
pcai2cmux.c pcf8563.c pcf8574.c rkpmic.c spdmem_i2c.c ssdfb_i2c.c
sy8106a.c tcagpio.c tcakp.c tda19988.c titemp.c tps65217pmic.c
tsllux.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/ac100.c src/sys/dev/i2c/tda19988.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/adadc.c src/sys/dev/i2c/pcagpio.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/i2c/adm1021.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/i2c/adm1026.c \
src/sys/dev/i2c/max77620.c src/sys/dev/i2c/titemp.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/anxedp.c src/sys/dev/i2c/pca9685.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/i2c/as3722.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/asms.c src/sys/dev/i2c/cwfg.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/i2c/at24cxx.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/i2c/axp20x.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/axp22x.c src/sys/dev/i2c/dstemp.c \
src/sys/dev/i2c/fan53555.c src/sys/dev/i2c/pcf8574.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/i2c/axppmic.c
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/i2c/dbcool.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/i2c/ds1307.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/em3027.c src/sys/dev/i2c/pcai2cmux.c \
src/sys/dev/i2c/ssdfb_i2c.c src/sys/dev/i2c/sy8106a.c \
src/sys/dev/i2c/tcagpio.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/es8316ac.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/i2c/fcu.c src/sys/dev/i2c/rkpmic.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/i2c/hytp14.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/i2c/ihidev.c \
src/sys/dev/i2c/tps65217pmic.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/i2c/lm75.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/i2c/lm87.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/i2c/m41st84.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/i2c/pcf8563.c src/sys/dev/i2c/tcakp.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/i2c/spdmem_i2c.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/tsllux.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/dev/i2c/ac100.c
diff -u src/sys/dev/i2c/ac100.c:1.6 src/sys/dev/i2c/ac100.c:1.7
--- src/sys/dev/i2c/ac100.c:1.6	Mon Jan 25 13:30:20 2021
+++ src/sys/dev/i2c/ac100.c	Wed Jan 27 02:29:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ac100.c,v 1.6 2021/01/25 13:30:20 thorpej Exp $ */
+/* $NetBSD: ac100.c,v 1.7 2021/01/27 02:29:48 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_fdt.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ac100.c,v 1.6 2021/01/25 13:30:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ac100.c,v 1.7 2021/01/27 02:29:48 thorpej Exp $");
 
 #include 
 #include 
@@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: ac100.c,v 1.
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "x-powers,ac100" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct ac100_softc {
Index: src/sys/dev/i2c/tda19988.c
diff -u src/sys/dev/i2c/tda19988.c:1.6 src/sys/dev/i2c/tda19988.c:1.7
--- src/sys/dev/i2c/tda19988.c:1.6	Mon Jan 25 13:30:20 2021
+++ src/sys/dev/i2c/tda19988.c	Wed Jan 27 02:29:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tda19988.c,v 1.6 2021/01/25 13:30:20 thorpej Exp $ */
+/* $NetBSD: tda19988.c,v 1.7 2021/01/27 02:29:48 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Oleksandr Tymoshenko 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tda19988.c,v 1.6 2021/01/25 13:30:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tda19988.c,v 1.7 2021/01/27 02:29:48 thorpej Exp $");
 
 /*
 * NXP TDA19988 HDMI encoder 
@@ -245,7 +245,7 @@ enum {
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "nxp,tda998x" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct tda19988_softc;

Index: src/sys/dev/i2c/adadc.c
diff -u src/sys/dev/i2c/adadc.c:1.9 src/sys/dev/i2c/adadc.c:1.10
--- src/sys/dev/i2c/adadc.c:1.9	Mon Jan 25 13:30:20 2021
+++ src/sys/dev/i2c/adadc.c	Wed Jan 27 02:29:48 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: adadc.c,v 1.9 2021/01/25 13:30:20 thorpej Exp $ */
+/* $NetBSD: adadc.c,v 1.10 2021/01/27 02:29:48 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Michael Lorenz
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: adadc.c,v 1.9 2021/01/25 13:30:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adadc.c,v 1.10 2021/01/27 02:29:48 thorpej Exp $");
 
 #include 
 #include 
@@ -95,7 +95,7 @@ CFATTACH_DECL_NEW(adadc, sizeof(struct a
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "ad7417" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 /* calibaration table from Darwin via 

CVS commit: src/sys/dev/i2c

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:28:37 UTC 2021

Modified Files:
src/sys/dev/i2c: twl4030.c

Log Message:
Replace 2 uses of of_match_compatible().  Also use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/twl4030.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/dev/i2c/twl4030.c
diff -u src/sys/dev/i2c/twl4030.c:1.4 src/sys/dev/i2c/twl4030.c:1.5
--- src/sys/dev/i2c/twl4030.c:1.4	Sun Jan 17 21:42:35 2021
+++ src/sys/dev/i2c/twl4030.c	Wed Jan 27 02:28:37 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: twl4030.c,v 1.4 2021/01/17 21:42:35 thorpej Exp $ */
+/* $NetBSD: twl4030.c,v 1.5 2021/01/27 02:28:37 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -29,7 +29,7 @@
 #include "opt_fdt.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: twl4030.c,v 1.4 2021/01/17 21:42:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twl4030.c,v 1.5 2021/01/27 02:28:37 thorpej Exp $");
 
 #include 
 #include 
@@ -100,13 +100,19 @@ struct twl_pin {
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "ti,twl4030" },
-
-	{ 0 }
+	DEVICE_COMPAT_EOL
 };
 
 #ifdef FDT
-static const char * const rtc_compatible[] = { "ti,twl4030-rtc", NULL };
-static const char * const gpio_compatible[] = { "ti,twl4030-gpio", NULL };
+static const struct device_compatible_entry rtc_compat_data[] = {
+	{ .compat = "ti,twl4030-rtc" },
+	DEVICE_COMPAT_EOL
+};
+
+static const struct device_compatible_entry gpio_compat_data[] = {
+	{ .compat = "ti,twl4030-gpio" },
+	DEVICE_COMPAT_EOL
+};
 #endif
 
 static uint8_t
@@ -384,10 +390,10 @@ twl_attach(device_t parent, device_t sel
 
 #ifdef FDT
 	for (int child = OF_child(sc->sc_phandle); child; child = OF_peer(child)) {
-		if (of_match_compatible(child, gpio_compatible)) {
+		if (of_match_compat_data(child, gpio_compat_data)) {
 			aprint_normal(", GPIO");
 			twl_gpio_attach(sc, child);
-		} else if (of_match_compatible(child, rtc_compatible)) {
+		} else if (of_match_compat_data(child, rtc_compat_data)) {
 			aprint_normal(", RTC");
 			twl_rtc_attach(sc, child);
 		}



CVS commit: src/sys/dev/fdt

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:24:10 UTC 2021

Modified Files:
src/sys/dev/fdt: amdccp_fdt.c connector_fdt.c dwc2_fdt.c dwcmmc_fdt.c
fdtbus.c i2cmux_fdt.c ns8250_uart.c panel_fdt.c pinctrl_single.c
vmt_fdt.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/amdccp_fdt.c \
src/sys/dev/fdt/panel_fdt.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/connector_fdt.c \
src/sys/dev/fdt/pinctrl_single.c src/sys/dev/fdt/vmt_fdt.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/fdt/dwc2_fdt.c \
src/sys/dev/fdt/i2cmux_fdt.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/fdt/dwcmmc_fdt.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/fdt/fdtbus.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/fdt/ns8250_uart.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/dev/fdt/amdccp_fdt.c
diff -u src/sys/dev/fdt/amdccp_fdt.c:1.4 src/sys/dev/fdt/amdccp_fdt.c:1.5
--- src/sys/dev/fdt/amdccp_fdt.c:1.4	Mon Jan 25 14:25:09 2021
+++ src/sys/dev/fdt/amdccp_fdt.c	Wed Jan 27 02:24:10 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: amdccp_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $ */
+/* $NetBSD: amdccp_fdt.c,v 1.5 2021/01/27 02:24:10 thorpej Exp $ */
 
 /*
  * Copyright (c) 2018 Jonathan A. Kollasch
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: amdccp_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdccp_fdt.c,v 1.5 2021/01/27 02:24:10 thorpej Exp $");
 
 #include 
 #include 
@@ -51,7 +51,7 @@ CFATTACH_DECL_NEW(amdccp_fdt, sizeof(str
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "amd,ccp-seattle-v1a" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int
Index: src/sys/dev/fdt/panel_fdt.c
diff -u src/sys/dev/fdt/panel_fdt.c:1.4 src/sys/dev/fdt/panel_fdt.c:1.5
--- src/sys/dev/fdt/panel_fdt.c:1.4	Mon Jan 25 14:25:09 2021
+++ src/sys/dev/fdt/panel_fdt.c	Wed Jan 27 02:24:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: panel_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $	*/
+/*	$NetBSD: panel_fdt.c,v 1.5 2021/01/27 02:24:10 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: panel_fdt.c,v 1.4 2021/01/25 14:25:09 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: panel_fdt.c,v 1.5 2021/01/27 02:24:10 thorpej Exp $");
 
 #include 
 #include 
@@ -71,7 +71,7 @@ CFATTACH_DECL_NEW(fdt_panel, sizeof(stru
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "panel-lvds",	.value = PANEL_LVDS},
 	{ .compat = "panel-dual-lvds",	.value = PANEL_DUAL_LVDS},
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/dev/fdt/connector_fdt.c
diff -u src/sys/dev/fdt/connector_fdt.c:1.3 src/sys/dev/fdt/connector_fdt.c:1.4
--- src/sys/dev/fdt/connector_fdt.c:1.3	Mon Jan 25 14:25:09 2021
+++ src/sys/dev/fdt/connector_fdt.c	Wed Jan 27 02:24:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: connector_fdt.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $	*/
+/*	$NetBSD: connector_fdt.c,v 1.4 2021/01/27 02:24:10 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: connector_fdt.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: connector_fdt.c,v 1.4 2021/01/27 02:24:10 thorpej Exp $");
 
 #include 
 #include 
@@ -74,7 +74,7 @@ static const struct device_compatible_en
 	{ .compat = "dvi-connector",			.value = CON_DVI},
 	{ .compat = "hdmi-connector",			.value = CON_HDMI},
 	{ .compat = "vga-connector",			.value = CON_VGA},
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int
Index: src/sys/dev/fdt/pinctrl_single.c
diff -u src/sys/dev/fdt/pinctrl_single.c:1.3 src/sys/dev/fdt/pinctrl_single.c:1.4
--- src/sys/dev/fdt/pinctrl_single.c:1.3	Mon Jan 25 14:25:09 2021
+++ src/sys/dev/fdt/pinctrl_single.c	Wed Jan 27 02:24:10 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pinctrl_single.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $ */
+/* $NetBSD: pinctrl_single.c,v 1.4 2021/01/27 02:24:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pinctrl_single.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pinctrl_single.c,v 1.4 2021/01/27 02:24:10 thorpej Exp $");
 
 #include 
 #include 
@@ -53,7 +53,7 @@ static const struct pinctrl_single_confi
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "pinctrl-single",	.data = _config },
 	{ .compat = "pinconf-single",	.data = _config },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct pinctrl_single_softc {
Index: src/sys/dev/fdt/vmt_fdt.c
diff -u src/sys/dev/fdt/vmt_fdt.c:1.3 src/sys/dev/fdt/vmt_fdt.c:1.4
--- src/sys/dev/fdt/vmt_fdt.c:1.3	Mon Jan 25 14:25:09 2021
+++ src/sys/dev/fdt/vmt_fdt.c	Wed Jan 27 02:24:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmt_fdt.c,v 1.3 2021/01/25 14:25:09 thorpej Exp $ */
+/*	

CVS commit: src/sys/arch

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:20:03 UTC 2021

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_cib.c octeon_intc.c
src/sys/arch/sparc64/dev: pcf8591_envctrl.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/cavium/dev/octeon_cib.c \
src/sys/arch/mips/cavium/dev/octeon_intc.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc64/dev/pcf8591_envctrl.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/mips/cavium/dev/octeon_cib.c
diff -u src/sys/arch/mips/cavium/dev/octeon_cib.c:1.4 src/sys/arch/mips/cavium/dev/octeon_cib.c:1.5
--- src/sys/arch/mips/cavium/dev/octeon_cib.c:1.4	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/mips/cavium/dev/octeon_cib.c	Wed Jan 27 02:20:03 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: octeon_cib.c,v 1.4 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: octeon_cib.c,v 1.5 2021/01/27 02:20:03 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_cib.c,v 1.4 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_cib.c,v 1.5 2021/01/27 02:20:03 thorpej Exp $");
 
 #include 
 #include 
@@ -92,7 +92,7 @@ CFATTACH_DECL_NEW(octcib, sizeof(struct 
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "cavium,octeon-7130-cib" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int
Index: src/sys/arch/mips/cavium/dev/octeon_intc.c
diff -u src/sys/arch/mips/cavium/dev/octeon_intc.c:1.4 src/sys/arch/mips/cavium/dev/octeon_intc.c:1.5
--- src/sys/arch/mips/cavium/dev/octeon_intc.c:1.4	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/mips/cavium/dev/octeon_intc.c	Wed Jan 27 02:20:03 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: octeon_intc.c,v 1.4 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: octeon_intc.c,v 1.5 2021/01/27 02:20:03 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: octeon_intc.c,v 1.4 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: octeon_intc.c,v 1.5 2021/01/27 02:20:03 thorpej Exp $");
 
 #include 
 #include 
@@ -71,7 +71,7 @@ CFATTACH_DECL_NEW(octintc, sizeof(struct
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "cavium,octeon-3860-ciu",	.value = OCTEON_INTC_CIU },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/sparc64/dev/pcf8591_envctrl.c
diff -u src/sys/arch/sparc64/dev/pcf8591_envctrl.c:1.18 src/sys/arch/sparc64/dev/pcf8591_envctrl.c:1.19
--- src/sys/arch/sparc64/dev/pcf8591_envctrl.c:1.18	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/sparc64/dev/pcf8591_envctrl.c	Wed Jan 27 02:20:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcf8591_envctrl.c,v 1.18 2021/01/25 14:20:39 thorpej Exp $	*/
+/*	$NetBSD: pcf8591_envctrl.c,v 1.19 2021/01/27 02:20:03 thorpej Exp $	*/
 /*	$OpenBSD: pcf8591_envctrl.c,v 1.6 2007/10/25 21:17:20 kettenis Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pcf8591_envctrl.c,v 1.18 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcf8591_envctrl.c,v 1.19 2021/01/27 02:20:03 thorpej Exp $");
 
 #include 
 #include 
@@ -98,7 +98,7 @@ CFATTACH_DECL3_NEW(ecadc, sizeof(struct 
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "ecadc" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int



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

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:17:28 UTC 2021

Modified Files:
src/sys/arch/macppc/dev: deq.c lmu.c psoc.c smusat.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/macppc/dev/deq.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/macppc/dev/lmu.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/macppc/dev/psoc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/macppc/dev/smusat.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/macppc/dev/deq.c
diff -u src/sys/arch/macppc/dev/deq.c:1.19 src/sys/arch/macppc/dev/deq.c:1.20
--- src/sys/arch/macppc/dev/deq.c:1.19	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/macppc/dev/deq.c	Wed Jan 27 02:17:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: deq.c,v 1.19 2021/01/25 14:20:39 thorpej Exp $	*/
+/*	$NetBSD: deq.c,v 1.20 2021/01/27 02:17:27 thorpej Exp $	*/
 
 /*-
  * Copyright (C) 2005 Michael Lorenz
@@ -32,7 +32,7 @@
  */
  
 #include 
-__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.19 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.20 2021/01/27 02:17:27 thorpej Exp $");
 
 #include 
 #include 
@@ -58,7 +58,7 @@ static const struct device_compatible_en
 	{ .compat = "pcm3052" },
 	{ .compat = "cs8416" },
 	{ .compat = "codec" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 int

Index: src/sys/arch/macppc/dev/lmu.c
diff -u src/sys/arch/macppc/dev/lmu.c:1.7 src/sys/arch/macppc/dev/lmu.c:1.8
--- src/sys/arch/macppc/dev/lmu.c:1.7	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/macppc/dev/lmu.c	Wed Jan 27 02:17:28 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lmu.c,v 1.7 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: lmu.c,v 1.8 2021/01/27 02:17:28 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2020 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lmu.c,v 1.7 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lmu.c,v 1.8 2021/01/27 02:17:28 thorpej Exp $");
 
 #include 
 #include 
@@ -83,7 +83,7 @@ CFATTACH_DECL_NEW(lmu, sizeof(struct lmu
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "lmu-micro" },
 	{ .compat = "lmu-controller" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 /* time between polling the light sensors */

Index: src/sys/arch/macppc/dev/psoc.c
diff -u src/sys/arch/macppc/dev/psoc.c:1.5 src/sys/arch/macppc/dev/psoc.c:1.6
--- src/sys/arch/macppc/dev/psoc.c:1.5	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/macppc/dev/psoc.c	Wed Jan 27 02:17:28 2021
@@ -1,4 +1,4 @@
- /* $NetBSD: psoc.c,v 1.5 2021/01/25 14:20:39 thorpej Exp $ */
+ /* $NetBSD: psoc.c,v 1.6 2021/01/27 02:17:28 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Michael Lorenz
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: psoc.c,v 1.5 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: psoc.c,v 1.6 2021/01/27 02:17:28 thorpej Exp $");
 
 #include 
 #include 
@@ -82,7 +82,7 @@ CFATTACH_DECL_NEW(psoc, sizeof(struct ps
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "Psoc" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/macppc/dev/smusat.c
diff -u src/sys/arch/macppc/dev/smusat.c:1.8 src/sys/arch/macppc/dev/smusat.c:1.9
--- src/sys/arch/macppc/dev/smusat.c:1.8	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/macppc/dev/smusat.c	Wed Jan 27 02:17:28 2021
@@ -108,7 +108,7 @@ CFATTACH_DECL_NEW(smusat, sizeof(struct 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "sat" },
 	{ .compat = "smu-sat" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int



CVS commit: src/sys/arch/arm/nxp

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:14:49 UTC 2021

Modified Files:
src/sys/arch/arm/nxp: if_enet_imx.c imx6_pcie.c imx6_spi.c
imx8mq_usbphy.c imx_sdhc.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nxp/if_enet_imx.c \
src/sys/arch/arm/nxp/imx6_pcie.c src/sys/arch/arm/nxp/imx_sdhc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nxp/imx6_spi.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nxp/imx8mq_usbphy.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/arm/nxp/if_enet_imx.c
diff -u src/sys/arch/arm/nxp/if_enet_imx.c:1.4 src/sys/arch/arm/nxp/if_enet_imx.c:1.5
--- src/sys/arch/arm/nxp/if_enet_imx.c:1.4	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nxp/if_enet_imx.c	Wed Jan 27 02:14:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_enet_imx.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $	*/
+/*	$NetBSD: if_enet_imx.c,v 1.5 2021/01/27 02:14:49 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.5 2021/01/27 02:14:49 thorpej Exp $");
 
 #include "opt_fdt.h"
 
@@ -53,7 +53,7 @@ static const struct device_compatible_en
 	/* compatible			imxtype */
 	{ .compat = "fsl,imx6q-fec",	.value = 6 },
 	{ .compat = "fsl,imx6sx-fec",	.value = 7 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int enet_init_clocks(struct enet_softc *);
Index: src/sys/arch/arm/nxp/imx6_pcie.c
diff -u src/sys/arch/arm/nxp/imx6_pcie.c:1.4 src/sys/arch/arm/nxp/imx6_pcie.c:1.5
--- src/sys/arch/arm/nxp/imx6_pcie.c:1.4	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nxp/imx6_pcie.c	Wed Jan 27 02:14:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_pcie.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $	*/
+/*	$NetBSD: imx6_pcie.c,v 1.5 2021/01/27 02:14:49 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.5 2021/01/27 02:14:49 thorpej Exp $");
 
 #include "opt_pci.h"
 #include "opt_fdt.h"
@@ -92,7 +92,7 @@ CFATTACH_DECL_NEW(imxpcie_fdt, sizeof(st
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "fsl,imx6q-pcie",	.value = false },
 	{ .compat = "fsl,imx6qp-pcie",	.value = true },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int
Index: src/sys/arch/arm/nxp/imx_sdhc.c
diff -u src/sys/arch/arm/nxp/imx_sdhc.c:1.4 src/sys/arch/arm/nxp/imx_sdhc.c:1.5
--- src/sys/arch/arm/nxp/imx_sdhc.c:1.4	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nxp/imx_sdhc.c	Wed Jan 27 02:14:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx_sdhc.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $	*/
+/*	$NetBSD: imx_sdhc.c,v 1.5 2021/01/27 02:14:49 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx_sdhc.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx_sdhc.c,v 1.5 2021/01/27 02:14:49 thorpej Exp $");
 
 #include "opt_fdt.h"
 
@@ -87,7 +87,7 @@ static const struct imx6_sdhc_config imx
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "fsl,imx6q-usdhc",	.data = _config },
 	{ .compat = "fsl,imx7d-usdhc",	.data = _config },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/nxp/imx6_spi.c
diff -u src/sys/arch/arm/nxp/imx6_spi.c:1.5 src/sys/arch/arm/nxp/imx6_spi.c:1.6
--- src/sys/arch/arm/nxp/imx6_spi.c:1.5	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nxp/imx6_spi.c	Wed Jan 27 02:14:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx6_spi.c,v 1.5 2021/01/25 14:20:38 thorpej Exp $	*/
+/*	$NetBSD: imx6_spi.c,v 1.6 2021/01/27 02:14:49 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2019 Genetec Corporation.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imx6_spi.c,v 1.5 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx6_spi.c,v 1.6 2021/01/27 02:14:49 thorpej Exp $");
 
 #include "opt_imxspi.h"
 
@@ -62,7 +62,7 @@ static const struct imx_spi_config imx6q
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "fsl,imx6q-ecspi",	.data = _spi_config },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 CFATTACH_DECL_NEW(imxspi_fdt, sizeof(struct imxspi_fdt_softc),

Index: src/sys/arch/arm/nxp/imx8mq_usbphy.c
diff -u src/sys/arch/arm/nxp/imx8mq_usbphy.c:1.3 src/sys/arch/arm/nxp/imx8mq_usbphy.c:1.4
--- src/sys/arch/arm/nxp/imx8mq_usbphy.c:1.3	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nxp/imx8mq_usbphy.c	Wed Jan 27 02:14:49 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: imx8mq_usbphy.c,v 1.3 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: imx8mq_usbphy.c,v 1.4 2021/01/27 02:14:49 

CVS commit: src/sys/arch/arm/ti

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:12:16 UTC 2021

Modified Files:
src/sys/arch/arm/ti: ti_gpio.c ti_iic.c ti_omapintc.c ti_omaptimer.c
ti_sdhc.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/ti/ti_gpio.c \
src/sys/arch/arm/ti/ti_sdhc.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/ti/ti_iic.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/ti/ti_omapintc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/ti/ti_omaptimer.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/arm/ti/ti_gpio.c
diff -u src/sys/arch/arm/ti/ti_gpio.c:1.8 src/sys/arch/arm/ti/ti_gpio.c:1.9
--- src/sys/arch/arm/ti/ti_gpio.c:1.8	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/ti/ti_gpio.c	Wed Jan 27 02:12:16 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_gpio.c,v 1.8 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: ti_gpio.c,v 1.9 2021/01/27 02:12:16 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 1.8 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_gpio.c,v 1.9 2021/01/27 02:12:16 thorpej Exp $");
 
 #include 
 #include 
@@ -102,7 +102,7 @@ static const u_int ti_gpio_regmap[TI_NGP
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "ti,omap3-gpio",	.value = TI_GPIO_OMAP3 },
 	{ .compat = "ti,omap4-gpio",	.value = TI_GPIO_OMAP4 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct ti_gpio_intr {
Index: src/sys/arch/arm/ti/ti_sdhc.c
diff -u src/sys/arch/arm/ti/ti_sdhc.c:1.8 src/sys/arch/arm/ti/ti_sdhc.c:1.9
--- src/sys/arch/arm/ti/ti_sdhc.c:1.8	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/ti/ti_sdhc.c	Wed Jan 27 02:12:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ti_sdhc.c,v 1.8 2021/01/25 14:20:39 thorpej Exp $	*/
+/*	$NetBSD: ti_sdhc.c,v 1.9 2021/01/27 02:12:16 thorpej Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.8 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_sdhc.c,v 1.9 2021/01/27 02:12:16 thorpej Exp $");
 
 #include 
 #include 
@@ -95,7 +95,7 @@ static const struct device_compatible_en
 	{ .compat = "ti,omap4-hsmmc",
 	  .data = _hsmmc_config },
 
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 enum {

Index: src/sys/arch/arm/ti/ti_iic.c
diff -u src/sys/arch/arm/ti/ti_iic.c:1.11 src/sys/arch/arm/ti/ti_iic.c:1.12
--- src/sys/arch/arm/ti/ti_iic.c:1.11	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/ti/ti_iic.c	Wed Jan 27 02:12:16 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_iic.c,v 1.11 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: ti_iic.c,v 1.12 2021/01/27 02:12:16 thorpej Exp $ */
 
 /*
  * Copyright (c) 2013 Manuel Bouyer.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.11 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_iic.c,v 1.12 2021/01/27 02:12:16 thorpej Exp $");
 
 #include 
 #include 
@@ -150,7 +150,7 @@ static const struct device_compatible_en
 	/* compatible			type */
 	{ .compat = "ti,omap3-i2c",	.value = TI_IIC_OMAP3 },
 	{ .compat = "ti,omap4-i2c",	.value = TI_IIC_OMAP4 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 /* operation in progress */

Index: src/sys/arch/arm/ti/ti_omapintc.c
diff -u src/sys/arch/arm/ti/ti_omapintc.c:1.6 src/sys/arch/arm/ti/ti_omapintc.c:1.7
--- src/sys/arch/arm/ti/ti_omapintc.c:1.6	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/ti/ti_omapintc.c	Wed Jan 27 02:12:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ti_omapintc.c,v 1.6 2021/01/25 14:20:39 thorpej Exp $	*/
+/*	$NetBSD: ti_omapintc.c,v 1.7 2021/01/27 02:12:16 thorpej Exp $	*/
 /*
  * Define the SDP2430 specific information and then include the generic OMAP
  * interrupt header.
@@ -29,7 +29,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_omapintc.c,v 1.6 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_omapintc.c,v 1.7 2021/01/27 02:12:16 thorpej Exp $");
 
 #include 
 #include 
@@ -61,7 +61,7 @@ static const struct device_compatible_en
 	/* compatible			number of banks */
 	{ .compat = "ti,omap3-intc",	.value = 3 },
 	{ .compat = "ti,am33xx-intc",	.value = 4 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 #define	INTC_READ(sc, g, o)		\

Index: src/sys/arch/arm/ti/ti_omaptimer.c
diff -u src/sys/arch/arm/ti/ti_omaptimer.c:1.7 src/sys/arch/arm/ti/ti_omaptimer.c:1.8
--- src/sys/arch/arm/ti/ti_omaptimer.c:1.7	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/ti/ti_omaptimer.c	Wed Jan 27 02:12:16 2021
@@ -1,7 +1,7 @@
-/*	$NetBSD: ti_omaptimer.c,v 1.7 2021/01/25 14:20:39 thorpej Exp $	*/
+/*	$NetBSD: ti_omaptimer.c,v 1.8 2021/01/27 02:12:16 thorpej Exp $	*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ti_omaptimer.c,v 1.7 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_omaptimer.c,v 1.8 2021/01/27 

CVS commit: src/sys/arch/arm/sunxi

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:09:39 UTC 2021

Modified Files:
src/sys/arch/arm/sunxi: sun4i_a10_ccu.c sun4i_dma.c sun6i_dma.c
sun8i_crypto.c sunxi_can.c sunxi_codec.c sunxi_de2_ccu.c
sunxi_dep.c sunxi_emac.c sunxi_gpio.c sunxi_hdmi.c sunxi_hdmiphy.c
sunxi_i2s.c sunxi_lcdc.c sunxi_lradc.c sunxi_mixer.c sunxi_mmc.c
sunxi_musb.c sunxi_nmi.c sunxi_pwm.c sunxi_rsb.c sunxi_rtc.c
sunxi_sid.c sunxi_sramc.c sunxi_tcon.c sunxi_thermal.c sunxi_ts.c
sunxi_twi.c sunxi_usb3phy.c sunxi_usbphy.c sunxi_wdt.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c \
src/sys/arch/arm/sunxi/sunxi_mixer.c \
src/sys/arch/arm/sunxi/sunxi_usbphy.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sun4i_dma.c \
src/sys/arch/arm/sunxi/sunxi_can.c src/sys/arch/arm/sunxi/sunxi_hdmiphy.c \
src/sys/arch/arm/sunxi/sunxi_ts.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/sun6i_dma.c \
src/sys/arch/arm/sunxi/sunxi_hdmi.c src/sys/arch/arm/sunxi/sunxi_rsb.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/sunxi/sun8i_crypto.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/sunxi/sunxi_codec.c \
src/sys/arch/arm/sunxi/sunxi_i2s.c src/sys/arch/arm/sunxi/sunxi_lcdc.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_de2_ccu.c \
src/sys/arch/arm/sunxi/sunxi_dep.c src/sys/arch/arm/sunxi/sunxi_pwm.c \
src/sys/arch/arm/sunxi/sunxi_sid.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/sunxi/sunxi_emac.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/arm/sunxi/sunxi_gpio.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_lradc.c \
src/sys/arch/arm/sunxi/sunxi_wdt.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/arm/sunxi/sunxi_mmc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/sunxi/sunxi_musb.c \
src/sys/arch/arm/sunxi/sunxi_rtc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sunxi/sunxi_nmi.c \
src/sys/arch/arm/sunxi/sunxi_sramc.c src/sys/arch/arm/sunxi/sunxi_tcon.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/sunxi/sunxi_thermal.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/sunxi/sunxi_twi.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_usb3phy.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/arm/sunxi/sun4i_a10_ccu.c
diff -u src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.14 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.15
--- src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.14	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/sunxi/sun4i_a10_ccu.c	Wed Jan 27 02:09:39 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sun4i_a10_ccu.c,v 1.14 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: sun4i_a10_ccu.c,v 1.15 2021/01/27 02:09:39 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.14 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.15 2021/01/27 02:09:39 thorpej Exp $");
 
 #include 
 #include 
@@ -96,7 +96,7 @@ enum sun4i_a10_ccu_type {
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "allwinner,sun4i-a10-ccu",	.value = CCU_A10 },
 	{ .compat = "allwinner,sun7i-a20-ccu",	.value = CCU_A20 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 CFATTACH_DECL_NEW(sunxi_a10_ccu, sizeof(struct sunxi_ccu_softc),
Index: src/sys/arch/arm/sunxi/sunxi_mixer.c
diff -u src/sys/arch/arm/sunxi/sunxi_mixer.c:1.14 src/sys/arch/arm/sunxi/sunxi_mixer.c:1.15
--- src/sys/arch/arm/sunxi/sunxi_mixer.c:1.14	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/sunxi/sunxi_mixer.c	Wed Jan 27 02:09:39 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mixer.c,v 1.14 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: sunxi_mixer.c,v 1.15 2021/01/27 02:09:39 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.14 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.15 2021/01/27 02:09:39 thorpej Exp $");
 
 #include 
 #include 
@@ -206,7 +206,7 @@ static const struct device_compatible_en
 	{ .compat = "allwinner,sun50i-a64-de2-mixer-1",
 	  .data = _data },
 
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct sunxi_mixer_softc;
Index: src/sys/arch/arm/sunxi/sunxi_usbphy.c
diff -u src/sys/arch/arm/sunxi/sunxi_usbphy.c:1.14 src/sys/arch/arm/sunxi/sunxi_usbphy.c:1.15
--- src/sys/arch/arm/sunxi/sunxi_usbphy.c:1.14	Mon Jan 25 14:20:39 2021
+++ src/sys/arch/arm/sunxi/sunxi_usbphy.c	Wed Jan 27 02:09:39 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_usbphy.c,v 1.14 2021/01/25 14:20:39 thorpej Exp $ */
+/* $NetBSD: sunxi_usbphy.c,v 1.15 2021/01/27 02:09:39 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_usbphy.c,v 1.14 2021/01/25 14:20:39 thorpej Exp $");
+__KERNEL_RCSID(0, 

CVS commit: src/sys/arch/arm/sociox

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:03:10 UTC 2021

Modified Files:
src/sys/arch/arm/sociox: if_ave.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/sociox/if_ave.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/arm/sociox/if_ave.c
diff -u src/sys/arch/arm/sociox/if_ave.c:1.19 src/sys/arch/arm/sociox/if_ave.c:1.20
--- src/sys/arch/arm/sociox/if_ave.c:1.19	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/sociox/if_ave.c	Wed Jan 27 02:03:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ave.c,v 1.19 2021/01/25 14:20:38 thorpej Exp $	*/
+/*	$NetBSD: if_ave.c,v 1.20 2021/01/27 02:03:10 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.19 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.20 2021/01/27 02:03:10 thorpej Exp $");
 
 #include 
 #include 
@@ -327,7 +327,7 @@ static const struct device_compatible_en
 	{ .compat = "socionext,unifier-pxs2-ave4", .value = 32 },
 	{ .compat = "socionext,unifier-ld11-ave4", .value = 32 },
 	{ .compat = "socionext,unifier-pxs3-ave4", .value = 32 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int



CVS commit: src/sys/arch/arm/samsung

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:01:53 UTC 2021

Modified Files:
src/sys/arch/arm/samsung: exynos_dwcmmc.c exynos_pinctrl.c
exynos_platform.c exynos_usbdrdphy.c exynos_usbphy.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/samsung/exynos_dwcmmc.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/samsung/exynos_pinctrl.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/samsung/exynos_platform.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/samsung/exynos_usbdrdphy.c \
src/sys/arch/arm/samsung/exynos_usbphy.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/arm/samsung/exynos_dwcmmc.c
diff -u src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.12 src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.13
--- src/sys/arch/arm/samsung/exynos_dwcmmc.c:1.12	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/samsung/exynos_dwcmmc.c	Wed Jan 27 02:01:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_dwcmmc.c,v 1.12 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: exynos_dwcmmc.c,v 1.13 2021/01/27 02:01:53 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.12 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_dwcmmc.c,v 1.13 2021/01/27 02:01:53 thorpej Exp $");
 
 #include 
 #include 
@@ -74,7 +74,7 @@ static const struct device_compatible_en
 	{ .compat = "samsung,exynos5250-dw-mshc",	.value = 0 },
 	{ .compat = "samsung,exynos5420-dw-mshc-smu",	.value = 1 },
 	{ .compat = "samsung,exynos5420-dw-mshc",	.value = 0 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/samsung/exynos_pinctrl.c
diff -u src/sys/arch/arm/samsung/exynos_pinctrl.c:1.19 src/sys/arch/arm/samsung/exynos_pinctrl.c:1.20
--- src/sys/arch/arm/samsung/exynos_pinctrl.c:1.19	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/samsung/exynos_pinctrl.c	Wed Jan 27 02:01:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_pinctrl.c,v 1.19 2021/01/25 14:20:38 thorpej Exp $ */
+/*	$NetBSD: exynos_pinctrl.c,v 1.20 2021/01/27 02:01:53 thorpej Exp $ */
 
 /*-
 * Copyright (c) 2015, 2020 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 #include "gpio.h"
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: exynos_pinctrl.c,v 1.19 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exynos_pinctrl.c,v 1.20 2021/01/27 02:01:53 thorpej Exp $");
 
 #include 
 #include 
@@ -79,7 +79,7 @@ static const struct device_compatible_en
 	{ .compat = "samsung,exynos5420-pinctrl",
 	  .data = _pinctrl_banks },
 
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/samsung/exynos_platform.c
diff -u src/sys/arch/arm/samsung/exynos_platform.c:1.34 src/sys/arch/arm/samsung/exynos_platform.c:1.35
--- src/sys/arch/arm/samsung/exynos_platform.c:1.34	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/samsung/exynos_platform.c	Wed Jan 27 02:01:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_platform.c,v 1.34 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: exynos_platform.c,v 1.35 2021/01/27 02:01:53 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -35,7 +35,7 @@
 #include "ukbd.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.34 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.35 2021/01/27 02:01:53 thorpej Exp $");
 
 
 /*
@@ -198,7 +198,7 @@ exynos5800_mpstart(void)
 
 static struct device_compatible_entry mp_compat_data[] = {
 	{ .compat = "samsung,exynos5800",	.data = exynos5800_mpstart },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/samsung/exynos_usbdrdphy.c
diff -u src/sys/arch/arm/samsung/exynos_usbdrdphy.c:1.4 src/sys/arch/arm/samsung/exynos_usbdrdphy.c:1.5
--- src/sys/arch/arm/samsung/exynos_usbdrdphy.c:1.4	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/samsung/exynos_usbdrdphy.c	Wed Jan 27 02:01:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos_usbdrdphy.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: exynos_usbdrdphy.c,v 1.5 2021/01/27 02:01:53 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: exynos_usbdrdphy.c,v 1.4 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_usbdrdphy.c,v 1.5 2021/01/27 02:01:53 thorpej Exp $");
 
 #include 
 #include 
@@ -91,7 +91,7 @@ enum {
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "samsung,exynos5420-usbdrd-phy" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct exynos_usbdrdphy_softc;
Index: src/sys/arch/arm/samsung/exynos_usbphy.c
diff -u src/sys/arch/arm/samsung/exynos_usbphy.c:1.4 src/sys/arch/arm/samsung/exynos_usbphy.c:1.5
--- src/sys/arch/arm/samsung/exynos_usbphy.c:1.4	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/samsung/exynos_usbphy.c	Wed Jan 27 02:01:53 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: 

CVS commit: src/sys/arch/arm/rockchip

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 02:00:02 UTC 2021

Modified Files:
src/sys/arch/arm/rockchip: rk3399_iomux.c rk_pwm.c rk_tsadc.c rk_usb.c
rk_v1crypto.c rk_vop.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/rockchip/rk3399_iomux.c \
src/sys/arch/arm/rockchip/rk_vop.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/rockchip/rk_pwm.c \
src/sys/arch/arm/rockchip/rk_v1crypto.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/rockchip/rk_tsadc.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/rockchip/rk_usb.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/arm/rockchip/rk3399_iomux.c
diff -u src/sys/arch/arm/rockchip/rk3399_iomux.c:1.8 src/sys/arch/arm/rockchip/rk3399_iomux.c:1.9
--- src/sys/arch/arm/rockchip/rk3399_iomux.c:1.8	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/rockchip/rk3399_iomux.c	Wed Jan 27 02:00:02 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: rk3399_iomux.c,v 1.8 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: rk3399_iomux.c,v 1.9 2021/01/27 02:00:02 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -29,7 +29,7 @@
 //#define RK3399_IOMUX_DEBUG
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rk3399_iomux.c,v 1.8 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk3399_iomux.c,v 1.9 2021/01/27 02:00:02 thorpej Exp $");
 
 #include 
 #include 
@@ -183,7 +183,7 @@ static const struct rk3399_iomux_conf rk
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "rockchip,rk3399-pinctrl",	.data = _iomux_conf },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct rk3399_iomux_softc {
Index: src/sys/arch/arm/rockchip/rk_vop.c
diff -u src/sys/arch/arm/rockchip/rk_vop.c:1.8 src/sys/arch/arm/rockchip/rk_vop.c:1.9
--- src/sys/arch/arm/rockchip/rk_vop.c:1.8	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/rockchip/rk_vop.c	Wed Jan 27 02:00:02 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_vop.c,v 1.8 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: rk_vop.c,v 1.9 2021/01/27 02:00:02 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.8 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.9 2021/01/27 02:00:02 thorpej Exp $");
 
 #include 
 #include 
@@ -224,7 +224,7 @@ static const struct device_compatible_en
 	{ .compat = "rockchip,rk3399-vop-lit",
 	  .data = _vop_lit_config },
 
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/rockchip/rk_pwm.c
diff -u src/sys/arch/arm/rockchip/rk_pwm.c:1.5 src/sys/arch/arm/rockchip/rk_pwm.c:1.6
--- src/sys/arch/arm/rockchip/rk_pwm.c:1.5	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/rockchip/rk_pwm.c	Wed Jan 27 02:00:02 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_pwm.c,v 1.5 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: rk_pwm.c,v 1.6 2021/01/27 02:00:02 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: rk_pwm.c,v 1.5 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk_pwm.c,v 1.6 2021/01/27 02:00:02 thorpej Exp $");
 
 #include 
 #include 
@@ -65,7 +65,7 @@ enum rk_pwm_type {
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "rockchip,rk3288-pwm",	.value = PWM_RK3288 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct rk_pwm_softc {
Index: src/sys/arch/arm/rockchip/rk_v1crypto.c
diff -u src/sys/arch/arm/rockchip/rk_v1crypto.c:1.5 src/sys/arch/arm/rockchip/rk_v1crypto.c:1.6
--- src/sys/arch/arm/rockchip/rk_v1crypto.c:1.5	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/rockchip/rk_v1crypto.c	Wed Jan 27 02:00:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rk_v1crypto.c,v 1.5 2021/01/25 14:20:38 thorpej Exp $	*/
+/*	$NetBSD: rk_v1crypto.c,v 1.6 2021/01/27 02:00:02 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: rk_v1crypto.c,v 1.5 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk_v1crypto.c,v 1.6 2021/01/27 02:00:02 thorpej Exp $");
 
 #include 
 
@@ -100,7 +100,7 @@ CFATTACH_DECL_NEW(rk_v1crypto, sizeof(st
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "rockchip,rk3288-crypto" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/rockchip/rk_tsadc.c
diff -u src/sys/arch/arm/rockchip/rk_tsadc.c:1.10 src/sys/arch/arm/rockchip/rk_tsadc.c:1.11
--- src/sys/arch/arm/rockchip/rk_tsadc.c:1.10	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/rockchip/rk_tsadc.c	Wed Jan 27 02:00:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rk_tsadc.c,v 1.10 2021/01/25 14:20:38 thorpej Exp $	*/
+/*	$NetBSD: rk_tsadc.c,v 1.11 2021/01/27 02:00:02 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -30,7 +30,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: rk_tsadc.c,v 1.10 

CVS commit: src/sys/arch/arm/nvidia

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 01:58:15 UTC 2021

Modified Files:
src/sys/arch/arm/nvidia: tegra_ahcisata.c tegra_pcie.c tegra_soctherm.c
tegra_xusb.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_ahcisata.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/nvidia/tegra_pcie.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/nvidia/tegra_soctherm.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/nvidia/tegra_xusb.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/arm/nvidia/tegra_ahcisata.c
diff -u src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.16 src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.17
--- src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.16	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nvidia/tegra_ahcisata.c	Wed Jan 27 01:58:15 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_ahcisata.c,v 1.16 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: tegra_ahcisata.c,v 1.17 2021/01/27 01:58:15 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_ahcisata.c,v 1.16 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_ahcisata.c,v 1.17 2021/01/27 01:58:15 thorpej Exp $");
 
 #include 
 #include 
@@ -105,7 +105,7 @@ struct tegra_ahcisata_data tegra210_ahci
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "nvidia,tegra124-ahci", .data = _ahcisata_data },
 	{ .compat = "nvidia,tegra210-ahci", .data = _ahcisata_data },
-	{ },
+	DEVICE_COMPAT_EOL,
 };
 
 

Index: src/sys/arch/arm/nvidia/tegra_pcie.c
diff -u src/sys/arch/arm/nvidia/tegra_pcie.c:1.34 src/sys/arch/arm/nvidia/tegra_pcie.c:1.35
--- src/sys/arch/arm/nvidia/tegra_pcie.c:1.34	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nvidia/tegra_pcie.c	Wed Jan 27 01:58:15 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pcie.c,v 1.34 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: tegra_pcie.c,v 1.35 2021/01/27 01:58:15 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.34 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.35 2021/01/27 01:58:15 thorpej Exp $");
 
 #include 
 
@@ -139,7 +139,7 @@ CFATTACH_DECL_NEW(tegra_pcie, sizeof(str
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "nvidia,tegra210-pcie",	.value = TEGRA_PCIE_210 },
 	{ .compat = "nvidia,tegra124-pcie",	.value = TEGRA_PCIE_124 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/nvidia/tegra_soctherm.c
diff -u src/sys/arch/arm/nvidia/tegra_soctherm.c:1.11 src/sys/arch/arm/nvidia/tegra_soctherm.c:1.12
--- src/sys/arch/arm/nvidia/tegra_soctherm.c:1.11	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nvidia/tegra_soctherm.c	Wed Jan 27 01:58:15 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_soctherm.c,v 1.11 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: tegra_soctherm.c,v 1.12 2021/01/27 01:58:15 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_soctherm.c,v 1.11 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_soctherm.c,v 1.12 2021/01/27 01:58:15 thorpej Exp $");
 
 #include 
 #include 
@@ -163,7 +163,7 @@ static const struct device_compatible_en
 	{ .compat = "nvidia,tegra124-soctherm",
 	  .data = _soctherm_config },
 
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int

Index: src/sys/arch/arm/nvidia/tegra_xusb.c
diff -u src/sys/arch/arm/nvidia/tegra_xusb.c:1.24 src/sys/arch/arm/nvidia/tegra_xusb.c:1.25
--- src/sys/arch/arm/nvidia/tegra_xusb.c:1.24	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/nvidia/tegra_xusb.c	Wed Jan 27 01:58:15 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_xusb.c,v 1.24 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: tegra_xusb.c,v 1.25 2021/01/27 01:58:15 thorpej Exp $ */
 
 /*
  * Copyright (c) 2016 Jonathan A. Kollasch
@@ -30,7 +30,7 @@
 #include "opt_tegra.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.24 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.25 2021/01/27 01:58:15 thorpej Exp $");
 
 #include 
 #include 
@@ -148,7 +148,7 @@ struct tegra_xhci_data tegra210_xhci_dat
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "nvidia,tegra124-xusb", .data = _xhci_data },
 	{ .compat = "nvidia,tegra210-xusb", .data = _xhci_data },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct fw_dma {



CVS commit: src/sys/arch/arm/fdt

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 01:54:06 UTC 2021

Modified Files:
src/sys/arch/arm/fdt: gicv3_fdt.c pcihost_fdt.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/fdt/gicv3_fdt.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/fdt/pcihost_fdt.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/arm/fdt/gicv3_fdt.c
diff -u src/sys/arch/arm/fdt/gicv3_fdt.c:1.13 src/sys/arch/arm/fdt/gicv3_fdt.c:1.14
--- src/sys/arch/arm/fdt/gicv3_fdt.c:1.13	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/fdt/gicv3_fdt.c	Wed Jan 27 01:54:06 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_fdt.c,v 1.13 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: gicv3_fdt.c,v 1.14 2021/01/27 01:54:06 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015-2018 Jared McNeill 
@@ -31,7 +31,7 @@
 #define	_INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gicv3_fdt.c,v 1.13 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_fdt.c,v 1.14 2021/01/27 01:54:06 thorpej Exp $");
 
 #include 
 #include 
@@ -109,7 +109,7 @@ struct gicv3_fdt_softc {
 
 static const struct device_compatible_entry gicv3_fdt_quirks[] = {
 	{ .compat = "rockchip,rk3399",		.value = GICV3_QUIRK_RK3399 },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 CFATTACH_DECL_NEW(gicv3_fdt, sizeof(struct gicv3_fdt_softc),
@@ -117,7 +117,7 @@ CFATTACH_DECL_NEW(gicv3_fdt, sizeof(stru
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "arm,gic-v3" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int
@@ -181,7 +181,7 @@ gicv3_fdt_attach(device_t parent, device
 		/* Interrupt Translation Services */
 		static const struct device_compatible_entry its_compat[] = {
 			{ .compat = "arm,gic-v3-its" },
-			{ }
+			DEVICE_COMPAT_EOL
 		};
 
 		for (int child = OF_child(phandle); child;

Index: src/sys/arch/arm/fdt/pcihost_fdt.c
diff -u src/sys/arch/arm/fdt/pcihost_fdt.c:1.21 src/sys/arch/arm/fdt/pcihost_fdt.c:1.22
--- src/sys/arch/arm/fdt/pcihost_fdt.c:1.21	Mon Jan 25 14:20:38 2021
+++ src/sys/arch/arm/fdt/pcihost_fdt.c	Wed Jan 27 01:54:06 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.21 2021/01/25 14:20:38 thorpej Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.22 2021/01/27 01:54:06 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.21 2021/01/25 14:20:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.22 2021/01/27 01:54:06 thorpej Exp $");
 
 #include 
 
@@ -98,7 +98,7 @@ CFATTACH_DECL_NEW(pcihost_fdt, sizeof(st
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "pci-host-cam-generic",	.value = PCIHOST_CAM },
 	{ .compat = "pci-host-ecam-generic",	.value = PCIHOST_ECAM },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int



CVS commit: src/sys/arch/arm/amlogic

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 01:49:36 UTC 2021

Modified Files:
src/sys/arch/arm/amlogic: meson_pinctrl.c meson_pwm.c meson_thermal.c
meson_usbctrl.c meson_usbphy.c mesong12_clkc.c mesongx_mmc.c
mesongxbb_clkc.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/amlogic/meson_pinctrl.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/amlogic/meson_pwm.c \
src/sys/arch/arm/amlogic/meson_usbctrl.c \
src/sys/arch/arm/amlogic/mesong12_clkc.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/amlogic/meson_thermal.c \
src/sys/arch/arm/amlogic/meson_usbphy.c \
src/sys/arch/arm/amlogic/mesongxbb_clkc.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/amlogic/mesongx_mmc.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/arm/amlogic/meson_pinctrl.c
diff -u src/sys/arch/arm/amlogic/meson_pinctrl.c:1.9 src/sys/arch/arm/amlogic/meson_pinctrl.c:1.10
--- src/sys/arch/arm/amlogic/meson_pinctrl.c:1.9	Mon Jan 25 14:20:37 2021
+++ src/sys/arch/arm/amlogic/meson_pinctrl.c	Wed Jan 27 01:49:36 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_pinctrl.c,v 1.9 2021/01/25 14:20:37 thorpej Exp $ */
+/* $NetBSD: meson_pinctrl.c,v 1.10 2021/01/27 01:49:36 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_soc.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: meson_pinctrl.c,v 1.9 2021/01/25 14:20:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_pinctrl.c,v 1.10 2021/01/27 01:49:36 thorpej Exp $");
 
 #include 
 #include 
@@ -96,7 +96,7 @@ static const struct device_compatible_en
 	{ .compat = "amlogic,meson-g12a-periphs-pinctrl",
 	  .data = _periphs_pinctrl_config },
 #endif
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 #define	MUX_READ(sc, reg)\

Index: src/sys/arch/arm/amlogic/meson_pwm.c
diff -u src/sys/arch/arm/amlogic/meson_pwm.c:1.3 src/sys/arch/arm/amlogic/meson_pwm.c:1.4
--- src/sys/arch/arm/amlogic/meson_pwm.c:1.3	Mon Jan 25 14:20:37 2021
+++ src/sys/arch/arm/amlogic/meson_pwm.c	Wed Jan 27 01:49:36 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_pwm.c,v 1.3 2021/01/25 14:20:37 thorpej Exp $ */
+/* $NetBSD: meson_pwm.c,v 1.4 2021/01/27 01:49:36 thorpej Exp $ */
 
 /*
  * Copyright (c) 2021 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: meson_pwm.c,v 1.3 2021/01/25 14:20:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_pwm.c,v 1.4 2021/01/27 01:49:36 thorpej Exp $");
 
 #include 
 #include 
@@ -69,7 +69,7 @@ static const struct device_compatible_en
 	{ .compat = "amlogic,meson-g12a-ao-pwm-ab" },
 	{ .compat = "amlogic,meson-g12a-ao-pwm-cd" },
 	{ .compat = "amlogic,meson-g12a-ee-pwm" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 #define MESON_PWM_NCHAN	2
Index: src/sys/arch/arm/amlogic/meson_usbctrl.c
diff -u src/sys/arch/arm/amlogic/meson_usbctrl.c:1.3 src/sys/arch/arm/amlogic/meson_usbctrl.c:1.4
--- src/sys/arch/arm/amlogic/meson_usbctrl.c:1.3	Mon Jan 25 14:20:37 2021
+++ src/sys/arch/arm/amlogic/meson_usbctrl.c	Wed Jan 27 01:49:36 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_usbctrl.c,v 1.3 2021/01/25 14:20:37 thorpej Exp $ */
+/* $NetBSD: meson_usbctrl.c,v 1.4 2021/01/27 01:49:36 thorpej Exp $ */
 
 /*
  * Copyright (c) 2021 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: meson_usbctrl.c,v 1.3 2021/01/25 14:20:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_usbctrl.c,v 1.4 2021/01/27 01:49:36 thorpej Exp $");
 
 #include 
 #include 
@@ -112,7 +112,7 @@ struct meson_usbctrl_config mesong12_con
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "amlogic,meson-g12a-usb-ctrl", .data = _conf },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 struct meson_usbctrl_softc {
Index: src/sys/arch/arm/amlogic/mesong12_clkc.c
diff -u src/sys/arch/arm/amlogic/mesong12_clkc.c:1.3 src/sys/arch/arm/amlogic/mesong12_clkc.c:1.4
--- src/sys/arch/arm/amlogic/mesong12_clkc.c:1.3	Mon Jan 25 14:20:37 2021
+++ src/sys/arch/arm/amlogic/mesong12_clkc.c	Wed Jan 27 01:49:36 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: mesong12_clkc.c,v 1.3 2021/01/25 14:20:37 thorpej Exp $ */
+/* $NetBSD: mesong12_clkc.c,v 1.4 2021/01/27 01:49:36 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mesong12_clkc.c,v 1.3 2021/01/25 14:20:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mesong12_clkc.c,v 1.4 2021/01/27 01:49:36 thorpej Exp $");
 
 #include 
 #include 
@@ -1492,7 +1492,7 @@ static const struct mesong12_clkc_config
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "amlogic,g12a-clkc",	.data = _config },
 	{ .compat = "amlogic,g12b-clkc",	.data = _config },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 CFATTACH_DECL_NEW(mesong12_clkc, sizeof(struct meson_clk_softc),

Index: src/sys/arch/arm/amlogic/meson_thermal.c
diff -u 

CVS commit: src/sys/arch/arm/altera

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 01:47:40 UTC 2021

Modified Files:
src/sys/arch/arm/altera: cycv_clkmgr.c

Log Message:
Use DEVICE_COMPAT_EOL.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/altera/cycv_clkmgr.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/arm/altera/cycv_clkmgr.c
diff -u src/sys/arch/arm/altera/cycv_clkmgr.c:1.6 src/sys/arch/arm/altera/cycv_clkmgr.c:1.7
--- src/sys/arch/arm/altera/cycv_clkmgr.c:1.6	Mon Jan 25 14:20:37 2021
+++ src/sys/arch/arm/altera/cycv_clkmgr.c	Wed Jan 27 01:47:40 2021
@@ -1,9 +1,9 @@
-/* $NetBSD: cycv_clkmgr.c,v 1.6 2021/01/25 14:20:37 thorpej Exp $ */
+/* $NetBSD: cycv_clkmgr.c,v 1.7 2021/01/27 01:47:40 thorpej Exp $ */
 
 /* This file is in the public domain. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cycv_clkmgr.c,v 1.6 2021/01/25 14:20:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_clkmgr.c,v 1.7 2021/01/27 01:47:40 thorpej Exp $");
 
 #include 
 #include 
@@ -113,7 +113,7 @@ CFATTACH_DECL_NEW(cycvclkmgr, sizeof (st
 
 static const struct device_compatible_entry compat_data[] = {
 	{ .compat = "altr,clk-mgr" },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static int
@@ -218,7 +218,7 @@ static const struct device_compatible_en
 	{ .compat = "altr,socfpga-pll-clock",	.value = CYCV_CLK_TYPE_PLL },
 	{ .compat = "altr,socfpga-perip-clk",	.value = CYCV_CLK_TYPE_PERIP },
 	{ .compat = "altr,socfpga-gate-clk",	.value = CYCV_CLK_TYPE_PERIP },
-	{ }
+	DEVICE_COMPAT_EOL
 };
 
 static void



CVS commit: src/sys/sys

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jan 27 01:00:05 UTC 2021

Modified Files:
src/sys/sys: device.h

Log Message:
Define a macro to terminate the common usage of device_compatible_entry
arrays, in order to placate the angry hordes objecting to use of a GCC
extension.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/sys/device.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/sys/device.h
diff -u src/sys/sys/device.h:1.162 src/sys/sys/device.h:1.163
--- src/sys/sys/device.h:1.162	Sun Jan 24 17:42:37 2021
+++ src/sys/sys/device.h	Wed Jan 27 01:00:05 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.162 2021/01/24 17:42:37 thorpej Exp $ */
+/* $NetBSD: device.h,v 1.163 2021/01/27 01:00:05 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -131,6 +131,8 @@ struct device_compatible_entry {
 	};
 };
 
+#define	DEVICE_COMPAT_EOL	{ .compat = NULL }
+
 struct device_lock {
 	int		dvl_nwait;
 	int		dvl_nlock;



CVS commit: src/usr.bin/make

2021-01-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Wed Jan 27 00:02:38 UTC 2021

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: directive-error.exp directive-error.mk
opt-warnings-as-errors.exp opt-warnings-as-errors.mk

Log Message:
make(1): fix irrelevant message in -W mode


To generate a diff of this commit:
cvs rdiff -u -r1.532 -r1.533 src/usr.bin/make/parse.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-error.exp
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/directive-error.mk \
src/usr.bin/make/unit-tests/opt-warnings-as-errors.mk
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/opt-warnings-as-errors.exp

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/make/parse.c
diff -u src/usr.bin/make/parse.c:1.532 src/usr.bin/make/parse.c:1.533
--- src/usr.bin/make/parse.c:1.532	Tue Jan 26 23:44:56 2021
+++ src/usr.bin/make/parse.c	Wed Jan 27 00:02:38 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.532 2021/01/26 23:44:56 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.533 2021/01/27 00:02:38 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.532 2021/01/26 23:44:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.533 2021/01/27 00:02:38 rillig Exp $");
 
 /* types and constants */
 
@@ -611,13 +611,10 @@ ParseVErrorInternal(FILE *f, const char 
 
 	if (type == PARSE_INFO)
 		goto print_stack_trace;
-	if (type == PARSE_FATAL || opts.parseWarnFatal)
-		fatals++;
-	if (opts.parseWarnFatal && !fatal_warning_error_printed) {
-		/*
-		 * FIXME: Also gets printed on .error, even though it
-		 *  doesn't apply to it.
-		 */
+	if (type == PARSE_WARNING && !opts.parseWarnFatal)
+		goto print_stack_trace;
+	fatals++;
+	if (type == PARSE_WARNING && !fatal_warning_error_printed) {
 		Error("parsing warnings being treated as errors");
 		fatal_warning_error_printed = TRUE;
 	}

Index: src/usr.bin/make/unit-tests/directive-error.exp
diff -u src/usr.bin/make/unit-tests/directive-error.exp:1.2 src/usr.bin/make/unit-tests/directive-error.exp:1.3
--- src/usr.bin/make/unit-tests/directive-error.exp:1.2	Tue Jan 26 23:51:20 2021
+++ src/usr.bin/make/unit-tests/directive-error.exp	Wed Jan 27 00:02:38 2021
@@ -1,5 +1,4 @@
-make: "directive-error.mk" line 11: message
-make: parsing warnings being treated as errors
+make: "directive-error.mk" line 13: message
 
 make: stopped in unit-tests
 exit status 1

Index: src/usr.bin/make/unit-tests/directive-error.mk
diff -u src/usr.bin/make/unit-tests/directive-error.mk:1.4 src/usr.bin/make/unit-tests/directive-error.mk:1.5
--- src/usr.bin/make/unit-tests/directive-error.mk:1.4	Tue Jan 26 23:51:20 2021
+++ src/usr.bin/make/unit-tests/directive-error.mk	Wed Jan 27 00:02:38 2021
@@ -1,11 +1,13 @@
-# $NetBSD: directive-error.mk,v 1.4 2021/01/26 23:51:20 rillig Exp $
+# $NetBSD: directive-error.mk,v 1.5 2021/01/27 00:02:38 rillig Exp $
 #
 # Tests for the .error directive, which prints an error message and exits
 # immediately, unlike other "fatal" parse errors, which continue to parse
 # until the end of the current top-level makefile.
+#
+# See also:
+#	opt-warnings-as-errors.mk
 
-# TODO: Implementation
-
-# FIXME: The "parsing warnings being treated as errors" is irrelevant.
+# Before parse.c 1.532 from 2021-01-27, the ".error" issued an irrelevant
+# message saying "parsing warnings being treated as errors".
 .MAKEFLAGS: -W
 .error message
Index: src/usr.bin/make/unit-tests/opt-warnings-as-errors.mk
diff -u src/usr.bin/make/unit-tests/opt-warnings-as-errors.mk:1.4 src/usr.bin/make/unit-tests/opt-warnings-as-errors.mk:1.5
--- src/usr.bin/make/unit-tests/opt-warnings-as-errors.mk:1.4	Mon Nov  9 20:50:56 2020
+++ src/usr.bin/make/unit-tests/opt-warnings-as-errors.mk	Wed Jan 27 00:02:38 2021
@@ -1,6 +1,11 @@
-# $NetBSD: opt-warnings-as-errors.mk,v 1.4 2020/11/09 20:50:56 rillig Exp $
+# $NetBSD: opt-warnings-as-errors.mk,v 1.5 2021/01/27 00:02:38 rillig Exp $
 #
 # Tests for the -W command line option, which turns warnings into errors.
+#
+# Even in -W mode, a .warning is not completely equivalent to an .error.
+# First, the word "warning" is still printed, and second, parsing continues
+# after a failed warning, whereas it would stop immediately at the first
+# .error.
 
 .MAKEFLAGS: -W
 

Index: src/usr.bin/make/unit-tests/opt-warnings-as-errors.exp
diff -u src/usr.bin/make/unit-tests/opt-warnings-as-errors.exp:1.3 src/usr.bin/make/unit-tests/opt-warnings-as-errors.exp:1.4
--- src/usr.bin/make/unit-tests/opt-warnings-as-errors.exp:1.3	Mon Nov  9 20:50:56 2020
+++ src/usr.bin/make/unit-tests/opt-warnings-as-errors.exp	Wed Jan 27 00:02:38 2021
@@ -1,6 +1,6 @@
-make: "opt-warnings-as-errors.mk" line 7: warning: message 1
+make: "opt-warnings-as-errors.mk" line 12: warning: 

CVS commit: src/usr.bin/make/unit-tests

2021-01-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jan 26 23:51:20 UTC 2021

Modified Files:
src/usr.bin/make/unit-tests: directive-error.exp directive-error.mk

Log Message:
make(1): demonstrate irrelevant message about warnings as errors


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/directive-error.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/directive-error.mk

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/make/unit-tests/directive-error.exp
diff -u src/usr.bin/make/unit-tests/directive-error.exp:1.1 src/usr.bin/make/unit-tests/directive-error.exp:1.2
--- src/usr.bin/make/unit-tests/directive-error.exp:1.1	Sun Aug 16 12:07:51 2020
+++ src/usr.bin/make/unit-tests/directive-error.exp	Tue Jan 26 23:51:20 2021
@@ -1 +1,5 @@
-exit status 0
+make: "directive-error.mk" line 11: message
+make: parsing warnings being treated as errors
+
+make: stopped in unit-tests
+exit status 1

Index: src/usr.bin/make/unit-tests/directive-error.mk
diff -u src/usr.bin/make/unit-tests/directive-error.mk:1.3 src/usr.bin/make/unit-tests/directive-error.mk:1.4
--- src/usr.bin/make/unit-tests/directive-error.mk:1.3	Sun Dec 13 01:07:54 2020
+++ src/usr.bin/make/unit-tests/directive-error.mk	Tue Jan 26 23:51:20 2021
@@ -1,4 +1,4 @@
-# $NetBSD: directive-error.mk,v 1.3 2020/12/13 01:07:54 rillig Exp $
+# $NetBSD: directive-error.mk,v 1.4 2021/01/26 23:51:20 rillig Exp $
 #
 # Tests for the .error directive, which prints an error message and exits
 # immediately, unlike other "fatal" parse errors, which continue to parse
@@ -6,5 +6,6 @@
 
 # TODO: Implementation
 
-all:
-	@:;
+# FIXME: The "parsing warnings being treated as errors" is irrelevant.
+.MAKEFLAGS: -W
+.error message



CVS commit: src/usr.bin/make

2021-01-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jan 26 23:44:56 UTC 2021

Modified Files:
src/usr.bin/make: parse.c
src/usr.bin/make/unit-tests: include-main.exp include-subsub.mk

Log Message:
make(1): in -dp mode, print stack trace with each diagnostic

This makes it easier to track down where a warning or an error
originated from.  This information could be further enriched for .for
loops, to also include the variable names and their values.  For now,
it's good enough to replace the large comment describing how a stack
trace _could_ be generated with actual code that implements that idea.

The syntax of the locations is :, which intentionally
differs from the traditional "" line , since the
former is more widely supported by editors and IDEs.

Having this stacktrace information is especially intended for
complicated systems built upon make, such as pkgsrc.


To generate a diff of this commit:
cvs rdiff -u -r1.531 -r1.532 src/usr.bin/make/parse.c
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/include-main.exp
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/include-subsub.mk

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/make/parse.c
diff -u src/usr.bin/make/parse.c:1.531 src/usr.bin/make/parse.c:1.532
--- src/usr.bin/make/parse.c:1.531	Sun Jan 24 20:11:55 2021
+++ src/usr.bin/make/parse.c	Tue Jan 26 23:44:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.531 2021/01/24 20:11:55 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.532 2021/01/26 23:44:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.531 2021/01/24 20:11:55 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.532 2021/01/26 23:44:56 rillig Exp $");
 
 /* types and constants */
 
@@ -225,44 +225,11 @@ static int fatals = 0;
  */
 
 /*
- * The include chain of makefiles.  At the bottom is the top-level makefile
- * from the command line, and on top of that, there are the included files or
- * .for loops, up to and including the current file.
- *
- * This data could be used to print stack traces on parse errors.  As of
- * 2020-09-14, this is not done though.  It seems quite simple to print the
- * tuples (fname:lineno:fromForLoop), from top to bottom.  This simple idea is
- * made complicated by the fact that the .for loops also use this stack for
- * storing information.
- *
- * The lineno fields of the IFiles with fromForLoop == TRUE look confusing,
- * which is demonstrated by the test 'include-main.mk'.  They seem sorted
- * backwards since they tell the number of completely parsed lines, which for
- * a .for loop is right after the terminating .endfor.  To compensate for this
- * confusion, there is another field first_lineno pointing at the start of the
- * .for loop, 1-based for human consumption.
- *
- * To make the stack trace intuitive, the entry below the first .for loop must
- * be ignored completely since neither its lineno nor its first_lineno is
- * useful.  Instead, the topmost of each chain of .for loop needs to be
- * printed twice, once with its first_lineno and once with its lineno.
- *
- * As of 2020-10-28, using the above rules, the stack trace for the .info line
- * in include-subsub.mk would be:
- *
- *	includes[5]:	include-subsub.mk:4
- *			(lineno, from an .include)
- *	includes[4]:	include-sub.mk:32
- *			(lineno, from a .for loop below an .include)
- *	includes[4]:	include-sub.mk:31
- *			(first_lineno, from a .for loop, lineno == 32)
- *	includes[3]:	include-sub.mk:30
- *			(first_lineno, from a .for loop, lineno == 33)
- *	includes[2]:	include-sub.mk:29
- *			(first_lineno, from a .for loop, lineno == 34)
- *	includes[1]:	include-sub.mk:35
- *			(not printed since it is below a .for loop)
- *	includes[0]:	include-main.mk:27
+ * The include chain of makefiles.  At index 0 is the top-level makefile from
+ * the command line, followed by the included files or .for loops, up to and
+ * including the current file.
+ *
+ * See PrintStackTrace for how to interpret the data.
  */
 static Vector /* of IFile */ includes;
 
@@ -493,7 +460,56 @@ loadfile(const char *path, int fd)
 	}
 }
 
-/* old code */
+static void
+PrintStackTrace(void)
+{
+	const IFile *entries;
+	size_t i, n;
+
+	if (!(DEBUG(PARSE)))
+		return;
+
+	entries = GetInclude(0);
+	n = includes.len;
+	if (n == 0)
+		return;
+	n--;			/* This entry is already in the diagnostic. */
+
+	/*
+	 * For the IFiles with fromForLoop, lineno seems to be sorted
+	 * backwards.  This is because lineno is the number of completely
+	 * parsed lines, which for a .for loop is right after the
+	 * corresponding .endfor.  The intuitive line number comes from
+	 * first_lineno instead, which points at the start of the .for loop.
+	 *
+	 * To make the stack trace intuitive, the entry below each chain of
+	 * .for 

CVS commit: src/usr.bin/nbperf

2021-01-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jan 26 21:25:55 UTC 2021

Modified Files:
src/usr.bin/nbperf: nbperf-bdz.c nbperf-chm.c

Log Message:
Fix potential off-by-one error when using hash fudging. It needs to
round up to 2/4 and not one less to guarantee that the adjusted hash
fits into array.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/nbperf/nbperf-bdz.c
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/nbperf/nbperf-chm.c

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/nbperf/nbperf-bdz.c
diff -u src/usr.bin/nbperf/nbperf-bdz.c:1.10 src/usr.bin/nbperf/nbperf-bdz.c:1.11
--- src/usr.bin/nbperf/nbperf-bdz.c:1.10	Thu Jan  7 16:03:08 2021
+++ src/usr.bin/nbperf/nbperf-bdz.c	Tue Jan 26 21:25:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: nbperf-bdz.c,v 1.10 2021/01/07 16:03:08 joerg Exp $	*/
+/*	$NetBSD: nbperf-bdz.c,v 1.11 2021/01/26 21:25:55 joerg Exp $	*/
 /*-
  * Copyright (c) 2009, 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: nbperf-bdz.c,v 1.10 2021/01/07 16:03:08 joerg Exp $");
+__RCSID("$NetBSD: nbperf-bdz.c,v 1.11 2021/01/26 21:25:55 joerg Exp $");
 
 #include 
 #include 
@@ -285,7 +285,7 @@ bpz_compute(struct nbperf *nbperf)
 	if (v < 10)
 		v = 10;
 	if (nbperf->allow_hash_fudging)
-		v |= 3;
+		v = (v + 3) & ~3;
 
 	graph3_setup(, v, e);
 

Index: src/usr.bin/nbperf/nbperf-chm.c
diff -u src/usr.bin/nbperf/nbperf-chm.c:1.4 src/usr.bin/nbperf/nbperf-chm.c:1.5
--- src/usr.bin/nbperf/nbperf-chm.c:1.4	Thu Jan  7 16:03:08 2021
+++ src/usr.bin/nbperf/nbperf-chm.c	Tue Jan 26 21:25:55 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: nbperf-chm.c,v 1.4 2021/01/07 16:03:08 joerg Exp $	*/
+/*	$NetBSD: nbperf-chm.c,v 1.5 2021/01/26 21:25:55 joerg Exp $	*/
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: nbperf-chm.c,v 1.4 2021/01/07 16:03:08 joerg Exp $");
+__RCSID("$NetBSD: nbperf-chm.c,v 1.5 2021/01/26 21:25:55 joerg Exp $");
 
 #include 
 #include 
@@ -262,12 +262,12 @@ chm_compute(struct nbperf *nbperf)
 	if (v < 10)
 		v = 10;
 	if (nbperf->allow_hash_fudging)
-		v |= 3;
+		v = (v + 3) & ~3;
 #else
 	if (v == 2 * nbperf->n)
 		++v;
 	if (nbperf->allow_hash_fudging)
-		v |= 1;
+		v = (v + 1) & ~1;
 #endif
 
 	state.g = calloc(sizeof(uint32_t), v);



CVS commit: src/sys/kern

2021-01-26 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Jan 26 19:09:18 UTC 2021

Modified Files:
src/sys/kern: kern_event.c

Log Message:
call f_touch with kq_lock held, and without KERNEL_LOCK() - for this
adjust EVFILT_USER, which is the only filter actually using that hook

kqueue_scan() now doesn't need to exit/enter the kq_lock when calling
f_touch, which removes another possible race

part of PR kern/50094


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/kern/kern_event.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/kern/kern_event.c
diff -u src/sys/kern/kern_event.c:1.115 src/sys/kern/kern_event.c:1.116
--- src/sys/kern/kern_event.c:1.115	Mon Jan 25 19:57:05 2021
+++ src/sys/kern/kern_event.c	Tue Jan 26 19:09:18 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_event.c,v 1.115 2021/01/25 19:57:05 jdolecek Exp $	*/
+/*	$NetBSD: kern_event.c,v 1.116 2021/01/26 19:09:18 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.115 2021/01/25 19:57:05 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.116 2021/01/26 19:09:18 jdolecek Exp $");
 
 #include 
 #include 
@@ -838,7 +838,8 @@ filt_usertouch(struct knote *kn, struct 
 	struct kqueue *kq = kn->kn_kq;
 	int ffctrl;
 
-	mutex_spin_enter(>kq_lock);
+	KASSERT(mutex_owned(>kq_lock));
+
 	switch (type) {
 	case EVENT_REGISTER:
 		if (kev->fflags & NOTE_TRIGGER)
@@ -889,7 +890,6 @@ filt_usertouch(struct knote *kn, struct 
 		panic("filt_usertouch() - invalid type (%ld)", type);
 		break;
 	}
-	mutex_spin_exit(>kq_lock);
 }
 
 /*
@@ -925,7 +925,6 @@ const struct filterops seltrue_filtops =
 	.f_attach = NULL,
 	.f_detach = filt_seltruedetach,
 	.f_event = filt_seltrue,
-	.f_touch = NULL,
 };
 
 int
@@ -1276,9 +1275,9 @@ kqueue_register(struct kqueue *kq, struc
 	kn->kn_kevent.udata = kev->udata;
 	KASSERT(kn->kn_fop != NULL);
 	if (!kn->kn_fop->f_isfd && kn->kn_fop->f_touch != NULL) {
-		KERNEL_LOCK(1, NULL);			/* XXXSMP */
+		mutex_spin_enter(>kq_lock);
 		(*kn->kn_fop->f_touch)(kn, kev, EVENT_REGISTER);
-		KERNEL_UNLOCK_ONE(NULL);		/* XXXSMP */
+		mutex_spin_exit(>kq_lock);
 	} else {
 		kn->kn_sfflags = kev->fflags;
 		kn->kn_sdata = kev->data;
@@ -1529,11 +1528,7 @@ relock:
 kn->kn_fop->f_touch != NULL);
 		/* XXXAD should be got from f_event if !oneshot. */
 		if (touch) {
-			mutex_spin_exit(>kq_lock);
-			KERNEL_LOCK(1, NULL);		/* XXXSMP */
 			(*kn->kn_fop->f_touch)(kn, kevp, EVENT_PROCESS);
-			KERNEL_UNLOCK_ONE(NULL);	/* XXXSMP */
-			mutex_spin_enter(>kq_lock);
 		} else {
 			*kevp = kn->kn_kevent;
 		}



CVS commit: src/usr.bin/xlint/common

2021-01-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Jan 26 18:38:58 UTC 2021

Modified Files:
src/usr.bin/xlint/common: tyname.c

Log Message:
lint: remove __noinline attribute from string interning function

I had committed this accidentally while ensuring that the generated code
is still efficient even though the source code looks heavy with the
double pointer indirection.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/xlint/common/tyname.c

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/xlint/common/tyname.c
diff -u src/usr.bin/xlint/common/tyname.c:1.25 src/usr.bin/xlint/common/tyname.c:1.26
--- src/usr.bin/xlint/common/tyname.c:1.25	Sun Jan 24 11:55:57 2021
+++ src/usr.bin/xlint/common/tyname.c	Tue Jan 26 18:38:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tyname.c,v 1.25 2021/01/24 11:55:57 rillig Exp $	*/
+/*	$NetBSD: tyname.c,v 1.26 2021/01/26 18:38:57 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tyname.c,v 1.25 2021/01/24 11:55:57 rillig Exp $");
+__RCSID("$NetBSD: tyname.c,v 1.26 2021/01/26 18:38:57 rillig Exp $");
 #endif
 
 #include 
@@ -82,7 +82,7 @@ new_name_tree_node(const char *name)
 }
 
 /* Return the canonical instance of the string, with unlimited life time. */
-static const char * __noinline
+static const char *
 intern(const char *name)
 {
 	name_tree_node *n = type_names, **next;



CVS commit: src/sys/dev/wsfb

2021-01-26 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jan 26 18:08:33 UTC 2021

Modified Files:
src/sys/dev/wsfb: genfb.c

Log Message:
remove outdated comment


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/wsfb/genfb.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/dev/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.79 src/sys/dev/wsfb/genfb.c:1.80
--- src/sys/dev/wsfb/genfb.c:1.79	Sun Jan 17 00:23:38 2021
+++ src/sys/dev/wsfb/genfb.c	Tue Jan 26 18:08:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.79 2021/01/17 00:23:38 jmcneill Exp $ */
+/*	$NetBSD: genfb.c,v 1.80 2021/01/26 18:08:33 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.79 2021/01/17 00:23:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.80 2021/01/26 18:08:33 macallan Exp $");
 
 #include 
 #include 
@@ -631,7 +631,6 @@ genfb_init_screen(void *cookie, struct v
 	rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
 		sc->sc_width / ri->ri_font->fontwidth);
 
-	/* TODO: actually center output */
 	ri->ri_hw = scr;
 
 #ifdef GENFB_DISABLE_TEXT



CVS commit: src/sys/dev/pci

2021-01-26 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Tue Jan 26 16:40:16 UTC 2021

Modified Files:
src/sys/dev/pci: virtio_pci.c

Log Message:
Fix indexing bug in clean up code on error in virtio PCI v1.0 attach code.
Thanks go to Rin Okuyama for spotting it.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/virtio_pci.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/dev/pci/virtio_pci.c
diff -u src/sys/dev/pci/virtio_pci.c:1.25 src/sys/dev/pci/virtio_pci.c:1.26
--- src/sys/dev/pci/virtio_pci.c:1.25	Sun Jan 24 15:59:35 2021
+++ src/sys/dev/pci/virtio_pci.c	Tue Jan 26 16:40:16 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_pci.c,v 1.25 2021/01/24 15:59:35 reinoud Exp $ */
+/* $NetBSD: virtio_pci.c,v 1.26 2021/01/26 16:40:16 reinoud Exp $ */
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.25 2021/01/24 15:59:35 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_pci.c,v 1.26 2021/01/26 16:40:16 reinoud Exp $");
 
 #include 
 #include 
@@ -444,7 +444,7 @@ virtio_pci_attach_10(device_t self, void
 	bus_size_t bars[NMAPREG] = { 0 };
 	int bars_idx[NMAPREG] = { 0 };
 	struct virtio_pci_cap *caps[] = { , , ,  };
-	int i, j = 0, ret = 0;
+	int i, j, ret = 0;
 
 	if (virtio_pci_find_cap(psc, VIRTIO_PCI_CAP_COMMON_CFG,
 			, sizeof(common)))
@@ -471,7 +471,7 @@ virtio_pci_attach_10(device_t self, void
 			bars[bar] = len;
 	}
 
-	for (i = 0; i < __arraycount(bars); i++) {
+	for (i = j = 0; i < __arraycount(bars); i++) {
 		int reg;
 		pcireg_t type;
 		if (bars[i] == 0)
@@ -551,10 +551,10 @@ virtio_pci_attach_10(device_t self, void
 err:
 	/* undo our pci_mapreg_map()s */ 
 	for (i = 0; i < __arraycount(bars); i++) {
-		if (bars[i] == 0)
+		if (psc->sc_bars_iosize[i] == 0)
 			continue;
-		bus_space_unmap(psc->sc_bars_iot[j], psc->sc_bars_ioh[j],
-psc->sc_bars_iosize[j]);
+		bus_space_unmap(psc->sc_bars_iot[i], psc->sc_bars_ioh[i],
+psc->sc_bars_iosize[i]);
 	}
 	return ret;
 }



CVS commit: src/sys/dev/wscons

2021-01-26 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jan 26 16:24:18 UTC 2021

Modified Files:
src/sys/dev/wscons: wsdisplay_vcons.c

Log Message:
- refactor vcons_cursor_noread() a bit so it works the same way as the other
  _noread() methods instead of duplicating half of vcons_cursor()
- skip clearing the cursor only if we use all _noread() methods
- clear RI_CURSOR in all copy*_noread() methods as well if we overwrite the
  cursor


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/wscons/wsdisplay_vcons.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/dev/wscons/wsdisplay_vcons.c
diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.49 src/sys/dev/wscons/wsdisplay_vcons.c:1.50
--- src/sys/dev/wscons/wsdisplay_vcons.c:1.49	Mon Jan 25 02:11:41 2021
+++ src/sys/dev/wscons/wsdisplay_vcons.c	Tue Jan 26 16:24:17 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_vcons.c,v 1.49 2021/01/25 02:11:41 macallan Exp $ */
+/*	$NetBSD: wsdisplay_vcons.c,v 1.50 2021/01/26 16:24:17 macallan Exp $ */
 
 /*-
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.49 2021/01/25 02:11:41 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.50 2021/01/26 16:24:17 macallan Exp $");
 
 #include 
 #include 
@@ -320,6 +320,7 @@ vcons_init_screen(struct vcons_data *vd,
 	scr->scr_cookie = vd->cookie;
 	scr->scr_vd = scr->scr_origvd = vd;
 	scr->scr_busy = 0;
+
 	if (scr->scr_type == NULL)
 		scr->scr_type = vd->defaulttype;
 	
@@ -336,7 +337,6 @@ vcons_init_screen(struct vcons_data *vd,
 	vd->eraserows = ri->ri_ops.eraserows;
 	vd->erasecols = ri->ri_ops.erasecols;
 	scr->putchar   = ri->ri_ops.putchar;
-	vd->cursor= ri->ri_ops.cursor;
 
 	if (scr->scr_flags & VCONS_NO_COPYCOLS) {
 		vd->copycols  = vcons_copycols_noread;
@@ -350,15 +350,16 @@ vcons_init_screen(struct vcons_data *vd,
 		vd->copyrows = ri->ri_ops.copyrows;
 	}
 
-	ri->ri_ops.eraserows = vcons_eraserows;	
-	ri->ri_ops.erasecols = vcons_erasecols;	
-	ri->ri_ops.putchar   = vcons_putchar;
 	if (scr->scr_flags & VCONS_NO_CURSOR) {
-		ri->ri_ops.cursor= vcons_cursor_noread;
+		vd->cursor  = vcons_cursor_noread;
 	} else {
-		ri->ri_ops.cursor= vcons_cursor;
+		vd->cursor = ri->ri_ops.cursor;
 	}
 
+	ri->ri_ops.eraserows = vcons_eraserows;	
+	ri->ri_ops.erasecols = vcons_erasecols;	
+	ri->ri_ops.putchar   = vcons_putchar;
+	ri->ri_ops.cursor= vcons_cursor;
 	ri->ri_ops.copycols  = vcons_copycols;
 	ri->ri_ops.copyrows  = vcons_copyrows;
 
@@ -471,14 +472,17 @@ vcons_load_font(void *v, void *cookie, s
 		vd->copyrows = ri->ri_ops.copyrows;
 	}
 
+	if (scr->scr_flags & VCONS_NO_CURSOR) {
+		vd->cursor  = vcons_cursor_noread;
+	} else {
+		vd->cursor = ri->ri_ops.cursor;
+	}
+
 	/* and put our wrappers back */
 	ri->ri_ops.eraserows = vcons_eraserows;	
 	ri->ri_ops.erasecols = vcons_erasecols;	
 	ri->ri_ops.putchar   = vcons_putchar;
-	if (scr->scr_flags & VCONS_NO_CURSOR) {
-		ri->ri_ops.cursor= vcons_cursor_noread;
-	} else
-		ri->ri_ops.cursor= vcons_cursor;
+	ri->ri_ops.cursor= vcons_cursor;
 	ri->ri_ops.copycols  = vcons_copycols;
 	ri->ri_ops.copyrows  = vcons_copyrows;
 	vcons_unlock(vd->active);
@@ -955,6 +959,9 @@ vcons_copycols_noread(void *cookie, int 
 			pos++;
 			ppos++;
 		}
+		if (ri->ri_crow == row && 
+		   (ri->ri_ccol >= dstcol && ri->ri_ccol < (dstcol + ncols )))
+			ri->ri_flg &= ~RI_CURSOR;
 	}
 	vcons_unlock(scr);
 }
@@ -1130,6 +1137,8 @@ vcons_copyrows_noread(void *cookie, int 
 ppos++;
 			}
 		}
+		if (ri->ri_crow >= dstrow && ri->ri_crow < (dstrow + nrows))
+			ri->ri_flg &= ~RI_CURSOR;
 	}
 	vcons_unlock(scr);
 }
@@ -1318,53 +1327,33 @@ vcons_cursor_noread(void *cookie, int on
 {
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri->ri_hw;
-	int offset = 0;	
-
-#if defined(VCONS_DRAW_INTR)
-	if (scr->scr_vd->use_intr) {
-		vcons_lock(scr);
-		if (scr->scr_ri.ri_crow != row || scr->scr_ri.ri_ccol != col) {
-			scr->scr_ri.ri_crow = row;
-			scr->scr_ri.ri_ccol = col;
-			atomic_inc_uint(>scr_dirty);
-		}
-		vcons_unlock(scr);
-		return;
-	}
-#endif
-
-	vcons_lock(scr);
+	int offset = 0, ofs;
 
 #ifdef WSDISPLAY_SCROLLSUPPORT
 	offset = scr->scr_current_offset;
 #endif
-	if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) {
-		int ofs = offset + ri->ri_crow * ri->ri_cols + ri->ri_ccol;
-		if (on && (ri->ri_flg & RI_CURSOR)) {
-			scr->putchar(cookie, ri->ri_crow, ri->ri_ccol,
-			scr->scr_chars[ofs], scr->scr_attrs[ofs]);
-			ri->ri_flg &= ~RI_CURSOR;
-		}
-		ri->ri_crow = row;
-		ri->ri_ccol = col;
-		ofs = offset + ri->ri_crow * ri->ri_cols + ri->ri_ccol;
-		if (on) {
-			scr->putchar(cookie, row, col, scr->scr_chars[ofs],
+	ofs = offset + ri->ri_crow * ri->ri_cols + ri->ri_ccol;
+	if ((ri->ri_flg & RI_CURSOR) && 
+	   ((scr->scr_flags & VCONS_DONT_READ) != VCONS_DONT_READ)) {

CVS commit: src/sys/dev/acpi

2021-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan 26 15:30:05 UTC 2021

Modified Files:
src/sys/dev/acpi: acpi_mcfg.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/acpi/acpi_mcfg.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/dev/acpi/acpi_mcfg.c
diff -u src/sys/dev/acpi/acpi_mcfg.c:1.22 src/sys/dev/acpi/acpi_mcfg.c:1.23
--- src/sys/dev/acpi/acpi_mcfg.c:1.22	Tue Jan 26 15:29:41 2021
+++ src/sys/dev/acpi/acpi_mcfg.c	Tue Jan 26 15:30:05 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_mcfg.c,v 1.22 2021/01/26 15:29:41 skrll Exp $	*/
+/*	$NetBSD: acpi_mcfg.c,v 1.23 2021/01/26 15:30:05 skrll Exp $	*/
 
 /*-
  * Copyright (C) 2015 NONAKA Kimihiro 
@@ -28,7 +28,7 @@
 #include "opt_pci.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.22 2021/01/26 15:29:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.23 2021/01/26 15:30:05 skrll Exp $");
 
 #include 
 #include 
@@ -507,7 +507,7 @@ acpimcfg_device_probe(const struct pci_a
 		force_hasextcnf = true;
 	if (qd != NULL && (qd->quirks & PCI_QUIRK_NOEXTCNF) != 0)
 		force_noextcnf = true;
-	
+
 	/* Probe extended configuration space. */
 	if ((!force_hasextcnf) && ((force_noextcnf) ||
 		((reg = pci_conf_read(pc, tag, PCI_CONF_SIZE)) == (pcireg_t)-1)



CVS commit: src/sys/dev/acpi

2021-01-26 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jan 26 15:29:42 UTC 2021

Modified Files:
src/sys/dev/acpi: acpi_mcfg.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/acpi/acpi_mcfg.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/dev/acpi/acpi_mcfg.c
diff -u src/sys/dev/acpi/acpi_mcfg.c:1.21 src/sys/dev/acpi/acpi_mcfg.c:1.22
--- src/sys/dev/acpi/acpi_mcfg.c:1.21	Sun Dec  6 12:47:12 2020
+++ src/sys/dev/acpi/acpi_mcfg.c	Tue Jan 26 15:29:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_mcfg.c,v 1.21 2020/12/06 12:47:12 jmcneill Exp $	*/
+/*	$NetBSD: acpi_mcfg.c,v 1.22 2021/01/26 15:29:41 skrll Exp $	*/
 
 /*-
  * Copyright (C) 2015 NONAKA Kimihiro 
@@ -28,7 +28,7 @@
 #include "opt_pci.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.21 2020/12/06 12:47:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.22 2021/01/26 15:29:41 skrll Exp $");
 
 #include 
 #include 
@@ -364,7 +364,7 @@ acpimcfg_init(bus_space_tag_t memt, cons
 		if (mcfg_ops->ao_validate != NULL &&
 		!mcfg_ops->ao_validate(ama->Address, ama->StartBusNumber,
 		  _end)) {
-			if (!acpimcfg_find_system_resource( ama->Address,
+			if (!acpimcfg_find_system_resource(ama->Address,
 			ama->StartBusNumber, _end)) {
 aprint_debug_dev(acpi_sc->sc_dev,
 "MCFG: segment %d, bus %d-%d, "



CVS commit: src/etc/rc.d

2021-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 26 15:08:02 UTC 2021

Modified Files:
src/etc/rc.d: Makefile

Log Message:
llvmlockdir -> lvmlockdir


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/etc/rc.d/Makefile

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

Modified files:

Index: src/etc/rc.d/Makefile
diff -u src/etc/rc.d/Makefile:1.110 src/etc/rc.d/Makefile:1.111
--- src/etc/rc.d/Makefile:1.110	Sun Jan 10 23:24:25 2021
+++ src/etc/rc.d/Makefile	Tue Jan 26 15:08:02 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.110 2021/01/10 23:24:25 riastradh Exp $
+# $NetBSD: Makefile,v 1.111 2021/01/26 15:08:02 martin Exp $
 
 .include 
 
@@ -27,7 +27,7 @@ CONFIGFILES=\
 		identd ifwatchd inetd ip6addrctl ipfilter ipfs ipmon ipnat \
 		ipsec irdaattach iscsi_target iscsid isibootd \
 		kdc \
-		ldconfig ldpd llvmlockdir local lpd lvm \
+		ldconfig ldpd lvmlockdir local lpd lvm \
 		makemandb mdnsd mixerctl modules mopd motd mountall \
 		mountcritlocal mountcritremote mountd moused mrouted \
 		named ndbootd network newsyslog nfsd nfslocking npf npf_boot \



CVS commit: src/sys/dev/ofw

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jan 26 14:55:57 UTC 2021

Modified Files:
src/sys/dev/ofw: ofw_subr.c

Log Message:
Replace use of of_match_compatible().


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/ofw/ofw_subr.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/dev/ofw/ofw_subr.c
diff -u src/sys/dev/ofw/ofw_subr.c:1.52 src/sys/dev/ofw/ofw_subr.c:1.53
--- src/sys/dev/ofw/ofw_subr.c:1.52	Tue Jan 26 14:49:41 2021
+++ src/sys/dev/ofw/ofw_subr.c	Tue Jan 26 14:55:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_subr.c,v 1.52 2021/01/26 14:49:41 thorpej Exp $	*/
+/*	$NetBSD: ofw_subr.c,v 1.53 2021/01/26 14:55:57 thorpej Exp $	*/
 
 /*
  * Copyright 1998
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.52 2021/01/26 14:49:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.53 2021/01/26 14:55:57 thorpej Exp $");
 
 #include 
 #include 
@@ -334,7 +334,7 @@ of_find_bycompat(int node, const char *s
 	int child, ret;
 
 	for (child = OF_child(node); child; child = OF_peer(child)) {
-		if (of_match_compatible(child, compatible) != 0)
+		if (of_compatible(child, compatible))
 			return child;
 		ret = of_find_bycompat(child, str);
 		if (ret != -1)



CVS commit: src/sys/dev/fdt

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jan 26 14:55:34 UTC 2021

Modified Files:
src/sys/dev/fdt: fdtbus.c

Log Message:
Replace 2 uses of of_match_compatible().


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/fdt/fdtbus.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/dev/fdt/fdtbus.c
diff -u src/sys/dev/fdt/fdtbus.c:1.35 src/sys/dev/fdt/fdtbus.c:1.36
--- src/sys/dev/fdt/fdtbus.c:1.35	Sun Sep 20 11:25:36 2020
+++ src/sys/dev/fdt/fdtbus.c	Tue Jan 26 14:55:34 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.35 2020/09/20 11:25:36 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.36 2021/01/26 14:55:34 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.35 2020/09/20 11:25:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.36 2021/01/26 14:55:34 thorpej Exp $");
 
 #include 
 #include 
@@ -87,8 +87,10 @@ static u_int	fdt_get_order(int);
 static void	fdt_pre_attach(struct fdt_node *);
 static void	fdt_post_attach(struct fdt_node *);
 
-static const char * const fdtbus_compatible[] =
-{ "simple-bus", NULL };
+static const struct device_compatible_entry compat_data[] = {
+	{ .compat = "simple-bus" },
+	{ }
+};
 
 CFATTACH_DECL2_NEW(simplebus, sizeof(struct fdt_softc),
 fdt_match, fdt_attach, NULL, NULL, fdt_rescan, fdt_childdet);
@@ -101,7 +103,7 @@ fdt_match(device_t parent, cfdata_t cf, 
 	int match;
 
 	/* Check compatible string */
-	match = of_match_compatible(phandle, fdtbus_compatible);
+	match = of_match_compat_data(phandle, compat_data);
 	if (match)
 		return match;
 
@@ -474,7 +476,7 @@ fdt_remove_bycompat(const char *compatib
 	struct fdt_node *node, *next;
 
 	TAILQ_FOREACH_SAFE(node, _nodes, n_nodes, next) {
-		if (of_match_compatible(node->n_phandle, compatible)) {
+		if (of_compatible(node->n_phandle, compatible)) {
 			TAILQ_REMOVE(_nodes, node, n_nodes);
 		}
 	}



CVS commit: src/sys

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jan 26 14:49:41 UTC 2021

Modified Files:
src/sys/arch/macppc/dev: awacs.c mediabay.c obio.c pmu.c wdc_obio.c
src/sys/arch/macppc/macppc: interrupts.c machdep.c pic_heathrow.c
pic_u3_ht.c
src/sys/arch/macppc/pci: pci_machdep.c
src/sys/dev/ofw: ofw_subr.c

Log Message:
There is not much point in of_compatible() returning -1 for "no match"
and >= 0 for "match".  Just make it return 0 for "no match" and >0 for
"match" so it can be treated like a boolean expression.

As such of_match_compatible() (a wrapper around of_compatible()) is now
obsolete, and will be removed once all call sites are converted to an
appropriate replacement.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/macppc/dev/awacs.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/macppc/dev/mediabay.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/macppc/dev/obio.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/macppc/dev/pmu.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/macppc/dev/wdc_obio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/macppc/macppc/interrupts.c
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/macppc/macppc/machdep.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/macppc/macppc/pic_heathrow.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/macppc/macppc/pic_u3_ht.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/macppc/pci/pci_machdep.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/ofw/ofw_subr.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/macppc/dev/awacs.c
diff -u src/sys/arch/macppc/dev/awacs.c:1.48 src/sys/arch/macppc/dev/awacs.c:1.49
--- src/sys/arch/macppc/dev/awacs.c:1.48	Sat Jun  8 08:02:37 2019
+++ src/sys/arch/macppc/dev/awacs.c	Tue Jan 26 14:49:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: awacs.c,v 1.48 2019/06/08 08:02:37 isaki Exp $	*/
+/*	$NetBSD: awacs.c,v 1.49 2021/01/26 14:49:41 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.48 2019/06/08 08:02:37 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.49 2021/01/26 14:49:41 thorpej Exp $");
 
 #include 
 #include 
@@ -373,7 +373,7 @@ awacs_attach(device_t parent, device_t s
 	cv_init(>sc_event, "awacs_wait");
 
 	/* check if the chip is a screamer */
-	sc->sc_screamer = (of_compatible(ca->ca_node, screamer) != -1);
+	sc->sc_screamer = of_compatible(ca->ca_node, screamer);
 	if (!sc->sc_screamer) {
 		/* look for 'sound' child node */
 		int sound_node;
@@ -381,8 +381,7 @@ awacs_attach(device_t parent, device_t s
 		sound_node = OF_child(ca->ca_node);
 		while ((sound_node != 0) && (!sc->sc_screamer)) {
 
-			sc->sc_screamer = 
-			(of_compatible(sound_node, screamer) != -1);
+			sc->sc_screamer = of_compatible(sound_node, screamer);
 			sound_node = OF_peer(sound_node);
 		}
 	}
@@ -426,7 +425,7 @@ awacs_attach(device_t parent, device_t s
 	 */
 	perch = OF_finddevice("/perch");
 	root_node = OF_finddevice("/");
-	if (of_compatible(root_node, detect_reversed) != -1) {
+	if (of_compatible(root_node, detect_reversed)) {
 
 		/* 0x02 is for the microphone jack, high active */
 		/*
@@ -435,8 +434,7 @@ awacs_attach(device_t parent, device_t s
 		 */
 		sc->sc_headphones_mask = 0x8;
 		sc->sc_headphones_in = 0x0;
-	} else if ((perch != -1) ||
-	(of_compatible(root_node, use_gpio4) != -1)) {
+	} else if ((perch != -1) || of_compatible(root_node, use_gpio4)) {
 		/*
 		 * this is for the beige G3's 'personality card' which uses
 		 * yet another wiring of the headphone detect GPIOs
@@ -450,7 +448,7 @@ awacs_attach(device_t parent, device_t s
 		sc->sc_headphones_in = 0x8;
 	}
 
-	if (of_compatible(root_node, no_parallel_output) != -1)
+	if (of_compatible(root_node, no_parallel_output))
 		sc->sc_need_parallel_output = 0;
 	else {
 		sc->sc_need_parallel_output = 1;

Index: src/sys/arch/macppc/dev/mediabay.c
diff -u src/sys/arch/macppc/dev/mediabay.c:1.22 src/sys/arch/macppc/dev/mediabay.c:1.23
--- src/sys/arch/macppc/dev/mediabay.c:1.22	Tue Jul 26 08:36:02 2011
+++ src/sys/arch/macppc/dev/mediabay.c	Tue Jan 26 14:49:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mediabay.c,v 1.22 2011/07/26 08:36:02 macallan Exp $	*/
+/*	$NetBSD: mediabay.c,v 1.23 2021/01/26 14:49:41 thorpej Exp $	*/
 
 /*-
  * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mediabay.c,v 1.22 2011/07/26 08:36:02 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mediabay.c,v 1.23 2021/01/26 14:49:41 thorpej Exp $");
 
 #include 
 #include 
@@ -132,7 +132,7 @@ mediabay_attach(device_t parent, device_
 	irq = ca->ca_intr[0];
 	itype = IST_EDGE;
 
-	if (of_compatible(ca->ca_node, mediabay_keylargo) != -1) {
+	if (of_compatible(ca->ca_node, mediabay_keylargo)) {
 		sc->sc_type = MB_CONTROLLER_KEYLARGO;
 		sc->sc_fcr = sc->sc_addr + 2;
 	} else {

Index: 

CVS commit: src/sys/dev/ofw

2021-01-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jan 26 14:09:11 UTC 2021

Modified Files:
src/sys/dev/ofw: ofw_subr.c

Log Message:
Minor comment changes.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ofw/ofw_subr.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/dev/ofw/ofw_subr.c
diff -u src/sys/dev/ofw/ofw_subr.c:1.50 src/sys/dev/ofw/ofw_subr.c:1.51
--- src/sys/dev/ofw/ofw_subr.c:1.50	Mon Jan 25 19:59:49 2021
+++ src/sys/dev/ofw/ofw_subr.c	Tue Jan 26 14:09:11 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_subr.c,v 1.50 2021/01/25 19:59:49 mrg Exp $	*/
+/*	$NetBSD: ofw_subr.c,v 1.51 2021/01/26 14:09:11 thorpej Exp $	*/
 
 /*
  * Copyright 1998
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.50 2021/01/25 19:59:49 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.51 2021/01/26 14:09:11 thorpej Exp $");
 
 #include 
 #include 
@@ -161,8 +161,11 @@ of_match_compatible(int phandle, const c
 /*
  * int of_match_compat_data(phandle, compat_data)
  *
- * This routine searches an array of compat_data structures for a
- * matching "compatible" entry matching the supplied OFW node.
+ * This routine searches an array of device_compatible_entry structures
+ * for a matching "compatible" entry matching the supplied OFW node,
+ * and returns a weighted match value corresponding to which string
+ * from the "compatible" property was matched, which more weight given
+ * to the first string than the last.
  *
  * It should be used when determining whether a driver can drive
  * a particular device.
@@ -212,8 +215,8 @@ of_match_compat_data(int phandle,
  * const struct device_compatible_entry *of_search_compatible(phandle,
  *			  compat_data)
  *
- * This routine searches an array of compat_data structures for a
- * matching "compatible" entry matching the supplied OFW node.
+ * This routine searches an array of device_compatible_entry structures
+ * for a "compatible" entry matching the supplied OFW node.
  *
  * Arguments:
  *	phandle		OFW phandle of device to be checked for



CVS commit: src

2021-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jan 26 13:31:19 UTC 2021

Modified Files:
src/distrib/sets/lists/etc: mi
Added Files:
src/etc/rc.d: lvmlockdir
Removed Files:
src/etc/rc.d: llvmlockdir

Log Message:
Rename etc/rc.d/llvmlockdir to lvmlockdir - it has nothing to do with LLVM,
the name probably was a freudian slip of my fingers when I split that
fragment out of another rc.d script.


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/distrib/sets/lists/etc/mi
cvs rdiff -u -r1.2 -r0 src/etc/rc.d/llvmlockdir
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/lvmlockdir

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

Modified files:

Index: src/distrib/sets/lists/etc/mi
diff -u src/distrib/sets/lists/etc/mi:1.264 src/distrib/sets/lists/etc/mi:1.265
--- src/distrib/sets/lists/etc/mi:1.264	Sun Jan 10 23:24:25 2021
+++ src/distrib/sets/lists/etc/mi	Tue Jan 26 13:31:19 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.264 2021/01/10 23:24:25 riastradh Exp $
+# $NetBSD: mi,v 1.265 2021/01/26 13:31:19 martin Exp $
 #
 # Note: end-user configuration files that are moved to another location
 #	should not be marked "obsolete"; they should just be removed from
@@ -247,10 +247,11 @@
 ./etc/rc.d/lkm1	etc-obsolete		obsolete
 ./etc/rc.d/lkm2	etc-obsolete		obsolete
 ./etc/rc.d/lkm3	etc-obsolete		obsolete
-./etc/rc.d/llvmlockdiretc-sys-rc
+./etc/rc.d/llvmlockdiretc-obsolete		obsolete
 ./etc/rc.d/localetc-sys-rc
 ./etc/rc.d/lpd	etc-lpr-rc
 ./etc/rc.d/lvm	etc-sys-rc
+./etc/rc.d/lvmlockdiretc-sys-rc
 ./etc/rc.d/makemandbetc-man-rc
 ./etc/rc.d/mdnsdetc-mdns-rc
 ./etc/rc.d/mixerctletc-audio-rc

Added files:

Index: src/etc/rc.d/lvmlockdir
diff -u /dev/null src/etc/rc.d/lvmlockdir:1.1
--- /dev/null	Tue Jan 26 13:31:19 2021
+++ src/etc/rc.d/lvmlockdir	Tue Jan 26 13:31:19 2021
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $NetBSD: lvmlockdir,v 1.1 2021/01/26 13:31:19 martin Exp $
+#
+
+# REQUIRE: mountcritlocal
+# BEFORE: CRITLOCALMOUNTED
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="lvmlockdir"
+start_cmd="lvmlockdir_start"
+stop_cmd=":"
+
+lvmlockdir_start()
+{
+	#   create LVM locking directory, it needs to be owned by operator
+	#	group and has parmissions to allow lock file creation.
+	#
+	mkdir -p /var/run/lvm
+	chown root:operator /var/run/lvm
+	chmod 770 /var/run/lvm
+	return 0
+}
+
+load_rc_config $name
+run_rc_command "$1"



CVS commit: src/sys/arch/atari/conf

2021-01-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jan 26 10:51:27 UTC 2021

Modified Files:
src/sys/arch/atari/conf: ATARITT FALCON HADES MILAN-ISAIDE MILAN-PCIIDE
SMALL030

Log Message:
Regen for previous commit to GENERIC.in.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/atari/conf/SMALL030

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/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.121 src/sys/arch/atari/conf/ATARITT:1.122
--- src/sys/arch/atari/conf/ATARITT:1.121	Mon Aug 10 06:34:25 2020
+++ src/sys/arch/atari/conf/ATARITT	Tue Jan 26 10:51:27 2021
@@ -1,11 +1,11 @@
 #
-# $NetBSD: ATARITT,v 1.121 2020/08/10 06:34:25 rin Exp $
+# $NetBSD: ATARITT,v 1.122 2021/01/26 10:51:27 rin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.119 2020/08/10 06:32:58 rin Exp $
+#		NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.118 src/sys/arch/atari/conf/FALCON:1.119
--- src/sys/arch/atari/conf/FALCON:1.118	Mon Aug 10 06:34:25 2020
+++ src/sys/arch/atari/conf/FALCON	Tue Jan 26 10:51:27 2021
@@ -1,11 +1,11 @@
 #
-# $NetBSD: FALCON,v 1.118 2020/08/10 06:34:25 rin Exp $
+# $NetBSD: FALCON,v 1.119 2021/01/26 10:51:27 rin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.119 2020/08/10 06:32:58 rin Exp $
+#		NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.116 src/sys/arch/atari/conf/HADES:1.117
--- src/sys/arch/atari/conf/HADES:1.116	Mon Aug 10 06:34:25 2020
+++ src/sys/arch/atari/conf/HADES	Tue Jan 26 10:51:27 2021
@@ -1,12 +1,12 @@
 #
-# $NetBSD: HADES,v 1.116 2020/08/10 06:34:25 rin Exp $
+# $NetBSD: HADES,v 1.117 2021/01/26 10:51:27 rin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: HADES.in,v 1.16 2018/03/31 04:19:41 tsutsui Exp $
-#		NetBSD: GENERIC.in,v 1.119 2020/08/10 06:32:58 rin Exp $
+#		NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
 include "arch/atari/conf/std.hades"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.

Index: src/sys/arch/atari/conf/MILAN-ISAIDE
diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.94 src/sys/arch/atari/conf/MILAN-ISAIDE:1.95
--- src/sys/arch/atari/conf/MILAN-ISAIDE:1.94	Mon Aug 10 06:34:25 2020
+++ src/sys/arch/atari/conf/MILAN-ISAIDE	Tue Jan 26 10:51:27 2021
@@ -1,12 +1,12 @@
 #
-# $NetBSD: MILAN-ISAIDE,v 1.94 2020/08/10 06:34:25 rin Exp $
+# $NetBSD: MILAN-ISAIDE,v 1.95 2021/01/26 10:51:27 rin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
-#		NetBSD: GENERIC.in,v 1.119 2020/08/10 06:32:58 rin Exp $
+#		NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
 include "arch/atari/conf/std.milan"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.

Index: src/sys/arch/atari/conf/MILAN-PCIIDE
diff -u src/sys/arch/atari/conf/MILAN-PCIIDE:1.98 src/sys/arch/atari/conf/MILAN-PCIIDE:1.99
--- src/sys/arch/atari/conf/MILAN-PCIIDE:1.98	Mon Aug 10 06:34:25 2020
+++ src/sys/arch/atari/conf/MILAN-PCIIDE	Tue Jan 26 10:51:27 2021
@@ -1,12 +1,12 @@
 #
-# $NetBSD: MILAN-PCIIDE,v 1.98 2020/08/10 06:34:25 rin Exp $
+# $NetBSD: MILAN-PCIIDE,v 1.99 2021/01/26 10:51:27 rin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when 

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

2021-01-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Jan 26 10:50:20 UTC 2021

Modified Files:
src/sys/arch/amiga/conf: DRACO GENERIC INSTALL

Log Message:
Regen for previous commit to GENERIC.in.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/arch/amiga/conf/DRACO
cvs rdiff -u -r1.332 -r1.333 src/sys/arch/amiga/conf/GENERIC
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/amiga/conf/INSTALL

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/conf/DRACO
diff -u src/sys/arch/amiga/conf/DRACO:1.197 src/sys/arch/amiga/conf/DRACO:1.198
--- src/sys/arch/amiga/conf/DRACO:1.197	Thu Jan 21 06:51:54 2021
+++ src/sys/arch/amiga/conf/DRACO	Tue Jan 26 10:50:20 2021
@@ -1,9 +1,9 @@
-# $NetBSD: DRACO,v 1.197 2021/01/21 06:51:54 nia Exp $
+# $NetBSD: DRACO,v 1.198 2021/01/26 10:50:20 rin Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.147 2020/10/26 06:21:49 rin Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.148 2021/01/21 06:51:54 nia Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include "arch/amiga/conf/std.amiga"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.197 $"
+#ident 		"GENERIC-$Revision: 1.198 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer"
 	# See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for

Index: src/sys/arch/amiga/conf/GENERIC
diff -u src/sys/arch/amiga/conf/GENERIC:1.332 src/sys/arch/amiga/conf/GENERIC:1.333
--- src/sys/arch/amiga/conf/GENERIC:1.332	Thu Jan 21 06:51:54 2021
+++ src/sys/arch/amiga/conf/GENERIC	Tue Jan 26 10:50:20 2021
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC,v 1.332 2021/01/21 06:51:54 nia Exp $
+# $NetBSD: GENERIC,v 1.333 2021/01/26 10:50:20 rin Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.147 2020/10/26 06:21:49 rin Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.148 2021/01/21 06:51:54 nia Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include "arch/amiga/conf/std.amiga"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.332 $"
+#ident 		"GENERIC-$Revision: 1.333 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer"
 	# See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for

Index: src/sys/arch/amiga/conf/INSTALL
diff -u src/sys/arch/amiga/conf/INSTALL:1.137 src/sys/arch/amiga/conf/INSTALL:1.138
--- src/sys/arch/amiga/conf/INSTALL:1.137	Mon Oct 26 06:22:28 2020
+++ src/sys/arch/amiga/conf/INSTALL	Tue Jan 26 10:50:20 2021
@@ -1,9 +1,9 @@
-# $NetBSD: INSTALL,v 1.137 2020/10/26 06:22:28 rin Exp $
+# $NetBSD: INSTALL,v 1.138 2021/01/26 10:50:20 rin Exp $
 #
 # This file was automatically created.
 # Changes will be lost when make is run in this directory.
 #
-# Created from: # NetBSD: GENERIC.in,v 1.147 2020/10/26 06:21:49 rin Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.148 2021/01/21 06:51:54 nia Exp $
 #
 ##
 # GENERIC machine description file
@@ -29,7 +29,7 @@ include "arch/amiga/conf/std.amiga"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.137 $"
+#ident 		"GENERIC-$Revision: 1.138 $"
 
 makeoptions	COPTS="-Os -fno-omit-frame-pointer"