Re: CVS commit: src/sys/sys

2019-12-24 Thread Warner Losh
On Mon, Dec 23, 2019, 2:37 PM Kamil Rytarowski  wrote:

> On 23.12.2019 18:14, Greg Troxel wrote:
> > Warner Losh  writes:
> >
> >> Just a quick note: when FreeBSD when from 9 to 10, we had to play 'hunt
> the
> >> wumpus' for all the autoconfig scripts that suddenly thought they were
> >> configuring for FreeBSD 1.0.
> >>
> >> If you can arrange it, it might make sense to do a pkgsrc run on an
> >> experimental system that has the version as 10.0 rather than 9.9.xx
> before
> >> committing to a schedule given the experience of your sister BSD
> project.
> >
> > Thanks, that's a really good point.
> >
>
> This issue is well known. Once we will branch -10 we will test it in
> HEAD and -10 concurrently.
>
> On the other hand, clang10 broke only a single piece of software that I
> build (nodejs).
>


FreeBSD 10 broke dozens of config scripts that all derived from a common
ancestor back in the 90s... though 1.0 FreeBSD needed special treatment for
things like a.out and such and the scripts used 1* to match. It would be
easy enough to grep for that pattern in gnu software to see if it will trip
you up. NetBSDs release version history may be such this isn't an issue,
but it broke a heck of a lot than I'd expected at the time...

Warner

>


Re: CVS commit: src/sys/sys

2019-12-24 Thread Greg Troxel
Warner Losh  writes:

> Just a quick note: when FreeBSD when from 9 to 10, we had to play 'hunt the
> wumpus' for all the autoconfig scripts that suddenly thought they were
> configuring for FreeBSD 1.0.
>
> If you can arrange it, it might make sense to do a pkgsrc run on an
> experimental system that has the version as 10.0 rather than 9.9.xx before
> committing to a schedule given the experience of your sister BSD project.

Thanks, that's a really good point.


Re: CVS commit: src/sys/sys

2019-12-24 Thread Kamil Rytarowski
On 23.12.2019 18:14, Greg Troxel wrote:
> Warner Losh  writes:
> 
>> Just a quick note: when FreeBSD when from 9 to 10, we had to play 'hunt the
>> wumpus' for all the autoconfig scripts that suddenly thought they were
>> configuring for FreeBSD 1.0.
>>
>> If you can arrange it, it might make sense to do a pkgsrc run on an
>> experimental system that has the version as 10.0 rather than 9.9.xx before
>> committing to a schedule given the experience of your sister BSD project.
> 
> Thanks, that's a really good point.
> 

This issue is well known. Once we will branch -10 we will test it in
HEAD and -10 concurrently.

On the other hand, clang10 broke only a single piece of software that I
build (nodejs).



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/sys/sys

2019-12-24 Thread Warner Losh
On Mon, Dec 23, 2019 at 9:33 AM Greg Troxel  wrote:

