CVS commit: src/sys/dev/acpi

2018-11-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Nov 17 07:06:26 UTC 2018

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

Log Message:
Attempt to appease gcc and unbreak i386 build.   Should be NFC.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/sdhc_acpi.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/sdhc_acpi.c
diff -u src/sys/dev/acpi/sdhc_acpi.c:1.6 src/sys/dev/acpi/sdhc_acpi.c:1.7
--- src/sys/dev/acpi/sdhc_acpi.c:1.6	Fri Nov 16 23:05:50 2018
+++ src/sys/dev/acpi/sdhc_acpi.c	Sat Nov 17 07:06:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc_acpi.c,v 1.6 2018/11/16 23:05:50 jmcneill Exp $	*/
+/*	$NetBSD: sdhc_acpi.c,v 1.7 2018/11/17 07:06:25 kre Exp $	*/
 
 /*
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.6 2018/11/16 23:05:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.7 2018/11/17 07:06:25 kre Exp $");
 
 #include 
 #include 
@@ -179,7 +179,8 @@ sdhc_acpi_attach(device_t parent, device
 		goto cleanup;
 	}
 
-	sc->sc_ih = acpi_intr_establish(self, (uint64_t)aa->aa_node->ad_handle,
+	sc->sc_ih = acpi_intr_establish(self,
+	(uint64_t)(uintptr_t)aa->aa_node->ad_handle,
 	IPL_BIO, false, sdhc_intr, >sc, device_xname(self));
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self,



CVS commit: src/sys/arch/xen/x86

2018-11-16 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Sat Nov 17 05:26:46 UTC 2018

Modified Files:
src/sys/arch/xen/x86: hypervisor_machdep.c

Log Message:
Use hypervisor provided interface to unmask specific ports.

Although at first glance this looks suboptimal, the unmask operation
fast path does not use hypervisor_unmask_event(). Instead, it directly
operates on the mask and pending bit arrays to provide what would
effectively be an "auto mask/eoi" semantic.

This change is thus not in the fast path, and has the advantage of
performance improvements since cross CPU state updates etc. is handled
within the hypervisor instead of domU IPIs.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/xen/x86/hypervisor_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/xen/x86/hypervisor_machdep.c
diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.29 src/sys/arch/xen/x86/hypervisor_machdep.c:1.30
--- src/sys/arch/xen/x86/hypervisor_machdep.c:1.29	Fri Oct 26 05:33:21 2018
+++ src/sys/arch/xen/x86/hypervisor_machdep.c	Sat Nov 17 05:26:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor_machdep.c,v 1.29 2018/10/26 05:33:21 cherry Exp $	*/
+/*	$NetBSD: hypervisor_machdep.c,v 1.30 2018/11/17 05:26:46 cherry Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.29 2018/10/26 05:33:21 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.30 2018/11/17 05:26:46 cherry Exp $");
 
 #include 
 #include 
@@ -322,47 +322,22 @@ hypervisor_send_event(struct cpu_info *c
 void
 hypervisor_unmask_event(unsigned int ev)
 {
-	volatile shared_info_t *s = HYPERVISOR_shared_info;
-	CPU_INFO_ITERATOR cii;
-	struct cpu_info *ci;
-	volatile struct vcpu_info *vci;
+
+	KASSERT(ev > 0 && ev < NR_EVENT_CHANNELS);
 
 #ifdef PORT_DEBUG
 	if (ev == PORT_DEBUG)
 		printf("hypervisor_unmask_event %d\n", ev);
 #endif
 
-	xen_atomic_clear_bit(>evtchn_mask[0], ev);
-	/*
-	 * The following is basically the equivalent of
-	 * 'hw_resend_irq'. Just like a real IO-APIC we 'lose the
-	 * interrupt edge' if the channel is masked.
-	 */
-	if (!xen_atomic_test_bit(>evtchn_pending[0], ev))
-		return;
+	/* Xen unmasks the evtchn_mask[0]:ev bit for us. */
+	evtchn_op_t op;
+	op.cmd = EVTCHNOP_unmask;
+	op.u.unmask.port = ev;
+	if (HYPERVISOR_event_channel_op() != 0)
+		panic("Failed to unmask event %d\n", ev);
 
-	for (CPU_INFO_FOREACH(cii, ci)) {
-		if (!xen_atomic_test_bit(>ci_evtmask[0], ev))
-			continue;
-		vci = ci->ci_vcpu;
-		if (__predict_true(ci == curcpu())) {
-			if (!xen_atomic_test_and_set_bit(>evtchn_pending_sel,
-ev>>LONG_SHIFT))
-xen_atomic_set_bit(>evtchn_upcall_pending, 0);
-		}
-		if (!vci->evtchn_upcall_mask) {
-			if (__predict_true(ci == curcpu())) {
-hypervisor_force_callback();
-			} else {
-if (__predict_false(
-xen_send_ipi(ci, XEN_IPI_HVCB))) {
-	panic("xen_send_ipi(cpu%d, "
-	"XEN_IPI_HVCB) failed\n",
-	(int) ci->ci_cpuid);
-}
-			}
-		}
-	}
+	return;
 }
 
 void



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

2018-11-16 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Sat Nov 17 01:45:25 UTC 2018

Modified Files:
src/sys/arch/arm/footbridge: footbridge_pci.c

Log Message:
Add xname to footbridge_pci_intr_establish().


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/footbridge/footbridge_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/arch/arm/footbridge/footbridge_pci.c
diff -u src/sys/arch/arm/footbridge/footbridge_pci.c:1.30 src/sys/arch/arm/footbridge/footbridge_pci.c:1.31
--- src/sys/arch/arm/footbridge/footbridge_pci.c:1.30	Tue Oct 23 08:38:18 2018
+++ src/sys/arch/arm/footbridge/footbridge_pci.c	Sat Nov 17 01:45:25 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: footbridge_pci.c,v 1.30 2018/10/23 08:38:18 jmcneill Exp $	*/
+/*	$NetBSD: footbridge_pci.c,v 1.31 2018/11/17 01:45:25 rjs Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.30 2018/10/23 08:38:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: footbridge_pci.c,v 1.31 2018/11/17 01:45:25 rjs Exp $");
 
 #include 
 #include 
@@ -72,7 +72,7 @@ int		footbridge_pci_intr_map(const struc
 const char	*footbridge_pci_intr_string(void *, pci_intr_handle_t,
 		char *, size_t);
 void		*footbridge_pci_intr_establish(void *, pci_intr_handle_t,
-		int, int (*)(void *), void *);
+		int, int (*)(void *), void *, const char *);
 void		footbridge_pci_intr_disestablish(void *, void *);
 const struct evcnt *footbridge_pci_intr_evcnt(void *, pci_intr_handle_t);
 
@@ -335,15 +335,15 @@ footbridge_pci_intr_establish(
 	pci_intr_handle_t ih,
 	int level,
 	int (*func)(void *),
-	void *arg)
+	void *arg, const char *xname)
 {
 	void *intr;
 	char buf[PCI_INTRSTR_LEN];
 	const char *intrstr;
 
 #ifdef PCI_DEBUG
-	printf("footbridge_pci_intr_establish(pcv=%p, ih=0x%" PRIx64 ", level=%d, func=%p, arg=%p)\n",
-	pcv, ih, level, func, arg);
+	printf("footbridge_pci_intr_establish(pcv=%p, ih=0x%" PRIx64 ", level=%d, func=%p, arg=%p, xname=%s)\n",
+	pcv, ih, level, func, arg, xname);
 #endif
 
 	/* Copy the interrupt string to a private buffer */



CVS commit: src/doc

2018-11-16 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Nov 17 01:08:55 UTC 2018

Modified Files:
src/doc: TODO.sanitizers

