CVS commit: src/sys/arch/xen

2018-10-25 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Fri Oct 26 05:33:21 UTC 2018

Modified Files:
src/sys/arch/xen/include: hypervisor.h
src/sys/arch/xen/x86: hypervisor_machdep.c xen_ipi.c
src/sys/arch/xen/xen: clock.c evtchn.c if_xennet_xenbus.c pciback.c
xbd_xenbus.c xbdback_xenbus.c xencons.c xennetback_xenbus.c
src/sys/arch/xen/xenbus: xenbus_comms.c

Log Message:
Decompose hypervisor_enable_event() into functional steps.

The hypervisor_unmask_event() step is relevant for any event.

The pirq related step is only relevant for pirq bound events.

Prune blanket usage of this, so that usage is semantically appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/xen/include/hypervisor.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/xen/x86/hypervisor_machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/xen/x86/xen_ipi.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/xen/xen/clock.c
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/xen/xen/evtchn.c
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/xen/xen/if_xennet_xenbus.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/xen/pciback.c
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/xen/xen/xbd_xenbus.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/xen/xen/xbdback_xenbus.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/xen/xen/xencons.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/xen/xen/xennetback_xenbus.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/xen/xenbus/xenbus_comms.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/xen/include/hypervisor.h
diff -u src/sys/arch/xen/include/hypervisor.h:1.45 src/sys/arch/xen/include/hypervisor.h:1.46
--- src/sys/arch/xen/include/hypervisor.h:1.45	Sun Sep 23 02:27:24 2018
+++ src/sys/arch/xen/include/hypervisor.h	Fri Oct 26 05:33:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor.h,v 1.45 2018/09/23 02:27:24 cherry Exp $	*/
+/*	$NetBSD: hypervisor.h,v 1.46 2018/10/26 05:33:21 cherry Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -55,7 +55,8 @@
 #define _XEN_HYPERVISOR_H_
 
 #include "opt_xen.h"
-
+#include "isa.h"
+#include "pci.h"
 
 struct hypervisor_attach_args {
 	const char 		*haa_busname;
@@ -130,8 +131,10 @@ extern volatile shared_info_t *HYPERVISO
 struct intrframe;
 struct cpu_info;
 void do_hypervisor_callback(struct intrframe *regs);
+#if NPCI > 0 || NISA > 0
 void hypervisor_prime_pirq_event(int, unsigned int);
-void hypervisor_enable_event(unsigned int);
+void hypervisor_ack_pirq_event(unsigned int);
+#endif /* NPCI > 0 || NISA > 0 */
 
 extern int xen_version;
 #define XEN_MAJOR(x) (((x) & 0x) >> 16)

Index: src/sys/arch/xen/x86/hypervisor_machdep.c
diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.28 src/sys/arch/xen/x86/hypervisor_machdep.c:1.29
--- src/sys/arch/xen/x86/hypervisor_machdep.c:1.28	Sun Sep 21 12:46:15 2014
+++ src/sys/arch/xen/x86/hypervisor_machdep.c	Fri Oct 26 05:33:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor_machdep.c,v 1.28 2014/09/21 12:46:15 bouyer Exp $	*/
+/*	$NetBSD: hypervisor_machdep.c,v 1.29 2018/10/26 05:33:21 cherry Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.28 2014/09/21 12:46:15 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.29 2018/10/26 05:33:21 cherry Exp $");
 
 #include 
 #include 
@@ -71,6 +71,8 @@ __KERNEL_RCSID(0, "$NetBSD: hypervisor_m
 #include 
 
 #include "opt_xen.h"
+#include "isa.h"
+#include "pci.h"
 
 /*
  * arch-dependent p2m frame lists list (L3 and L2)
@@ -392,7 +394,10 @@ evt_enable_event(unsigned int port, unsi
 		 unsigned int l2i, void *args)
 {
 	KASSERT(args == NULL);
-	hypervisor_enable_event(port);
+	hypervisor_unmask_event(port);
+#if NPCI > 0 || NISA > 0
+	hypervisor_ack_pirq_event(port);
+#endif /* NPCI > 0 || NISA > 0 */
 }
 
 void

Index: src/sys/arch/xen/x86/xen_ipi.c
diff -u src/sys/arch/xen/x86/xen_ipi.c:1.27 src/sys/arch/xen/x86/xen_ipi.c:1.28
--- src/sys/arch/xen/x86/xen_ipi.c:1.27	Wed Oct 24 03:59:33 2018
+++ src/sys/arch/xen/x86/xen_ipi.c	Fri Oct 26 05:33:21 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $ */
+/* $NetBSD: xen_ipi.c,v 1.28 2018/10/26 05:33:21 cherry Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -33,10 +33,10 @@
 
 /* 
  * Based on: x86/ipi.c
- * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $");
+ * __KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.28 2018/10/26 05:33:21 cherry Exp $");
  */
 
-__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.27 2018/10/24 03:59:33 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.28 2018/10/26 05:33:21 cherry Exp $");
 
 #include "opt_ddb.h"
 
@@ -143,7 +143,7 @@ xen_ipi_init(void)
 		/* NOTREACHED */
 	}
 
-	hypervisor_enable_event(evtchn);
+	hypervisor_unmask_event(evtchn);
 }
 
 #ifdef DIAGNOSTIC

Index: src/sys/arch/xen/xen/clock.c
diff -u src/sys/arch/xen/xen/clock.c:1.71 

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

2018-10-25 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Fri Oct 26 01:57:59 UTC 2018

Modified Files:
src/sys/arch/sparc64/dev: jbus-i2c.c

Log Message:
- map registers ourselves, no more schizo hackery
- remove some leftover debug code
- print address when attaching
- actually lock/unlock in acquire_bus()/release_bus()
should be ready for general consumption now


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/dev/jbus-i2c.c

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

Modified files:

Index: src/sys/arch/sparc64/dev/jbus-i2c.c
diff -u src/sys/arch/sparc64/dev/jbus-i2c.c:1.1 src/sys/arch/sparc64/dev/jbus-i2c.c:1.2
--- src/sys/arch/sparc64/dev/jbus-i2c.c:1.1	Sat Oct 20 06:25:46 2018
+++ src/sys/arch/sparc64/dev/jbus-i2c.c	Fri Oct 26 01:57:59 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: jbus-i2c.c,v 1.1 2018/10/20 06:25:46 macallan Exp $	*/
+/*	$NetBSD: jbus-i2c.c,v 1.2 2018/10/26 01:57:59 macallan Exp $	*/
 
 /*
  * Copyright (c) 2018 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: jbus-i2c.c,v 1.1 2018/10/20 06:25:46 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jbus-i2c.c,v 1.2 2018/10/26 01:57:59 macallan Exp $");
 
 #include 
 #include 
@@ -39,15 +39,13 @@ __KERNEL_RCSID(0, "$NetBSD: jbus-i2c.c,v
 #include 
 #include 
 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 
+#ifdef JBUSI2C_DEBUG
 #define DPRINTF printf
+#else
+#define DPRINTF if (0) printf
+#endif
 
 /* I2C glue */
 static int jbusi2c_i2c_acquire_bus(void *, int);
@@ -82,6 +80,8 @@ struct jbusi2c_softc {
 	device_t sc_dev;
 	struct i2c_controller sc_i2c;
 	kmutex_t sc_i2c_lock;
+	bus_space_tag_t sc_bustag;
+	bus_space_handle_t sc_regh;
 	int sc_node;
 };
 