> Martin Husemann  writes:
>
> > On Mon, Dec 23, 2019 at 09:02:50AM -0500, Greg Troxel wrote:
> >> Well, we are coming up on a year since netbsd-9 was branched, or at
> >> least will arrive there before this discussion resolves.   So cutting
> >> -10 before we hit 100 works for me :-)
> >
> > Nitpicking (and I don't know for the discussion resolving), but netbsd-9
> > was branched on 2019-07-30 (so not even 1/2 a year yes).
> >
> > The branch for netbsd-10 can happen soon after Andrew is done (we need
> > 10.0 on the build cluster ASAP).
>
> I will admit that my comment was partly humor.
>
> Thanks for pointing out the -9 branch date.  Given that we have had an
> RC, this branch is going much better than recent previous ones.  I
> realize it's always difficult, but I think we (mostly you, perhaps) are
> doing better this time.
>
> I did mean to be somewhat serious in saying it was going to be time to
> start 10, just based on calendar, because I believe releases should be
> no more than 18 months apart, and I think 12 months is ideal.  Thus I am
> in favor of starting a new branch 12 months after the last one was
> started.
>
> (I see the merits of points about lots of improvements in current vs 9
> and the reasonableness of branching late spring and releasing fall, even
> if that seems a bit aspirational.)
>

Just a quick note: when FreeBSD when from 9 to 10, we had to play 'hunt the
wumpus' for all the autoconfig scripts that suddenly thought they were
configuring for FreeBSD 1.0.

If you can arrange it, it might make sense to do a pkgsrc run on an
experimental system that has the version as 10.0 rather than 9.9.xx before
committing to a schedule given the experience of your sister BSD project.

Warner


CVS commit: src/tests/lib/libc/sys

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Dec 25 02:23:38 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Read TLS base pointer with _lwp_getprivate()

This avoid usage of fast versions that are mostly internal to RTLD.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/tests/lib/libc/sys/t_ptrace_wait.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.144 src/tests/lib/libc/sys/t_ptrace_wait.c:1.145
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.144	Tue Dec 24 21:09:38 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Wed Dec 25 02:23:37 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.144 2019/12/24 21:09:38 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.145 2019/12/25 02:23:37 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,10 +27,9 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.144 2019/12/24 21:09:38 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.145 2019/12/25 02:23:37 kamil Exp $");
 
 #define __LEGACY_PT_LWPINFO
-#define _RTLD_SOURCE
 
 #include 
 #include 
@@ -4804,19 +4803,6 @@ PTRACE_KILL(kill3, "killpg(SIGKILL)")
 
 /// 
 
-static void *
-get_private(void)
-{
-
-#ifdef __HAVE___LWP_GETTCB_FAST
-	return __lwp_gettcb_fast();
-#elif defined(__HAVE___LWP_GETPRIVATE_FAST)
-	return __lwp_getprivate_fast();
-#else
-#error Unknown code path!
-#endif
-}
-
 static int lwpinfo_thread_sigmask[] = {SIGXCPU, SIGPIPE, SIGALRM, SIGURG};
 
 static pthread_mutex_t lwpinfo_thread_mtx = PTHREAD_MUTEX_INITIALIZER;
@@ -4831,7 +4817,7 @@ lwpinfo_thread(void *arg)
 
 	tcb = (volatile void **)arg;
 
-	*tcb = get_private();
+	*tcb = _lwp_getprivate();
 	DPRINTF("Storing tcb[] = %p from thread %d\n", *tcb, _lwp_self());
 
 	pthread_setname_np(pthread_self(), "thread %d",
@@ -4885,7 +4871,7 @@ traceme_lwpinfo(const size_t threads, co
 		DPRINTF("Before calling PT_TRACE_ME from child %d\n", getpid());
 		FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1);
 
-		tcb[0] = get_private();
+		tcb[0] = _lwp_getprivate();
 		DPRINTF("Storing tcb[0] = %p\n", tcb[0]);
 
 		pthread_setname_np(pthread_self(), "thread %d",



CVS commit: src/tests/lib/libc/sys

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Dec 25 02:23:38 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Read TLS base pointer with _lwp_getprivate()

This avoid usage of fast versions that are mostly internal to RTLD.


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/tests/lib/libc/sys/t_ptrace_wait.c

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



CVS commit: src/sys/dev/i2c

2019-12-24 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Dec 25 01:19:56 UTC 2019

Modified Files:
src/sys/dev/i2c: ihidev.c ihidev.h

Log Message:
Revert previous until issues can be sorted out.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/i2c/ihidev.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/ihidev.h

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



CVS commit: src/sys/dev/i2c

2019-12-24 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Dec 25 01:19:56 UTC 2019

Modified Files:
src/sys/dev/i2c: ihidev.c ihidev.h

Log Message:
Revert previous until issues can be sorted out.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/i2c/ihidev.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/ihidev.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/i2c/ihidev.c
diff -u src/sys/dev/i2c/ihidev.c:1.10 src/sys/dev/i2c/ihidev.c:1.11
--- src/sys/dev/i2c/ihidev.c:1.10	Sun Dec 22 16:44:35 2019
+++ src/sys/dev/i2c/ihidev.c	Wed Dec 25 01:19:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.c,v 1.10 2019/12/22 16:44:35 thorpej Exp $ */
+/* $NetBSD: ihidev.c,v 1.11 2019/12/25 01:19:56 thorpej Exp $ */
 /* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
 
 /*-
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.10 2019/12/22 16:44:35 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.11 2019/12/25 01:19:56 thorpej Exp $");
 
 #include 
 #include 
@@ -71,7 +71,6 @@ __KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1
 #  include "acpica.h"
 #endif
 #if NACPICA > 0
-#include 
 #include 
 #endif
 
@@ -110,14 +109,10 @@ static int	ihidev_detach(device_t, int);
 CFATTACH_DECL_NEW(ihidev, sizeof(struct ihidev_softc),
 ihidev_match, ihidev_attach, ihidev_detach, NULL);
 
-static bool	ihiddev_intr_init(struct ihidev_softc *);
-static void	ihiddev_intr_fini(struct ihidev_softc *);
-
 static bool	ihidev_suspend(device_t, const pmf_qual_t *);
 static bool	ihidev_resume(device_t, const pmf_qual_t *);
 static int	ihidev_hid_command(struct ihidev_softc *, int, void *, bool);
 static int	ihidev_intr(void *);
-static void	ihidev_softintr(void *);
 static int	ihidev_reset(struct ihidev_softc *, bool);
 static int	ihidev_hid_desc_parse(struct ihidev_softc *);
 
@@ -205,9 +200,20 @@ ihidev_attach(device_t parent, device_t 
 		repsz));
 	}
 	sc->sc_ibuf = kmem_zalloc(sc->sc_isize, KM_SLEEP);
-	if (! ihiddev_intr_init(sc)) {
-		return;
+#if NACPICA > 0
+	{
+		char buf[100];
+
+		sc->sc_ih = acpi_intr_establish(self, sc->sc_phandle, IPL_TTY,
+		false, ihidev_intr, sc, device_xname(self));
+		if (sc->sc_ih == NULL) {
+			aprint_error_dev(self, "can't establish interrupt\n");
+			return;
+		}
+		aprint_normal_dev(self, "interrupting at %s\n",
+		acpi_intr_string(sc->sc_ih, buf, sizeof(buf)));
 	}
+#endif
 
 	iha.iaa = ia;
 	iha.parent = sc;
@@ -254,7 +260,10 @@ ihidev_detach(device_t self, int flags)
 	struct ihidev_softc *sc = device_private(self);
 
 	mutex_enter(>sc_intr_lock);
-	ihiddev_intr_fini(sc);
+#if NACPICA > 0
+	if (sc->sc_ih != NULL)
+		acpi_intr_disestablish(sc->sc_ih);
+#endif
 	if (ihidev_hid_command(sc, I2C_HID_CMD_SET_POWER,
 	_HID_POWER_OFF, true))
 	aprint_error_dev(sc->sc_dev, "failed to power down\n");
@@ -640,110 +649,31 @@ ihidev_hid_desc_parse(struct ihidev_soft
 	return (0);
 }
 
-static bool
-ihiddev_intr_init(struct ihidev_softc *sc)
-{
-#if NACPICA > 0
-	ACPI_HANDLE hdl = (void *)(uintptr_t)sc->sc_phandle;
-	struct acpi_resources res;
-	ACPI_STATUS rv;
-	char buf[100];
-
-	rv = acpi_resource_parse(sc->sc_dev, hdl, "_CRS", ,
-	_resource_parse_ops_quiet);
-	if (ACPI_FAILURE(rv)) {
-		aprint_error_dev(sc->sc_dev, "can't parse '_CRS'\n");
-		return false;
-	}
-
-	const struct acpi_irq * const irq = acpi_res_irq(, 0);
-	if (irq == NULL) {
-		aprint_error_dev(sc->sc_dev, "no IRQ resource\n");
-		acpi_resource_cleanup();
-		return false;
-	}
-
-	sc->sc_intr_type =
-	irq->ar_type == ACPI_EDGE_SENSITIVE ? IST_EDGE : IST_LEVEL;
-
-	acpi_resource_cleanup();
-
-	sc->sc_ih = acpi_intr_establish(sc->sc_dev, sc->sc_phandle, IPL_TTY,
-	false, ihidev_intr, sc, device_xname(sc->sc_dev));
-	if (sc->sc_ih == NULL) {
-		aprint_error_dev(sc->sc_dev, "can't establish interrupt\n");
-		return false;
-	}
-	aprint_normal_dev(sc->sc_dev, "interrupting at %s\n",
-	acpi_intr_string(sc->sc_ih, buf, sizeof(buf)));
-
-	sc->sc_sih = softint_establish(SOFTINT_SERIAL, ihidev_softintr, sc);
-	if (sc->sc_sih == NULL) {
-		aprint_error_dev(sc->sc_dev,
-		"can't establish soft interrupt\n");
-		return false;
-	}
-
-	return true;
-#else
-	aprint_error_dev(sc->sc_dev, "can't establish interrupt\n");
-	return false;
-#endif
-}
-
-static void
-ihiddev_intr_fini(struct ihidev_softc *sc)
-{
-#if NACPICA > 0
-	if (sc->sc_ih != NULL) {
-		acpi_intr_disestablish(sc->sc_ih);
-	}
-	if (sc->sc_sih != NULL) {
-		softint_disestablish(sc->sc_sih);
-	}
-#endif
-}
-
 static int
 ihidev_intr(void *arg)
 {
-	struct ihidev_softc * const sc = arg;
-
-	mutex_enter(>sc_intr_lock);
-
-	/*
-	 * Schedule our soft interrupt handler.  If we're using a level-
-	 * triggered interrupt, we have to mask it off while we wait
-	 * for service.
-	 */
-	softint_schedule(sc->sc_sih);
-	if (sc->sc_intr_type == IST_LEVEL) {
-#if NACPICA > 0
-		acpi_intr_mask(sc->sc_ih);

CVS commit: src/lib/libpthread

2019-12-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Dec 25 00:44:45 UTC 2019

Modified Files:
src/lib/libpthread: pthread_tsd.c

Log Message:
Since pthread_setspecific requires locks, ensure that they are acquired
before fork and dropped in both parent and child. At least Python
depends on TSD after fork, even though it is undefined behavior in
POSIX.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libpthread/pthread_tsd.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/libpthread/pthread_tsd.c
diff -u src/lib/libpthread/pthread_tsd.c:1.17 src/lib/libpthread/pthread_tsd.c:1.18
--- src/lib/libpthread/pthread_tsd.c:1.17	Tue Mar  5 01:35:52 2019
+++ src/lib/libpthread/pthread_tsd.c	Wed Dec 25 00:44:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_tsd.c,v 1.17 2019/03/05 01:35:52 christos Exp $	*/
+/*	$NetBSD: pthread_tsd.c,v 1.18 2019/12/25 00:44:45 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread_tsd.c,v 1.17 2019/03/05 01:35:52 christos Exp $");
+__RCSID("$NetBSD: pthread_tsd.c,v 1.18 2019/12/25 00:44:45 joerg Exp $");
 
 /* Functions and structures dealing with thread-specific data */
 #include 
@@ -61,6 +61,18 @@ null_destructor(void *p)
 #include 
 #include 
 
+static void
+pthread_tsd_prefork(void)
+{
+	pthread_mutex_lock(_mutex);
+}
+
+static void
+pthread_tsd_postfork(void)
+{
+	pthread_mutex_unlock(_mutex);
+}
+
 void *
 pthread_tsd_init(size_t *tlen)
 {
@@ -68,6 +80,8 @@ pthread_tsd_init(size_t *tlen)
 	size_t alen;
 	char *arena;
 
+	pthread_atfork(pthread_tsd_prefork, pthread_tsd_postfork, pthread_tsd_postfork);
+
 	if ((pkm = pthread__getenv("PTHREAD_KEYS_MAX")) != NULL) {
 		pthread_keys_max = (int)strtol(pkm, NULL, 0);
 		if (pthread_keys_max < _POSIX_THREAD_KEYS_MAX)



CVS commit: src/lib/libpthread

2019-12-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Dec 25 00:44:45 UTC 2019

Modified Files:
src/lib/libpthread: pthread_tsd.c

Log Message:
Since pthread_setspecific requires locks, ensure that they are acquired
before fork and dropped in both parent and child. At least Python
depends on TSD after fork, even though it is undefined behavior in
POSIX.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libpthread/pthread_tsd.c

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



CVS commit: src/share/tmac

2019-12-24 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Dec 24 23:41:05 UTC 2019

Modified Files:
src/share/tmac: Makefile

Log Message:
G/c the list of old files that are gone for decades.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/tmac/Makefile

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



CVS commit: src/share/tmac

2019-12-24 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Tue Dec 24 23:41:05 UTC 2019

Modified Files:
src/share/tmac: Makefile

Log Message:
G/c the list of old files that are gone for decades.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/tmac/Makefile

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

Modified files:

Index: src/share/tmac/Makefile
diff -u src/share/tmac/Makefile:1.31 src/share/tmac/Makefile:1.32
--- src/share/tmac/Makefile:1.31	Sat Oct 25 22:27:36 2008
+++ src/share/tmac/Makefile	Tue Dec 24 23:41:05 2019
@@ -1,5 +1,5 @@
 #	@(#)Makefile	8.1 (Berkeley) 6/8/93
-#	$NetBSD: Makefile,v 1.31 2008/10/25 22:27:36 apb Exp $
+#	$NetBSD: Makefile,v 1.32 2019/12/24 23:41:05 uwe Exp $
 
 # IF YOU ADD TO MSRCS, MAKE SURE YOU UPDATE `CATDEPS' IN bsd.man.mk!
 MSRCS=	doc2html
@@ -11,9 +11,6 @@ CLEANFILES+= ${MMACS}
 TMACDIR?=${.CURDIR}
 STRIP_SED = ${TMACDIR}/../me/strip.sed
 
-# old macros not currently installed...
-OFILES=	tmac.an.v6compat tmac.an6n tmac.an6t tmac.a tmac.cp tmac.doc.old
-
 realall:	${MMACS}
 
 .for i in ${MSRCS}



Re: CVS commit: src/sys/uvm

2019-12-24 Thread Andrew Doran
On Tue, Dec 24, 2019 at 03:22:54AM +, Taylor R Campbell wrote:

> > Module Name:src
> > Committed By:   ad
> > Date:   Sat Dec 21 14:41:44 UTC 2019
> > 
> > - Add inlines to set/get locator values in the unused lower bits of
> >   pg->phys_addr.  Begin by using it to cache the freelist index, because
> >   computing it is expensive and that shows up during profiling.  Discussed
> >   on tech-kern.
> 
> So I guess we won't be switching pg->phys_addr from paddr to pfn?
> Speaking of which, any plans for expanding to >32-bit (or >31-bit, if
> signed) pfns in the rest of uvm?

That's not part of my current plans for UVM, which right now extend only as
far as breaking the back of the performance problems with builds.  31 bit
pfns get us into the terabyte range I think.  I have a couple of thoughts
here, firstly SVR4 or Solaris has a pfn_t and pgcnt_t or something like that
and it would would be nice to have an analogue.  Kind of surprised we didn't
inherit something like that from Mach.  Secondly in the comments above those
functions:

 * None of this is set in stone; it can be adjusted as needed.

What I have put in there is only a means to an end, to get some extra fields
without putting too much pressure on old systems with small memory.

> Can you use __BITS/__SHIFTIN/__SHIFTOUT for this instead of magic hex
> masks?

Good suggestion, I'll make that change.

Cheers,
Andrew


CVS commit: src/tests/lib/libc/sys

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 21:09:38 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Define _RTLD_SOURCE in t_ptrace_wait.c

The __lwp_gettcb_fast() and __lwp_getprivate_fast() functions are
namespaced on a selection of ports.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/tests/lib/libc/sys/t_ptrace_wait.c

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



CVS commit: src/tests/lib/libc/sys

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 21:09:38 UTC 2019

Modified Files:
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Define _RTLD_SOURCE in t_ptrace_wait.c

The __lwp_gettcb_fast() and __lwp_getprivate_fast() functions are
namespaced on a selection of ports.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/tests/lib/libc/sys/t_ptrace_wait.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_wait.c
diff -u src/tests/lib/libc/sys/t_ptrace_wait.c:1.143 src/tests/lib/libc/sys/t_ptrace_wait.c:1.144
--- src/tests/lib/libc/sys/t_ptrace_wait.c:1.143	Tue Dec 24 14:50:59 2019
+++ src/tests/lib/libc/sys/t_ptrace_wait.c	Tue Dec 24 21:09:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.c,v 1.143 2019/12/24 14:50:59 kamil Exp $	*/
+/*	$NetBSD: t_ptrace_wait.c,v 1.144 2019/12/24 21:09:38 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,9 +27,10 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.143 2019/12/24 14:50:59 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.144 2019/12/24 21:09:38 kamil Exp $");
 
 #define __LEGACY_PT_LWPINFO
+#define _RTLD_SOURCE
 
 #include 
 #include 



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 20:40:09 UTC 2019

Modified Files:
src/sys/arch/arm/pic: pic.c picvar.h

Log Message:
Update pic_add to allocate and return an irqbase if passed
PIC_IRQBASE_ALLOC.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/pic/pic.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/pic/picvar.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.51 src/sys/arch/arm/pic/pic.c:1.52
--- src/sys/arch/arm/pic/pic.c:1.51	Tue Dec 24 20:37:44 2019
+++ src/sys/arch/arm/pic/pic.c	Tue Dec 24 20:40:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.51 2019/12/24 20:37:44 skrll Exp $	*/
+/*	$NetBSD: pic.c,v 1.52 2019/12/24 20:40:09 skrll Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.51 2019/12/24 20:37:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.52 2019/12/24 20:40:09 skrll Exp $");
 
 #include 
 #include 
@@ -99,6 +99,7 @@ size_t pic_ipl_offset[NIPL+1];
 
 static kmutex_t pic_lock;
 static size_t pic_sourcebase;
+static int pic_lastbase;
 static struct evcnt pic_deferral_ev =
 EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "deferred", "intr");
 EVCNT_ATTACH_STATIC(pic_deferral_ev);
@@ -633,7 +634,7 @@ pic_init(void)
 	return 0;
 }
 
-void
+int
 pic_add(struct pic_softc *pic, int irqbase)
 {
 	int slot, maybe_slot = -1;
@@ -656,6 +657,9 @@ pic_add(struct pic_softc *pic, int irqba
 #endif /* __HAVE_PIC_PENDING_INTRS && MULTIPROCESSOR */
 
 	mutex_enter(_lock);
+	if (irqbase == PIC_IRQBASE_ALLOC) {
+		irqbase = pic_lastbase;
+	}
 	for (slot = 0; slot < PIC_MAXPICS; slot++) {
 		struct pic_softc * const xpic = pic_list[slot];
 		if (xpic == NULL) {
@@ -686,7 +690,8 @@ pic_add(struct pic_softc *pic, int irqba
 	KASSERT(pic_sourcebase + pic->pic_maxsources <= PIC_MAXMAXSOURCES);
 	sourcebase = pic_sourcebase;
 	pic_sourcebase += pic->pic_maxsources;
-
+if (pic_lastbase < irqbase + pic->pic_maxsources)
+pic_lastbase = irqbase + pic->pic_maxsources;
 	mutex_exit(_lock);
 
 	/*
@@ -714,6 +719,8 @@ pic_add(struct pic_softc *pic, int irqba
 	KASSERT((pic->pic_cpus != NULL) == (pic->pic_ops->pic_ipi_send != NULL));
 #endif
 	pic_list[slot] = pic;
+	
+	return irqbase;
 }
 
 int

Index: src/sys/arch/arm/pic/picvar.h
diff -u src/sys/arch/arm/pic/picvar.h:1.25 src/sys/arch/arm/pic/picvar.h:1.26
--- src/sys/arch/arm/pic/picvar.h:1.25	Mon Dec 23 15:51:47 2019
+++ src/sys/arch/arm/pic/picvar.h	Tue Dec 24 20:40:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: picvar.h,v 1.25 2019/12/23 15:51:47 jmcneill Exp $	*/
+/*	$NetBSD: picvar.h,v 1.26 2019/12/24 20:40:09 skrll Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -186,7 +186,9 @@ void	pic_set_priority(struct cpu_info *,
 #define	pic_set_priority(ci, newipl)	((void)((ci)->ci_cpl = (newipl)))
 #endif
 
-void	pic_add(struct pic_softc *, int);
+#define	PIC_IRQBASE_ALLOC	(-2)
+
+int	pic_add(struct pic_softc *, int);
 void	pic_do_pending_int(void);
 #ifdef MULTIPROCESSOR
 int	pic_ipi_ast(void *);



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 20:40:09 UTC 2019

Modified Files:
src/sys/arch/arm/pic: pic.c picvar.h

Log Message:
Update pic_add to allocate and return an irqbase if passed
PIC_IRQBASE_ALLOC.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/pic/pic.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/pic/picvar.h

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



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 20:37:44 UTC 2019

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
Make pic_sourcebase static


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arm/pic/pic.c

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



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 20:37:44 UTC 2019

Modified Files:
src/sys/arch/arm/pic: pic.c

Log Message:
Make pic_sourcebase static


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/arm/pic/pic.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/pic/pic.c
diff -u src/sys/arch/arm/pic/pic.c:1.50 src/sys/arch/arm/pic/pic.c:1.51
--- src/sys/arch/arm/pic/pic.c:1.50	Mon Dec 23 15:51:47 2019
+++ src/sys/arch/arm/pic/pic.c	Tue Dec 24 20:37:44 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic.c,v 1.50 2019/12/23 15:51:47 jmcneill Exp $	*/
+/*	$NetBSD: pic.c,v 1.51 2019/12/24 20:37:44 skrll Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_multiprocessor.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.50 2019/12/23 15:51:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.51 2019/12/24 20:37:44 skrll Exp $");
 
 #include 
 #include 
@@ -98,7 +98,7 @@ struct intrsource **pic_iplsource[NIPL] 
 size_t pic_ipl_offset[NIPL+1];
 
 static kmutex_t pic_lock;
-size_t pic_sourcebase;
+static size_t pic_sourcebase;
 static struct evcnt pic_deferral_ev =
 EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "deferred", "intr");
 EVCNT_ATTACH_STATIC(pic_deferral_ev);



CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 19:51:00 UTC 2019

Modified Files:
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_platform_limits_netbsd.cc
sanitizer_platform_limits_netbsd.h sanitizer_syscalls_netbsd.inc

Log Message:
Fix compiler-rt sanitizer build with >= 9.99.30

Cherry-pick (patched):
[compiler-rt] Adapt for ptrace(2) changes in NetBSD-9.99.30

Enable compat support for now legacy PT_LWPINFO.
Support PT_LWPSTATUS and PT_LWPNEXT.

https://github.com/llvm/llvm-project/commit/4b8232d4f0bf5fd9f11ebef2b0f9e8e15f130fb3


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc

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

Modified files:

Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.3 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.4
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc:1.3	Wed Dec 18 14:51:24 2019
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc	Tue Dec 24 19:51:00 2019
@@ -18,6 +18,7 @@
 
 #define _KMEMUSER
 #define RAY_DO_SIGLEV
+#define __LEGACY_PT_LWPINFO
 
 // clang-format off
 #include 
@@ -72,6 +73,15 @@
 #include 
 #include 
 #include 
+
+// Compat for NetBSD < 9.99.30.
+#ifndef PT_LWPSTATUS
+#define PT_LWPSTATUS 24
+#endif
+#ifndef PT_LWPSTATUS
+#define PT_LWPSTATUS 25
+#endif
+
 #include 
 #include 
 #include 
@@ -292,6 +302,8 @@ int ptrace_pt_get_event_mask = PT_GET_EV
 int ptrace_pt_get_process_state = PT_GET_PROCESS_STATE;
 int ptrace_pt_set_siginfo = PT_SET_SIGINFO;
 int ptrace_pt_get_siginfo = PT_GET_SIGINFO;
+int ptrace_pt_lwpstatus = PT_LWPSTATUS;
+int ptrace_pt_lwpnext = PT_LWPNEXT;
 int ptrace_piod_read_d = PIOD_READ_D;
 int ptrace_piod_write_d = PIOD_WRITE_D;
 int ptrace_piod_read_i = PIOD_READ_I;
@@ -324,6 +336,8 @@ int ptrace_pt_getdbregs = -1;
 
 unsigned struct_ptrace_ptrace_io_desc_struct_sz = sizeof(struct ptrace_io_desc);
 unsigned struct_ptrace_ptrace_lwpinfo_struct_sz = sizeof(struct ptrace_lwpinfo);
+unsigned struct_ptrace_ptrace_lwpstatus_struct_sz =
+sizeof(struct __sanitizer_ptrace_lwpstatus);
 unsigned struct_ptrace_ptrace_event_struct_sz = sizeof(ptrace_event_t);
 unsigned struct_ptrace_ptrace_siginfo_struct_sz = sizeof(ptrace_siginfo_t);
 
Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.4
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h:1.3	Wed Dec 18 14:51:24 2019
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h	Tue Dec 24 19:51:00 2019
@@ -407,6 +407,8 @@ extern int ptrace_pt_get_event_mask;
 extern int ptrace_pt_get_process_state;
 extern int ptrace_pt_set_siginfo;
 extern int ptrace_pt_get_siginfo;
+extern int ptrace_pt_lwpstatus;
+extern int ptrace_pt_lwpnext;
 extern int ptrace_piod_read_d;
 extern int ptrace_piod_write_d;
 extern int ptrace_piod_read_i;
@@ -431,8 +433,17 @@ struct __sanitizer_ptrace_lwpinfo {
   int pl_event;
 };
 
+struct __sanitizer_ptrace_lwpstatus {
+  __sanitizer_lwpid_t pl_lwpid;
+  __sanitizer_sigset_t pl_sigpend;
+  __sanitizer_sigset_t pl_sigmask;
+  char pl_name[20];
+  void *pl_private;
+};
+
 extern unsigned struct_ptrace_ptrace_io_desc_struct_sz;
 extern unsigned struct_ptrace_ptrace_lwpinfo_struct_sz;
+extern unsigned struct_ptrace_ptrace_lwpstatus_struct_sz;
 extern unsigned struct_ptrace_ptrace_event_struct_sz;
 extern unsigned struct_ptrace_ptrace_siginfo_struct_sz;
 

Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc
diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc:1.2
--- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc:1.1.1.1	Tue Jan  8 05:40:30 2019
+++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc	Tue Dec 24 19:51:00 2019
@@ -324,6 +324,16 @@ PRE_SYSCALL(ptrace)
 PRE_READ(addr_, 

CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 19:51:00 UTC 2019

Modified Files:
src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common:
sanitizer_platform_limits_netbsd.cc
sanitizer_platform_limits_netbsd.h sanitizer_syscalls_netbsd.inc

Log Message:
Fix compiler-rt sanitizer build with >= 9.99.30

Cherry-pick (patched):
[compiler-rt] Adapt for ptrace(2) changes in NetBSD-9.99.30

Enable compat support for now legacy PT_LWPINFO.
Support PT_LWPSTATUS and PT_LWPNEXT.

https://github.com/llvm/llvm-project/commit/4b8232d4f0bf5fd9f11ebef2b0f9e8e15f130fb3


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
cvs rdiff -u -r1.1.1.1 -r1.2 \

src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_syscalls_netbsd.inc

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



CVS commit: [netbsd-9] src/doc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:47:14 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #574 - #581


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.145 -r1.1.2.146 src/doc/CHANGES-9.0

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-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.145 src/doc/CHANGES-9.0:1.1.2.146
--- src/doc/CHANGES-9.0:1.1.2.145	Wed Dec 18 20:21:11 2019
+++ src/doc/CHANGES-9.0	Tue Dec 24 17:47:14 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.145 2019/12/18 20:21:11 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.146 2019/12/24 17:47:14 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -7255,3 +7255,58 @@ sys/kern/uipc_sem.c1.56
 	The ressource is naturally limited by the backing file descriptor.
 	[joerg, ticket #572]
 
+sys/arch/aarch64/aarch64/cpuswitch.S		1.13
+sys/arch/aarch64/include/asm.h			1.5
+
+	Add a speculation barrier after the 'eret' to help mitigate
+	potential side-channel attacks.
+	[ryo, ticket #574]
+
+share/mk/bsd.sys.mk1.298
+share/mk/sys.mk	1.140
+
+	Move MV to sys.mk because it is used there.
+	[christos, ticket #575]
+
+sys/dev/ic/ahcisata_core.c			1.79
+
+	Avoid a KASSERT on DIAGNOSTIC kernels when a drive does not
+	support CLO.
+	[jmcneill, ticket #576]
+
+usr.bin/calendar/calendars/calendar.christian	1.8
+usr.bin/calendar/calendars/calendar.holiday	1.30
+usr.bin/calendar/calendars/calendar.judaic	1.8,1.9
+usr.bin/calendar/calendars/calendar.usholiday	1.10
+
+	Update to 2020 dates.
+	Add regional holidays: Sigd (Beta Israel), Mimouna (Morrocan).
+	Transliterate some things in an Israeli Hebrew accent.
+	Avoid the risk of being wrong and don't expand meaning of holiday.
+	[sevan, ticket #577]
+
+share/misc/bsd-family-tree			1.76,1.77
+
+	Sync with FreeBSD rev 355063.
+	[sevan, ticket #578]
+
+share/misc/acronyms1.288-1.291
+share/misc/acronyms.comp			1.284-1.294
+
+	Add various acronyms.
+	[sevan, ticket #579]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.217,1.218
+sys/dev/pci/ixgbe/ixgbe_osdep.c			1.6
+sys/dev/pci/ixgbe/ixgbe_osdep.h			1.25
+sys/dev/pci/ixgbe/ixv.c1.143
+
+	Use bus_space_barrier() instead of x86 specific *fence instruction.
+	Add missing core lock in ixgbe_handle_mod().
+	[msaitoh, ticket #580]
+
+sys/miscfs/nullfs/null_vfsops.c			1.96
+
+	Fix MPSAFE flag for the root vnode.
+	[hannken, ticket #581]
+



CVS commit: [netbsd-9] src/doc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:47:14 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Tickets #574 - #581


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.145 -r1.1.2.146 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/sys/miscfs/nullfs

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:45:53 UTC 2019

Modified Files:
src/sys/miscfs/nullfs [netbsd-9]: null_vfsops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #581):

sys/miscfs/nullfs/null_vfsops.c: revision 1.96

Set IMNT_MPSAFE before creating the vnode for the root of the
filesystem. Otherwise, it won't be created with VV_MPSAFE and require
the kernel_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.4.1 src/sys/miscfs/nullfs/null_vfsops.c

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



CVS commit: [netbsd-9] src/sys/miscfs/nullfs

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:45:53 UTC 2019

Modified Files:
src/sys/miscfs/nullfs [netbsd-9]: null_vfsops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #581):

sys/miscfs/nullfs/null_vfsops.c: revision 1.96

Set IMNT_MPSAFE before creating the vnode for the root of the
filesystem. Otherwise, it won't be created with VV_MPSAFE and require
the kernel_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.4.1 src/sys/miscfs/nullfs/null_vfsops.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/miscfs/nullfs/null_vfsops.c
diff -u src/sys/miscfs/nullfs/null_vfsops.c:1.95 src/sys/miscfs/nullfs/null_vfsops.c:1.95.4.1
--- src/sys/miscfs/nullfs/null_vfsops.c:1.95	Wed Feb 20 10:06:00 2019
+++ src/sys/miscfs/nullfs/null_vfsops.c	Tue Dec 24 17:45:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $	*/
+/*	$NetBSD: null_vfsops.c,v 1.95.4.1 2019/12/24 17:45:53 martin Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics & Space Administration
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.95.4.1 2019/12/24 17:45:53 martin Exp $");
 
 #include 
 #include 
@@ -140,6 +140,7 @@ nullfs_mount(struct mount *mp, const cha
 	/* Create the mount point. */
 	nmp = kmem_zalloc(sizeof(struct null_mount), KM_SLEEP);
 	mp->mnt_data = nmp;
+	mp->mnt_iflag |= IMNT_MPSAFE;
 
 	/*
 	 * Make sure that the mount point is sufficiently initialized
@@ -168,7 +169,6 @@ nullfs_mount(struct mount *mp, const cha
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	nmp->nullm_rootvp = vp;
-	mp->mnt_iflag |= IMNT_MPSAFE;
 	VOP_UNLOCK(vp);
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->la.target,



CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:44:22 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe_osdep.c ixgbe_osdep.h
ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #580):

sys/dev/pci/ixgbe/ixgbe.c: revision 1.217
sys/dev/pci/ixgbe/ixgbe.c: revision 1.218
sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.6
sys/dev/pci/ixgbe/ixv.c: revision 1.143
sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.25

 Use bus_space_barrier() instead of x86 specific *fence instruction.
Written by riastradh@.

 Add missing core lock in ixgbe_handle_mod().


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.7 -r1.199.2.8 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.4 -r1.4.8.1 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.23 -r1.23.6.1 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.125.2.7 -r1.125.2.8 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.7 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.8
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.7	Tue Nov 19 13:17:44 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Tue Dec 24 17:44:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.7 2019/11/19 13:17:44 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.8 2019/12/24 17:44:22 martin Exp $ */
 
 /**
 
@@ -4021,7 +4021,7 @@ ixgbe_init_locked(struct adapter *adapte
 			else
 msec_delay(1);
 		}
-		wmb();
+		IXGBE_WRITE_BARRIER(hw);
 
 		/*
 		 * In netmap mode, we must preserve the buffers made
@@ -4613,6 +4613,7 @@ ixgbe_handle_mod(void *context)
 	device_t	dev = adapter->dev;
 	u32		err, cage_full = 0;
 
+	IXGBE_CORE_LOCK(adapter);
 	++adapter->mod_sicount.ev_count;
 	if (adapter->hw.need_crosstalk_fix) {
 		switch (hw->mac.type) {
@@ -4630,14 +4631,14 @@ ixgbe_handle_mod(void *context)
 		}
 
 		if (!cage_full)
-			return;
+			goto out;
 	}
 
 	err = hw->phy.ops.identify_sfp(hw);
 	if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
 		device_printf(dev,
 		"Unsupported SFP+ module type was detected.\n");
-		return;
+		goto out;
 	}
 
 	if (hw->mac.type == ixgbe_mac_82598EB)
@@ -4648,9 +4649,11 @@ ixgbe_handle_mod(void *context)
 	if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
 		device_printf(dev,
 		"Setup failure - unsupported SFP+ module type.\n");
-		return;
+		goto out;
 	}
 	softint_schedule(adapter->msf_si);
+out:
+	IXGBE_CORE_UNLOCK(adapter);
 } /* ixgbe_handle_mod */
 
 

Index: src/sys/dev/pci/ixgbe/ixgbe_osdep.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.4 src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.4.8.1
--- src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.4	Wed Apr  4 08:13:07 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_osdep.c	Tue Dec 24 17:44:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_osdep.c,v 1.4 2018/04/04 08:13:07 msaitoh Exp $ */
+/* $NetBSD: ixgbe_osdep.c,v 1.4.8.1 2019/12/24 17:44:22 martin Exp $ */
 
 /**
 
@@ -116,3 +116,12 @@ ixgbe_write_reg_array(struct ixgbe_hw *h
 	((struct adapter *)hw->back)->osdep.mem_bus_space_handle,
 	reg + (offset << 2), val);
 }
+
+inline void
+ixgbe_write_barrier(struct ixgbe_hw *hw)
+{
+	bus_space_barrier(((struct adapter *)hw->back)->osdep.mem_bus_space_tag,
+	((struct adapter *)hw->back)->osdep.mem_bus_space_handle,
+	0, ((struct adapter *)hw->back)->osdep.mem_size,
+	BUS_SPACE_BARRIER_WRITE);
+}

Index: src/sys/dev/pci/ixgbe/ixgbe_osdep.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_osdep.h:1.23 src/sys/dev/pci/ixgbe/ixgbe_osdep.h:1.23.6.1
--- src/sys/dev/pci/ixgbe/ixgbe_osdep.h:1.23	Tue Jul 31 09:19:34 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_osdep.h	Tue Dec 24 17:44:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_osdep.h,v 1.23 2018/07/31 09:19:34 msaitoh Exp $ */
+/* $NetBSD: ixgbe_osdep.h,v 1.23.6.1 2019/12/24 17:44:22 martin Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -157,18 +157,6 @@ typedef uint64_t	u64;
 /* This device driver's max interrupt numbers. */
 #define IXG_MAX_NINTR		64
 
-#if __FreeBSD_version < 80
-#if defined(__i386__) || defined(__amd64__)
-#define mb()	__asm volatile("mfence" ::: "memory")
-#define wmb()	__asm volatile("sfence" ::: "memory")
-#define rmb()	__asm volatile("lfence" ::: "memory")
-#else
-#define mb()
-#define rmb()
-#define wmb()
-#endif
-#endif
-
 #if defined(__i386__) || defined(__amd64__)
 static __inline
 void prefetch(void *x)
@@ -241,4 +229,8 @@ extern void ixgbe_write_reg_array(struct
 #define IXGBE_WRITE_REG_ARRAY(a, reg, offset, val) \
 ixgbe_write_reg_array(a, reg, offset, val)
 
+extern void ixgbe_write_barrier(struct ixgbe_hw *);
+#define IXGBE_WRITE_BARRIER(a) \
+

CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:44:22 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe_osdep.c ixgbe_osdep.h
ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #580):

sys/dev/pci/ixgbe/ixgbe.c: revision 1.217
sys/dev/pci/ixgbe/ixgbe.c: revision 1.218
sys/dev/pci/ixgbe/ixgbe_osdep.c: revision 1.6
sys/dev/pci/ixgbe/ixv.c: revision 1.143
sys/dev/pci/ixgbe/ixgbe_osdep.h: revision 1.25

 Use bus_space_barrier() instead of x86 specific *fence instruction.
Written by riastradh@.

 Add missing core lock in ixgbe_handle_mod().


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.7 -r1.199.2.8 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.4 -r1.4.8.1 src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.23 -r1.23.6.1 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.125.2.7 -r1.125.2.8 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: [netbsd-9] src/share/misc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:42:18 UTC 2019

Modified Files:
src/share/misc [netbsd-9]: acronyms acronyms.comp

Log Message:
Pull up following revision(s) (requested by sevan in ticket #579):

share/misc/acronyms: revision 1.290
share/misc/acronyms: revision 1.291
share/misc/acronyms.comp: revision 1.284
share/misc/acronyms.comp: revision 1.285
share/misc/acronyms.comp: revision 1.286
share/misc/acronyms.comp: revision 1.287
share/misc/acronyms.comp: revision 1.288
share/misc/acronyms.comp: revision 1.289
share/misc/acronyms: revision 1.288
share/misc/acronyms: revision 1.289
share/misc/acronyms.comp: revision 1.290
share/misc/acronyms.comp: revision 1.291
share/misc/acronyms.comp: revision 1.292
share/misc/acronyms.comp: revision 1.293
share/misc/acronyms.comp: revision 1.294

RDP RFB VNC
ATF NURBS
SICP
GECOS
http://bitsavers.trailing-edge.com/pdf/ge/GE-6xx/CPB-1002A_GE-625_635_GECOS_Jan65.pdf
PPT
INODE STM
GFCI, RCD
CSU UTS
SDR
DAAP DLNA
AWDL, BLE, another NAN
CIA ISMS
Add UPC - universal product code
AVB


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.287.2.1 src/share/misc/acronyms
cvs rdiff -u -r1.283 -r1.283.2.1 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.287 src/share/misc/acronyms:1.287.2.1
--- src/share/misc/acronyms:1.287	Fri Jul 26 14:38:26 2019
+++ src/share/misc/acronyms	Tue Dec 24 17:42:18 2019
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.287 2019/07/26 14:38:26 sevan Exp $
+$NetBSD: acronyms,v 1.287.2.1 2019/12/24 17:42:18 martin Exp $
 10Q	thank you
 10X	thanks
 1337	elite ("leet")
@@ -44,6 +44,7 @@ ATEOTD	at the end of the day
 ATM	at the moment
 ATM	{automated,automatic} teller machine
 ATW	around the world
+AVB	alcohol by volume
 AVI	automatic vehicle identification
 AWK	Aho, Weinberger, [and] Kernighan
 AWOL	absent without official leave
@@ -94,6 +95,7 @@ CFV	call for votes
 CFY	calling for you
 CG	center of gravity
 CHANOPS	channel operator status
+CIA	central intelligence agency
 CMIIW	correct me if I'm wrong
 CNP	continued [in my] next post
 COB	close of business [day]
@@ -190,6 +192,7 @@ GBTW	get back to work
 GCD	greatest common divisor
 GDPR	General Data Protection Regulation
 GF	girlfriend
+GFCI	ground-fault circuit interrupter
 GFU	good for you
 GFY	good for you
 GG	good game
@@ -463,6 +466,7 @@ QED	quod erat demonstrandum
 QFT	quoted for truth
 RA	residential advisor
 RAND	reasonable and non-discriminatory
+RCD	residual current device
 RFC	request for comments
 RFD	request for discussion
 RFE	request for enhancements
@@ -571,6 +575,7 @@ TY	thank you
 TYVM	thank you very much
 U/L	upload
 UGT	universal greeting time
+UPC	Universal Product Code
 UR	your
 UR	{you're, you are}
 UTSL	use the source, Luke

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.283 src/share/misc/acronyms.comp:1.283.2.1
--- src/share/misc/acronyms.comp:1.283	Sun Jul 28 21:43:39 2019
+++ src/share/misc/acronyms.comp	Tue Dec 24 17:42:18 2019
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.283 2019/07/28 21:43:39 sevan Exp $
+$NetBSD: acronyms.comp,v 1.283.2.1 2019/12/24 17:42:18 martin Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -109,12 +109,15 @@ AT	advanced technology
 ATA	advanced technology attachment
 ATAPI	advanced technology attachment packet interface
 ATC	address translation cache
+ATF	ARM trusted firmware
+ATF	automated testing framework
 ATM	asynchronous transfer mode
 ATX	advanced technology extended
 AV	anti virus
 AVB	audio video bridging
 AVL	Adelson-Velsky-Landis
 AVX	advanced vector extensions
+AWDL	Apple wireless direct link
 BA	byte align
 BAL	basic assembly language
 BAR	base address register
@@ -148,6 +151,7 @@ BIU	bus interface unit
 BKDG	BIOS and kernel developer's guide
 BLAS	basic linear algebra subprograms
 BLC	back light control
+BLE	Bluetooth low energy
 BLOB	binary large object
 BM	bus master
 BMC	baseboard management controller
@@ -237,6 +241,7 @@ CHFS	chip file system
 CHS	cylinder/head/sector
 CI	continuous integration
 CI	{common,component} interface
+CIA	confidentiality, integrity, availability
 CIDR	Classless Inter-Domain Routing
 CIF	common intermediate format
 CIFS	Common Internet File System
@@ -296,6 +301,7 @@ CR	carriage return
 CRC	cyclic redundancy check
 CRL	carrier recovery loop
 CRLF	carriage return line feed
+CSU	C start up
 CRT	cathode ray tube
 CRUD	create, read, update, and delete
 CS	cable select
@@ -329,6 +335,7 @@ CVE	common vulnerabilities and exposures
 CVS	Concurrent Versions System
 DA	destination address
 DAA	distributed application architecture
+DAAP	digital audio access protocol
 DAB	digital audio broadcasting
 DAC	digital 

CVS commit: [netbsd-9] src/share/misc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:42:18 UTC 2019

Modified Files:
src/share/misc [netbsd-9]: acronyms acronyms.comp

Log Message:
Pull up following revision(s) (requested by sevan in ticket #579):

share/misc/acronyms: revision 1.290
share/misc/acronyms: revision 1.291
share/misc/acronyms.comp: revision 1.284
share/misc/acronyms.comp: revision 1.285
share/misc/acronyms.comp: revision 1.286
share/misc/acronyms.comp: revision 1.287
share/misc/acronyms.comp: revision 1.288
share/misc/acronyms.comp: revision 1.289
share/misc/acronyms: revision 1.288
share/misc/acronyms: revision 1.289
share/misc/acronyms.comp: revision 1.290
share/misc/acronyms.comp: revision 1.291
share/misc/acronyms.comp: revision 1.292
share/misc/acronyms.comp: revision 1.293
share/misc/acronyms.comp: revision 1.294

RDP RFB VNC
ATF NURBS
SICP
GECOS
http://bitsavers.trailing-edge.com/pdf/ge/GE-6xx/CPB-1002A_GE-625_635_GECOS_Jan65.pdf
PPT
INODE STM
GFCI, RCD
CSU UTS
SDR
DAAP DLNA
AWDL, BLE, another NAN
CIA ISMS
Add UPC - universal product code
AVB


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.287.2.1 src/share/misc/acronyms
cvs rdiff -u -r1.283 -r1.283.2.1 src/share/misc/acronyms.comp

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



CVS commit: [netbsd-9] src/share/misc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:39:23 UTC 2019

Modified Files:
src/share/misc [netbsd-9]: bsd-family-tree

Log Message:
Pull up following revision(s) (requested by sevan in ticket #578):

share/misc/bsd-family-tree: revision 1.76
share/misc/bsd-family-tree: revision 1.77

sync with FreeBSD r354417

Update to r355063


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.75.2.1 src/share/misc/bsd-family-tree

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



CVS commit: [netbsd-9] src/share/misc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:39:23 UTC 2019

Modified Files:
src/share/misc [netbsd-9]: bsd-family-tree

Log Message:
Pull up following revision(s) (requested by sevan in ticket #578):

share/misc/bsd-family-tree: revision 1.76
share/misc/bsd-family-tree: revision 1.77

sync with FreeBSD r354417

Update to r355063


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.75.2.1 src/share/misc/bsd-family-tree

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

Modified files:

Index: src/share/misc/bsd-family-tree
diff -u src/share/misc/bsd-family-tree:1.75 src/share/misc/bsd-family-tree:1.75.2.1
--- src/share/misc/bsd-family-tree:1.75	Sat Jun 22 22:47:01 2019
+++ src/share/misc/bsd-family-tree	Tue Dec 24 17:39:23 2019
@@ -388,20 +388,26 @@ FreeBSD 5.2   |  |  
  ||   |  |   | |  |DragonFly 5.2.2
  | FreeBSD|  |   | *--NetBSD  ||
  |   11.2 |  |   | 7.2||
- |  macOS|   | |  ||
- |  10.14|   | |  OpenBSD 6.4  |
- ||  |   | |  ||
- ||  |   | |  |DragonFly 5.4.0
- *--FreeBSD   |  |   | v  ||
- |   12.0 |  |   ||DragonFly 5.4.1
- ||  |   |OpenBSD 6.5  |
- ||  |   |||
- ||  |  NetBSD||
- ||  |   8.1  |DragonFly 5.6
+ || macOS|   | |  ||
+ || 10.14|   | |  OpenBSD 6.4  |
+ ||   |  |   | |  ||
+ ||   |  |   | |  |DragonFly 5.4.0
+ *--FreeBSD   |   |  |   | v  ||
+ |   12.0 |   |  |   ||DragonFly 5.4.1
+ | |  |   |  |   |OpenBSD 6.5  |
+ | |  |   |  |   |||
+ | |  |   |  |  NetBSD||
+ | |  |   |  |   8.1  |DragonFly 5.6
+ | |  |   |  |||
+ | |  |   |  ||DragonFly 5.6.1
+ | |   FreeBSD  macOS|||
+ | | 11.3   10.15|||
+ |  FreeBSD   |  |OpenBSD 6.6  |
+ |   12.1   macOS|||
+ | |   10.15.1   ||DragonFly 5.6.2
+ | v  |  |||
  ||  |||
- ||  ||DragonFly 5.6.1
- ||  |||
-FreeBSD 13 -current   |  NetBSD -current   OpenBSD -current   DragonFly -current
+FreeBSD 13 -current   |  NetBSD -current   OpenBSD -currentDragonFly -current
  ||  |||
  vv  vvv
 
@@ -786,6 +792,12 @@ OpenBSD 6.5		2019-05-01 [OBD]
 NetBSD 8.1		2019-06-04 [NBD]
 DragonFly 5.6		2019-06-17 [DFB]
 DragonFly 5.6.1		2019-06-19 [DFB]
+FreeBSD 11.3		2019-07-09 [FBD]
+DragonFly 5.6.2		2019-08-11 [DFB]
+OpenBSD 6.6		2019-10-17 [OBD]
+macOS 10.15		2019-10-07 [APL]
+macOS 10.15.1		2019-10-29 [APL] (security/critical release)
+FreeBSD 12.1		2019-11-04 [FBD]
 
 Bibliography
 
@@ -850,5 +862,5 @@ Steven M. Schultz for providing 2.8BSD, 
 Copyright (c) 1997-2012 Wolfram Schneider 
 URL: https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree
 
-$FreeBSD: head/share/misc/bsd-family-tree 349295 2019-06-22 22:43:40Z sevan $
-$NetBSD: bsd-family-tree,v 1.75 2019/06/22 22:47:01 sevan Exp $
+$FreeBSD: head/share/misc/bsd-family-tree 355063 2019-11-24 19:16:57Z eadler $
+$NetBSD: bsd-family-tree,v 1.75.2.1 2019/12/24 17:39:23 martin Exp $



CVS commit: [netbsd-9] src/usr.bin/calendar/calendars

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:37:24 UTC 2019

Modified Files:
src/usr.bin/calendar/calendars [netbsd-9]: calendar.christian
calendar.holiday calendar.judaic calendar.usholiday

Log Message:
Pull up following revision(s) (requested by sevan in ticket #577):

usr.bin/calendar/calendars/calendar.holiday: revision 1.30
usr.bin/calendar/calendars/calendar.christian: revision 1.8
usr.bin/calendar/calendars/calendar.usholiday: revision 1.10
usr.bin/calendar/calendars/calendar.judaic: revision 1.8
usr.bin/calendar/calendars/calendar.judaic: revision 1.9

Update to 2020 dates. While here:
- Add regional holidays: Sigd (Beta Israel), Mimouna (Morrocan).
- Transliterate some things in an Israeli Hebrew accent (Succos -> Sukkot,
  Atzeres -> Atzeret)

Avoid the risk of being wrong and don't expand meaning of holiday.

update calendar files with all dates in 2020 as next release is expect
late 2019


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.4.1 \
src/usr.bin/calendar/calendars/calendar.christian \
src/usr.bin/calendar/calendars/calendar.judaic
cvs rdiff -u -r1.29 -r1.29.4.1 \
src/usr.bin/calendar/calendars/calendar.holiday
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 \
src/usr.bin/calendar/calendars/calendar.usholiday

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



CVS commit: [netbsd-9] src/usr.bin/calendar/calendars

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:37:24 UTC 2019

Modified Files:
src/usr.bin/calendar/calendars [netbsd-9]: calendar.christian
calendar.holiday calendar.judaic calendar.usholiday

Log Message:
Pull up following revision(s) (requested by sevan in ticket #577):

usr.bin/calendar/calendars/calendar.holiday: revision 1.30
usr.bin/calendar/calendars/calendar.christian: revision 1.8
usr.bin/calendar/calendars/calendar.usholiday: revision 1.10
usr.bin/calendar/calendars/calendar.judaic: revision 1.8
usr.bin/calendar/calendars/calendar.judaic: revision 1.9

Update to 2020 dates. While here:
- Add regional holidays: Sigd (Beta Israel), Mimouna (Morrocan).
- Transliterate some things in an Israeli Hebrew accent (Succos -> Sukkot,
  Atzeres -> Atzeret)

Avoid the risk of being wrong and don't expand meaning of holiday.

update calendar files with all dates in 2020 as next release is expect
late 2019


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.4.1 \
src/usr.bin/calendar/calendars/calendar.christian \
src/usr.bin/calendar/calendars/calendar.judaic
cvs rdiff -u -r1.29 -r1.29.4.1 \
src/usr.bin/calendar/calendars/calendar.holiday
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 \
src/usr.bin/calendar/calendars/calendar.usholiday

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/calendar/calendars/calendar.christian
diff -u src/usr.bin/calendar/calendars/calendar.christian:1.7 src/usr.bin/calendar/calendars/calendar.christian:1.7.4.1
--- src/usr.bin/calendar/calendars/calendar.christian:1.7	Sat Jun  2 05:55:47 2018
+++ src/usr.bin/calendar/calendars/calendar.christian	Tue Dec 24 17:37:24 2019
@@ -1,17 +1,17 @@
 01/06*	Epiphany
-03/05*	Shrove Tuesday / Mardi Gras (day before Ash Wednesday)
-03/06*	Ash Wednesday (First day of Lent)
-04/14*	Palm Sunday (7 days before Easter)
-04/17*	Maundy Thursday (3 days before Easter)
-04/18*	Good Friday (2 days before Easter)
-04/20*	Easter Sunday
-05/26*	Rogation Sunday
-05/30*	Ascension Day (10 days before Pentecost)
-06/09*	Pentecost (Whitsunday)
-06/10*	Whitmonday
-06/16*	Trinity Sunday (7 days after Pentecost)
-06/20*	Corpus Christi (11 days after Pentecost)
+02/25*	Shrove Tuesday / Mardi Gras (day before Ash Wednesday)
+02/26*	Ash Wednesday (First day of Lent)
+04/05*	Palm Sunday (7 days before Easter)
+04/09*	Maundy Thursday (3 days before Easter)
+04/10*	Good Friday (2 days before Easter)
+04/12*	Easter Sunday
+05/17*	Rogation Sunday
+05/21*	Ascension Day (10 days before Pentecost)
+05/31*	Pentecost (Whitsunday)
+06/01*	Whitmonday
+06/07*	Trinity Sunday (7 days after Pentecost)
+06/11*	Corpus Christi (11 days after Pentecost)
 10/18	Feast Day of St. Luke
-12/02*	First Sunday of Advent (4th Sunday before Christmas)
+11/29*	First Sunday of Advent (4th Sunday before Christmas)
 12/06	St. Nicholas' Day
 12/25	Feast of the Nativity (Christmas)
Index: src/usr.bin/calendar/calendars/calendar.judaic
diff -u src/usr.bin/calendar/calendars/calendar.judaic:1.7 src/usr.bin/calendar/calendars/calendar.judaic:1.7.4.1
--- src/usr.bin/calendar/calendars/calendar.judaic:1.7	Sat Jun  2 05:55:47 2018
+++ src/usr.bin/calendar/calendars/calendar.judaic	Tue Dec 24 17:37:24 2019
@@ -1,27 +1,29 @@
 01/21*  Tu B'Shvat (Feast of Trees)
-03/19*	Fast of Esther (Battle of Purim; 1 day before Purim; fast day)
-03/20*	Purim (Feast of Lots; 30 days before Pesach)
-04/19*	Pesach (First Day of Passover; sabbatical)
-04/20*	Pesach (sabbatical)
-04/21*	Pesach (sabbatical)
-04/26*	Pesach (Last Day of Passover; 8th day of Pesach; sabbatical)
-05/09*	Yom HaAtzma'ut (Israel Independence Day)
-05/23*	Lag B'Omer (Commemoration of the Great Rebellion)
-06/01*	Yom Yerushalayim (Reunification of Jerusalem)
-06/08*	Shavuot (Festival of Weeks; 50 days after Pesach; sabbatical)
-07/20*	Fast of Shiv'a Asar B'Tammuz (Tzom Tammuz) (Romans breach Wall of Jerusalem;
+03/09*	Fast of Esther (Battle of Purim; 1 day before Purim; fast day)
+03/10*	Purim (Feast of Lots; 30 days before Pesach)
+04/09*	Pesach (First Day of Passover; sabbatical)
+04/10*	Pesach (sabbatical)
+04/11*	Pesach (sabbatical)
+04/16*	Pesach (Last Day of Passover; 8th day of Pesach; sabbatical)
+04/17*	Mimouna (Morrocan Jewish Celebration of End of Pesach)
+04/09*	Yom HaAtzma'ut (Israel Independence Day)
+05/12*	Lag B'Omer (Commemoration of the Great Rebellion)
+05/22*	Yom Yerushalayim (Reunification of Jerusalem)
+05/29*	Shavuot (Festival of Weeks; 50 days after Pesach; sabbatical)
+07/09*	Fast of Shiv'a Asar B'Tammuz (Tzom Tammuz) (Romans breach Wall of Jerusalem;
 	fast day)
-07/21*	Fast of Tish'a B'Av (Babylon/Rome destroys Holy Temple; fast day)
-09/09*	First Day of Rosh Hashanah (Jewish Lunar New Year; 5778 == 2017;
+07/30*	Fast of Tish'a B'Av (Babylon/Rome destroys Holy Temple; fast day)
+09/19*	First Day of Rosh Hashanah (Jewish Lunar New Year; 

CVS commit: [netbsd-9] src/sys/dev/ic

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:34:33 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-9]: ahcisata_core.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #576):

sys/dev/ic/ahcisata_core.c: revision 1.79

When resetting a drive, if the command list is running and CLO is not
supported, attempt to stop the drive first and fail gracefully if that
fails instead of triggering a KASSERT on DIAGNOSTIC kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.75.4.1 -r1.75.4.2 src/sys/dev/ic/ahcisata_core.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/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.75.4.1 src/sys/dev/ic/ahcisata_core.c:1.75.4.2
--- src/sys/dev/ic/ahcisata_core.c:1.75.4.1	Wed Oct 23 18:06:46 2019
+++ src/sys/dev/ic/ahcisata_core.c	Tue Dec 24 17:34:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_core.c,v 1.75.4.1 2019/10/23 18:06:46 martin Exp $	*/
+/*	$NetBSD: ahcisata_core.c,v 1.75.4.2 2019/12/24 17:34:33 martin Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.75.4.1 2019/10/23 18:06:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.75.4.2 2019/12/24 17:34:33 martin Exp $");
 
 #include 
 #include 
@@ -807,7 +807,7 @@ ahci_do_reset_drive(struct ata_channel *
 	struct ahci_cmd_tbl *cmd_tbl;
 	struct ahci_cmd_header *cmd_h;
 	int i, error = 0;
-	uint32_t sig;
+	uint32_t sig, cmd;
 	int noclo_retry = 0;
 
 	ata_channel_lock_owned(chp);
@@ -825,6 +825,19 @@ again:
 		ahci_channel_start(sc, chp, flags, 1);
 	} else {
 		/* Can't handle command still running without CLO */
+		cmd = AHCI_READ(sc, AHCI_P_CMD(chp->ch_channel));
+		if ((cmd & AHCI_P_CMD_CR) != 0) {
+			ahci_channel_stop(sc, chp, flags);
+			cmd = AHCI_READ(sc, AHCI_P_CMD(chp->ch_channel));
+			if ((cmd & AHCI_P_CMD_CR) != 0) {
+aprint_error("%s port %d: DMA engine busy "
+"for drive %d\n", AHCINAME(sc),
+chp->ch_channel, drive);
+error = EBUSY;
+goto end;
+			}
+		}
+
 		KASSERT((AHCI_READ(sc, AHCI_P_CMD(chp->ch_channel)) & AHCI_P_CMD_CR) == 0);
 
 		ahci_channel_start(sc, chp, flags, 0);



CVS commit: [netbsd-9] src/sys/dev/ic

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:34:33 UTC 2019

Modified Files:
src/sys/dev/ic [netbsd-9]: ahcisata_core.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #576):

sys/dev/ic/ahcisata_core.c: revision 1.79

When resetting a drive, if the command list is running and CLO is not
supported, attempt to stop the drive first and fail gracefully if that
fails instead of triggering a KASSERT on DIAGNOSTIC kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.75.4.1 -r1.75.4.2 src/sys/dev/ic/ahcisata_core.c

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



CVS commit: [netbsd-9] src/share/mk

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:32:21 UTC 2019

Modified Files:
src/share/mk [netbsd-9]: bsd.sys.mk sys.mk

Log Message:
Pull up following revision(s) (requested by christos in ticket #575):

share/mk/bsd.sys.mk: revision 1.298
share/mk/sys.mk: revision 1.140

move MV to sys.mk because it is used there. Pointed out by joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.292.2.1 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.139 -r1.139.2.1 src/share/mk/sys.mk

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

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.292 src/share/mk/bsd.sys.mk:1.292.2.1
--- src/share/mk/bsd.sys.mk:1.292	Wed May 22 08:31:25 2019
+++ src/share/mk/bsd.sys.mk	Tue Dec 24 17:32:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.292 2019/05/22 08:31:25 kamil Exp $
+#	$NetBSD: bsd.sys.mk,v 1.292.2.1 2019/12/24 17:32:20 martin Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -264,7 +264,6 @@ OBJCOPY?=	objcopy
 OBJDUMP?=	objdump
 PAXCTL?=	paxctl
 STRIP?=		strip
-MV?=		mv -f
 
 .SUFFIXES:	.o .ln .lo .c .cc .cpp .cxx .C .m ${YHEADER:D.h}
 

Index: src/share/mk/sys.mk
diff -u src/share/mk/sys.mk:1.139 src/share/mk/sys.mk:1.139.2.1
--- src/share/mk/sys.mk:1.139	Sun Apr  7 19:32:24 2019
+++ src/share/mk/sys.mk	Tue Dec 24 17:32:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: sys.mk,v 1.139 2019/04/07 19:32:24 christos Exp $
+#	$NetBSD: sys.mk,v 1.139.2.1 2019/12/24 17:32:20 martin Exp $
 #	@(#)sys.mk	8.2 (Berkeley) 3/21/94
 #
 # This file contains the basic rules for make(1) and is read first
@@ -14,6 +14,7 @@ unix?=		We run NetBSD.
 AR?=		ar
 ARFLAGS?=	rl
 RANLIB?=	ranlib
+MV?=		mv -f
 
 AS?=		as
 AFLAGS?=



CVS commit: [netbsd-9] src/share/mk

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:32:21 UTC 2019

Modified Files:
src/share/mk [netbsd-9]: bsd.sys.mk sys.mk

Log Message:
Pull up following revision(s) (requested by christos in ticket #575):

share/mk/bsd.sys.mk: revision 1.298
share/mk/sys.mk: revision 1.140

move MV to sys.mk because it is used there. Pointed out by joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.292.2.1 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.139 -r1.139.2.1 src/share/mk/sys.mk

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



CVS commit: [netbsd-9] src/sys/arch/aarch64

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:30:28 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64 [netbsd-9]: cpuswitch.S
src/sys/arch/aarch64/include [netbsd-9]: asm.h

Log Message:
Pull up following revision(s) (requested by ryo in ticket #574):

sys/arch/aarch64/include/asm.h: revision 1.5
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.13

Add a speculation barrier after the 'eret'.

Some aarch64 cpus speculatively execute instructions after 'eret',
and this potentiates side-channel attack.

from
 
https://github.com/torvalds/linux/commit/679db70801da9fda91d26caf13bf5b5ccc74e8e8


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/arch/aarch64/aarch64/cpuswitch.S
cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/arch/aarch64/include/asm.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/aarch64/aarch64/cpuswitch.S
diff -u src/sys/arch/aarch64/aarch64/cpuswitch.S:1.11 src/sys/arch/aarch64/aarch64/cpuswitch.S:1.11.4.1
--- src/sys/arch/aarch64/aarch64/cpuswitch.S:1.11	Thu Dec 27 09:55:27 2018
+++ src/sys/arch/aarch64/aarch64/cpuswitch.S	Tue Dec 24 17:30:28 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuswitch.S,v 1.11 2018/12/27 09:55:27 mrg Exp $ */
+/* $NetBSD: cpuswitch.S,v 1.11.4.1 2019/12/24 17:30:28 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 #include "opt_ddb.h"
 #include "opt_kasan.h"
 
-RCSID("$NetBSD: cpuswitch.S,v 1.11 2018/12/27 09:55:27 mrg Exp $")
+RCSID("$NetBSD: cpuswitch.S,v 1.11.4.1 2019/12/24 17:30:28 martin Exp $")
 
 /*
  * At IPL_SCHED:
@@ -268,7 +268,7 @@ ENTRY_NP(el1_trap_exit)
 	ldp	x1, x2, [x0, #TF_X1]
 	ldr	x0, [x0, #TF_X0]
 
-	eret
+	ERET
 END(el1_trap_exit)
 #ifdef DDB
 END(el1_trap)
@@ -339,7 +339,7 @@ ENTRY_NP(el0_trap_exit)
 	unwind_x0_x2
 
 	/* leave sp at l_md.md_utf, return back to EL0 user process */
-	eret
+	ERET
 END(el0_trap_exit)
 #ifdef DDB
 END(el0_trap)

Index: src/sys/arch/aarch64/include/asm.h
diff -u src/sys/arch/aarch64/include/asm.h:1.3 src/sys/arch/aarch64/include/asm.h:1.3.4.1
--- src/sys/arch/aarch64/include/asm.h:1.3	Tue Jul 17 18:08:37 2018
+++ src/sys/arch/aarch64/include/asm.h	Tue Dec 24 17:30:28 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.3 2018/07/17 18:08:37 christos Exp $ */
+/* $NetBSD: asm.h,v 1.3.4.1 2019/12/24 17:30:28 martin Exp $ */
 
 #ifndef _AARCH64_ASM_H_
 #define _AARCH64_ASM_H_
@@ -8,4 +8,12 @@
 #define	fp	x29
 #define	lr	x30
 
+/*
+ * Add a speculation barrier after the 'eret'.
+ * Some aarch64 cpus speculatively execute instructions after 'eret',
+ * and this potentiates side-channel attacks.
+ */
+#define	ERET	\
+	eret; dsb sy; isb
+
 #endif /* !_AARCH64_ASM_H_ */



CVS commit: [netbsd-9] src/sys/arch/aarch64

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:30:28 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64 [netbsd-9]: cpuswitch.S
src/sys/arch/aarch64/include [netbsd-9]: asm.h

Log Message:
Pull up following revision(s) (requested by ryo in ticket #574):

sys/arch/aarch64/include/asm.h: revision 1.5
sys/arch/aarch64/aarch64/cpuswitch.S: revision 1.13

Add a speculation barrier after the 'eret'.

Some aarch64 cpus speculatively execute instructions after 'eret',
and this potentiates side-channel attack.

from
 
https://github.com/torvalds/linux/commit/679db70801da9fda91d26caf13bf5b5ccc74e8e8


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/arch/aarch64/aarch64/cpuswitch.S
cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/arch/aarch64/include/asm.h

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



CVS commit: [netbsd-8] src/doc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:16:23 UTC 2019

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

Log Message:
Ticket #1476


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-8.2

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.2
diff -u src/doc/CHANGES-8.2:1.1.2.82 src/doc/CHANGES-8.2:1.1.2.83
--- src/doc/CHANGES-8.2:1.1.2.82	Tue Dec 17 16:20:28 2019
+++ src/doc/CHANGES-8.2	Tue Dec 24 17:16:23 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.82 2019/12/17 16:20:28 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.83 2019/12/24 17:16:23 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1813,3 +1813,8 @@ sys/dev/ic/ath.c1.129
 	Protect network ioctls from non-authorized users.
 	[christos, ticket #1475]
 
+sys/miscfs/nullfs/null_vfsops.c			1.96
+
+	Fix MPSAFE flag for the root vnode.
+	[hannken, ticket #1476]
+



CVS commit: [netbsd-8] src/doc

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:16:23 UTC 2019

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

Log Message:
Ticket #1476


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/sys/miscfs/nullfs

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:15:48 UTC 2019

Modified Files:
src/sys/miscfs/nullfs [netbsd-8]: null_vfsops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1476):

sys/miscfs/nullfs/null_vfsops.c: revision 1.96

Set IMNT_MPSAFE before creating the vnode for the root of the
filesystem. Otherwise, it won't be created with VV_MPSAFE and require
the kernel_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.94.4.1 src/sys/miscfs/nullfs/null_vfsops.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/miscfs/nullfs/null_vfsops.c
diff -u src/sys/miscfs/nullfs/null_vfsops.c:1.94 src/sys/miscfs/nullfs/null_vfsops.c:1.94.4.1
--- src/sys/miscfs/nullfs/null_vfsops.c:1.94	Tue Apr 11 07:51:37 2017
+++ src/sys/miscfs/nullfs/null_vfsops.c	Tue Dec 24 17:15:47 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: null_vfsops.c,v 1.94 2017/04/11 07:51:37 hannken Exp $	*/
+/*	$NetBSD: null_vfsops.c,v 1.94.4.1 2019/12/24 17:15:47 martin Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics & Space Administration
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.94 2017/04/11 07:51:37 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.94.4.1 2019/12/24 17:15:47 martin Exp $");
 
 #include 
 #include 
@@ -140,6 +140,7 @@ nullfs_mount(struct mount *mp, const cha
 	/* Create the mount point. */
 	nmp = kmem_zalloc(sizeof(struct null_mount), KM_SLEEP);
 	mp->mnt_data = nmp;
+	mp->mnt_iflag |= IMNT_MPSAFE;
 
 	/*
 	 * Make sure that the mount point is sufficiently initialized
@@ -167,7 +168,6 @@ nullfs_mount(struct mount *mp, const cha
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	nmp->nullm_rootvp = vp;
-	mp->mnt_iflag |= IMNT_MPSAFE;
 	VOP_UNLOCK(vp);
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->la.target,



CVS commit: [netbsd-8] src/sys/miscfs/nullfs

2019-12-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec 24 17:15:48 UTC 2019

Modified Files:
src/sys/miscfs/nullfs [netbsd-8]: null_vfsops.c

Log Message:
Pull up following revision(s) (requested by hannken in ticket #1476):

sys/miscfs/nullfs/null_vfsops.c: revision 1.96

Set IMNT_MPSAFE before creating the vnode for the root of the
filesystem. Otherwise, it won't be created with VV_MPSAFE and require
the kernel_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.94.4.1 src/sys/miscfs/nullfs/null_vfsops.c

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



Re: CVS commit: src/share/tmac

2019-12-24 Thread Valery Ushakov
On Tue, Dec 24, 2019 at 16:13:56 -, Christos Zoulas wrote:

> In article <20191224113037.gl24...@pony.stderr.spb.ru>,
> Valery Ushakov   wrote:
> >On Tue, Dec 24, 2019 at 08:46:49 +0700, Robert Elz wrote:
> >
> >>   |  |but since we run with -ww we
> >>   |  |get the warning about an unbalanced .el
> >> 
> >> That's a broken warning.
> >
> >Amen.  But let's be honest, in this day and age *very* few people can
> >can read troff, never mind write it (and I don't count myself as one),
> >so a warning from groff, however broken, will just confuse and upset
> >the users.  Since silencing this warning doesn't require that much of
> >an effort and doesn't mutilate the code that much, it's easier to just
> >shut it up.
> 
> We should file a bug report with groff though (and optionally supply a fix).

We are sticking to groff 1.19 that is still GPLv2+.  1.20 (released 11
years ago) switched to GPLv3+.  Current version is 1.22.4.  It would
make sense to switch to heirloom doctools (CDDL), but the general
sentiment seems to be that we don't want to have troff in base as it's
not cool, nobody knows how to use it and we don't use it for manpages
anymore anyway. :(

For the in-tree stuff we only use troff for isntall notes and for
(very very old and often out of date) documents in /usr/share/doc

-uwe


Re: CVS commit: src/share/tmac

2019-12-24 Thread Christos Zoulas
In article <20191224113037.gl24...@pony.stderr.spb.ru>,
Valery Ushakov   wrote:
>On Tue, Dec 24, 2019 at 08:46:49 +0700, Robert Elz wrote:
>
>> Date:Mon, 23 Dec 2019 23:45:34 +0100
>> From:Steffen Nurpmeso 
>> Message-ID:  <20191223224534.8ufgy%stef...@sdaoden.eu>
>> 
>> 
>>   |  |Troff reads .ie and checks the condition.  The condition is true and
>>   |  |so the rest of the line is executed.  Then troff reads .el that
>>   |  |matches successful .ie, so the .el is discarded.
>>   |  |
>>   |  |Then it reads .el which is not matched with any .ie that troff has
>>   |  |seen.  It's usually silently discarded,
>> 
>> That is what is (always was) intended to happen.
>
>Sure.
>
>
>>   |  |but since we run with -ww we
>>   |  |get the warning about an unbalanced .el
>> 
>> That's a broken warning.
>
>Amen.  But let's be honest, in this day and age *very* few people can
>can read troff, never mind write it (and I don't count myself as one),
>so a warning from groff, however broken, will just confuse and upset
>the users.  Since silencing this warning doesn't require that much of
>an effort and doesn't mutilate the code that much, it's easier to just
>shut it up.

We should file a bug report with groff though (and optionally supply a fix).

christos



CVS commit: src/sys/sys

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 15:20:34 UTC 2019

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

Log Message:
Welcome to NetBSD 9.99.30!

Addition of PT_LWPSTATUS, PT_LWPNEXT with compat32 and core(5) support.


To generate a diff of this commit:
cvs rdiff -u -r1.630 -r1.631 src/sys/sys/param.h

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



CVS commit: src/sys/sys

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 15:20:34 UTC 2019

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

Log Message:
Welcome to NetBSD 9.99.30!

Addition of PT_LWPSTATUS, PT_LWPNEXT with compat32 and core(5) support.


To generate a diff of this commit:
cvs rdiff -u -r1.630 -r1.631 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.630 src/sys/sys/param.h:1.631
--- src/sys/sys/param.h:1.630	Sun Dec 22 22:24:37 2019
+++ src/sys/sys/param.h	Tue Dec 24 15:20:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.630 2019/12/22 22:24:37 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.631 2019/12/24 15:20:34 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999002900	/* NetBSD 9.99.29 */
+#define	__NetBSD_Version__	999003000	/* NetBSD 9.99.30 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 14:51:00 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c
src/sys/arch/alpha/include: ptrace.h
src/sys/arch/hppa/include: ptrace.h
src/sys/arch/powerpc/include: ptrace.h
src/sys/arch/sh3/include: ptrace.h
src/sys/arch/sparc/include: ptrace.h
src/sys/compat/netbsd32: netbsd32.h netbsd32_ptrace.c
src/sys/kern: core_elf32.c sys_ptrace.c sys_ptrace_common.c
src/sys/sys: ptrace.h
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFO

PT_LWPINFO is a legacy ptrace(2) operation that was originally intended
to retrieve the thread (LWP) information inside a traced process.

It has a number of flaws and is confused with PT_LWPINFO from FreeBSD.

PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename,
removal of pl_event) and introduces new features: signal context
(pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address
(pl_private). The private pointer was so far missing information for
a debugger.

PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific
information, so far missed in the core(5) files.

PT_LWPSTATUS retrieves LWP information for the prompted thread.
PT_LWPNEXT retrieves LWP information for the next thread, borrowing the
semantics from NetBSD specific PT_LWPINFO.

PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for
the foreseeable future, without plans of removing it.

Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT.

Keep ATF tests for PT_LWPINFO.

Switch GDB to new API.

Proposed on tech-kern@.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/include/ptrace.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/ptrace.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/ptrace.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sh3/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc/include/ptrace.h
cvs rdiff -u -r1.131 -r1.132 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/netbsd32/netbsd32_ptrace.c
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/sys_ptrace.c
cvs rdiff -u -r1.73 -r1.74 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.67 -r1.68 src/sys/sys/ptrace.h
cvs rdiff -u -r1.142 -r1.143 src/tests/lib/libc/sys/t_ptrace_wait.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/gpl3/gdb/dist/gdb/nbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.13 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.14
--- src/external/gpl3/gdb/dist/gdb/nbsd-nat.c:1.13	Sun Jul 14 18:50:58 2019
+++ src/external/gpl3/gdb/dist/gdb/nbsd-nat.c	Tue Dec 24 14:51:00 2019
@@ -145,10 +145,10 @@ nbsd_nat_target::thread_alive (ptid_t pt
 {
   if (ptid.lwp_p ())
 {
-  struct ptrace_lwpinfo pl;
+  struct ptrace_lwpstatus pl;
 
   pl.pl_lwpid = ptid.lwp ();
-  if (ptrace (PT_LWPINFO, ptid.pid (), (caddr_t) , sizeof pl)
+  if (ptrace (PT_LWPSTATUS, ptid.pid (), (caddr_t) , sizeof pl)
 	  == -1)
 	return 0;
 }
@@ -255,10 +255,10 @@ static void
 nbsd_add_threads (pid_t pid)
 {
   int val;
-  struct ptrace_lwpinfo pl;
+  struct ptrace_lwpstatus pl;
 
   pl.pl_lwpid = 0;
-  while ((val = ptrace (PT_LWPINFO, pid, (void *), sizeof(pl))) != -1
+  while ((val = ptrace (PT_LWPNEXT, pid, (void *), sizeof(pl))) != -1
 && pl.pl_lwpid != 0)
 {
   ptid_t ptid = ptid_t (pid, pl.pl_lwpid, 0);

Index: src/sys/arch/alpha/include/ptrace.h
diff -u src/sys/arch/alpha/include/ptrace.h:1.10 src/sys/arch/alpha/include/ptrace.h:1.11
--- src/sys/arch/alpha/include/ptrace.h:1.10	Tue Jun 18 21:18:11 2019
+++ src/sys/arch/alpha/include/ptrace.h	Tue Dec 24 14:50:59 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ptrace.h,v 1.10 2019/06/18 21:18:11 kamil Exp $ */
+/* $NetBSD: ptrace.h,v 1.11 2019/12/24 14:50:59 kamil Exp $ */
 
 /*
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -56,3 +56,7 @@
 #define PTRACE_BREAKPOINT	((const uint8_t[]) { 0x80, 0x00, 0x00, 0x00 })
 #define PTRACE_BREAKPOINT_ASM	__asm __volatile("bpt" ::: "memory")
 #define PTRACE_BREAKPOINT_SIZE	4
+
+#ifdef _KERNEL
+#define PTRACE_LWP_GETPRIVATE(l) ((struct pcb *)lwp_getpcb(l))->pcb_hw.apcb_unique
+#endif

Index: src/sys/arch/hppa/include/ptrace.h
diff -u src/sys/arch/hppa/include/ptrace.h:1.9 src/sys/arch/hppa/include/ptrace.h:1.10
--- src/sys/arch/hppa/include/ptrace.h:1.9	Tue Jun 18 21:18:12 2019
+++ src/sys/arch/hppa/include/ptrace.h	Tue Dec 24 14:50:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptrace.h,v 1.9 2019/06/18 21:18:12 kamil Exp $	*/
+/*	$NetBSD: ptrace.h,v 1.10 2019/12/24 14:50:59 kamil Exp $	*/
 
 /*	$OpenBSD: ptrace.h,v 1.2 1998/12/01 03:05:44 mickey Exp $	*/
 
@@ -61,3 +61,7 @@
 #define 

CVS commit: src

2019-12-24 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec 24 14:51:00 UTC 2019

Modified Files:
src/external/gpl3/gdb/dist/gdb: nbsd-nat.c
src/sys/arch/alpha/include: ptrace.h
src/sys/arch/hppa/include: ptrace.h
src/sys/arch/powerpc/include: ptrace.h
src/sys/arch/sh3/include: ptrace.h
src/sys/arch/sparc/include: ptrace.h
src/sys/compat/netbsd32: netbsd32.h netbsd32_ptrace.c
src/sys/kern: core_elf32.c sys_ptrace.c sys_ptrace_common.c
src/sys/sys: ptrace.h
src/tests/lib/libc/sys: t_ptrace_wait.c

Log Message:
Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFO

PT_LWPINFO is a legacy ptrace(2) operation that was originally intended
to retrieve the thread (LWP) information inside a traced process.

It has a number of flaws and is confused with PT_LWPINFO from FreeBSD.

PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename,
removal of pl_event) and introduces new features: signal context
(pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address
(pl_private). The private pointer was so far missing information for
a debugger.

PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific
information, so far missed in the core(5) files.

PT_LWPSTATUS retrieves LWP information for the prompted thread.
PT_LWPNEXT retrieves LWP information for the next thread, borrowing the
semantics from NetBSD specific PT_LWPINFO.

PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for
the foreseeable future, without plans of removing it.

Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT.

Keep ATF tests for PT_LWPINFO.

Switch GDB to new API.

Proposed on tech-kern@.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/dist/gdb/nbsd-nat.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/alpha/include/ptrace.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/ptrace.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/ptrace.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sh3/include/ptrace.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc/include/ptrace.h
cvs rdiff -u -r1.131 -r1.132 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/netbsd32/netbsd32_ptrace.c
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/core_elf32.c
cvs rdiff -u -r1.5 -r1.6 src/sys/kern/sys_ptrace.c
cvs rdiff -u -r1.73 -r1.74 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.67 -r1.68 src/sys/sys/ptrace.h
cvs rdiff -u -r1.142 -r1.143 src/tests/lib/libc/sys/t_ptrace_wait.c

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



Re: CVS commit: src/sys/arch/amd64

2019-12-24 Thread Emmanuel Dreyfus
On Tue, Dec 24, 2019 at 05:50:00PM +0900, Ryo ONODERA wrote:
> After this change, amd64 kernel does not boot on my HP Spectre x360
> 13-inch ae019TU laptop with pure UEFI boot mode.

Hello

Does the attached patch (crafted for port-amd64/54775) fix the
problem?

-- 
Emmanuel Dreyfus
m...@netbsd.org
Index: sys/arch/amd64/amd64/locore.S
===
RCS file: /cvsroot/src/sys/arch/amd64/amd64/locore.S,v
retrieving revision 1.195
diff -U4 -r1.195 locore.S
--- sys/arch/amd64/amd64/locore.S   15 Dec 2019 02:58:21 -  1.195
+++ sys/arch/amd64/amd64/locore.S   22 Dec 2019 02:23:11 -
@@ -432,10 +432,10 @@
.space  512
 tmpstk:
 
 .section multiboot,"a"
-#if defined(MULTIBOOT)
.align  8
+#if defined(MULTIBOOT)
.globl  Multiboot2_Header
 _C_LABEL(Multiboot2_Header):
.intMULTIBOOT2_HEADER_MAGIC
.intMULTIBOOT2_ARCHITECTURE_I386
@@ -473,8 +473,11 @@
.int8   /* sizeof(struct multiboot_tag) */
.align  8
.globl  Multiboot2_Header_end
 _C_LABEL(Multiboot2_Header_end):
+#else /* MULTIBOOT */
+   .int0xdeadbeef  /* have some non empty content */
+   .align  8
 #endif /* MULTIBOOT */
 
 /*
  * Some hackage to deal with 64bit symbols in 32 bit mode.


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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 14:10:51 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835reg.h bcm283x_platform.c
bcm283x_platform.h

Log Message:
We follow linux mainline and they're using 2711 and not 2838 for RPI4


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/broadcom/bcm2835reg.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/broadcom/bcm283x_platform.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm283x_platform.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/broadcom/bcm2835reg.h
diff -u src/sys/arch/arm/broadcom/bcm2835reg.h:1.25 src/sys/arch/arm/broadcom/bcm2835reg.h:1.26
--- src/sys/arch/arm/broadcom/bcm2835reg.h:1.25	Wed Sep 25 18:05:39 2019
+++ src/sys/arch/arm/broadcom/bcm2835reg.h	Tue Dec 24 14:10:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835reg.h,v 1.25 2019/09/25 18:05:39 skrll Exp $	*/
+/*	$NetBSD: bcm2835reg.h,v 1.26 2019/12/24 14:10:51 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -44,16 +44,16 @@
 #error Must define SOC_BCM2835 or SOC_BCM2836, and not both
 #endif
 
-#define	BCM2838_PERIPHERALS_BASE	0xfe00
+#define	BCM2711_PERIPHERALS_BASE	0xfe00
 #define	BCM2836_PERIPHERALS_BASE	0x3f00
 #define	BCM2835_PERIPHERALS_BASE	0x2000
 #define	BCM283X_PERIPHERALS_SIZE	0x0100	/* 16MBytes */
 #define	BCM283X_PERIPHERALS_BASE_BUS	0x7e00
 
-#define	BCM2838_PERIPHERALS_PHYS_TO_BUS(a) \
-((a) - BCM2838_PERIPHERALS_BASE + BCM283X_PERIPHERALS_BASE_BUS)
-#define	BCM2838_PERIPHERALS_BUS_TO_PHYS(a) \
-((a) - BCM283X_PERIPHERALS_BASE_BUS + BCM2838_PERIPHERALS_BASE)
+#define	BCM2711_PERIPHERALS_PHYS_TO_BUS(a) \
+((a) - BCM2711_PERIPHERALS_BASE + BCM283X_PERIPHERALS_BASE_BUS)
+#define	BCM2711_PERIPHERALS_BUS_TO_PHYS(a) \
+((a) - BCM283X_PERIPHERALS_BASE_BUS + BCM2711_PERIPHERALS_BASE)
 
 #define	BCM2836_PERIPHERALS_PHYS_TO_BUS(a) \
 ((a) - BCM2836_PERIPHERALS_BASE + BCM283X_PERIPHERALS_BASE_BUS)
@@ -212,8 +212,8 @@
 
 #define	BCM2835_UART0_CLK		300
 
-#define	BCM2838_ARM_LOCAL_BASE		0xff80
-#define	BCM2838_ARM_LOCAL_SIZE		0x0010	/* 1MByte */
+#define	BCM2711_ARM_LOCAL_BASE		0xff80
+#define	BCM2711_ARM_LOCAL_SIZE		0x0010	/* 1MByte */
 
 #define	BCM2836_ARM_LOCAL_BASE		0x4000
 #define	BCM2836_ARM_LOCAL_SIZE		0x1000	/* 4KBytes */

Index: src/sys/arch/arm/broadcom/bcm283x_platform.c
diff -u src/sys/arch/arm/broadcom/bcm283x_platform.c:1.27 src/sys/arch/arm/broadcom/bcm283x_platform.c:1.28
--- src/sys/arch/arm/broadcom/bcm283x_platform.c:1.27	Sun Dec 22 12:21:45 2019
+++ src/sys/arch/arm/broadcom/bcm283x_platform.c	Tue Dec 24 14:10:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm283x_platform.c,v 1.27 2019/12/22 12:21:45 skrll Exp $	*/
+/*	$NetBSD: bcm283x_platform.c,v 1.28 2019/12/24 14:10:51 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.27 2019/12/22 12:21:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.28 2019/12/24 14:10:51 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bcm283x.h"
@@ -113,7 +113,7 @@ __KERNEL_RCSID(0, "$NetBSD: bcm283x_plat
 void bcm2835_platform_early_putchar(char c);
 void bcm2836_platform_early_putchar(char c);
 void bcm2837_platform_early_putchar(char c);
-void bcm2838_platform_early_putchar(char c);
+void bcm2711_platform_early_putchar(char c);
 
 extern void bcmgenfb_set_console_dev(device_t dev);
 void bcmgenfb_set_ioctl(int(*)(void *, void *, u_long, void *, int, struct lwp *));
@@ -130,19 +130,19 @@ bs_protos(bcm2835);
 bs_protos(bcm2835_a4x);
 bs_protos(bcm2836);
 bs_protos(bcm2836_a4x);
-bs_protos(bcm2838);
-bs_protos(bcm2838_a4x);
+bs_protos(bcm2711);
+bs_protos(bcm2711_a4x);
 
 struct bus_space bcm2835_bs_tag;
 struct bus_space bcm2835_a4x_bs_tag;
 struct bus_space bcm2836_bs_tag;
 struct bus_space bcm2836_a4x_bs_tag;
-struct bus_space bcm2838_bs_tag;
-struct bus_space bcm2838_a4x_bs_tag;
+struct bus_space bcm2711_bs_tag;
+struct bus_space bcm2711_a4x_bs_tag;
 
 static paddr_t bcm2835_bus_to_phys(bus_addr_t);
 static paddr_t bcm2836_bus_to_phys(bus_addr_t);
-static paddr_t bcm2838_bus_to_phys(bus_addr_t);
+static paddr_t bcm2711_bus_to_phys(bus_addr_t);
 
 #ifdef VERBOSE_INIT_ARM
 #define VPRINTF(...)	printf(__VA_ARGS__)
@@ -179,16 +179,16 @@ bcm2836_bus_to_phys(bus_addr_t ba)
 }
 
 static paddr_t
-bcm2838_bus_to_phys(bus_addr_t ba)
+bcm2711_bus_to_phys(bus_addr_t ba)
 {
 
 	/* Attempt to find the PA device mapping */
 	if (ba >= BCM283X_PERIPHERALS_BASE_BUS &&
 	ba < BCM283X_PERIPHERALS_BASE_BUS + BCM283X_PERIPHERALS_SIZE)
-		return BCM2838_PERIPHERALS_BUS_TO_PHYS(ba);
+		return BCM2711_PERIPHERALS_BUS_TO_PHYS(ba);
 
-	if (ba >= BCM2838_ARM_LOCAL_BASE &&
-	ba < BCM2838_ARM_LOCAL_BASE + BCM2838_ARM_LOCAL_SIZE)
+	if (ba >= 

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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 14:10:51 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835reg.h bcm283x_platform.c
bcm283x_platform.h

Log Message:
We follow linux mainline and they're using 2711 and not 2838 for RPI4


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/broadcom/bcm2835reg.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/broadcom/bcm283x_platform.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/broadcom/bcm283x_platform.h

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



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 13:40:56 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_cprman.c

Log Message:
Match brcm,bcm2711-cprman


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm2835_cprman.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/broadcom/bcm2835_cprman.c
diff -u src/sys/arch/arm/broadcom/bcm2835_cprman.c:1.2 src/sys/arch/arm/broadcom/bcm2835_cprman.c:1.3
--- src/sys/arch/arm/broadcom/bcm2835_cprman.c:1.2	Sun Sep  9 07:21:17 2018
+++ src/sys/arch/arm/broadcom/bcm2835_cprman.c	Tue Dec 24 13:40:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_cprman.c,v 1.2 2018/09/09 07:21:17 aymeric Exp $ */
+/* $NetBSD: bcm2835_cprman.c,v 1.3 2019/12/24 13:40:56 skrll Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_cprman.c,v 1.2 2018/09/09 07:21:17 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_cprman.c,v 1.3 2019/12/24 13:40:56 skrll Exp $");
 
 #include 
 #include 
@@ -155,7 +155,10 @@ cprman_add_clock(struct cprman_softc *sc
 static int
 cprman_match(device_t parent, cfdata_t cf, void *aux)
 {
-	const char * const compatible[] = { "brcm,bcm2835-cprman", NULL };
+	const char * const compatible[] = {
+	"brcm,bcm2835-cprman",
+	"brcm,bcm2711-cprman",
+	NULL };
 	const struct fdt_attach_args *faa = aux;
 
 	return of_match_compatible(faa->faa_phandle, compatible);



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 13:40:56 UTC 2019

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_cprman.c

Log Message:
Match brcm,bcm2711-cprman


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm2835_cprman.c

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



Re: CVS commit: src/share/tmac

2019-12-24 Thread Valery Ushakov
On Tue, Dec 24, 2019 at 08:46:49 +0700, Robert Elz wrote:

> Date:Mon, 23 Dec 2019 23:45:34 +0100
> From:Steffen Nurpmeso 
> Message-ID:  <20191223224534.8ufgy%stef...@sdaoden.eu>
> 
> 
>   |  |Troff reads .ie and checks the condition.  The condition is true and
>   |  |so the rest of the line is executed.  Then troff reads .el that
>   |  |matches successful .ie, so the .el is discarded.
>   |  |
>   |  |Then it reads .el which is not matched with any .ie that troff has
>   |  |seen.  It's usually silently discarded,
> 
> That is what is (always was) intended to happen.

Sure.


>   |  |but since we run with -ww we
>   |  |get the warning about an unbalanced .el
> 
> That's a broken warning.

Amen.  But let's be honest, in this day and age *very* few people can
can read troff, never mind write it (and I don't count myself as one),
so a warning from groff, however broken, will just confuse and upset
the users.  Since silencing this warning doesn't require that much of
an effort and doesn't mutilate the code that much, it's easier to just
shut it up.

-uwe


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

2019-12-24 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Dec 24 10:21:08 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
Fix missing splnet() for ether_ioctl() caused by if_vmx.c:r1.32.

pointed out by nonaka@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/pci/if_vmx.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/x86/pci/if_vmx.c
diff -u src/sys/arch/x86/pci/if_vmx.c:1.52 src/sys/arch/x86/pci/if_vmx.c:1.53
--- src/sys/arch/x86/pci/if_vmx.c:1.52	Wed Nov 27 19:21:36 2019
+++ src/sys/arch/x86/pci/if_vmx.c	Tue Dec 24 10:21:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vmx.c,v 1.52 2019/11/27 19:21:36 maxv Exp $	*/
+/*	$NetBSD: if_vmx.c,v 1.53 2019/12/24 10:21:08 knakahara Exp $	*/
 /*	$OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.52 2019/11/27 19:21:36 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.53 2019/12/24 10:21:08 knakahara Exp $");
 
 #include 
 #include 
@@ -3378,7 +3378,9 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long 
 			break;
 		}
 		if (ifp->if_mtu != nmtu) {
+			s = splnet();
 			error = ether_ioctl(ifp, cmd, data);
+			splx(s);
 			if (error == ENETRESET)
 error = vmxnet3_init(ifp);
 		}



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

2019-12-24 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Tue Dec 24 10:21:08 UTC 2019

Modified Files:
src/sys/arch/x86/pci: if_vmx.c

Log Message:
Fix missing splnet() for ether_ioctl() caused by if_vmx.c:r1.32.

pointed out by nonaka@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/pci/if_vmx.c

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



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 09:13:23 UTC 2019

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

Log Message:
Traiing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/cortex/gicv3_its.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_its.c
diff -u src/sys/arch/arm/cortex/gicv3_its.c:1.22 src/sys/arch/arm/cortex/gicv3_its.c:1.23
--- src/sys/arch/arm/cortex/gicv3_its.c:1.22	Mon Dec  2 03:06:51 2019
+++ src/sys/arch/arm/cortex/gicv3_its.c	Tue Dec 24 09:13:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_its.c,v 1.22 2019/12/02 03:06:51 msaitoh Exp $ */
+/* $NetBSD: gicv3_its.c,v 1.23 2019/12/24 09:13:22 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #define _INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.22 2019/12/02 03:06:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.23 2019/12/24 09:13:22 skrll Exp $");
 
 #include 
 #include 
@@ -297,7 +297,7 @@ gicv3_its_msi_alloc_lpi(struct gicv3_its
 
 return -1;
 }
- 
+
 static void
 gicv3_its_msi_free_lpi(struct gicv3_its *its, int lpi)
 {



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 09:13:23 UTC 2019

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

Log Message:
Traiing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/cortex/gicv3_its.c

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



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 09:12:56 UTC 2019

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

Log Message:
Traiing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 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.21 src/sys/arch/arm/cortex/gicv3.c:1.22
--- src/sys/arch/arm/cortex/gicv3.c:1.21	Thu Sep  5 13:33:11 2019
+++ src/sys/arch/arm/cortex/gicv3.c	Tue Dec 24 09:12:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.21 2019/09/05 13:33:11 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.22 2019/12/24 09:12:56 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -31,7 +31,7 @@
 #define	_INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.21 2019/09/05 13:33:11 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.22 2019/12/24 09:12:56 skrll Exp $");
 
 #include 
 #include 
@@ -348,7 +348,7 @@ gicv3_find_redist(struct gicv3_softc *sc
 static uint64_t
 gicv3_sgir(struct gicv3_softc *sc)
 {
-	const uint64_t cpu_identity = gicv3_cpu_identity();	
+	const uint64_t cpu_identity = gicv3_cpu_identity();
 
 	const u_int aff0 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff0);
 	const u_int aff1 = __SHIFTOUT(cpu_identity, GICR_TYPER_Affinity_Value_Aff1);
@@ -358,7 +358,7 @@ gicv3_sgir(struct gicv3_softc *sc)
 	return __SHIFTIN(__BIT(aff0), ICC_SGIR_EL1_TargetList) |
 	   __SHIFTIN(aff1, ICC_SGIR_EL1_Aff1) |
 	   __SHIFTIN(aff2, ICC_SGIR_EL1_Aff2) |
-	   __SHIFTIN(aff3, ICC_SGIR_EL1_Aff3); 
+	   __SHIFTIN(aff3, ICC_SGIR_EL1_Aff3);
 }
 
 static void



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

2019-12-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Dec 24 09:12:56 UTC 2019

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

Log Message:
Traiing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 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.



Re: CVS commit: src/sys/arch/amd64

2019-12-24 Thread Ryo ONODERA
Hi,

"Emmanuel Dreyfus"  writes:

> Module Name:  src
> Committed By: manu
> Date: Sun Dec 15 02:56:40 UTC 2019
>
> Modified Files:
>   src/sys/arch/amd64/amd64: locore.S
>   src/sys/arch/amd64/conf: kern.ldscript
>
> Log Message:
> Restore multiboot 2 header in amd64 kernel
>
> The header must appear below 32k offset in the kernel file, but we
> have to make sure it does not load at low addresses, otherwise we
> break BIOS boot.
>
> .text section used to load at 0x20, we just load multiboot section
> there, and have .text loaded just after.

After this change, amd64 kernel does not boot on my HP Spectre x360
13-inch ae019TU laptop with pure UEFI boot mode.

Reverting this change on 2019-12-23T08:00 (UTC) enables pure UEFI boot.

On another laptop, VAIO S13, the same kernel boots fine in UEFI mode.

I want to continue to use my HP Spectre x360.
Could you take a look at my problem?

Thank you.

> To generate a diff of this commit:
> cvs rdiff -u -r1.193 -r1.194 src/sys/arch/amd64/amd64/locore.S
> cvs rdiff -u -r1.29 -r1.30 src/sys/arch/amd64/conf/kern.ldscript
>
> 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/amd64/amd64/locore.S
> diff -u src/sys/arch/amd64/amd64/locore.S:1.193 
> src/sys/arch/amd64/amd64/locore.S:1.194
> --- src/sys/arch/amd64/amd64/locore.S:1.193   Tue Dec 10 02:06:07 2019
> +++ src/sys/arch/amd64/amd64/locore.S Sun Dec 15 02:56:40 2019
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: locore.S,v 1.193 2019/12/10 02:06:07 manu Exp $*/
> +/*   $NetBSD: locore.S,v 1.194 2019/12/15 02:56:40 manu Exp $*/
>  
>  /*
>   * Copyright-o-rama!
> @@ -432,7 +432,7 @@ END(farjmp64)
>   .space  512
>  tmpstk:
>  
> -.section multiboot,"ax",@progbits
> +.section multiboot,"a"
>  #if defined(MULTIBOOT)
>   .align  8
>   .globl  Multiboot2_Header
>
> Index: src/sys/arch/amd64/conf/kern.ldscript
> diff -u src/sys/arch/amd64/conf/kern.ldscript:1.29 
> src/sys/arch/amd64/conf/kern.ldscript:1.30
> --- src/sys/arch/amd64/conf/kern.ldscript:1.29Wed Dec 11 02:31:44 2019
> +++ src/sys/arch/amd64/conf/kern.ldscript Sun Dec 15 02:56:40 2019
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: kern.ldscript,v 1.29 2019/12/11 02:31:44 manu Exp $*/
> +/*   $NetBSD: kern.ldscript,v 1.30 2019/12/15 02:56:40 manu Exp $*/
>  
>  #include "assym.h"
>  
> @@ -13,7 +13,17 @@ __LARGE_PAGE_SIZE = 0x20 ;
>  ENTRY(_start)
>  SECTIONS
>  {
> - .text : AT (ADDR(.text) & 0x0fff)
> + /*
> +  * multiboot (file_offset) : AT (load_address) 
> +  * file_offset must be below 32k for multiboot 2 specification
> +  * BIOS boot requires load_address above 0x20
> +  */
> + multiboot 0x1000 : AT (0x20)
> + {
> + . = ALIGN(8);
> + KEEP(*(multiboot));
> + }
> + .text : AT (0x20 + SIZEOF(multiboot))
>   {
>   . = ALIGN(__PAGE_SIZE);
>   __text_user_start = . ;
>

-- 
Ryo ONODERA // r...@tetera.org
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Re: CVS commit: src/sys/dev/i2c

2019-12-24 Thread Ryo ONODERA
Hi,

"Jason R Thorpe"  writes:

> Module Name:  src
> Committed By: thorpej
> Date: Sun Dec 22 16:44:35 UTC 2019
>
> Modified Files:
>   src/sys/dev/i2c: ihidev.c ihidev.h
>
> Log Message:
> The hid-over-i2c spec specifies that compliant devices use level-sensitive
> interrupts.  However, it's not safe to do i2c bus access in hard interrupt
> context, and we must read the event data off the device in order to clear
> the interrupt condition.
>
> Address this by using acpi_intr_mask() to mask off the interrupt source
> while a softint is pending to service the events, re-enabling it once
> servicing is completed.
>
> While here, re-factor the interrupt setup / tear-down code a bit to
> eventually once day simplify supporting the FDT bindings for hid-over-i2c.

This change freezes an amd64 kernel boot on my laptop.
And I cannot enter into DDB with ALt+Ctrl+ESC.
My laptop is HP Spectre x360 and it has twi ims(4) touch/pen screen.

With "userconf disable ihidev", the kernel boots fine as of
2019-12-24T08:00 (UTC).

Could you take a look at my problem?

> To generate a diff of this commit:
> cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/ihidev.c
> cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/ihidev.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/i2c/ihidev.c
> diff -u src/sys/dev/i2c/ihidev.c:1.9 src/sys/dev/i2c/ihidev.c:1.10
> --- src/sys/dev/i2c/ihidev.c:1.9  Tue Oct  1 18:00:08 2019
> +++ src/sys/dev/i2c/ihidev.c  Sun Dec 22 16:44:35 2019
> @@ -1,4 +1,4 @@
> -/* $NetBSD: ihidev.c,v 1.9 2019/10/01 18:00:08 chs Exp $ */
> +/* $NetBSD: ihidev.c,v 1.10 2019/12/22 16:44:35 thorpej Exp $ */
>  /* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
>  
>  /*-
> @@ -54,7 +54,7 @@
>   */
>  
>  #include 
> -__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.9 2019/10/01 18:00:08 chs Exp $");
> +__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.10 2019/12/22 16:44:35 thorpej Exp 
> $");
>  
>  #include 
>  #include 
> @@ -71,6 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1
>  #  include "acpica.h"
>  #endif
>  #if NACPICA > 0
> +#include 
>  #include 
>  #endif
>  
> @@ -109,10 +110,14 @@ static int  ihidev_detach(device_t, int);
>  CFATTACH_DECL_NEW(ihidev, sizeof(struct ihidev_softc),
>  ihidev_match, ihidev_attach, ihidev_detach, NULL);
>  
> +static bool  ihiddev_intr_init(struct ihidev_softc *);
> +static void  ihiddev_intr_fini(struct ihidev_softc *);
> +
>  static bool  ihidev_suspend(device_t, const pmf_qual_t *);
>  static bool  ihidev_resume(device_t, const pmf_qual_t *);
>  static int   ihidev_hid_command(struct ihidev_softc *, int, void *, bool);
>  static int   ihidev_intr(void *);
> +static void  ihidev_softintr(void *);
>  static int   ihidev_reset(struct ihidev_softc *, bool);
>  static int   ihidev_hid_desc_parse(struct ihidev_softc *);
>  
> @@ -200,20 +205,9 @@ ihidev_attach(device_t parent, device_t 
>   repsz));
>   }
>   sc->sc_ibuf = kmem_zalloc(sc->sc_isize, KM_SLEEP);
> -#if NACPICA > 0
> - {
> - char buf[100];
> -
> - sc->sc_ih = acpi_intr_establish(self, sc->sc_phandle, IPL_TTY,
> - false, ihidev_intr, sc, device_xname(self));
> - if (sc->sc_ih == NULL) {
> - aprint_error_dev(self, "can't establish interrupt\n");
> - return;
> - }
> - aprint_normal_dev(self, "interrupting at %s\n",
> - acpi_intr_string(sc->sc_ih, buf, sizeof(buf)));
> + if (! ihiddev_intr_init(sc)) {
> + return;
>   }
> -#endif
>  
>   iha.iaa = ia;
>   iha.parent = sc;
> @@ -260,10 +254,7 @@ ihidev_detach(device_t self, int flags)
>   struct ihidev_softc *sc = device_private(self);
>  
>   mutex_enter(>sc_intr_lock);
> -#if NACPICA > 0
> - if (sc->sc_ih != NULL)
> - acpi_intr_disestablish(sc->sc_ih);
> -#endif
> + ihiddev_intr_fini(sc);
>   if (ihidev_hid_command(sc, I2C_HID_CMD_SET_POWER,
>   _HID_POWER_OFF, true))
>   aprint_error_dev(sc->sc_dev, "failed to power down\n");
> @@ -649,31 +640,110 @@ ihidev_hid_desc_parse(struct ihidev_soft
>   return (0);
>  }
>  
> +static bool
> +ihiddev_intr_init(struct ihidev_softc *sc)
> +{
> +#if NACPICA > 0
> + ACPI_HANDLE hdl = (void *)(uintptr_t)sc->sc_phandle;
> + struct acpi_resources res;
> + ACPI_STATUS rv;
> + char buf[100];
> +
> + rv = acpi_resource_parse(sc->sc_dev, hdl, "_CRS", ,
> + _resource_parse_ops_quiet);
> + if (ACPI_FAILURE(rv)) {
> + aprint_error_dev(sc->sc_dev, "can't parse '_CRS'\n");
> + return false;
> + }
> +
> + const struct acpi_irq * const irq = acpi_res_irq(, 0);
> + if (irq == NULL) {
> + aprint_error_dev(sc->sc_dev, "no IRQ resource\n");
> + acpi_resource_cleanup();
> + return false;
> + }
> +