Log Message:
Move two entries in TODO.sanitizers to be done later (post -9 branch)

 - develop fts(3) interceptors (MSan, for ls(1), find(1), mtree(8)
 - investigate and address the libcxx failing tests on NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/doc/TODO.sanitizers

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

Modified files:

Index: src/doc/TODO.sanitizers
diff -u src/doc/TODO.sanitizers:1.6 src/doc/TODO.sanitizers:1.7
--- src/doc/TODO.sanitizers:1.6	Tue Aug 28 20:11:58 2018
+++ src/doc/TODO.sanitizers	Sat Nov 17 01:08:55 2018
@@ -5,10 +5,10 @@ Short term:
  - merge TSan, MSan and libFuzzer ATF tests
  - prepare MKSANITIZER readme
  - upstream local patches, mostly to compiler-rt
- - develop fts(3) interceptors (MSan, for ls(1), find(1), mtree(8)
- - investigate and address the libcxx failing tests on NetBSD
 
 Long term:
+ - develop fts(3) interceptors (MSan, for ls(1), find(1), mtree(8)
+ - investigate and address the libcxx failing tests on NetBSD
  - FILE and DIR sanitization (needed by at least: ESan, MSan)
  - add missing interceptors (mostly MSan-centric)
  - improve the framework for ioctl(2) database and handle special cases when a



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

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Nov 17 00:17:54 UTC 2018

Modified Files:
src/sys/arch/arm/cortex: gicv3.c

Log Message:
Use intr_establish_xname


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/cortex/gicv3.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/cortex/gicv3.c
diff -u src/sys/arch/arm/cortex/gicv3.c:1.10 src/sys/arch/arm/cortex/gicv3.c:1.11
--- src/sys/arch/arm/cortex/gicv3.c:1.10	Thu Nov 15 00:01:38 2018
+++ src/sys/arch/arm/cortex/gicv3.c	Sat Nov 17 00:17:54 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.10 2018/11/15 00:01:38 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.11 2018/11/17 00:17:54 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -31,7 +31,7 @@
 #define	_INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.10 2018/11/15 00:01:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.11 2018/11/17 00:17:54 jmcneill Exp $");
 
 #include 
 #include 
@@ -767,23 +767,23 @@ gicv3_init(struct gicv3_softc *sc)
 		gicv3_lpi_cpu_init(>sc_lpi, curcpu());
 
 #ifdef __HAVE_PIC_FAST_SOFTINTS
-	intr_establish(SOFTINT_BIO, IPL_SOFTBIO, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_BIO);
-	intr_establish(SOFTINT_CLOCK, IPL_SOFTCLOCK, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_CLOCK);
-	intr_establish(SOFTINT_NET, IPL_SOFTNET, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_NET);
-	intr_establish(SOFTINT_SERIAL, IPL_SOFTSERIAL, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_SERIAL);
+	intr_establish_xname(SOFTINT_BIO, IPL_SOFTBIO, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_BIO, "softint bio");
+	intr_establish_xname(SOFTINT_CLOCK, IPL_SOFTCLOCK, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_CLOCK, "softint clock");
+	intr_establish_xname(SOFTINT_NET, IPL_SOFTNET, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_NET, "softint net");
+	intr_establish_xname(SOFTINT_SERIAL, IPL_SOFTSERIAL, IST_MPSAFE | IST_EDGE, pic_handle_softint, (void *)SOFTINT_SERIAL, "softint serial");
 #endif
 
 #ifdef MULTIPROCESSOR
-	intr_establish(IPI_AST, IPL_VM, IST_MPSAFE | IST_EDGE, pic_ipi_ast, (void *)-1);
-	intr_establish(IPI_XCALL, IPL_HIGH, IST_MPSAFE | IST_EDGE, pic_ipi_xcall, (void *)-1);
-	intr_establish(IPI_GENERIC, IPL_HIGH, IST_MPSAFE | IST_EDGE, pic_ipi_generic, (void *)-1);
-	intr_establish(IPI_NOP, IPL_VM, IST_MPSAFE | IST_EDGE, pic_ipi_nop, (void *)-1);
-	intr_establish(IPI_SHOOTDOWN, IPL_SCHED, IST_MPSAFE | IST_EDGE, pic_ipi_shootdown, (void *)-1);
+	intr_establish_xname(IPI_AST, IPL_VM, IST_MPSAFE | IST_EDGE, pic_ipi_ast, (void *)-1, "IPI ast");
+	intr_establish_xname(IPI_XCALL, IPL_HIGH, IST_MPSAFE | IST_EDGE, pic_ipi_xcall, (void *)-1, "IPI xcall");
+	intr_establish_xname(IPI_GENERIC, IPL_HIGH, IST_MPSAFE | IST_EDGE, pic_ipi_generic, (void *)-1, "IPI generic");
+	intr_establish_xname(IPI_NOP, IPL_VM, IST_MPSAFE | IST_EDGE, pic_ipi_nop, (void *)-1, "IPI nop");
+	intr_establish_xname(IPI_SHOOTDOWN, IPL_SCHED, IST_MPSAFE | IST_EDGE, pic_ipi_shootdown, (void *)-1, "IPI shootdown");
 #ifdef DDB
-	intr_establish(IPI_DDB, IPL_HIGH, IST_MPSAFE | IST_EDGE, pic_ipi_ddb, NULL);
+	intr_establish_xname(IPI_DDB, IPL_HIGH, IST_MPSAFE | IST_EDGE, pic_ipi_ddb, NULL, "IPI ddb");
 #endif
 #ifdef __HAVE_PREEMPTION
-	intr_establish(IPI_KPREEMPT, IPL_VM, IST_MPSAFE | IST_EDGE, pic_ipi_kpreempt, (void *)-1);
+	intr_establish_xname(IPI_KPREEMPT, IPL_VM, IST_MPSAFE | IST_EDGE, pic_ipi_kpreempt, (void *)-1, "IPI kpreempt");
 #endif
 #endif
 



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

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 23:25:09 UTC 2018

Modified Files:
src/sys/arch/arm/cortex: gic.c

Log Message:
Use intr_establish_xname


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/cortex/gic.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/cortex/gic.c
diff -u src/sys/arch/arm/cortex/gic.c:1.37 src/sys/arch/arm/cortex/gic.c:1.38
--- src/sys/arch/arm/cortex/gic.c:1.37	Mon Sep 10 19:43:58 2018
+++ src/sys/arch/arm/cortex/gic.c	Fri Nov 16 23:25:09 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gic.c,v 1.37 2018/09/10 19:43:58 jmcneill Exp $	*/
+/*	$NetBSD: gic.c,v 1.38 2018/11/16 23:25:09 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.37 2018/09/10 19:43:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.38 2018/11/16 23:25:09 jmcneill Exp $");
 
 #include 
 #include 
@@ -677,35 +677,35 @@ armgic_attach(device_t parent, device_t 
 		}
 	}
 #ifdef __HAVE_PIC_FAST_SOFTINTS
-	intr_establish(SOFTINT_BIO, IPL_SOFTBIO, IST_MPSAFE | IST_EDGE,
-	pic_handle_softint, (void *)SOFTINT_BIO);
-	intr_establish(SOFTINT_CLOCK, IPL_SOFTCLOCK, IST_MPSAFE | IST_EDGE,
-	pic_handle_softint, (void *)SOFTINT_CLOCK);
-	intr_establish(SOFTINT_NET, IPL_SOFTNET, IST_MPSAFE | IST_EDGE,
-	pic_handle_softint, (void *)SOFTINT_NET);
-	intr_establish(SOFTINT_SERIAL, IPL_SOFTSERIAL, IST_MPSAFE | IST_EDGE,
-	pic_handle_softint, (void *)SOFTINT_SERIAL);
+	intr_establish_xname(SOFTINT_BIO, IPL_SOFTBIO, IST_MPSAFE | IST_EDGE,
+	pic_handle_softint, (void *)SOFTINT_BIO, "softint bio");
+	intr_establish_xname(SOFTINT_CLOCK, IPL_SOFTCLOCK, IST_MPSAFE | IST_EDGE,
+	pic_handle_softint, (void *)SOFTINT_CLOCK, "softint clock");
+	intr_establish_xname(SOFTINT_NET, IPL_SOFTNET, IST_MPSAFE | IST_EDGE,
+	pic_handle_softint, (void *)SOFTINT_NET, "softint net");
+	intr_establish_xname(SOFTINT_SERIAL, IPL_SOFTSERIAL, IST_MPSAFE | IST_EDGE,
+	pic_handle_softint, (void *)SOFTINT_SERIAL, "softint serial");
 #endif
 #ifdef MULTIPROCESSOR
 	armgic_cpu_init(>sc_pic, curcpu());
 
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_AST, IPL_VM,
-	IST_MPSAFE | IST_EDGE, pic_ipi_ast, (void *)-1);
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_XCALL, IPL_HIGH,
-	IST_MPSAFE | IST_EDGE, pic_ipi_xcall, (void *)-1);
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_GENERIC, IPL_HIGH,
-	IST_MPSAFE | IST_EDGE, pic_ipi_generic, (void *)-1);
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_NOP, IPL_VM,
-	IST_MPSAFE | IST_EDGE, pic_ipi_nop, (void *)-1);
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_SHOOTDOWN, IPL_SCHED,
-	IST_MPSAFE | IST_EDGE, pic_ipi_shootdown, (void *)-1);
+	intr_establish_xname(ARMGIC_SGI_IPIBASE + IPI_AST, IPL_VM,
+	IST_MPSAFE | IST_EDGE, pic_ipi_ast, (void *)-1, "IPI ast");
+	intr_establish_xname(ARMGIC_SGI_IPIBASE + IPI_XCALL, IPL_HIGH,
+	IST_MPSAFE | IST_EDGE, pic_ipi_xcall, (void *)-1, "IPI xcall");
+	intr_establish_xname(ARMGIC_SGI_IPIBASE + IPI_GENERIC, IPL_HIGH,
+	IST_MPSAFE | IST_EDGE, pic_ipi_generic, (void *)-1, "IPI generic");
+	intr_establish_xname(ARMGIC_SGI_IPIBASE + IPI_NOP, IPL_VM,
+	IST_MPSAFE | IST_EDGE, pic_ipi_nop, (void *)-1, "IPI nop");
+	intr_establish_xname(ARMGIC_SGI_IPIBASE + IPI_SHOOTDOWN, IPL_SCHED,
+	IST_MPSAFE | IST_EDGE, pic_ipi_shootdown, (void *)-1, "IPI shootdown");
 #ifdef DDB
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_DDB, IPL_HIGH,
-	IST_MPSAFE | IST_EDGE, pic_ipi_ddb, NULL);
+	intr_establish_xname(ARMGIC_SGI_IPIBASE + IPI_DDB, IPL_HIGH,
+	IST_MPSAFE | IST_EDGE, pic_ipi_ddb, NULL, "IPI ddb");
 #endif
 #ifdef __HAVE_PREEMPTION
-	intr_establish(ARMGIC_SGI_IPIBASE + IPI_KPREEMPT, IPL_VM,
-	IST_MPSAFE | IST_EDGE, pic_ipi_kpreempt, (void *)-1);
+	intr_establish_xname(ARMGIC_SGI_IPIBASE + IPI_KPREEMPT, IPL_VM,
+	IST_MPSAFE | IST_EDGE, pic_ipi_kpreempt, (void *)-1, "IPI kpreempt");
 #endif
 #endif
 



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

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 23:24:28 UTC 2018

Modified Files:
src/sys/arch/arm/acpi: gtmr_acpi.c

Log Message:
Use intr_establish_xname


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/acpi/gtmr_acpi.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/acpi/gtmr_acpi.c
diff -u src/sys/arch/arm/acpi/gtmr_acpi.c:1.1 src/sys/arch/arm/acpi/gtmr_acpi.c:1.2
--- src/sys/arch/arm/acpi/gtmr_acpi.c:1.1	Fri Oct 12 22:20:04 2018
+++ src/sys/arch/arm/acpi/gtmr_acpi.c	Fri Nov 16 23:24:28 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: gtmr_acpi.c,v 1.1 2018/10/12 22:20:04 jmcneill Exp $ */
+/* $NetBSD: gtmr_acpi.c,v 1.2 2018/11/16 23:24:28 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gtmr_acpi.c,v 1.1 2018/10/12 22:20:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr_acpi.c,v 1.2 2018/11/16 23:24:28 jmcneill Exp $");
 
 #include 
 #include 
@@ -79,7 +79,7 @@ gtmr_acpi_attach(device_t parent, device
 	aprint_naive("\n");
 	aprint_normal(": irq %d\n", irq);
 
-	ih = intr_establish(irq, ipl, type | IST_MPSAFE, gtmr_intr, NULL);
+	ih = intr_establish_xname(irq, ipl, type | IST_MPSAFE, gtmr_intr, NULL, device_xname(self));
 	if (ih == NULL) {
 		aprint_error_dev(self, "couldn't install interrupt handler\n");
 		return;



CVS commit: src/sys/dev/acpi

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 23:18:17 UTC 2018

Modified Files:
src/sys/dev/acpi: ahcisata_acpi.c dwiic_acpi.c ehci_acpi.c
virtio_acpi.c xhci_acpi.c

Log Message:
Use acpi_intr_establish


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/ahcisata_acpi.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/dwiic_acpi.c \
src/sys/dev/acpi/virtio_acpi.c src/sys/dev/acpi/xhci_acpi.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/ehci_acpi.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/ahcisata_acpi.c
diff -u src/sys/dev/acpi/ahcisata_acpi.c:1.3 src/sys/dev/acpi/ahcisata_acpi.c:1.4
--- src/sys/dev/acpi/ahcisata_acpi.c:1.3	Mon Oct 15 18:58:35 2018
+++ src/sys/dev/acpi/ahcisata_acpi.c	Fri Nov 16 23:18:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ahcisata_acpi.c,v 1.3 2018/10/15 18:58:35 jdolecek Exp $ */
+/* $NetBSD: ahcisata_acpi.c,v 1.4 2018/11/16 23:18:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_acpi.c,v 1.3 2018/10/15 18:58:35 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_acpi.c,v 1.4 2018/11/16 23:18:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: ahcisata_acp
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -102,8 +103,8 @@ ahcisata_acpi_attach(device_t parent, de
 		goto done;
 	}
 
-	const int type = (irq->ar_type == ACPI_EDGE_SENSITIVE) ? IST_EDGE : IST_LEVEL;
-	ih = intr_establish(irq->ar_irq, IPL_BIO, type, ahci_intr, sc);
+	ih = acpi_intr_establish(self, (uint64_t)aa->aa_node->ad_handle,
+	IPL_BIO, false, ahci_intr, sc, device_xname(self));
 	if (ih == NULL) {
 		aprint_error_dev(self, "couldn't install interrupt handler\n");
 		return;

Index: src/sys/dev/acpi/dwiic_acpi.c
diff -u src/sys/dev/acpi/dwiic_acpi.c:1.1 src/sys/dev/acpi/dwiic_acpi.c:1.2
--- src/sys/dev/acpi/dwiic_acpi.c:1.1	Wed Oct 17 00:03:47 2018
+++ src/sys/dev/acpi/dwiic_acpi.c	Fri Nov 16 23:18:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: dwiic_acpi.c,v 1.1 2018/10/17 00:03:47 jmcneill Exp $ */
+/* $NetBSD: dwiic_acpi.c,v 1.2 2018/11/16 23:18:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwiic_acpi.c,v 1.1 2018/10/17 00:03:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwiic_acpi.c,v 1.2 2018/11/16 23:18:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -39,6 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: dwiic_acpi.c
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -113,8 +114,8 @@ dwiic_acpi_attach(device_t parent, devic
 		return;
 	}
 
-	const int type = (irq->ar_type == ACPI_EDGE_SENSITIVE) ? IST_EDGE : IST_LEVEL;
-	ih = intr_establish(irq->ar_irq, IPL_VM, type, dwiic_intr, sc);
+	ih = acpi_intr_establish(self, (uint64_t)aa->aa_node->ad_handle,
+	IPL_VM, true, dwiic_intr, sc, device_xname(self));
 	if (ih == NULL) {
 		aprint_error_dev(self, "couldn't install interrupt handler\n");
 		bus_space_unmap(sc->sc_iot, sc->sc_ioh, mem->ar_length);
Index: src/sys/dev/acpi/virtio_acpi.c
diff -u src/sys/dev/acpi/virtio_acpi.c:1.1 src/sys/dev/acpi/virtio_acpi.c:1.2
--- src/sys/dev/acpi/virtio_acpi.c:1.1	Sun Oct 21 12:26:38 2018
+++ src/sys/dev/acpi/virtio_acpi.c	Fri Nov 16 23:18:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio_acpi.c,v 1.1 2018/10/21 12:26:38 jmcneill Exp $ */
+/* $NetBSD: virtio_acpi.c,v 1.2 2018/11/16 23:18:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.1 2018/10/21 12:26:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio_acpi.c,v 1.2 2018/11/16 23:18:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -39,12 +39,14 @@ __KERNEL_RCSID(0, "$NetBSD: virtio_acpi.
 
 #include 
 #include 
+#include 
 
 #define	VIRTIO_PRIVATE
 #include 
 
 struct virtio_acpi_softc {
 	struct virtio_mmio_softc	sc_msc;
+	ACPI_HANDLE			sc_handle;
 	intsc_irq;
 	intsc_irqtype;
 };
@@ -90,6 +92,7 @@ virtio_acpi_attach(device_t parent, devi
 	ACPI_STATUS rv;
 	int error;
 
+	sc->sc_handle = aa->aa_node->ad_handle;
 	msc->sc_iot = aa->aa_memt;
 	vsc->sc_dev = self;
 	vsc->sc_dmat = aa->aa_dmat;
@@ -164,7 +167,8 @@ virtio_acpi_setup_interrupts(struct virt
 	struct virtio_acpi_softc * const sc = (struct virtio_acpi_softc *)msc;
 	struct virtio_softc * const vsc = >sc_sc;
 
-	msc->sc_ih = intr_establish(sc->sc_irq, IPL_VM, sc->sc_irqtype, virtio_mmio_intr, msc);
+	msc->sc_ih = acpi_intr_establish(vsc->sc_dev, (uint64_t)sc->sc_handle,
+IPL_VM, false, virtio_mmio_intr, msc, device_xname(vsc->sc_dev));
 	if (msc->sc_ih == NULL) {
 		aprint_error_dev(vsc->sc_dev, "couldn't install interrupt handler\n");
 		return -1;
@@ -179,7 +183,7 @@ static void
 virtio_acpi_free_interrupts(struct 

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

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 23:18:00 UTC 2018

Modified Files:
src/sys/arch/arm/acpi: plcom_acpi.c

Log Message:
Use acpi_intr_establish


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/acpi/plcom_acpi.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/acpi/plcom_acpi.c
diff -u src/sys/arch/arm/acpi/plcom_acpi.c:1.1 src/sys/arch/arm/acpi/plcom_acpi.c:1.2
--- src/sys/arch/arm/acpi/plcom_acpi.c:1.1	Fri Oct 12 22:20:04 2018
+++ src/sys/arch/arm/acpi/plcom_acpi.c	Fri Nov 16 23:18:00 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: plcom_acpi.c,v 1.1 2018/10/12 22:20:04 jmcneill Exp $ */
+/* $NetBSD: plcom_acpi.c,v 1.2 2018/11/16 23:18:00 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plcom_acpi.c,v 1.1 2018/10/12 22:20:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom_acpi.c,v 1.2 2018/11/16 23:18:00 jmcneill Exp $");
 
 #include 
 #include 
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: plcom_acpi.c
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -109,8 +110,8 @@ plcom_acpi_attach(device_t parent, devic
 
 	plcom_attach_subr(sc);
 
-	const int type = (irq->ar_type == ACPI_EDGE_SENSITIVE) ? IST_EDGE : IST_LEVEL;
-	ih = intr_establish(irq->ar_irq, IPL_SERIAL, type | IST_MPSAFE, plcomintr, sc);
+	ih = acpi_intr_establish(self, (uint64_t)aa->aa_node->ad_handle,
+	IPL_SERIAL, true, plcomintr, sc, device_xname(self));
 	if (ih == NULL) {
 		aprint_error_dev(self, "couldn't install interrupt handler\n");
 		return;



CVS commit: src/sys/dev

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 23:05:50 UTC 2018

Modified Files:
src/sys/dev/acpi: acpi_intr.h acpi_util.c sdhc_acpi.c
src/sys/dev/i2c: ihidev.c

Log Message:
Use acpi_md_intr_establish/disestablish to handle device IRQs. The existing
code abused AcpiOsInstallInterruptHandler, which is meant for installing
the SCI handler.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/acpi_intr.h
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/acpi_util.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/sdhc_acpi.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/ihidev.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_intr.h
diff -u src/sys/dev/acpi/acpi_intr.h:1.2 src/sys/dev/acpi/acpi_intr.h:1.3
--- src/sys/dev/acpi/acpi_intr.h:1.2	Tue Mar 20 12:14:52 2018
+++ src/sys/dev/acpi/acpi_intr.h	Fri Nov 16 23:05:50 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_intr.h,v 1.2 2018/03/20 12:14:52 bouyer Exp $ */
+/* $NetBSD: acpi_intr.h,v 1.3 2018/11/16 23:05:50 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-void *		acpi_intr_establish(device_t, uint64_t,
-		unsigned int (*intr)(void *), void *, const char *);
-void 		acpi_intr_disestablish(void *, unsigned int (*intr)(void *));
+void *		acpi_intr_establish(device_t, uint64_t, int, bool,
+		int (*intr)(void *), void *, const char *);
+void 		acpi_intr_disestablish(void *);
 const char * 	acpi_intr_string(void *, char *, size_t len);

Index: src/sys/dev/acpi/acpi_util.c
diff -u src/sys/dev/acpi/acpi_util.c:1.13 src/sys/dev/acpi/acpi_util.c:1.14
--- src/sys/dev/acpi/acpi_util.c:1.13	Fri Oct 12 23:25:29 2018
+++ src/sys/dev/acpi/acpi_util.c	Fri Nov 16 23:05:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.c,v 1.13 2018/10/12 23:25:29 jmcneill Exp $ */
+/*	$NetBSD: acpi_util.c,v 1.14 2018/11/16 23:05:50 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.13 2018/10/12 23:25:29 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.14 2018/11/16 23:05:50 jmcneill Exp $");
 
 #include 
 #include 
@@ -75,6 +75,8 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_util.c,
 #include 
 #include 
 
+#include 
+
 #define _COMPONENT	ACPI_BUS_COMPONENT
 ACPI_MODULE_NAME	("acpi_util")
 
@@ -550,18 +552,19 @@ out:
 struct acpi_irq_handler {
 	ACPI_HANDLE aih_hdl;
 	uint32_t aih_irq;
-	int (*aih_intr)(void *);
+	void *aih_ih;
 };
 
 void *
-acpi_intr_establish(device_t dev, uint64_t c,
-unsigned int (*intr)(void *), void *iarg, const char *xname)
+acpi_intr_establish(device_t dev, uint64_t c, int ipl, bool mpsafe,
+int (*intr)(void *), void *iarg, const char *xname)
 {
 	ACPI_STATUS rv;
 	ACPI_HANDLE hdl = (void *)(uintptr_t)c;
 	struct acpi_resources res;
 	struct acpi_irq *irq;
 	struct acpi_irq_handler *aih = NULL;
+	void *ih;
 
 	rv = acpi_resource_parse(dev, hdl, "_CRS", ,
 	_resource_parse_ops_quiet);
@@ -572,30 +575,28 @@ acpi_intr_establish(device_t dev, uint64
 	if (irq == NULL)
 		goto end;
 
-	aih = kmem_alloc(sizeof(struct acpi_irq_handler), KM_NOSLEEP);
-	if (aih == NULL)
+	const int type = (irq->ar_type == ACPI_EDGE_SENSITIVE) ? IST_EDGE : IST_LEVEL;
+	ih = acpi_md_intr_establish(irq->ar_irq, ipl, type, intr, iarg, mpsafe, xname);
+	if (ih == NULL)
 		goto end;
 
+	aih = kmem_alloc(sizeof(struct acpi_irq_handler), KM_SLEEP);
 	aih->aih_hdl = hdl;
 	aih->aih_irq = irq->ar_irq;
-	rv = AcpiOsInstallInterruptHandler_xname(irq->ar_irq, intr, iarg, xname);
-	if (ACPI_FAILURE(rv)) {
-		kmem_free(aih, sizeof(struct acpi_irq_handler));
-		aih = NULL;
-	}
+	aih->aih_ih = ih;
+
 end:
 	acpi_resource_cleanup();
 	return aih;
 }
 
 void
-acpi_intr_disestablish(void *c, unsigned int (*intr)(void *))
+acpi_intr_disestablish(void *c)
 {
 	struct acpi_irq_handler *aih = c;
 
-	AcpiOsRemoveInterruptHandler(aih->aih_irq, intr);
+	acpi_md_intr_disestablish(aih->aih_ih);
 	kmem_free(aih, sizeof(struct acpi_irq_handler));
-	return;
 }
 
 const char *

Index: src/sys/dev/acpi/sdhc_acpi.c
diff -u src/sys/dev/acpi/sdhc_acpi.c:1.5 src/sys/dev/acpi/sdhc_acpi.c:1.6
--- src/sys/dev/acpi/sdhc_acpi.c:1.5	Tue May  8 03:27:17 2018
+++ src/sys/dev/acpi/sdhc_acpi.c	Fri Nov 16 23:05:50 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc_acpi.c,v 1.5 2018/05/08 03:27:17 mlelstv Exp $	*/
+/*	$NetBSD: sdhc_acpi.c,v 1.6 2018/11/16 23:05:50 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.5 2018/05/08 03:27:17 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc_acpi.c,v 1.6 2018/11/16 23:05:50 jmcneill Exp $");
 
 #include 
 #include 
@@ -35,6 +35,7 @@ __KERNEL_RCSID(0, "$NetBSD: 

CVS commit: src/sys/arch

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 23:03:55 UTC 2018

Modified Files:
src/sys/arch/arm/acpi: acpi_machdep.c
src/sys/arch/arm/include: acpi_machdep.h
src/sys/arch/ia64/acpi: acpi_machdep.c
src/sys/arch/ia64/include: acpi_machdep.h
src/sys/arch/x86/acpi: acpi_machdep.c
src/sys/arch/x86/include: acpi_machdep.h

Log Message:
Add MD functions for establishing and disestablishing interrupt handlers.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/acpi/acpi_machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/include/acpi_machdep.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/acpi/acpi_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/include/acpi_machdep.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/acpi/acpi_machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/include/acpi_machdep.h

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

Modified files:

Index: src/sys/arch/arm/acpi/acpi_machdep.c
diff -u src/sys/arch/arm/acpi/acpi_machdep.c:1.5 src/sys/arch/arm/acpi/acpi_machdep.c:1.6
--- src/sys/arch/arm/acpi/acpi_machdep.c:1.5	Mon Nov 12 12:56:05 2018
+++ src/sys/arch/arm/acpi/acpi_machdep.c	Fri Nov 16 23:03:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.5 2018/11/12 12:56:05 jmcneill Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.6 2018/11/16 23:03:55 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "pci.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.5 2018/11/12 12:56:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.6 2018/11/16 23:03:55 jmcneill Exp $");
 
 #include 
 #include 
@@ -83,12 +83,7 @@ ACPI_STATUS
 acpi_md_OsInstallInterruptHandler(UINT32 irq, ACPI_OSD_HANDLER handler, void *context,
 void **cookiep, const char *xname)
 {
-	const int ipl = IPL_TTY;
-	const int type = IST_LEVEL;	/* TODO: MADT */
-
-	*cookiep = intr_establish(irq, ipl, type, (int (*)(void *))handler, context);
-
-	return *cookiep == NULL ? AE_NO_MEMORY : AE_OK;
+	return AE_NOT_IMPLEMENTED;
 }
 
 void
@@ -200,6 +195,18 @@ acpi_md_OsDisableInterrupt(void)
 	cpsid(I32_bit);
 }
 
+void *
+acpi_md_intr_establish(uint32_t irq, int ipl, int type, int (*handler)(void *), void *arg, bool mpsafe, const char *xname)
+{
+	return intr_establish_xname(irq, ipl, type | (mpsafe ? IST_MPSAFE : 0), handler, arg, xname);
+}
+
+void
+acpi_md_intr_disestablish(void *ih)
+{
+	intr_disestablish(ih);
+}
+
 int
 acpi_md_sleep(int state)
 {

Index: src/sys/arch/arm/include/acpi_machdep.h
diff -u src/sys/arch/arm/include/acpi_machdep.h:1.1 src/sys/arch/arm/include/acpi_machdep.h:1.2
--- src/sys/arch/arm/include/acpi_machdep.h:1.1	Fri Oct 12 22:12:12 2018
+++ src/sys/arch/arm/include/acpi_machdep.h	Fri Nov 16 23:03:55 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.h,v 1.1 2018/10/12 22:12:12 jmcneill Exp $ */
+/* $NetBSD: acpi_machdep.h,v 1.2 2018/11/16 23:03:55 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -46,6 +46,9 @@ BOOLEAN			acpi_md_OsReadable(void *, UIN
 BOOLEAN			acpi_md_OsWritable(void *, UINT32);
 void			acpi_md_OsEnableInterrupt(void);
 void			acpi_md_OsDisableInterrupt(void);
+void *			acpi_md_intr_establish(uint32_t, int, int, int (*)(void *),
+	   void *, bool, const char *);
+void			acpi_md_intr_disestablish(void *);
 int			acpi_md_sleep(int);
 uint32_t		acpi_md_pdc(void);
 uint32_t		acpi_md_ncpus(void);

Index: src/sys/arch/ia64/acpi/acpi_machdep.c
diff -u src/sys/arch/ia64/acpi/acpi_machdep.c:1.7 src/sys/arch/ia64/acpi/acpi_machdep.c:1.8
--- src/sys/arch/ia64/acpi/acpi_machdep.c:1.7	Tue Mar 20 12:14:52 2018
+++ src/sys/arch/ia64/acpi/acpi_machdep.c	Fri Nov 16 23:03:55 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.c,v 1.7 2018/03/20 12:14:52 bouyer Exp $	*/
+/*	$NetBSD: acpi_machdep.c,v 1.8 2018/11/16 23:03:55 jmcneill Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -28,7 +28,7 @@
  * Machine-dependent routines for ACPICA.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.7 2018/03/20 12:14:52 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.8 2018/11/16 23:03:55 jmcneill Exp $");
 
 #include 
 
@@ -74,29 +74,34 @@ acpi_md_OsGetRootPointer(void)
 	return acpi_root_phys;
 }
 
-ACPI_STATUS
-acpi_md_OsInstallInterruptHandler(UINT32 InterruptNumber,
-  ACPI_OSD_HANDLER ServiceRoutine,
-  void *Context, void **cookiep,
-  const char *xname)
+static int
+acpi_isa_irq_to_vector(UINT32 irq)
 {
 	static int isa_irq_to_vector_map[16] = {
 	/* i8259 IRQ translation, first 16 entries */
 		0x2f, 0x20, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29,
 		0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21,
 	};
-	int irq;
-	void *ih;
 
-	if (has_i8259 && InterruptNumber < 16)
-		irq = isa_irq_to_vector_map[InterruptNumber];
-	else
-		irq = InterruptNumber;
+	if (has_i8259 && irq < 

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

2018-11-16 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Fri Nov 16 20:49:08 UTC 2018

Modified Files:
src/usr.bin/xlint/common: lp64.h

Log Message:
PR toolchain/53710

allow 64bit target to compile on 32bit host

Ok'ed by 


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/common/lp64.h

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/lp64.h
diff -u src/usr.bin/xlint/common/lp64.h:1.6 src/usr.bin/xlint/common/lp64.h:1.7
--- src/usr.bin/xlint/common/lp64.h:1.6	Sun Oct  7 14:20:01 2018
+++ src/usr.bin/xlint/common/lp64.h	Fri Nov 16 20:49:08 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: lp64.h,v 1.6 2018/10/07 14:20:01 christos Exp $	*/
+/*	$NetBSD: lp64.h,v 1.7 2018/11/16 20:49:08 scole Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -45,7 +45,9 @@
 #define	LONG_SIZE	(8 * CHAR_BIT)
 #define	QUAD_SIZE	(8 * CHAR_BIT)
 #define	PTR_SIZE	(8 * CHAR_BIT)
+#ifdef _LP64
 #define	INT128_SIZE	(16 * CHAR_BIT)
+#endif
 
 #define	TARG_SCHAR_MAX	((signed char) (((unsigned char) -1) >> 1))
 #define	TARG_SCHAR_MIN	((-TARG_CHAR_MAX) - 1)
@@ -67,7 +69,7 @@
 #define	TARG_QUAD_MIN	((-TARG_QUAD_MAX) - 1)
 #define	TARG_UQUAD_MAX	((uint64_t) -1)
 
-#ifndef _LP64
+#ifdef _LP64
 /* XXX on a 32 build for a 64 build host we skip these */
 #define	TARG_INT128_MAX		((__int128_t) (((__uint128_t) -1) >> 1))
 #define	TARG_INT128_MIN		((-TARG_INT128_MAX) - 1)



CVS commit: src/usr.sbin/sysinst

2018-11-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 16 19:55:18 UTC 2018

Modified Files:
src/usr.sbin/sysinst: mbr.c

Log Message:
Now that size estimates are not way off anymore, only double the size
for the minimal suggested partition.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/mbr.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.sbin/sysinst/mbr.c
diff -u src/usr.sbin/sysinst/mbr.c:1.7 src/usr.sbin/sysinst/mbr.c:1.8
--- src/usr.sbin/sysinst/mbr.c:1.7	Thu Nov 15 10:34:21 2018
+++ src/usr.sbin/sysinst/mbr.c	Fri Nov 16 19:55:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbr.c,v 1.7 2018/11/15 10:34:21 martin Exp $ */
+/*	$NetBSD: mbr.c,v 1.8 2018/11/16 19:55:18 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1283,7 +1283,7 @@ edit_mbr(mbr_info_t *mbri)
 		char min_size[5], build_size[5];
 
 		humanize_number(min_size, sizeof(min_size),
-		3 * m_size * 1024*1024UL,
+		2 * m_size * 1024*1024UL,
 		"", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
 		humanize_number(build_size, sizeof(build_size),
 		 SYSTEM_BUILD_SIZE * 1024 * 1024UL, "", HN_AUTOSCALE,



CVS commit: src/usr.sbin/sysinst

2018-11-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 16 19:54:05 UTC 2018

Modified Files:
src/usr.sbin/sysinst: defsizes.h
src/usr.sbin/sysinst/arch/alpha: md.h
src/usr.sbin/sysinst/arch/arc: md.h
src/usr.sbin/sysinst/arch/atari: md.h
src/usr.sbin/sysinst/arch/cobalt: md.h
src/usr.sbin/sysinst/arch/emips: md.h
src/usr.sbin/sysinst/arch/ews4800mips: md.h
src/usr.sbin/sysinst/arch/hp300: md.h
src/usr.sbin/sysinst/arch/hppa: md.h
src/usr.sbin/sysinst/arch/i386: md.h
src/usr.sbin/sysinst/arch/luna68k: md.h
src/usr.sbin/sysinst/arch/mipsco: md.h
src/usr.sbin/sysinst/arch/mvme68k: md.h
src/usr.sbin/sysinst/arch/news68k: md.h
src/usr.sbin/sysinst/arch/newsmips: md.h
src/usr.sbin/sysinst/arch/ofppc: md.h
src/usr.sbin/sysinst/arch/pmax: md.h
src/usr.sbin/sysinst/arch/prep: md.h
src/usr.sbin/sysinst/arch/sgimips: md.h
src/usr.sbin/sysinst/arch/sparc: md.h
src/usr.sbin/sysinst/arch/sparc64: md.h
src/usr.sbin/sysinst/arch/vax: md.h
src/usr.sbin/sysinst/arch/x68k: md.h

Log Message:
Sync install size estimates with current reality


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/defsizes.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/alpha/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/arc/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/atari/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/cobalt/md.h
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/emips/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/ews4800mips/md.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/hp300/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/hppa/md.h
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/i386/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/luna68k/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/mipsco/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/mvme68k/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/news68k/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/newsmips/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/ofppc/md.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/pmax/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/prep/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/sgimips/md.h
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/arch/sparc/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/sparc64/md.h
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/sysinst/arch/vax/md.h
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/sysinst/arch/x68k/md.h

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

Modified files:

Index: src/usr.sbin/sysinst/defsizes.h
diff -u src/usr.sbin/sysinst/defsizes.h:1.1 src/usr.sbin/sysinst/defsizes.h:1.2
--- src/usr.sbin/sysinst/defsizes.h:1.1	Thu Nov 15 10:34:21 2018
+++ src/usr.sbin/sysinst/defsizes.h	Fri Nov 16 19:54:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: defsizes.h,v 1.1 2018/11/15 10:34:21 martin Exp $	*/
+/*	$NetBSD: defsizes.h,v 1.2 2018/11/16 19:54:03 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -43,10 +43,10 @@
 #define DEFVARSIZE	32
 #endif
 #ifndef DEFROOTSIZE
-#define DEFROOTSIZE	32
+#define DEFROOTSIZE	40
 #endif
 #ifndef DEFUSRSIZE
-#define DEFUSRSIZE	128
+#define DEFUSRSIZE	800
 #endif
 #ifndef DEFSWAPSIZE
 #define DEFSWAPSIZE	128

Index: src/usr.sbin/sysinst/arch/alpha/md.h
diff -u src/usr.sbin/sysinst/arch/alpha/md.h:1.1 src/usr.sbin/sysinst/arch/alpha/md.h:1.2
--- src/usr.sbin/sysinst/arch/alpha/md.h:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/arch/alpha/md.h	Fri Nov 16 19:54:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.1 2014/07/26 19:30:44 dholland Exp $	*/
+/*	$NetBSD: md.h,v 1.2 2018/11/16 19:54:03 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -45,8 +45,10 @@
 #define	PART_USR	PART_D
 
 /* Megs required for a full X installation. */
-#define XNEEDMB 50	/* XXXTHORPEJ */
+#define XNEEDMB		300
 #define DEFROOTSIZE	128
+#define	DEFUSRSIZE	900
+#define	DEBNEEDMB	1024
 
 /* have support for booting from UFS2 */
 #define	HAVE_UFS2_BOOT

Index: src/usr.sbin/sysinst/arch/arc/md.h
diff -u src/usr.sbin/sysinst/arch/arc/md.h:1.1 src/usr.sbin/sysinst/arch/arc/md.h:1.2
--- src/usr.sbin/sysinst/arch/arc/md.h:1.1	Sat Jul 26 19:30:44 2014
+++ src/usr.sbin/sysinst/arch/arc/md.h	Fri Nov 16 19:54:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.1 2014/07/26 19:30:44 dholland Exp $	*/
+/*	$NetBSD: md.h,v 1.2 2018/11/16 19:54:03 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -66,10 +66,12 @@
 #define DEFSWAPSIZE	128	/* Default swap size */
 #define DEFROOTSIZE	64	/* Default root size, if created */
 #define DEFVARSIZE	64	/* Default /var size, if created */
-#define DEFUSRSIZE	256	/* Default /usr size, if created */

CVS commit: src/sys/arch/ia64

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 19:46:53 UTC 2018

Modified Files:
src/sys/arch/ia64/ia64: interrupt.c
src/sys/arch/ia64/include: intr.h

Log Message:
Add intr_establish_xname stub


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/ia64/interrupt.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/include/intr.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/ia64/ia64/interrupt.c
diff -u src/sys/arch/ia64/ia64/interrupt.c:1.8 src/sys/arch/ia64/ia64/interrupt.c:1.9
--- src/sys/arch/ia64/ia64/interrupt.c:1.8	Wed Dec 13 16:50:46 2017
+++ src/sys/arch/ia64/ia64/interrupt.c	Fri Nov 16 19:46:52 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.8 2017/12/13 16:50:46 scole Exp $ */
+/* $NetBSD: interrupt.c,v 1.9 2018/11/16 19:46:52 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -33,7 +33,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.8 2017/12/13 16:50:46 scole Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.9 2018/11/16 19:46:52 jmcneill Exp $");
 
 #include "opt_ddb.h"
 
@@ -256,6 +256,14 @@ ia64_intr_unmask(void *arg)
 #endif
 
 void *
+intr_establish_xname(int irq, int type, int level, int (*func)(void *),
+void *arg, const char *xname)
+{
+	/* TODO: xname support */
+	return intr_establish(irq, type, level, func, arg);
+}
+
+void *
 intr_establish(int irq, int type, int level, int (*func)(void *), void *arg)
 {
 	struct ia64_intr *i;

Index: src/sys/arch/ia64/include/intr.h
diff -u src/sys/arch/ia64/include/intr.h:1.7 src/sys/arch/ia64/include/intr.h:1.8
--- src/sys/arch/ia64/include/intr.h:1.7	Wed Dec 13 16:50:46 2017
+++ src/sys/arch/ia64/include/intr.h	Fri Nov 16 19:46:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.7 2017/12/13 16:50:46 scole Exp $	*/
+/*	$NetBSD: intr.h,v 1.8 2018/11/16 19:46:52 jmcneill Exp $	*/
 
 /* XXX: cherry: To Be fixed when we switch on interrupts. */
 
@@ -72,6 +72,7 @@ typedef uint64_t intr_handle_t;
 const char *intr_string(intr_handle_t, char *, size_t);
 
 void *intr_establish(int, int, int, int (*)(void *), void *);
+void *intr_establish_xname(int, int, int, int (*)(void *), void *, const char *);
 void intr_disestablish(void *);
 void ia64_handle_intr(void *);
 



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

2018-11-16 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Nov 16 19:32:01 UTC 2018

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

Log Message:
make pcihost_intr_evcnt static, like the other functions


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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/pcihost_fdt.c
diff -u src/sys/arch/arm/fdt/pcihost_fdt.c:1.4 src/sys/arch/arm/fdt/pcihost_fdt.c:1.5
--- src/sys/arch/arm/fdt/pcihost_fdt.c:1.4	Fri Nov 16 15:06:21 2018
+++ src/sys/arch/arm/fdt/pcihost_fdt.c	Fri Nov 16 19:32:01 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.5 2018/11/16 19:32:01 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.5 2018/11/16 19:32:01 jakllsch Exp $");
 
 #include 
 #include 
@@ -118,7 +118,7 @@ static int	pcihost_intr_map(const struct
 pci_intr_handle_t *);
 static const char *pcihost_intr_string(void *, pci_intr_handle_t,
 	  char *, size_t);
-const struct evcnt *pcihost_intr_evcnt(void *, pci_intr_handle_t);
+static const struct evcnt *pcihost_intr_evcnt(void *, pci_intr_handle_t);
 static int	pcihost_intr_setattr(void *, pci_intr_handle_t *, int,
 	uint64_t);
 static void *	pcihost_intr_establish(void *, pci_intr_handle_t,



CVS commit: src/sys/sys

2018-11-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Nov 16 17:18:29 UTC 2018

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

Log Message:
Belated Condolonces on the loss of your m_devget() copy argument.
In sympathy we offer you a welcome to 8.99.26


To generate a diff of this commit:
cvs rdiff -u -r1.570 -r1.571 src/sys/sys/param.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/param.h
diff -u src/sys/sys/param.h:1.570 src/sys/sys/param.h:1.571
--- src/sys/sys/param.h:1.570	Mon Sep  3 16:55:17 2018
+++ src/sys/sys/param.h	Fri Nov 16 17:18:29 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.570 2018/09/03 16:55:17 riastradh Exp $	*/
+/*	$NetBSD: param.h,v 1.571 2018/11/16 17:18:29 kre Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	899002500	/* NetBSD 8.99.25 */
+#define	__NetBSD_Version__	899002600	/* NetBSD 8.99.26 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/distrib/news68k/floppies/ramdisk

2018-11-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 16 17:07:42 UTC 2018

Modified Files:
src/distrib/news68k/floppies/ramdisk: Makefile

Log Message:
Bump image size


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/distrib/news68k/floppies/ramdisk/Makefile

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

Modified files:

Index: src/distrib/news68k/floppies/ramdisk/Makefile
diff -u src/distrib/news68k/floppies/ramdisk/Makefile:1.36 src/distrib/news68k/floppies/ramdisk/Makefile:1.37
--- src/distrib/news68k/floppies/ramdisk/Makefile:1.36	Tue Jan 24 18:04:03 2017
+++ src/distrib/news68k/floppies/ramdisk/Makefile	Fri Nov 16 17:07:42 2018
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.36 2017/01/24 18:04:03 christos Exp $
+#	$NetBSD: Makefile,v 1.37 2018/11/16 17:07:42 martin Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	1600k
+IMAGESIZE=	1800k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1



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

2018-11-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 16 17:07:10 UTC 2018

Modified Files:
src/sys/arch/news68k/conf: INSTALL

Log Message:
Bump space for ramdisk image


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/news68k/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/news68k/conf/INSTALL
diff -u src/sys/arch/news68k/conf/INSTALL:1.64 src/sys/arch/news68k/conf/INSTALL:1.65
--- src/sys/arch/news68k/conf/INSTALL:1.64	Wed Aug  1 20:04:13 2018
+++ src/sys/arch/news68k/conf/INSTALL	Fri Nov 16 17:07:10 2018
@@ -1,4 +1,4 @@
-# 	$NetBSD: INSTALL,v 1.64 2018/08/01 20:04:13 maxv Exp $
+# 	$NetBSD: INSTALL,v 1.65 2018/11/16 17:07:10 martin Exp $
 
 #	config for bootable floppy kernel
 #
@@ -18,7 +18,7 @@ options 	CPU_SINGLE		# Will IOP be suppo
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=3200	# 1.60 Megabytes
+options 	MEMORY_DISK_ROOT_SIZE=3600	# 1.80 Megabytes
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # Standard system options



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

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 15:41:27 UTC 2018

Modified Files:
src/sys/arch/arm/acpi: acpipchb.c

Log Message:
Restore acpi_pci_ignore_boot_config lost in previous commit


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/acpi/acpipchb.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/acpi/acpipchb.c
diff -u src/sys/arch/arm/acpi/acpipchb.c:1.4 src/sys/arch/arm/acpi/acpipchb.c:1.5
--- src/sys/arch/arm/acpi/acpipchb.c:1.4	Fri Nov 16 15:06:21 2018
+++ src/sys/arch/arm/acpi/acpipchb.c	Fri Nov 16 15:41:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpipchb.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $ */
+/* $NetBSD: acpipchb.c,v 1.5 2018/11/16 15:41:27 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.4 2018/11/16 15:06:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpipchb.c,v 1.5 2018/11/16 15:41:27 jmcneill Exp $");
 
 #include 
 #include 
@@ -133,10 +133,10 @@ acpipchb_attach(device_t parent, device_
 	sc->sc_ap.ap_pc.pc_conf_v = >sc_ap;
 	sc->sc_ap.ap_seg = seg;
 
-//	if (acpi_pci_ignore_boot_config(sc->sc_handle)) {
+	if (acpi_pci_ignore_boot_config(sc->sc_handle)) {
 		if (acpimcfg_configure_bus(self, >sc_ap.ap_pc, sc->sc_handle, sc->sc_bus, PCIHOST_CACHELINE_SIZE) != 0)
 			aprint_error_dev(self, "failed to configure bus\n");
-//	}
+	}
 
 	memset(, 0, sizeof(pba));
 	pba.pba_flags = aa->aa_pciflags;



CVS commit: src/sys

2018-11-16 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 16 15:06:23 UTC 2018

Modified Files:
src/sys/arch/arm/acpi: acpi_pci_machdep.c acpipchb.c
src/sys/arch/arm/broadcom: bcm53xx_pax.c
src/sys/arch/arm/cortex: gic_v2m.c gicv3_its.c
src/sys/arch/arm/fdt: pcihost_fdt.c
src/sys/arch/arm/gemini: gemini_pci.c
src/sys/arch/arm/include: pci_machdep.h
src/sys/arch/arm/marvell: pci_machdep.c
src/sys/arch/arm/nvidia: tegra_pcie.c
src/sys/arch/arm/pci: pci_msi_machdep.c pci_msi_machdep.h
src/sys/arch/arm/pic: pic.c picvar.h
src/sys/arch/arm/s3c2xx0: s3c2800_pci.c
src/sys/arch/arm/xscale: becc_pci.c
src/sys/arch/evbarm/cp3100: cp3100_pci.c
src/sys/arch/evbarm/hdl_g: hdlg_pci.c
src/sys/arch/evbarm/ifpga: ifpga_pci.c
src/sys/arch/evbarm/iq80310: iq80310_pci.c
src/sys/arch/evbarm/iq80321: iq80321_pci.c
src/sys/arch/evbarm/ixm1200: ixm1200_pci.c
src/sys/dev/marvell: if_mvgbe.c mvpex.c mvpexvar.h

Log Message:
Add intr_establish_xname support to arm and expose it to intrctl


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/acpi/acpi_pci_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/acpi/acpipchb.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/broadcom/bcm53xx_pax.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/cortex/gic_v2m.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/gicv3_its.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/fdt/pcihost_fdt.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/gemini/gemini_pci.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/pci_machdep.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/marvell/pci_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/nvidia/tegra_pcie.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/pci/pci_msi_machdep.c \
src/sys/arch/arm/pci/pci_msi_machdep.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/pic/pic.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/pic/picvar.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/s3c2xx0/s3c2800_pci.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/xscale/becc_pci.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/cp3100/cp3100_pci.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/hdl_g/hdlg_pci.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/ifpga/ifpga_pci.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/iq80310/iq80310_pci.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/iq80321/iq80321_pci.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/ixm1200/ixm1200_pci.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/marvell/if_mvgbe.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/marvell/mvpex.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/marvell/mvpexvar.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/acpi/acpi_pci_machdep.c
diff -u src/sys/arch/arm/acpi/acpi_pci_machdep.c:1.7 src/sys/arch/arm/acpi/acpi_pci_machdep.c:1.8
--- src/sys/arch/arm/acpi/acpi_pci_machdep.c:1.7	Sat Nov  3 12:03:05 2018
+++ src/sys/arch/arm/acpi/acpi_pci_machdep.c	Fri Nov 16 15:06:21 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci_machdep.c,v 1.7 2018/11/03 12:03:05 jmcneill Exp $ */
+/* $NetBSD: acpi_pci_machdep.c,v 1.8 2018/11/16 15:06:21 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.7 2018/11/03 12:03:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci_machdep.c,v 1.8 2018/11/16 15:06:21 jmcneill Exp $");
 
 #include 
 #include 
@@ -88,7 +88,8 @@ static const struct evcnt *acpi_pci_md_i
 static int	acpi_pci_md_intr_setattr(void *, pci_intr_handle_t *, int,
 	uint64_t);
 static void *	acpi_pci_md_intr_establish(void *, pci_intr_handle_t,
-	 int, int (*)(void *), void *);
+	 int, int (*)(void *), void *,
+	 const char *);
 static void	acpi_pci_md_intr_disestablish(void *, void *);
 
 struct arm32_pci_chipset arm_acpi_pci_chipset = {
@@ -381,17 +382,17 @@ acpi_pci_md_intr_setattr(void *v, pci_in
 
 static void *
 acpi_pci_md_intr_establish(void *v, pci_intr_handle_t ih, int ipl,
-int (*callback)(void *), void *arg)
+int (*callback)(void *), void *arg, const char *xname)
 {
 	struct acpi_pci_context * const ap = v;
 
 	if ((ih & (ARM_PCI_INTR_MSI | ARM_PCI_INTR_MSIX)) != 0)
-		return arm_pci_msi_intr_establish(>ap_pc, ih, ipl, callback, arg);
+		return arm_pci_msi_intr_establish(>ap_pc, ih, ipl, callback, arg, xname);
 
 	const int irq = (int)__SHIFTOUT(ih, ARM_PCI_INTR_IRQ);
 	const int mpsafe = (ih & ARM_PCI_INTR_MPSAFE) ? IST_MPSAFE : 0;
 
-	return intr_establish(irq, ipl, IST_LEVEL | mpsafe, callback, arg);
+	return intr_establish_xname(irq, ipl, IST_LEVEL | mpsafe, callback, arg, xname);
 }
 
 static void

Index: src/sys/arch/arm/acpi/acpipchb.c
diff -u src/sys/arch/arm/acpi/acpipchb.c:1.3 src/sys/arch/arm/acpi/acpipchb.c:1.4
--- 

CVS commit: src/sys/arch/macppc/stand/ofwboot

2018-11-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Nov 16 14:58:54 UTC 2018

Modified Files:
src/sys/arch/macppc/stand/ofwboot: ofdev.c version

Log Message:
Fix boot failure from installation floppies.  PR port-macppc/53103

Also bump version to denote a visible fix.
Should be pulled up to netbsd-8 and netbsd-7.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/macppc/stand/ofwboot/ofdev.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/macppc/stand/ofwboot/version

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/stand/ofwboot/ofdev.c
diff -u src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.26 src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.27
--- src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.26	Sun Feb 19 12:02:55 2012
+++ src/sys/arch/macppc/stand/ofwboot/ofdev.c	Fri Nov 16 14:58:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofdev.c,v 1.26 2012/02/19 12:02:55 tsutsui Exp $	*/
+/*	$NetBSD: ofdev.c,v 1.27 2018/11/16 14:58:54 tsutsui Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -437,10 +437,11 @@ devopen(struct open_file *of, const char
 		ofdev.type = OFDEV_DISK;
 		ofdev.bsize = DEV_BSIZE;
 		/* First try to find a disklabel without partitions */
-		if (strategy(, F_READ,
-			 LABELSECTOR, DEV_BSIZE, buf, ) != 0
-		|| nread != DEV_BSIZE
-		|| getdisklabel(buf, )) {
+		if (!floppyboot &&
+		(strategy(, F_READ,
+			  LABELSECTOR, DEV_BSIZE, buf, ) != 0
+		 || nread != DEV_BSIZE
+		 || getdisklabel(buf, ))) {
 			/* Else try APM or MBR partitions */
 			struct drvr_map *map = (struct drvr_map *)buf;
 

Index: src/sys/arch/macppc/stand/ofwboot/version
diff -u src/sys/arch/macppc/stand/ofwboot/version:1.13 src/sys/arch/macppc/stand/ofwboot/version:1.14
--- src/sys/arch/macppc/stand/ofwboot/version:1.13	Sun Oct 17 15:33:04 2010
+++ src/sys/arch/macppc/stand/ofwboot/version	Fri Nov 16 14:58:54 2018
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.13 2010/10/17 15:33:04 phx Exp $
+$NetBSD: version,v 1.14 2018/11/16 14:58:54 tsutsui Exp $
 
 1.1:		Initial revision from NetBSD/powerpc.
 1.2:		Use MI loadfile().
@@ -14,3 +14,4 @@ $NetBSD: version,v 1.13 2010/10/17 15:33
 1.11:		Check floppyboot and disable LOAD_NOTE to avoid backward seek.
 1.12:		Read Apple Partition Map to find the root partition, when
 		no OF path was specified.
+1.13:		Fix boot failure of installation floppies



CVS commit: src/usr.bin/audio/play

2018-11-16 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Fri Nov 16 13:55:18 UTC 2018

Modified Files:
src/usr.bin/audio/play: play.c

Log Message:
The test for regular file was wrong.

>From yarl on freenode, thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/usr.bin/audio/play/play.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/audio/play/play.c
diff -u src/usr.bin/audio/play/play.c:1.55 src/usr.bin/audio/play/play.c:1.56
--- src/usr.bin/audio/play/play.c:1.55	Wed Aug  5 06:54:39 2015
+++ src/usr.bin/audio/play/play.c	Fri Nov 16 13:55:17 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: play.c,v 1.55 2015/08/05 06:54:39 mrg Exp $	*/
+/*	$NetBSD: play.c,v 1.56 2018/11/16 13:55:17 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001, 2002, 2010 Matthew R. Green
@@ -28,7 +28,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: play.c,v 1.55 2015/08/05 06:54:39 mrg Exp $");
+__RCSID("$NetBSD: play.c,v 1.56 2018/11/16 13:55:17 mlelstv Exp $");
 #endif
 
 
@@ -248,7 +248,7 @@ play(char *file)
 	 * or if we failed to mmap the file, try to read it instead, so
 	 * that filesystems, etc, that do not support mmap() work
 	 */
-	if (S_ISREG(sb.st_rdev & S_IFMT) == 0 || 
+	if (!S_ISREG(sb.st_mode) || 
 	((off_t)sizet_filesize != filesize) ||
 	(oaddr = addr = mmap(0, sizet_filesize, PROT_READ,
 	MAP_SHARED, fd, 0)) == MAP_FAILED) {



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

2018-11-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 16 13:02:52 UTC 2018

Modified Files:
src/distrib/sets/lists/debug: shl.mi

Log Message:
Adjust for libcurses bump


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/distrib/sets/lists/debug/shl.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/debug/shl.mi
diff -u src/distrib/sets/lists/debug/shl.mi:1.209 src/distrib/sets/lists/debug/shl.mi:1.210
--- src/distrib/sets/lists/debug/shl.mi:1.209	Sun Sep 23 13:36:04 2018
+++ src/distrib/sets/lists/debug/shl.mi	Fri Nov 16 13:02:52 2018
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.209 2018/09/23 13:36:04 christos Exp $
+# $NetBSD: shl.mi,v 1.210 2018/11/16 13:02:52 martin Exp $
 ./usr/lib/libbfd_g.a		comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib		base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug		comp-sys-debug	debug,dynamicroot
@@ -82,7 +82,8 @@
 ./usr/libdata/debug/usr/lib/libcrypto_rc5.so.12.0.debug		comp-obsolete	debug,compatfile,obsolete
 ./usr/libdata/debug/usr/lib/libctf.so.3.0.debug			comp-sys-debug	debug,compatfile,ctf
 ./usr/libdata/debug/usr/lib/libcurses.so.7.0.debug		comp-obsolete	debug,obsolete,compatfile
-./usr/libdata/debug/usr/lib/libcurses.so.7.1.debug		comp-sys-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libcurses.so.7.1.debug		comp-obsolete	debug,obsolete,compatfile
+./usr/libdata/debug/usr/lib/libcurses.so.7.2.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libdes.so.12.0.debug			comp-crypto-debug	debug,compatfile,openssl=10
 ./usr/libdata/debug/usr/lib/libdes.so.14.0.debug			comp-crypto-debug	debug,compatfile,openssl=11
 ./usr/libdata/debug/usr/lib/libdevmapper.so.1.0.debug		comp-lvm-debug	debug,compatfile,lvm



CVS commit: src/lib/libc/arch/aarch64/gen

2018-11-16 Thread Ryo Shimizu
Module Name:src
Committed By:   ryo
Date:   Fri Nov 16 10:51:08 UTC 2018

Modified Files:
src/lib/libc/arch/aarch64/gen: makecontext.c

Log Message:
fix type of argument for va_arg; don't round to 32bit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/gen/makecontext.c

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

Modified files:

Index: src/lib/libc/arch/aarch64/gen/makecontext.c
diff -u src/lib/libc/arch/aarch64/gen/makecontext.c:1.1 src/lib/libc/arch/aarch64/gen/makecontext.c:1.2
--- src/lib/libc/arch/aarch64/gen/makecontext.c:1.1	Sun Aug 10 05:47:36 2014
+++ src/lib/libc/arch/aarch64/gen/makecontext.c	Fri Nov 16 10:51:08 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: makecontext.c,v 1.1 2014/08/10 05:47:36 matt Exp $ */
+/* $NetBSD: makecontext.c,v 1.2 2018/11/16 10:51:08 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: makecontext.c,v 1.1 2014/08/10 05:47:36 matt Exp $");
+__RCSID("$NetBSD: makecontext.c,v 1.2 2018/11/16 10:51:08 ryo Exp $");
 #endif
 
 #include 
@@ -63,9 +63,9 @@ makecontext(ucontext_t *ucp, void (*func
 	va_list ap;
 	va_start(ap, argc);
 
-	/* Pass up to four arguments in r0-3. */
+	/* Pass up to eight arguments in x0-x7. */
 	for (int i = 0; i < argc && i < 8; i++) {
-		gr[_REG_X0 + i] = va_arg(ap, int);
+		gr[_REG_X0 + i] = va_arg(ap, __greg_t);
 	}
 
 	/* Pass any additional arguments on the stack. */



CVS commit: src/lib/libcurses

2018-11-16 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Fri Nov 16 10:12:00 UTC 2018

Modified Files:
src/lib/libcurses: curses_private.h fileio.h screen.c shlib_version
tty.c

Log Message:
Fix for PR lib/52063
Many thanks to  Onno van der Linden (o.vd.lin...@quicknet.nl) for providing
the bulk of the patch that fixes the issue.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.4 -r1.5 src/lib/libcurses/fileio.h
cvs rdiff -u -r1.34 -r1.35 src/lib/libcurses/screen.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libcurses/shlib_version
cvs rdiff -u -r1.47 -r1.48 src/lib/libcurses/tty.c

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

Modified files:

Index: src/lib/libcurses/curses_private.h
diff -u src/lib/libcurses/curses_private.h:1.67 src/lib/libcurses/curses_private.h:1.68
--- src/lib/libcurses/curses_private.h:1.67	Mon Oct 29 00:25:20 2018
+++ src/lib/libcurses/curses_private.h	Fri Nov 16 10:12:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses_private.h,v 1.67 2018/10/29 00:25:20 uwe Exp $	*/
+/*	$NetBSD: curses_private.h,v 1.68 2018/11/16 10:12:00 blymn Exp $	*/
 
 /*-
  * Copyright (c) 1998-2000 Brett Lymn
@@ -133,6 +133,7 @@ struct __window {		/* Window structure. 
 #define __ISDERWIN	0x0010	/* "window" is derived from parent */
 #define __IMMEDOK	0x0020	/* refreshed when changed */
 #define __SYNCOK	0x0040	/* sync when changed */
+#define __HALFDELAY	0x0080	/* In half delay mode */
 	unsigned int flags;
 	int	delay;			/* delay for getch() */
 	attr_t	wattr;			/* Character attributes */
@@ -278,7 +279,6 @@ struct __screen {
 	char padchar;
 	int endwin;
 	int notty;
-	int half_delay;
 	int resized;
 	wchar_t *unget_list;
 	int unget_len, unget_pos;

Index: src/lib/libcurses/fileio.h
diff -u src/lib/libcurses/fileio.h:1.4 src/lib/libcurses/fileio.h:1.5
--- src/lib/libcurses/fileio.h:1.4	Mon Jan  2 12:38:16 2017
+++ src/lib/libcurses/fileio.h	Fri Nov 16 10:12:00 2018
@@ -1,8 +1,8 @@
 /*
  * Do not edit!  Automatically generated file:
- *   from: NetBSD: shlib_version,v 1.41 2015/11/22 04:56:00 kamil Exp 
+ *   from: NetBSD: shlib_version,v 1.42 2017/01/02 12:38:16 roy Exp 
  *   by  : NetBSD: genfileioh.awk,v 1.2 2008/05/02 11:13:02 martin Exp 
  */
 
 #define CURSES_LIB_MAJOR 7
-#define CURSES_LIB_MINOR 1
+#define CURSES_LIB_MINOR 2

Index: src/lib/libcurses/screen.c
diff -u src/lib/libcurses/screen.c:1.34 src/lib/libcurses/screen.c:1.35
--- src/lib/libcurses/screen.c:1.34	Tue Oct  2 17:35:44 2018
+++ src/lib/libcurses/screen.c	Fri Nov 16 10:12:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: screen.c,v 1.34 2018/10/02 17:35:44 roy Exp $	*/
+/*	$NetBSD: screen.c,v 1.35 2018/11/16 10:12:00 blymn Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)screen.c	8.2 (blymn) 11/27/2001";
 #else
-__RCSID("$NetBSD: screen.c,v 1.34 2018/10/02 17:35:44 roy Exp $");
+__RCSID("$NetBSD: screen.c,v 1.35 2018/11/16 10:12:00 blymn Exp $");
 #endif
 #endif	/* not lint */
 
@@ -167,7 +167,6 @@ newterm(char *type, FILE *outfd, FILE *i
 	new_screen->__virtscr = NULL;
 	new_screen->curwin = 0;
 	new_screen->notty = FALSE;
-	new_screen->half_delay = FALSE;
 	new_screen->resized = 0;
 	new_screen->unget_len = 32;
 

Index: src/lib/libcurses/shlib_version
diff -u src/lib/libcurses/shlib_version:1.42 src/lib/libcurses/shlib_version:1.43
--- src/lib/libcurses/shlib_version:1.42	Mon Jan  2 12:38:16 2017
+++ src/lib/libcurses/shlib_version	Fri Nov 16 10:12:00 2018
@@ -1,8 +1,8 @@
-#	$NetBSD: shlib_version,v 1.42 2017/01/02 12:38:16 roy Exp $
+#	$NetBSD: shlib_version,v 1.43 2018/11/16 10:12:00 blymn Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
 #	Remember to run `make fileio.h` when changing
 #	Remember to increment the major numbers of libform, libmenu and
 #	libpanel when the libcurses major number increments.
 #
 major=7
-minor=1
+minor=2

Index: src/lib/libcurses/tty.c
diff -u src/lib/libcurses/tty.c:1.47 src/lib/libcurses/tty.c:1.48
--- src/lib/libcurses/tty.c:1.47	Thu Oct 18 07:53:13 2018
+++ src/lib/libcurses/tty.c	Fri Nov 16 10:12:00 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.47 2018/10/18 07:53:13 roy Exp $	*/
+/*	$NetBSD: tty.c,v 1.48 2018/11/16 10:12:00 blymn Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)tty.c	8.6 (Berkeley) 1/10/95";
 #else
-__RCSID("$NetBSD: tty.c,v 1.47 2018/10/18 07:53:13 roy Exp $");
+__RCSID("$NetBSD: tty.c,v 1.48 2018/11/16 10:12:00 blymn Exp $");
 #endif
 #endif/* not lint */
 
@@ -250,11 +250,11 @@ nocbreak(void)
 	if (_cursesi_screen->notty == TRUE)
 		return OK;
 	  /* if we were in halfdelay mode then nuke the timeout */
-	if ((_cursesi_screen->half_delay == TRUE) &&
+	if ((stdscr->flags & __HALFDELAY) &&
 	(__notimeout() == ERR))
 		return ERR;
 
-	_cursesi_screen->half_delay = FALSE;
+	stdscr->flags &= 

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

2018-11-16 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Fri Nov 16 10:09:29 UTC 2018

Modified Files:
src/distrib/sets/lists/base: shl.mi

Log Message:
Bump libcurses minor version due to fix for lib/52063


To generate a diff of this commit:
cvs rdiff -u -r1.849 -r1.850 src/distrib/sets/lists/base/shl.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/base/shl.mi
diff -u src/distrib/sets/lists/base/shl.mi:1.849 src/distrib/sets/lists/base/shl.mi:1.850
--- src/distrib/sets/lists/base/shl.mi:1.849	Sun Sep 23 13:36:04 2018
+++ src/distrib/sets/lists/base/shl.mi	Fri Nov 16 10:09:29 2018
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.849 2018/09/23 13:36:04 christos Exp $
+# $NetBSD: shl.mi,v 1.850 2018/11/16 10:09:29 blymn Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -246,7 +246,7 @@
 ./usr/lib/libctf.so.3.0base-sys-shlib		compatfile,ctf
 ./usr/lib/libcurses.sobase-sys-shlib		compatfile
 ./usr/lib/libcurses.so.7			base-sys-shlib		compatfile
-./usr/lib/libcurses.so.7.1			base-sys-shlib		compatfile
+./usr/lib/libcurses.so.7.2			base-sys-shlib		compatfile
 ./usr/lib/libdes.sobase-crypto-shlib	compatfile
 ./usr/lib/libdes.so.12base-crypto-shlib	compatfile,openssl=10
 ./usr/lib/libdes.so.12.0base-crypto-shlib	compatfile,openssl=10



CVS commit: src/usr.sbin/rtadvd

2018-11-16 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Nov 16 08:57:10 UTC 2018

Modified Files:
src/usr.sbin/rtadvd: dump.c

Log Message:
rtadvd: use %u to print unsigned variables


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/rtadvd/dump.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.sbin/rtadvd/dump.c
diff -u src/usr.sbin/rtadvd/dump.c:1.16 src/usr.sbin/rtadvd/dump.c:1.17
--- src/usr.sbin/rtadvd/dump.c:1.16	Fri Apr 20 10:39:37 2018
+++ src/usr.sbin/rtadvd/dump.c	Fri Nov 16 08:57:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: dump.c,v 1.16 2018/04/20 10:39:37 roy Exp $	*/
+/*	$NetBSD: dump.c,v 1.17 2018/11/16 08:57:10 ozaki-r Exp $	*/
 /*	$KAME: dump.c,v 1.34 2004/06/14 05:35:59 itojun Exp $	*/
 
 /*
@@ -138,23 +138,23 @@ if_dump(void)
 		if (rai->advlinkopt)
 			fprintf(fp, "  Link-layer address: %s\n",
 			ether_str(rai->sdl));
-		fprintf(fp, "  MTU: %d\n", rai->phymtu);
+		fprintf(fp, "  MTU: %u\n", rai->phymtu);
 
 		/* Router configuration variables */
-		fprintf(fp, "  DefaultLifetime: %d, MaxAdvInterval: %d, "
-		"MinAdvInterval: %d\n", rai->lifetime, rai->maxinterval,
+		fprintf(fp, "  DefaultLifetime: %u, MaxAdvInterval: %u, "
+		"MinAdvInterval: %u\n", rai->lifetime, rai->maxinterval,
 		rai->mininterval);
 		fprintf(fp, "  Flags: %s%s%s, ",
 		rai->managedflg ? "M" : "", rai->otherflg ? "O" : "",
 		"");
 		fprintf(fp, "Preference: %s, ",
 			rtpref_str[(rai->rtpref >> 3) & 0xff]);
-		fprintf(fp, "MTU: %d\n", rai->linkmtu);
-		fprintf(fp, "  ReachableTime: %d, RetransTimer: %d, "
-			"CurHopLimit: %d\n", rai->reachabletime,
+		fprintf(fp, "MTU: %u\n", rai->linkmtu);
+		fprintf(fp, "  ReachableTime: %u, RetransTimer: %u, "
+			"CurHopLimit: %u\n", rai->reachabletime,
 			rai->retranstimer, rai->hoplimit);
 		if (rai->clockskew)
-			fprintf(fp, "  Clock skew: %dsec\n",
+			fprintf(fp, "  Clock skew: %usec\n",
 			rai->clockskew);
 		TAILQ_FOREACH(pfx, >prefix, next) {
 			if (pfx == TAILQ_FIRST(>prefix))
@@ -176,8 +176,7 @@ if_dump(void)
 			if (pfx->validlifetime == ND6_INFINITE_LIFETIME)
 fprintf(fp, "vltime: infinity");
 			else
-fprintf(fp, "vltime: %ld",
-	(long)pfx->validlifetime);
+fprintf(fp, "vltime: %u", pfx->validlifetime);
 			if (pfx->vltimeexpire != 0)
 fprintf(fp, "(decr,expire %lld), ", (long long)
 	(pfx->vltimeexpire > now.tv_sec ?
@@ -187,8 +186,7 @@ if_dump(void)
 			if (pfx->preflifetime ==  ND6_INFINITE_LIFETIME)
 fprintf(fp, "pltime: infinity");
 			else
-fprintf(fp, "pltime: %ld",
-	(long)pfx->preflifetime);
+fprintf(fp, "pltime: %u", pfx->preflifetime);
 			if (pfx->pltimeexpire != 0)
 fprintf(fp, "(decr,expire %lld), ", (long long)
 	(pfx->pltimeexpire > now.tv_sec ?