@@ -90,7 +90,9 @@ static void jbusi2c_setup_i2c(struct jbu
 CFATTACH_DECL_NEW(jbusi2c, sizeof(struct jbusi2c_softc),
 jbusi2c_match, jbusi2c_attach, NULL, NULL);
 
-extern struct schizo_softc *schizo0;
+/* schizo GPIO registers */
+#define DATA	0
+#define DIR	8
 
 int
 jbusi2c_match(device_t parent, cfdata_t match, void *aux)
@@ -114,13 +116,19 @@ jbusi2c_attach(device_t parent, device_t
 	struct jbusi2c_softc *sc = device_private(self);
 	struct mainbus_attach_args *ma = aux;
 
-	aprint_normal("\n");
+	aprint_normal(": addr %lx\n", ma->ma_reg[0].ur_paddr);
 
 	sc->sc_dev = self;
 	sc->sc_node = ma->ma_node;
+	sc->sc_bustag = ma->ma_bustag;
 
-	if (schizo0 != NULL)
-		jbusi2c_setup_i2c(sc);
+	if (bus_space_map(sc->sc_bustag, ma->ma_reg[0].ur_paddr, 16, 0,
+	>sc_regh)) {
+		aprint_error(": failed to map registers\n");
+		return;
+	}
+
+	jbusi2c_setup_i2c(sc);
 }
 
 
@@ -133,11 +141,10 @@ jbusi2c_setup_i2c(struct jbusi2c_softc *
 	prop_dictionary_t dev;
 	prop_data_t data;
 	prop_dictionary_t dict = device_properties(sc->sc_dev);
-	int ret, devs, regs[2], addr;
-	uint8_t reg = 0, val[128];
+	int devs, regs[2], addr;
 	char name[64], compat[256];
 
-	sc->sc_i2c.ic_cookie = schizo0;
+	sc->sc_i2c.ic_cookie = sc;
 	sc->sc_i2c.ic_acquire_bus = jbusi2c_i2c_acquire_bus;
 	sc->sc_i2c.ic_release_bus = jbusi2c_i2c_release_bus;
 	sc->sc_i2c.ic_send_start = jbusi2c_i2c_send_start;
@@ -147,11 +154,6 @@ jbusi2c_setup_i2c(struct jbusi2c_softc *
 	sc->sc_i2c.ic_write_byte = jbusi2c_i2c_write_byte;
 	sc->sc_i2c.ic_exec = NULL;
 
-	val[0] = 0;
-	ret = iic_exec(>sc_i2c, I2C_OP_READ_WITH_STOP, 0x50,
-		, 1, val, 1, I2C_F_POLL);
-	printf("ret %d val %02x\n", ret, val[0]);
-
 	/* round up i2c devices */
 	devs = OF_child(sc->sc_node);
 	cfg = prop_array_create();
@@ -188,45 +190,59 @@ jbusi2c_setup_i2c(struct jbusi2c_softc *
 	iicbus_print);
 }
 
+static inline void
+jbusi2c_write(struct jbusi2c_softc *sc, int reg, uint64_t bits)
+{
+	bus_space_write_8(sc->sc_bustag, sc->sc_regh, reg, bits);
+}
+
+static inline uint64_t
+jbusi2c_read(struct jbusi2c_softc *sc, int reg)
+{
+	return bus_space_read_8(sc->sc_bustag, sc->sc_regh, reg);
+}
+
 /* I2C bitbanging */
 static void
 jbusi2c_i2cbb_set_bits(void *cookie, uint32_t bits)
 {
-	struct schizo_softc *sc = cookie;
+	struct jbusi2c_softc *sc = cookie;
 
-	schizo_write(sc, SCZ_JBUS_GPIO_DATA, bits);
+	jbusi2c_write(sc, DATA, bits);
 }
 
 static void
 jbusi2c_i2cbb_set_dir(void *cookie, uint32_t dir)
 {
-	struct schizo_softc *sc = cookie;
+	struct jbusi2c_softc *sc = cookie;
 
-	schizo_write(sc, SCZ_JBUS_GPIO_DIR, dir);
+	jbusi2c_write(sc, DIR, dir);
 }
 
 static uint32_t
 jbusi2c_i2cbb_read(void *cookie)
 {
-	struct schizo_softc *sc = cookie;
+	struct jbusi2c_softc *sc = cookie;
 
-	return schizo_read(sc, SCZ_JBUS_GPIO_DATA);
+	return jbusi2c_read(sc, DATA);
 }
 
 /* higher level I2C stuff */
 static int
 jbusi2c_i2c_acquire_bus(void *cookie, int flags)
 {
+	struct jbusi2c_softc *sc = cookie;
 
-	/* private bus */
+	mutex_enter(>sc_i2c_lock);
 	return 0;
 }
 
 static void
 jbusi2c_i2c_release_bus(void *cookie, int flags)
 {
+	struct jbusi2c_softc *sc = cookie;
 
-	/* private bus */
+	

CVS commit: src/sys/rump/net/lib/libnpf

2018-10-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 26 01:33:33 UTC 2018

Modified Files:
src/sys/rump/net/lib/libnpf: Makefile

Log Message:
Comment out _NPF_TESTING (really should be removed)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/net/lib/libnpf/Makefile

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

Modified files:

Index: src/sys/rump/net/lib/libnpf/Makefile
diff -u src/sys/rump/net/lib/libnpf/Makefile:1.22 src/sys/rump/net/lib/libnpf/Makefile:1.23
--- src/sys/rump/net/lib/libnpf/Makefile:1.22	Thu Oct 25 20:38:52 2018
+++ src/sys/rump/net/lib/libnpf/Makefile	Thu Oct 25 21:33:33 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2018/10/26 00:38:52 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2018/10/26 01:33:33 christos Exp $
 #
 # Public Domain.
 #
@@ -33,9 +33,9 @@ SRCS+=	npf_component.c
 
 CPPFLAGS+=	-I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
 
-.if ${RUMP_NPF_TESTING:Uyes} == "yes"
-CPPFLAGS+=	-D_NPF_TESTING
-.endif
+#.if ${RUMP_NPF_TESTING:Uyes} == "yes"
+#CPPFLAGS+=	-D_NPF_TESTING
+#.endif
 
 .include 
 .include 



CVS commit: src/sys/rump/net/lib/libnpf

2018-10-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 26 00:38:52 UTC 2018

Modified Files:
src/sys/rump/net/lib/libnpf: Makefile

Log Message:
need libnvpair


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/net/lib/libnpf/Makefile

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

Modified files:

Index: src/sys/rump/net/lib/libnpf/Makefile
diff -u src/sys/rump/net/lib/libnpf/Makefile:1.21 src/sys/rump/net/lib/libnpf/Makefile:1.22
--- src/sys/rump/net/lib/libnpf/Makefile:1.21	Sat Sep 29 10:41:36 2018
+++ src/sys/rump/net/lib/libnpf/Makefile	Thu Oct 25 20:38:52 2018
@@ -1,11 +1,13 @@
-#	$NetBSD: Makefile,v 1.21 2018/09/29 14:41:36 rmind Exp $
+#	$NetBSD: Makefile,v 1.22 2018/10/26 00:38:52 christos Exp $
 #
 # Public Domain.
 #
 
 NOLINT=		# defined
+S=${.CURDIR}/../../../../
+
+.PATH:	${S}/net/npf ${S}/external/bsd/libnv/dist
 
-.PATH:	${.CURDIR}/../../../../net/npf
 
 LIB=	rumpnet_npf
 COMMENT=NPF packet filter
@@ -17,6 +19,8 @@ SRCS+=	npf_ruleset.c npf_conn.c npf_conn
 SRCS+=	npf_state.c npf_state_tcp.c npf_tableset.c
 SRCS+=	lpm.c npf_sendpkt.c npf_worker.c npf_os.c npf_ifaddr.c
 
+SRCS+=	nvlist.c nvpair.c nv_kern_netbsd.c dnvlist.c
+
 SRCS+=	if_npflog.c
 
 SRCS+=	npf_alg_icmp.c



CVS commit: src/sys/dev/pci

2018-10-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Oct 25 21:07:58 UTC 2018

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

Log Message:
enable MSI support where available


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/ehci_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/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.67 src/sys/dev/pci/ehci_pci.c:1.68
--- src/sys/dev/pci/ehci_pci.c:1.67	Thu May 10 03:41:00 2018
+++ src/sys/dev/pci/ehci_pci.c	Thu Oct 25 21:07:58 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.67 2018/05/10 03:41:00 msaitoh Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.68 2018/10/25 21:07:58 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.67 2018/05/10 03:41:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.68 2018/10/25 21:07:58 jdolecek Exp $");
 
 #include 
 #include 
@@ -83,6 +83,7 @@ struct ehci_pci_softc {
 	ehci_softc_t		sc;
 	pci_chipset_tag_t	sc_pc;
 	pcitag_t		sc_tag;
+	pci_intr_handle_t	*sc_pihp;
 	void 			*sc_ih;		/* interrupt vectoring */
 };
 
@@ -117,7 +118,6 @@ ehci_pci_attach(device_t parent, device_
 	pci_chipset_tag_t pc = pa->pa_pc;
 	pcitag_t tag = pa->pa_tag;
 	char const *intrstr;
-	pci_intr_handle_t ih;
 	pcireg_t csr;
 	int ncomp;
 	struct usb_pci *up;
@@ -171,7 +171,7 @@ ehci_pci_attach(device_t parent, device_
 	pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, csr);
 
 	/* Map and establish the interrupt. */
-	if (pci_intr_map(pa, )) {
+	if (pci_intr_alloc(pa, >sc_pihp, NULL, 0) != 0) {
 		aprint_error_dev(self, "couldn't map interrupt\n");
 		goto fail;
 	}
@@ -179,10 +179,13 @@ ehci_pci_attach(device_t parent, device_
 	/*
 	 * Allocate IRQ
 	 */
-	intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
-	sc->sc_ih = pci_intr_establish_xname(pc, ih, IPL_USB, ehci_intr, sc,
-	device_xname(self));
+	intrstr = pci_intr_string(pc, sc->sc_pihp[0], intrbuf, sizeof(intrbuf));
+	sc->sc_ih = pci_intr_establish_xname(pc, sc->sc_pihp[0], IPL_USB,
+	ehci_intr, sc, device_xname(self));
 	if (sc->sc_ih == NULL) {
+		pci_intr_release(sc->sc_pc, sc->sc_pihp, 1);
+		sc->sc_pihp = NULL;
+
 		aprint_error_dev(self, "couldn't establish interrupt");
 		if (intrstr != NULL)
 			aprint_error(" at %s", intrstr);
@@ -288,6 +291,12 @@ ehci_pci_detach(device_t self, int flags
 		pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
 		sc->sc_ih = NULL;
 	}
+
+	if (sc->sc_pihp != NULL) {
+		pci_intr_release(sc->sc_pc, sc->sc_pihp, 1);
+		sc->sc_pihp = NULL;
+	}
+
 	if (sc->sc.sc_size) {
 		ehci_release_ownership(>sc, sc->sc_pc, sc->sc_tag);
 		bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size);



CVS commit: src/sys/dev/pci

2018-10-25 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Oct 25 21:03:19 UTC 2018

Modified Files:
src/sys/dev/pci: ahcisata_pci.c siisata_pci.c

Log Message:
release intr if pci_intr_establish_xname() fails


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/ahcisata_pci.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/siisata_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/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.41 src/sys/dev/pci/ahcisata_pci.c:1.42
--- src/sys/dev/pci/ahcisata_pci.c:1.41	Wed Oct 24 19:38:00 2018
+++ src/sys/dev/pci/ahcisata_pci.c	Thu Oct 25 21:03:19 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.41 2018/10/24 19:38:00 jdolecek Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.42 2018/10/25 21:03:19 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.41 2018/10/24 19:38:00 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.42 2018/10/25 21:03:19 jdolecek Exp $");
 
 #include 
 #include 
@@ -297,6 +297,9 @@ ahci_pci_attach(device_t parent, device_
 	psc->sc_ih = pci_intr_establish_xname(pa->pa_pc, psc->sc_pihp[0],
 	IPL_BIO, ahci_intr, sc, device_xname(sc->sc_atac.atac_dev));
 	if (psc->sc_ih == NULL) {
+		pci_intr_release(psc->sc_pc, psc->sc_pihp, 1);
+		psc->sc_pihp = NULL;
+
 		aprint_error_dev(self, "couldn't establish interrupt\n");
 		return;
 	}

Index: src/sys/dev/pci/siisata_pci.c
diff -u src/sys/dev/pci/siisata_pci.c:1.19 src/sys/dev/pci/siisata_pci.c:1.20
--- src/sys/dev/pci/siisata_pci.c:1.19	Wed Oct 24 19:38:00 2018
+++ src/sys/dev/pci/siisata_pci.c	Thu Oct 25 21:03:19 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata_pci.c,v 1.19 2018/10/24 19:38:00 jdolecek Exp $ */
+/* $NetBSD: siisata_pci.c,v 1.20 2018/10/25 21:03:19 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -51,7 +51,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: siisata_pci.c,v 1.19 2018/10/24 19:38:00 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata_pci.c,v 1.20 2018/10/25 21:03:19 jdolecek Exp $");
 
 #include 
 #include 
@@ -222,6 +222,9 @@ siisata_pci_attach(device_t parent, devi
 	psc->sc_ih = pci_intr_establish_xname(pa->pa_pc, psc->sc_pihp[0],
 	IPL_BIO, siisata_intr, sc, device_xname(self));
 	if (psc->sc_ih == NULL) {
+		pci_intr_release(psc->sc_pc, psc->sc_pihp, 1);
+		psc->sc_pihp = NULL;
+
 		bus_space_unmap(sc->sc_grt, sc->sc_grh, grsize);
 		bus_space_unmap(sc->sc_prt, sc->sc_prh, prsize);
 		aprint_error_dev(self, "couldn't establish interrupt at %s\n",



CVS commit: [netbsd-8] src/doc

2018-10-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 25 18:33:52 UTC 2018

Modified Files:
src/doc [netbsd-8]: CHANGES-8.1

Log Message:
Tickets #1069 and #1071


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/doc/CHANGES-8.1

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-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.38 src/doc/CHANGES-8.1:1.1.2.39
--- src/doc/CHANGES-8.1:1.1.2.38	Mon Oct 22 07:42:27 2018
+++ src/doc/CHANGES-8.1	Thu Oct 25 18:33:52 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.38 2018/10/22 07:42:27 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.39 2018/10/25 18:33:52 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -1473,3 +1473,16 @@ doc/3RDPARTY	1.1568 (patch)
 
 	tzdata updated to 2018f.
 	[kre, ticket #1068]
+
+external/bsd/bind/dist/lib/isc/unix/socket.c	(apply patch)
+
+	Fix bind9 issue #589 (fixed on HEAD by import of a newer
+	version): BIND will on NetBSD fail to send replies over
+	IPv4/UDP larger than 1432 bytes.
+	[he, ticket #1069]
+
+sys/netinet6/icmp6.c1.240
+
+	Remove a leftover debug printf.
+	[ozaki-r, ticket #1071]
+



CVS commit: [netbsd-8] src/sys/netinet6

2018-10-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 25 18:32:54 UTC 2018

Modified Files:
src/sys/netinet6 [netbsd-8]: icmp6.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1071):

sys/netinet6/icmp6.c: revision 1.240

Remove a leftover debug printf

Pointed out by hannken@


To generate a diff of this commit:
cvs rdiff -u -r1.211.6.7 -r1.211.6.8 src/sys/netinet6/icmp6.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/netinet6/icmp6.c
diff -u src/sys/netinet6/icmp6.c:1.211.6.7 src/sys/netinet6/icmp6.c:1.211.6.8
--- src/sys/netinet6/icmp6.c:1.211.6.7	Sat Jun 23 11:03:27 2018
+++ src/sys/netinet6/icmp6.c	Thu Oct 25 18:32:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp6.c,v 1.211.6.7 2018/06/23 11:03:27 martin Exp $	*/
+/*	$NetBSD: icmp6.c,v 1.211.6.8 2018/10/25 18:32:54 martin Exp $	*/
 /*	$KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.211.6.7 2018/06/23 11:03:27 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.211.6.8 2018/10/25 18:32:54 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2866,7 +2866,6 @@ icmp6_redirect_timeout(struct rtentry *r
 
 	if ((rt->rt_flags & (RTF_GATEWAY | RTF_DYNAMIC | RTF_HOST)) ==
 	(RTF_GATEWAY | RTF_DYNAMIC | RTF_HOST)) {
-		printf("%s: RTM_DELETE\n", __func__);
 		rtrequest(RTM_DELETE, rt_getkey(rt),
 		rt->rt_gateway, rt_mask(rt), rt->rt_flags, );
 		rt_unref(rt);



CVS commit: [netbsd-8] src/external/bsd/bind/dist/lib/isc/unix

2018-10-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 25 18:22:31 UTC 2018

Modified Files:
src/external/bsd/bind/dist/lib/isc/unix [netbsd-8]: socket.c

Log Message:
Apply patch, requested by he in ticket #1069:
fix bind9 issue #589: BIND will on NetBSD fail to send replies over
IPv4/UDP larger than 1432 bytes.


To generate a diff of this commit:
cvs rdiff -u -r1.20.6.2 -r1.20.6.3 \
src/external/bsd/bind/dist/lib/isc/unix/socket.c

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

Modified files:

Index: src/external/bsd/bind/dist/lib/isc/unix/socket.c
diff -u src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.20.6.2 src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.20.6.3
--- src/external/bsd/bind/dist/lib/isc/unix/socket.c:1.20.6.2	Mon Aug 13 12:05:25 2018
+++ src/external/bsd/bind/dist/lib/isc/unix/socket.c	Thu Oct 25 18:22:31 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: socket.c,v 1.20.6.2 2018/08/13 12:05:25 martin Exp $	*/
+/*	$NetBSD: socket.c,v 1.20.6.3 2018/10/25 18:22:31 martin Exp $	*/
 
 /*
  * Copyright (C) 2004-2016  Internet Systems Consortium, Inc. ("ISC")
@@ -1544,7 +1544,8 @@ build_msghdr_send(isc__socket_t *sock, i
 
 #if defined(IPV6_USE_MIN_MTU)
 	if ((sock->type == isc_sockettype_udp) &&
-	((dev->attributes & ISC_SOCKEVENTATTR_USEMINMTU) != 0))
+	((dev->attributes & ISC_SOCKEVENTATTR_USEMINMTU) != 0) &&
+	(sock->pf == AF_INET6))
 	{
 		int use_min_mtu = 1;	/* -1, 0, 1 */
 



CVS commit: src/distrib/sets/lists/comp

2018-10-25 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Oct 25 13:20:01 UTC 2018

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
Mark html3/curses_insertch.html as obsolete too.


To generate a diff of this commit:
cvs rdiff -u -r1.2234 -r1.2235 src/distrib/sets/lists/comp/mi

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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2234 src/distrib/sets/lists/comp/mi:1.2235
--- src/distrib/sets/lists/comp/mi:1.2234	Thu Oct 25 10:36:56 2018
+++ src/distrib/sets/lists/comp/mi	Thu Oct 25 13:20:01 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2234 2018/10/25 10:36:56 uwe Exp $
+#	$NetBSD: mi,v 1.2235 2018/10/25 13:20:01 uwe Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -14161,7 +14161,7 @@
 ./usr/share/man/html3/curses_input.html		comp-c-htmlman		html
 ./usr/share/man/html3/curses_insch.html		comp-c-htmlman		html
 ./usr/share/man/html3/curses_insdelln.html	comp-c-htmlman		html
-./usr/share/man/html3/curses_insertch.html	comp-c-htmlman		html
+./usr/share/man/html3/curses_insertch.html	comp-obsolete		obsolete
 ./usr/share/man/html3/curses_insertln.html	comp-c-htmlman		html
 ./usr/share/man/html3/curses_keyname.html	comp-c-htmlman		html
 ./usr/share/man/html3/curses_line.html		comp-c-htmlman		html



CVS commit: src/lib/libcurses

2018-10-25 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Oct 25 10:41:00 UTC 2018

Modified Files:
src/lib/libcurses: curses_insch.3

Log Message:
Oops, update name in .Dt, bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libcurses/curses_insch.3

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

Modified files:

Index: src/lib/libcurses/curses_insch.3
diff -u src/lib/libcurses/curses_insch.3:1.1 src/lib/libcurses/curses_insch.3:1.2
--- src/lib/libcurses/curses_insch.3:1.1	Thu Oct 25 10:36:56 2018
+++ src/lib/libcurses/curses_insch.3	Thu Oct 25 10:41:00 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: curses_insch.3,v 1.1 2018/10/25 10:36:56 uwe Exp $
+.\"	$NetBSD: curses_insch.3,v 1.2 2018/10/25 10:41:00 uwe Exp $
 .\"
 .\" Copyright (c) 2002
 .\"	Brett Lymn (bl...@netbsd.org, brett_l...@yahoo.com.au)
@@ -30,8 +30,8 @@
 .\" SUCH DAMAGE.
 .\"
 .\"
-.Dd February 5, 2006
-.Dt CURSES_INSERTCH 3
+.Dd October 25, 2018
+.Dt CURSES_INSCH 3
 .Os
 .Sh NAME
 .Nm curses_insch ,



CVS commit: src/sys/dev/acpi

2018-10-25 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 25 10:38:57 UTC 2018

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

Log Message:
Add support for 64-bit memory resources.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/acpi/acpi_resource.c
cvs rdiff -u -r1.76 -r1.77 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_resource.c
diff -u src/sys/dev/acpi/acpi_resource.c:1.37 src/sys/dev/acpi/acpi_resource.c:1.38
--- src/sys/dev/acpi/acpi_resource.c:1.37	Mon Jul 27 04:50:50 2015
+++ src/sys/dev/acpi/acpi_resource.c	Thu Oct 25 10:38:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_resource.c,v 1.37 2015/07/27 04:50:50 msaitoh Exp $	*/
+/*	$NetBSD: acpi_resource.c,v 1.38 2018/10/25 10:38:57 jmcneill Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.37 2015/07/27 04:50:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.38 2018/10/25 10:38:57 jmcneill Exp $");
 
 #include 
 #include 
@@ -246,12 +246,12 @@ acpi_resource_parse_callback(ACPI_RESOUR
 		if (res->Data.Address32.Address.AddressLength == 0 ||
 		res->Data.Address32.ProducerConsumer != ACPI_CONSUMER)
 			break;
-#define ADRRESS32_FIXED2(r)		\
+#define ADDRESS32_FIXED2(r)		\
 	((r)->Data.Address32.MinAddressFixed == ACPI_ADDRESS_FIXED &&	\
 	 (r)->Data.Address32.MaxAddressFixed == ACPI_ADDRESS_FIXED)
 		switch (res->Data.Address32.ResourceType) {
 		case ACPI_MEMORY_RANGE:
-			if (ADRRESS32_FIXED2(res)) {
+			if (ADDRESS32_FIXED2(res)) {
 if (ops->memory)
 	(*ops->memory)(arg->dev, arg->context,
 	res->Data.Address32.Address.Minimum,
@@ -266,7 +266,7 @@ acpi_resource_parse_callback(ACPI_RESOUR
 			}
 			break;
 		case ACPI_IO_RANGE:
-			if (ADRRESS32_FIXED2(res)) {
+			if (ADDRESS32_FIXED2(res)) {
 if (ops->ioport)
 	(*ops->ioport)(arg->dev, arg->context,
 	res->Data.Address32.Address.Minimum,
@@ -285,7 +285,7 @@ acpi_resource_parse_callback(ACPI_RESOUR
   "Address32/BusNumber unimplemented\n"));
 			break;
 		}
-#undef ADRRESS32_FIXED2
+#undef ADDRESS32_FIXED2
 		break;
 
 	case ACPI_RESOURCE_TYPE_ADDRESS16:
@@ -294,8 +294,55 @@ acpi_resource_parse_callback(ACPI_RESOUR
 		break;
 
 	case ACPI_RESOURCE_TYPE_ADDRESS64:
+#ifdef _LP64
+		/* XXX Only fixed size supported for now */
+		if (res->Data.Address64.Address.AddressLength == 0 ||
+		res->Data.Address64.ProducerConsumer != ACPI_CONSUMER)
+			break;
+#define ADDRESS64_FIXED2(r)		\
+	((r)->Data.Address64.MinAddressFixed == ACPI_ADDRESS_FIXED &&	\
+	 (r)->Data.Address64.MaxAddressFixed == ACPI_ADDRESS_FIXED)
+		switch (res->Data.Address64.ResourceType) {
+		case ACPI_MEMORY_RANGE:
+			if (ADDRESS64_FIXED2(res)) {
+if (ops->memory)
+	(*ops->memory)(arg->dev, arg->context,
+	res->Data.Address64.Address.Minimum,
+	res->Data.Address64.Address.AddressLength);
+			} else {
+if (ops->memrange)
+	(*ops->memrange)(arg->dev, arg->context,
+	res->Data.Address64.Address.Minimum,
+	res->Data.Address64.Address.Maximum,
+	res->Data.Address64.Address.AddressLength,
+	res->Data.Address64.Address.Granularity);
+			}
+			break;
+		case ACPI_IO_RANGE:
+			if (ADDRESS64_FIXED2(res)) {
+if (ops->ioport)
+	(*ops->ioport)(arg->dev, arg->context,
+	res->Data.Address64.Address.Minimum,
+	res->Data.Address64.Address.AddressLength);
+			} else {
+if (ops->iorange)
+	(*ops->iorange)(arg->dev, arg->context,
+	res->Data.Address64.Address.Minimum,
+	res->Data.Address64.Address.Maximum,
+	res->Data.Address64.Address.AddressLength,
+	res->Data.Address64.Address.Granularity);
+			}
+			break;
+		case ACPI_BUS_NUMBER_RANGE:
+			ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
+  "Address64/BusNumber unimplemented\n"));
+			break;
+		}
+#undef ADDRESS64_FIXED2
+#else
 		ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
  "Address64 unimplemented\n"));
+#endif
 		break;
 	case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
 		ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
@@ -423,9 +470,11 @@ acpi_resource_print(device_t dev, struct
 		sep = "";
 		aprint_normal(" mem ");
 		SIMPLEQ_FOREACH(ar, >ar_mem, ar_list) {
-			aprint_normal("%s0x%x", sep, ar->ar_base);
+			aprint_normal("%s0x%" PRIx64, sep,
+			(uint64_t)ar->ar_base);
 			if (ar->ar_length > 1)
-aprint_normal("-0x%x", ar->ar_base +
+aprint_normal("-0x%" PRIx64,
+(uint64_t)ar->ar_base +
 ar->ar_length - 1);
 			sep = ",";
 		}
@@ -597,10 +646,10 @@ static void	acpi_res_parse_ioport(device
 static void	acpi_res_parse_iorange(device_t, void *, uint32_t,
 		uint32_t, uint32_t, uint32_t);
 
-static void	acpi_res_parse_memory(device_t, void *, uint32_t,
-		uint32_t);
-static void	

CVS commit: src

2018-10-25 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Oct 25 10:36:57 UTC 2018

Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/libcurses: Makefile curses.3 curses_addch.3 curses_attributes.3
curses_delch.3 curses_inch.3
Added Files:
src/lib/libcurses: curses_insch.3
Removed Files:
src/lib/libcurses: curses_insertch.3

Log Message:
Rename curses_insertch.3 to curses_insch.3 to match the function names
documented in that manpage.  With the letter salad used in curses
function names naming consistency is very important and this page was
the only one that didn't match.

Add mvinsch and mvwinsch links.  Update xrefs in other man pages.


To generate a diff of this commit:
cvs rdiff -u -r1.2233 -r1.2234 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.85 -r1.86 src/lib/libcurses/Makefile
cvs rdiff -u -r1.72 -r1.73 src/lib/libcurses/curses.3
cvs rdiff -u -r1.9 -r1.10 src/lib/libcurses/curses_addch.3
cvs rdiff -u -r1.8 -r1.9 src/lib/libcurses/curses_attributes.3
cvs rdiff -u -r1.3 -r1.4 src/lib/libcurses/curses_delch.3
cvs rdiff -u -r1.12 -r1.13 src/lib/libcurses/curses_inch.3
cvs rdiff -u -r0 -r1.1 src/lib/libcurses/curses_insch.3
cvs rdiff -u -r1.4 -r0 src/lib/libcurses/curses_insertch.3

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/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2233 src/distrib/sets/lists/comp/mi:1.2234
--- src/distrib/sets/lists/comp/mi:1.2233	Fri Oct  5 09:51:55 2018
+++ src/distrib/sets/lists/comp/mi	Thu Oct 25 10:36:56 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2233 2018/10/05 09:51:55 hannken Exp $
+#	$NetBSD: mi,v 1.2234 2018/10/25 10:36:56 uwe Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -5435,7 +5435,7 @@
 ./usr/share/man/cat3/acosf.0			comp-c-catman		.cat
 ./usr/share/man/cat3/acosh.0			comp-c-catman		.cat
 ./usr/share/man/cat3/acoshf.0			comp-c-catman		.cat
-./usr/share/man/cat3/addch.0			comp-c-catman		.cat
+./usr/share/man/cat3/addch.0			comp-obsolete		obsolete
 ./usr/share/man/cat3/addchnstr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/addchstr.0			comp-c-catman		.cat
 ./usr/share/man/cat3/addnstr.0			comp-c-catman		.cat
@@ -5863,14 +5863,14 @@
 ./usr/share/man/cat3/atomic_swap_ptr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_swap_uint.0		comp-c-catman		.cat
 ./usr/share/man/cat3/atomic_swap_ulong.0	comp-c-catman		.cat
-./usr/share/man/cat3/attr_get.0			comp-c-catman		.cat
-./usr/share/man/cat3/attr_off.0			comp-c-catman		.cat
-./usr/share/man/cat3/attr_on.0			comp-c-catman		.cat
-./usr/share/man/cat3/attr_set.0			comp-c-catman		.cat
-./usr/share/man/cat3/attribute.0		comp-c-catman		.cat
-./usr/share/man/cat3/attroff.0			comp-c-catman		.cat
-./usr/share/man/cat3/attron.0			comp-c-catman		.cat
-./usr/share/man/cat3/attrset.0			comp-c-catman		.cat
+./usr/share/man/cat3/attr_get.0			comp-obsolete		obsolete
+./usr/share/man/cat3/attr_off.0			comp-obsolete		obsolete
+./usr/share/man/cat3/attr_on.0			comp-obsolete		obsolete
+./usr/share/man/cat3/attr_set.0			comp-obsolete		obsolete
+./usr/share/man/cat3/attribute.0		comp-obsolete		obsolete
+./usr/share/man/cat3/attroff.0			comp-obsolete		obsolete
+./usr/share/man/cat3/attron.0			comp-obsolete		obsolete
+./usr/share/man/cat3/attrset.0			comp-obsolete		obsolete
 ./usr/share/man/cat3/auth_destroy.0		comp-c-catman		.cat
 ./usr/share/man/cat3/authnone_create.0		comp-c-catman		.cat
 ./usr/share/man/cat3/authsys_create.0		comp-c-catman		.cat
@@ -6178,7 +6178,7 @@
 ./usr/share/man/cat3/clrtoeol.0			comp-c-catman		.cat
 ./usr/share/man/cat3/cmsg.0			comp-c-catman		.cat
 ./usr/share/man/cat3/color_content.0		comp-c-catman		.cat
-./usr/share/man/cat3/color_set.0		comp-c-catman		.cat
+./usr/share/man/cat3/color_set.0		comp-obsolete		obsolete
 ./usr/share/man/cat3/com_err.0			comp-krb5-catman	kerberos,.cat
 ./usr/share/man/cat3/com_err_va.0		comp-krb5-catman	kerberos,.cat
 ./usr/share/man/cat3/confstr.0			comp-c-catman		.cat
@@ -6240,11 +6240,11 @@
 ./usr/share/man/cat3/current_field.0		comp-c-catman		.cat
 ./usr/share/man/cat3/current_item.0		comp-c-catman		.cat
 ./usr/share/man/cat3/curs_set.0			comp-c-catman		.cat
-./usr/share/man/cat3/curses.0			comp-c-catman		.cat
-./usr/share/man/cat3/curses_addch.0		comp-c-catman		.cat
+./usr/share/man/cat3/curses.0			comp-obsolete		obsolete
+./usr/share/man/cat3/curses_addch.0		comp-obsolete		obsolete
 ./usr/share/man/cat3/curses_addchstr.0		comp-c-catman		.cat
 ./usr/share/man/cat3/curses_addstr.0		comp-c-catman		.cat
-./usr/share/man/cat3/curses_attributes.0	comp-c-catman		.cat
+./usr/share/man/cat3/curses_attributes.0	comp-obsolete		obsolete
 ./usr/share/man/cat3/curses_background.0	comp-c-catman		.cat
 ./usr/share/man/cat3/curses_border.0		comp-c-catman		.cat
 ./usr/share/man/cat3/curses_chgat.0		comp-c-catman		.cat
@@ -6252,14 +6252,14 @@
 

CVS commit: src/sys/kern

2018-10-25 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Oct 25 09:30:45 UTC 2018

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

Log Message:
in the !MP world, ci->ci_curlwp may not exist.  just use curlwp.

XXX: can we just do this for MP builds, too?  i think so.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/kern/subr_lockdebug.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/subr_lockdebug.c
diff -u src/sys/kern/subr_lockdebug.c:1.67 src/sys/kern/subr_lockdebug.c:1.68
--- src/sys/kern/subr_lockdebug.c:1.67	Thu Sep 13 01:55:16 2018
+++ src/sys/kern/subr_lockdebug.c	Thu Oct 25 09:30:45 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_lockdebug.c,v 1.67 2018/09/13 01:55:16 mrg Exp $	*/
+/*	$NetBSD: subr_lockdebug.c,v 1.68 2018/10/25 09:30:45 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.67 2018/09/13 01:55:16 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.68 2018/10/25 09:30:45 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -898,7 +898,11 @@ lockdebug_show_all_locks_cpu(void (*pr)(
 			lockdebug_dump(ld, pr);
 			if (show_trace) {
 db_stack_trace_print(
+#ifdef MULTIPROCESSOR
 (db_expr_t)(intptr_t)ci->ci_curlwp,
+#else
+(db_expr_t)(intptr_t)curlwp,
+#endif
 true,
 32 /* Limit just in case */,
 "a", pr);



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

2018-10-25 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 25 07:13:55 UTC 2018

Modified Files:
src/sys/arch/arm/include: cpu.h

Log Message:
Align struct cpu_info member names. NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/arm/include/cpu.h

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

Modified files:

Index: src/sys/arch/arm/include/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.98 src/sys/arch/arm/include/cpu.h:1.99
--- src/sys/arch/arm/include/cpu.h:1.98	Thu Oct 18 09:01:52 2018
+++ src/sys/arch/arm/include/cpu.h	Thu Oct 25 07:13:55 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.98 2018/10/18 09:01:52 skrll Exp $	*/
+/*	$NetBSD: cpu.h,v 1.99 2018/10/25 07:13:55 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -132,37 +132,49 @@ static inline void cpu_dosoftints(void);
 #include 
 
 struct cpu_info {
-	struct cpu_data ci_data;	/* MI per-cpu data */
-	device_t ci_dev;		/* Device corresponding to this CPU */
-	cpuid_t ci_cpuid;
-	uint32_t ci_arm_cpuid;		/* aggregate CPU id */
-	uint32_t ci_arm_cputype;	/* CPU type */
-	uint32_t ci_arm_cpurev;		/* CPU revision */
-	uint32_t ci_ctrl;		/* The CPU control register */
-	int ci_cpl;			/* current processor level (spl) */
-	volatile int ci_astpending;	/* */
-	int ci_want_resched;		/* resched() was called */
-	int ci_intr_depth;		/* */
-	struct cpu_softc *ci_softc;	/* platform softc */
-	lwp_t *ci_softlwps[SOFTINT_COUNT];
-	volatile uint32_t ci_softints;
-	lwp_t *ci_curlwp;		/* current lwp */
-	lwp_t *ci_lastlwp;		/* last lwp */
-	struct evcnt ci_arm700bugcount;
-	int32_t ci_mtx_count;
-	int ci_mtx_oldspl;
-	register_t ci_undefsave[3];
-	uint32_t ci_vfp_id;
-	uint64_t ci_lastintr;
-	struct pmap_tlb_info *ci_tlb_info;
-	struct pmap *ci_pmap_lastuser;
-	struct pmap *ci_pmap_cur;
-	tlb_asid_t ci_pmap_asid_cur;
-	struct trapframe *ci_ddb_regs;
-	struct evcnt ci_abt_evs[16];
-	struct evcnt ci_und_ev;
-	struct evcnt ci_und_cp15_ev;
-	struct evcnt ci_vfp_evs[3];
+	struct cpu_data	ci_data;	/* MI per-cpu data */
+	device_t	ci_dev;		/* Device corresponding to this CPU */
+	cpuid_t		ci_cpuid;
+	uint32_t	ci_arm_cpuid;	/* aggregate CPU id */
+	uint32_t	ci_arm_cputype;	/* CPU type */
+	uint32_t	ci_arm_cpurev;	/* CPU revision */
+	uint32_t	ci_ctrl;	/* The CPU control register */
+	int		ci_cpl;		/* current processor level (spl) */
+	volatile int	ci_astpending;	/* */
+	int		ci_want_resched;/* resched() was called */
+	int		ci_intr_depth;	/* */
+
+	struct cpu_softc *
+			ci_softc;	/* platform softc */
+
+	lwp_t *		ci_softlwps[SOFTINT_COUNT];
+	volatile uint32_t
+			ci_softints;
+
+	lwp_t *		ci_curlwp;	/* current lwp */
+	lwp_t *		ci_lastlwp;	/* last lwp */
+
+	struct evcnt	ci_arm700bugcount;
+	int32_t		ci_mtx_count;
+	int		ci_mtx_oldspl;
+	register_t	ci_undefsave[3];
+	uint32_t	ci_vfp_id;
+	uint64_t	ci_lastintr;
+
+	struct pmap_tlb_info *
+			ci_tlb_info;
+	struct pmap *	ci_pmap_lastuser;
+	struct pmap *	ci_pmap_cur;
+	tlb_asid_t	ci_pmap_asid_cur;
+
+	struct trapframe *
+			ci_ddb_regs;
+
+	struct evcnt	ci_abt_evs[16];
+	struct evcnt	ci_und_ev;
+	struct evcnt	ci_und_cp15_ev;
+	struct evcnt	ci_vfp_evs[3];
+
 #if defined(MP_CPU_INFO_MEMBERS)
 	MP_CPU_INFO_MEMBERS
 #endif