CVS commit: src/sys/external/bsd/drm2/linux

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 17 01:38:38 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/linux: linux_dma_buf.c

Log Message:
drm: Fix membars around dma_buf_put reference count release.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/linux/linux_dma_buf.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/external/bsd/drm2/linux/linux_dma_buf.c
diff -u src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.13 src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.14
--- src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.13	Sun Dec 19 12:01:40 2021
+++ src/sys/external/bsd/drm2/linux/linux_dma_buf.c	Thu Feb 17 01:38:38 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_dma_buf.c,v 1.13 2021/12/19 12:01:40 riastradh Exp $	*/
+/*	$NetBSD: linux_dma_buf.c,v 1.14 2022/02/17 01:38:38 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.13 2021/12/19 12:01:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.14 2022/02/17 01:38:38 riastradh Exp $");
 
 #include 
 #include 
@@ -160,8 +160,10 @@ void
 dma_buf_put(struct dma_buf *dmabuf)
 {
 
+	membar_exit();
 	if (atomic_dec_uint_nv(&dmabuf->db_refcnt) != 0)
 		return;
+	membar_enter();
 
 	dma_resv_poll_fini(&dmabuf->db_resv_poll);
 	mutex_destroy(&dmabuf->db_lock);



CVS commit: src/sys/external/bsd/drm2/linux

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 17 01:38:38 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/linux: linux_dma_buf.c

Log Message:
drm: Fix membars around dma_buf_put reference count release.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/linux/linux_dma_buf.c

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



CVS commit: src/sys/external/bsd

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 17 01:21:03 UTC 2022

Modified Files:
src/sys/external/bsd/common/include/linux: compiler.h
src/sys/external/bsd/drm2/dist/drm/vmwgfx: ttm_lock.c ttm_lock.h
ttm_object.c vmwgfx_cmdbuf.c vmwgfx_drv.c vmwgfx_drv.h
vmwgfx_resource.c vmwgfx_validation.h
src/sys/external/bsd/drm2/pci: files.drmkms_pci
Added Files:
src/sys/external/bsd/drm2/include/asm: hypervisor.h vmware.h
src/sys/external/bsd/drm2/include/linux: dmapool.h frame.h pci_ids.h
src/sys/external/bsd/drm2/vmwgfx: files.vmwgfx vmware_pack_begin.h
vmware_pack_end.h vmwgfx2netbsd vmwgfx_module.c vmwgfx_pci.c
vmwgfx_task.h vmwgfxfb.c vmwgfxfb.h

Log Message:
drm/vmwgfx: First draft.  Passes make depend, doesn't build yet.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/common/include/linux/compiler.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.c \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.h \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_object.c \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_validation.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_cmdbuf.c \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_resource.c
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_drv.c
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_drv.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/include/asm/hypervisor.h \
src/sys/external/bsd/drm2/include/asm/vmware.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/include/linux/dmapool.h \
src/sys/external/bsd/drm2/include/linux/frame.h \
src/sys/external/bsd/drm2/include/linux/pci_ids.h
cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/drm2/pci/files.drmkms_pci
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/vmwgfx/files.vmwgfx \
src/sys/external/bsd/drm2/vmwgfx/vmware_pack_begin.h \
src/sys/external/bsd/drm2/vmwgfx/vmware_pack_end.h \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx2netbsd \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx_module.c \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx_pci.c \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx_task.h \
src/sys/external/bsd/drm2/vmwgfx/vmwgfxfb.c \
src/sys/external/bsd/drm2/vmwgfx/vmwgfxfb.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/external/bsd/common/include/linux/compiler.h
diff -u src/sys/external/bsd/common/include/linux/compiler.h:1.6 src/sys/external/bsd/common/include/linux/compiler.h:1.7
--- src/sys/external/bsd/common/include/linux/compiler.h:1.6	Sun Dec 19 11:26:57 2021
+++ src/sys/external/bsd/common/include/linux/compiler.h	Thu Feb 17 01:21:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: compiler.h,v 1.6 2021/12/19 11:26:57 riastradh Exp $	*/
+/*	$NetBSD: compiler.h,v 1.7 2022/02/17 01:21:02 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -50,6 +50,8 @@
 #define	__maybe_unused	__unused
 #define	noinline	__noinline
 #define	__deprecated	/* nothing */
+#define	__acquire(X)	/* nothing */
+#define	__release(X)	/* nothing */
 
 #define	barrier()	__insn_barrier()
 #define	likely(X)	__predict_true(X)

Index: src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.c
diff -u src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.c:1.2 src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.c:1.3
--- src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.c:1.2	Sat Dec 18 23:45:45 2021
+++ src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.c	Thu Feb 17 01:21:02 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_lock.c,v 1.2 2021/12/18 23:45:45 riastradh Exp $	*/
+/*	$NetBSD: ttm_lock.c,v 1.3 2022/02/17 01:21:02 riastradh Exp $	*/
 
 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
 /**
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ttm_lock.c,v 1.2 2021/12/18 23:45:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_lock.c,v 1.3 2022/02/17 01:21:02 riastradh Exp $");
 
 #include 
 #include 
@@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: ttm_lock.c,v
 void ttm_lock_init(struct ttm_lock *lock)
 {
 	spin_lock_init(&lock->lock);
-	init_waitqueue_head(&lock->queue);
+	DRM_INIT_WAITQUEUE(&lock->queue, "ttmlock");
 	lock->rw = 0;
 	lock->flags = 0;
 }
@@ -59,7 +59,7 @@ void ttm_read_unlock(struct ttm_lock *lo
 {
 	spin_lock(&lock->lock);
 	if (--lock->rw == 0)
-		wake_up_all(&lock->queue);
+		DRM_SPIN_WAKEUP_ALL(&lock->queue, &lock->lock);
 	spin_unlock(&lock->lock);
 }
 
@@ -67,12 +67,10 @@ static bool __ttm_read_lock(struct ttm_l
 {
 	bool locked = false;
 
-	spin_lock(&lock->lock);
 	if (lock->rw >= 0 && lock->flags == 0) {
 		++lock->rw;
 		locked = true;
 	}
-	spin_unlock(&lock->lock);
 	return locked;
 }
 
@@ -80,11 +78,1

CVS commit: src/sys/external/bsd

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 17 01:21:03 UTC 2022

Modified Files:
src/sys/external/bsd/common/include/linux: compiler.h
src/sys/external/bsd/drm2/dist/drm/vmwgfx: ttm_lock.c ttm_lock.h
ttm_object.c vmwgfx_cmdbuf.c vmwgfx_drv.c vmwgfx_drv.h
vmwgfx_resource.c vmwgfx_validation.h
src/sys/external/bsd/drm2/pci: files.drmkms_pci
Added Files:
src/sys/external/bsd/drm2/include/asm: hypervisor.h vmware.h
src/sys/external/bsd/drm2/include/linux: dmapool.h frame.h pci_ids.h
src/sys/external/bsd/drm2/vmwgfx: files.vmwgfx vmware_pack_begin.h
vmware_pack_end.h vmwgfx2netbsd vmwgfx_module.c vmwgfx_pci.c
vmwgfx_task.h vmwgfxfb.c vmwgfxfb.h

Log Message:
drm/vmwgfx: First draft.  Passes make depend, doesn't build yet.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/common/include/linux/compiler.h
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.c \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_lock.h \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/ttm_object.c \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_validation.h
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_cmdbuf.c \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_resource.c
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_drv.c
cvs rdiff -u -r1.5 -r1.6 \
src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_drv.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/include/asm/hypervisor.h \
src/sys/external/bsd/drm2/include/asm/vmware.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/include/linux/dmapool.h \
src/sys/external/bsd/drm2/include/linux/frame.h \
src/sys/external/bsd/drm2/include/linux/pci_ids.h
cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/drm2/pci/files.drmkms_pci
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/vmwgfx/files.vmwgfx \
src/sys/external/bsd/drm2/vmwgfx/vmware_pack_begin.h \
src/sys/external/bsd/drm2/vmwgfx/vmware_pack_end.h \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx2netbsd \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx_module.c \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx_pci.c \
src/sys/external/bsd/drm2/vmwgfx/vmwgfx_task.h \
src/sys/external/bsd/drm2/vmwgfx/vmwgfxfb.c \
src/sys/external/bsd/drm2/vmwgfx/vmwgfxfb.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/evbppc/virtex

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 17 00:54:51 UTC 2022

Modified Files:
src/sys/arch/evbppc/virtex: design_gsrd1.c

Log Message:
evbppc: fix typo from cfargs rototill.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbppc/virtex/design_gsrd1.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/evbppc/virtex/design_gsrd1.c
diff -u src/sys/arch/evbppc/virtex/design_gsrd1.c:1.7 src/sys/arch/evbppc/virtex/design_gsrd1.c:1.8
--- src/sys/arch/evbppc/virtex/design_gsrd1.c:1.7	Sat Aug  7 16:18:52 2021
+++ src/sys/arch/evbppc/virtex/design_gsrd1.c	Thu Feb 17 00:54:51 2022
@@ -1,4 +1,4 @@
-/* 	$NetBSD: design_gsrd1.c,v 1.7 2021/08/07 16:18:52 thorpej Exp $ */
+/* 	$NetBSD: design_gsrd1.c,v 1.8 2022/02/17 00:54:51 riastradh Exp $ */
 
 /*
  * Copyright (c) 2006 Jachym Holecek
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: design_gsrd1.c,v 1.7 2021/08/07 16:18:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: design_gsrd1.c,v 1.8 2022/02/17 00:54:51 riastradh Exp $");
 
 #include 
 #include 
@@ -349,7 +349,7 @@ virtex_autoconf(device_t self, struct pl
 		vaa.vaa_tx_dmac = virtex_mpmc_mapdma(g->gdv_tx_dma, &tx);
 
 		config_found(self, &vaa, xcvbus_print,
-		CFARGS(.attr = g->gdv_attr));
+		CFARGS(.iattr = g->gdv_attr));
 	}
 
 	/* Setup the dispatch handler. */



CVS commit: src/sys/arch/evbppc/virtex

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 17 00:54:51 UTC 2022

Modified Files:
src/sys/arch/evbppc/virtex: design_gsrd1.c

Log Message:
evbppc: fix typo from cfargs rototill.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbppc/virtex/design_gsrd1.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

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:49:27 UTC 2022

Modified Files:
src/sys/arch/amiga/amiga: bus.c
src/sys/arch/amigappc/amigappc: p5reg.h
src/sys/arch/amigappc/include: bus_funcs.h cpu.h
src/sys/arch/bebox/stand/boot: io.c pci.c vreset.c
src/sys/arch/evbppc/pmppc/dev: if_cs_mainbus.c
src/sys/arch/ibmnws/ibmnws: machdep.c
src/sys/arch/macppc/dev: if_mc.c mediabay.c valkyriefb.c zs.c
src/sys/arch/powerpc/include: pio.h
src/sys/arch/powerpc/oea: pmap.c
src/sys/arch/powerpc/pic: intr.c
src/sys/arch/powerpc/powerpc: bus_dma.c
src/sys/arch/prep/stand/boot: io.c pci.c vreset.c
src/sys/arch/rs6000/stand/boot: boot.c
src/sys/arch/sandpoint/stand/altboot: brdsetup.c

Log Message:
powerpc: Sprinkle "memory" clobbers on eieio and nearby asm blocks.

Otherwise the compiler may reorder these around loads and stores,
which mostly defeats the purpose.  `asm volatile' just ensures the
instruction isn't _deleted_; it may still move around.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/amiga/bus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amigappc/amigappc/p5reg.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amigappc/include/bus_funcs.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amigappc/include/cpu.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/bebox/stand/boot/io.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/bebox/stand/boot/pci.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/bebox/stand/boot/vreset.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/pmppc/dev/if_cs_mainbus.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ibmnws/ibmnws/machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/macppc/dev/if_mc.c \
src/sys/arch/macppc/dev/mediabay.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/macppc/dev/valkyriefb.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/macppc/dev/zs.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/pio.h
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/powerpc/powerpc/bus_dma.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/prep/stand/boot/io.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/prep/stand/boot/pci.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/stand/boot/vreset.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/rs6000/stand/boot/boot.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sandpoint/stand/altboot/brdsetup.c

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

Modified files:

Index: src/sys/arch/amiga/amiga/bus.c
diff -u src/sys/arch/amiga/amiga/bus.c:1.2 src/sys/arch/amiga/amiga/bus.c:1.3
--- src/sys/arch/amiga/amiga/bus.c:1.2	Thu Nov 12 12:01:53 2015
+++ src/sys/arch/amiga/amiga/bus.c	Wed Feb 16 23:49:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.2 2015/11/12 12:01:53 phx Exp $ */
+/*	$NetBSD: bus.c,v 1.3 2022/02/16 23:49:26 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -39,8 +39,8 @@ bus_space_barrier(bus_space_tag_t space,
 			bus_size_t offset, bus_size_t length, int flags)
 {
 /* Only amigappc needs barrier. */
-#if defined(__powerpc__) 
-	asm volatile("eieio");	
+#if defined(__powerpc__)
+	asm volatile("eieio" ::: "memory");
 #endif
 }
 

Index: src/sys/arch/amigappc/amigappc/p5reg.h
diff -u src/sys/arch/amigappc/amigappc/p5reg.h:1.2 src/sys/arch/amigappc/amigappc/p5reg.h:1.3
--- src/sys/arch/amigappc/amigappc/p5reg.h:1.2	Tue Feb  2 19:15:33 2010
+++ src/sys/arch/amigappc/amigappc/p5reg.h	Wed Feb 16 23:49:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: p5reg.h,v 1.2 2010/02/02 19:15:33 phx Exp $ */
+/*	$NetBSD: p5reg.h,v 1.3 2022/02/16 23:49:26 riastradh Exp $ */
 
 /*
  * Copyright (C) 2000 Adam Ciarcinski.
@@ -100,13 +100,13 @@
 #define P5read(reg, val)		\
 	do {\
 		(val) = *(volatile unsigned char *)(P5BASE + (reg));	\
-		__asm volatile("eieio");	\
+		__asm volatile("eieio" ::: "memory");			\
 	} while (0);
 
 #define P5write(reg, val)		\
 	do {\
 		*(volatile unsigned char *)(P5BASE + (reg)) = (val);	\
-		__asm volatile("eieio");	\
+		__asm volatile("eieio" ::: "memory");			\
 	} while (0);
 
 #endif /* _P5REG_H_ */

Index: src/sys/arch/amigappc/include/bus_funcs.h
diff -u src/sys/arch/amigappc/include/bus_funcs.h:1.1 src/sys/arch/amigappc/include/bus_funcs.h:1.2
--- src/sys/arch/amigappc/include/bus_funcs.h:1.1	Mon Jul 18 17:51:17 2011
+++ src/sys/arch/amigappc/include/bus_funcs.h	Wed Feb 16 23:49:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_funcs.h,v 1.1 2011/07/18 17:51:17 dyoung Exp $	*/
+/*	$NetBSD: bus_funcs.h,v 1.2 2022/02/16 23:49:26 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1996 Leo Weppelman.  All rights reserved.
@@ -141,6 +141,6 @@
 ((void)((void)(t), (void)(h), (void)(o), (void)(l), (void)(f)))
 
 /* Instruction for enforcing reorder protection. */
-#define amiga_bus_reorder_protect() __asm volatile ("eieio")
+#define amiga_bus_r

CVS commit: src/sys/arch

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:49:27 UTC 2022

Modified Files:
src/sys/arch/amiga/amiga: bus.c
src/sys/arch/amigappc/amigappc: p5reg.h
src/sys/arch/amigappc/include: bus_funcs.h cpu.h
src/sys/arch/bebox/stand/boot: io.c pci.c vreset.c
src/sys/arch/evbppc/pmppc/dev: if_cs_mainbus.c
src/sys/arch/ibmnws/ibmnws: machdep.c
src/sys/arch/macppc/dev: if_mc.c mediabay.c valkyriefb.c zs.c
src/sys/arch/powerpc/include: pio.h
src/sys/arch/powerpc/oea: pmap.c
src/sys/arch/powerpc/pic: intr.c
src/sys/arch/powerpc/powerpc: bus_dma.c
src/sys/arch/prep/stand/boot: io.c pci.c vreset.c
src/sys/arch/rs6000/stand/boot: boot.c
src/sys/arch/sandpoint/stand/altboot: brdsetup.c

Log Message:
powerpc: Sprinkle "memory" clobbers on eieio and nearby asm blocks.

Otherwise the compiler may reorder these around loads and stores,
which mostly defeats the purpose.  `asm volatile' just ensures the
instruction isn't _deleted_; it may still move around.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/amiga/bus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amigappc/amigappc/p5reg.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amigappc/include/bus_funcs.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/amigappc/include/cpu.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/bebox/stand/boot/io.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/bebox/stand/boot/pci.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/bebox/stand/boot/vreset.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/pmppc/dev/if_cs_mainbus.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ibmnws/ibmnws/machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/macppc/dev/if_mc.c \
src/sys/arch/macppc/dev/mediabay.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/macppc/dev/valkyriefb.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/macppc/dev/zs.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/pio.h
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/powerpc/powerpc/bus_dma.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/prep/stand/boot/io.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/prep/stand/boot/pci.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/stand/boot/vreset.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/rs6000/stand/boot/boot.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sandpoint/stand/altboot/brdsetup.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/powerpc

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:31:13 UTC 2022

Modified Files:
src/sys/arch/powerpc/conf: files.powerpc
src/sys/arch/powerpc/include: pmap.h
src/sys/arch/powerpc/include/oea: pmap.h
src/sys/arch/powerpc/oea: pmap.c pmap_kernel.c

Log Message:
powerpc: Implement pv-tracking for unmanaged pages.

Needed for drm.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/powerpc/conf/files.powerpc
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/oea/pmap_kernel.c

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

Modified files:

Index: src/sys/arch/powerpc/conf/files.powerpc
diff -u src/sys/arch/powerpc/conf/files.powerpc:1.98 src/sys/arch/powerpc/conf/files.powerpc:1.99
--- src/sys/arch/powerpc/conf/files.powerpc:1.98	Fri Mar  5 06:06:34 2021
+++ src/sys/arch/powerpc/conf/files.powerpc	Wed Feb 16 23:31:13 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.powerpc,v 1.98 2021/03/05 06:06:34 rin Exp $
+#	$NetBSD: files.powerpc,v 1.99 2022/02/16 23:31:13 riastradh Exp $
 
 defflag	opt_altivec.h	ALTIVEC K_ALTIVEC PPC_HAVE_SPE
 defflag	opt_openpic.h	OPENPIC_DISTRIBUTE
@@ -51,6 +51,7 @@ file	arch/powerpc/oea/pmap64.c			ppc_oea
 file	arch/powerpc/oea/pmap64_bridge.c		ppc_oea64_bridge
 file	arch/powerpc/oea/pmap_kernel.c			ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601
 file	arch/powerpc/powerpc/trap.c			ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601
+file	uvm/pmap/pmap_pvt.cppc_oea | ppc_oea601 | ppc_oea64
 
 # PPC BookE (MPC85xx) Family files
 file	arch/powerpc/booke/booke_machdep.c		ppc_booke

Index: src/sys/arch/powerpc/include/pmap.h
diff -u src/sys/arch/powerpc/include/pmap.h:1.40 src/sys/arch/powerpc/include/pmap.h:1.41
--- src/sys/arch/powerpc/include/pmap.h:1.40	Mon Jul  6 08:17:01 2020
+++ src/sys/arch/powerpc/include/pmap.h	Wed Feb 16 23:31:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.40 2020/07/06 08:17:01 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.41 2022/02/16 23:31:13 riastradh Exp $	*/
 
 #ifndef _POWERPC_PMAP_H_
 #define _POWERPC_PMAP_H_
@@ -22,6 +22,8 @@
 
 #endif /* !_MODULE */
 
+#include 
+
 #if !defined(_LOCORE) && (defined(MODULAR) || defined(_MODULE))
 /*
  * Both BOOKE and OEA use __HAVE_VM_PAGE_MD but IBM4XX doesn't so define

Index: src/sys/arch/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.35 src/sys/arch/powerpc/include/oea/pmap.h:1.36
--- src/sys/arch/powerpc/include/oea/pmap.h:1.35	Fri Mar 12 04:57:42 2021
+++ src/sys/arch/powerpc/include/oea/pmap.h	Wed Feb 16 23:31:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.35 2021/03/12 04:57:42 thorpej Exp $	*/
+/*	$NetBSD: pmap.h,v 1.36 2022/02/16 23:31:13 riastradh Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -90,6 +90,7 @@ struct pmap_ops {
 	void (*pmapop_protect)(pmap_t, vaddr_t, vaddr_t, vm_prot_t);
 	void (*pmapop_unwire)(pmap_t, vaddr_t);
 	void (*pmapop_page_protect)(struct vm_page *, vm_prot_t);
+	void (*pmapop_pv_protect)(paddr_t, vm_prot_t);
 	bool (*pmapop_query_bit)(struct vm_page *, int);
 	bool (*pmapop_clear_bit)(struct vm_page *, int);
 
@@ -247,11 +248,20 @@ LIST_HEAD(pvo_head, pvo_entry);
 
 #define	__HAVE_VM_PAGE_MD
 
+struct pmap_page {
+	unsigned int pp_attrs;
+	struct pvo_head pp_pvoh;
+#ifdef MODULAR
+	uintptr_t pp_dummy[3];
+#endif
+};
+
 struct vm_page_md {
-	unsigned int mdpg_attrs; 
-	struct pvo_head mdpg_pvoh;
+	struct pmap_page mdpg_pp;
+#define	mdpg_attrs	mdpg_pp.pp_attrs
+#define	mdpg_pvoh	mdpg_pp.pp_pvoh
 #ifdef MODULAR
-	uintptr_t mdpg_dummy[3];
+#define	mdpg_dummy	mdpg_pp.pp_dummy
 #endif
 };
 

Index: src/sys/arch/powerpc/oea/pmap.c
diff -u src/sys/arch/powerpc/oea/pmap.c:1.107 src/sys/arch/powerpc/oea/pmap.c:1.108
--- src/sys/arch/powerpc/oea/pmap.c:1.107	Mon Jul 19 14:49:45 2021
+++ src/sys/arch/powerpc/oea/pmap.c	Wed Feb 16 23:31:13 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.107 2021/07/19 14:49:45 chs Exp $	*/
+/*	$NetBSD: pmap.c,v 1.108 2022/02/16 23:31:13 riastradh Exp $	*/
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.107 2021/07/19 14:49:45 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.108 2022/02/16 23:31:13 riastradh Exp $");
 
 #define	PMAP_NOOPNAMES
 
@@ -214,6 +214,7 @@ STATIC bool pmap_extract(pmap_t, vaddr_t
 STATIC void pmap_protect(pmap_t, vaddr_t, vaddr_t, vm_prot_t);
 STATIC void pmap_unwire(pmap_t, vaddr_t);
 STATIC void pmap_page_protect(struct vm_page *, vm_prot_t);
+STATIC void pmap_pv_protect(paddr_t, vm_prot_t);
 STATIC bool pmap_query_bit(struct vm_page *, int);
 STATIC bool pmap_clear_bit(struct vm_page *, int);
 
@@ -645,12 +646,16 @@ pa_to_pvoh(paddr_t pa, struct vm_pag

CVS commit: src/sys/arch/powerpc

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:31:13 UTC 2022

Modified Files:
src/sys/arch/powerpc/conf: files.powerpc
src/sys/arch/powerpc/include: pmap.h
src/sys/arch/powerpc/include/oea: pmap.h
src/sys/arch/powerpc/oea: pmap.c pmap_kernel.c

Log Message:
powerpc: Implement pv-tracking for unmanaged pages.

Needed for drm.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/powerpc/conf/files.powerpc
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/powerpc

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:30:52 UTC 2022

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

Log Message:
powerpc: Implement bus_dmamap_load_raw.

Can probably delete some of the round-trips between bus addresses and
physical addresses -- did these only to copy the logic already in
_bus_dmamap_load_buffer.


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

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

Modified files:

Index: src/sys/arch/powerpc/powerpc/bus_dma.c
diff -u src/sys/arch/powerpc/powerpc/bus_dma.c:1.52 src/sys/arch/powerpc/powerpc/bus_dma.c:1.53
--- src/sys/arch/powerpc/powerpc/bus_dma.c:1.52	Mon Jul  6 10:31:24 2020
+++ src/sys/arch/powerpc/powerpc/bus_dma.c	Wed Feb 16 23:30:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma.c,v 1.52 2020/07/06 10:31:24 rin Exp $	*/
+/*	$NetBSD: bus_dma.c,v 1.53 2022/02/16 23:30:52 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define _POWERPC_BUS_DMA_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.52 2020/07/06 10:31:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.53 2022/02/16 23:30:52 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
@@ -401,12 +401,98 @@ _bus_dmamap_load_uio(bus_dma_tag_t t, bu
 /*
  * Like _bus_dmamap_load(), but for raw memory allocated with
  * bus_dmamem_alloc().
+ *
+ * XXX This is too much copypasta of _bus_dmamap_load_buffer.
  */
 int
-_bus_dmamap_load_raw(bus_dma_tag_t t, bus_dmamap_t map, bus_dma_segment_t *segs, int nsegs, bus_size_t size, int flags)
+_bus_dmamap_load_raw(bus_dma_tag_t t, bus_dmamap_t map,
+bus_dma_segment_t *segs, int nsegs, bus_size_t size, int flags)
 {
+	bus_size_t sgsize, isgsize;
+	bus_size_t busaddr, curaddr, lastaddr, baddr, bmask;
+	int seg, iseg, first;
+
+	if (size == 0)
+		return 0;
+
+	lastaddr = 0;
+	bmask = ~(map->_dm_boundary - 1);
+
+	first = 0;
+	iseg = 0;
+	busaddr = segs[iseg].ds_addr;
+	isgsize = segs[iseg].ds_len;
+	for (seg = 0; size > 0;) {
+		/*
+		 * Get the physical address for this segment.
+		 */
+		curaddr = BUS_MEM_TO_PHYS(t, busaddr);
+
+		/*
+		 * If we're beyond the bounce threshold, notify
+		 * the caller.
+		 */
+		if (map->_dm_bounce_thresh != 0 &&
+		curaddr >= map->_dm_bounce_thresh)
+			return EINVAL;
+
+		/*
+		 * Compute the segment size, and adjust counts.
+		 */
+		sgsize = PAGE_SIZE - ((u_long)curaddr & PGOFSET);
+		sgsize = MIN(sgsize, isgsize);
+		sgsize = MIN(sgsize, size);
+		sgsize = MIN(sgsize, map->dm_maxsegsz);
+
+		/*
+		 * Make sure we don't cross any boundaries.
+		 */
+		if (map->_dm_boundary > 0) {
+			baddr = (curaddr + map->_dm_boundary) & bmask;
+			if (sgsize > (baddr - curaddr))
+sgsize = (baddr - curaddr);
+		}
+
+		/*
+		 * Insert chunk into a segment, coalescing with
+		 * the previous segment if possible.
+		 */
+		if (first) {
+			map->dm_segs[seg].ds_addr =
+			PHYS_TO_BUS_MEM(t, curaddr);
+			map->dm_segs[seg].ds_len = sgsize;
+			first = 0;
+		} else {
+			if (curaddr == lastaddr &&
+			(map->dm_segs[seg].ds_len + sgsize) <=
+			 map->dm_maxsegsz &&
+			(map->_dm_boundary == 0 ||
+			 (map->dm_segs[seg].ds_addr & bmask) ==
+			 (PHYS_TO_BUS_MEM(t, curaddr) & bmask)))
+map->dm_segs[seg].ds_len += sgsize;
+			else {
+if (++seg >= map->_dm_segcnt)
+	break;
+map->dm_segs[seg].ds_addr =
+	PHYS_TO_BUS_MEM(t, curaddr);
+map->dm_segs[seg].ds_len = sgsize;
+			}
+		}
+
+		lastaddr = curaddr + sgsize;
+		size -= sgsize;
+		if ((isgsize -= sgsize) == 0) {
+			iseg++;
+			KASSERT(iseg < nsegs);
+			busaddr = segs[iseg].ds_addr;
+			isgsize = segs[iseg].ds_len;
+		}
+	}
+
+	if (size > 0)
+		return EFBIG;
 
-	panic("_bus_dmamap_load_raw: not implemented");
+	return 0;
 }
 
 /*



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

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:30:52 UTC 2022

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

Log Message:
powerpc: Implement bus_dmamap_load_raw.

Can probably delete some of the round-trips between bus addresses and
physical addresses -- did these only to copy the logic already in
_bus_dmamap_load_buffer.


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

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



CVS commit: src/sys/external/bsd/drm2/drm

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:30:10 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/drm: drmfb.c

Log Message:
drm: Respect is_console property on main drm device, not fb child.

The MD device enumeration sets the property on, e.g., PCI devices --
not on drm framebuffer children, which are mostly a software
abstraction.  Not sure examining the nouveaufb, intelfb, &c., device
properties is worthwhile at all, but in case it breaks something
let's just leave it in while we're fixing other things.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/drm/drmfb.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/external/bsd/drm2/drm/drmfb.c
diff -u src/sys/external/bsd/drm2/drm/drmfb.c:1.12 src/sys/external/bsd/drm2/drm/drmfb.c:1.13
--- src/sys/external/bsd/drm2/drm/drmfb.c:1.12	Mon Dec 20 20:34:59 2021
+++ src/sys/external/bsd/drm2/drm/drmfb.c	Wed Feb 16 23:30:10 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmfb.c,v 1.12 2021/12/20 20:34:59 chs Exp $	*/
+/*	$NetBSD: drmfb.c,v 1.13 2022/02/16 23:30:10 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.12 2021/12/20 20:34:59 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drmfb.c,v 1.13 2022/02/16 23:30:10 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -93,6 +93,7 @@ drmfb_attach(struct drmfb_softc *sc, con
 	static const struct genfb_ops zero_genfb_ops;
 	struct genfb_ops genfb_ops = zero_genfb_ops;
 	enum { CONS_VGA, CONS_GENFB, CONS_NONE } what_was_cons;
+	device_t parent = device_parent(da->da_dev);
 	bool is_console;
 	int error;
 
@@ -114,7 +115,9 @@ drmfb_attach(struct drmfb_softc *sc, con
 	prop_dictionary_set_uint64(dict, "mode_callback",
 	(uint64_t)(uintptr_t)&drmfb_genfb_mode_callback);
 
-	if (!prop_dictionary_get_bool(dict, "is_console", &is_console)) {
+	if (!prop_dictionary_get_bool(dict, "is_console", &is_console) &&
+	!prop_dictionary_get_bool(device_properties(parent), "is_console",
+		&is_console)) {
 		/* XXX Whattakludge!  */
 #if NVGA > 0
 		if ((da->da_params->dp_is_vga_console != NULL) &&



CVS commit: src/sys/external/bsd/drm2/drm

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:30:10 UTC 2022

Modified Files:
src/sys/external/bsd/drm2/drm: drmfb.c

Log Message:
drm: Respect is_console property on main drm device, not fb child.

The MD device enumeration sets the property on, e.g., PCI devices --
not on drm framebuffer children, which are mostly a software
abstraction.  Not sure examining the nouveaufb, intelfb, &c., device
properties is worthwhile at all, but in case it breaks something
let's just leave it in while we're fixing other things.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/drm/drmfb.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/macppc/conf

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:20:38 UTC 2022

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
macppc: Support *macppc* GENERIC.local, not evbarm GENERIC64.local.

Managed to fumble with a copypasta error of local commits, and
committed the one that didn't work instead of the one that did.


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 src/sys/arch/macppc/conf/GENERIC

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

Modified files:

Index: src/sys/arch/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.373 src/sys/arch/macppc/conf/GENERIC:1.374
--- src/sys/arch/macppc/conf/GENERIC:1.373	Wed Feb 16 20:14:40 2022
+++ src/sys/arch/macppc/conf/GENERIC	Wed Feb 16 23:20:38 2022
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.373 2022/02/16 20:14:40 riastradh Exp $
+# $NetBSD: GENERIC,v 1.374 2022/02/16 23:20:38 riastradh Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/macppc/conf/std.macppc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.373 $"
+#ident 		"GENERIC-$Revision: 1.374 $"
 
 maxusers	32
 
@@ -570,4 +570,4 @@ include "dev/veriexec.config"
 #options PAX_MPROTECT=0			# PaX mprotect(2) restrictions
 
 # Pull in optional local configuration
-cinclude "arch/evbarm/conf/GENERIC64.local"
+cinclude "arch/macppc/conf/GENERIC.local"



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

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 23:20:38 UTC 2022

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
macppc: Support *macppc* GENERIC.local, not evbarm GENERIC64.local.

Managed to fumble with a copypasta error of local commits, and
committed the one that didn't work instead of the one that did.


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 src/sys/arch/macppc/conf/GENERIC

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



CVS commit: src

2022-02-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Feb 16 22:00:57 UTC 2022

Modified Files:
src/sbin/nvmectl: identify.c
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/arm/samsung: exynos4_reg.h
src/sys/dev/ata: satareg.h
src/sys/dev/ic: mvsatareg.h
src/sys/dev/marvell: if_mvxpe.c if_mvxpevar.h
src/sys/dev/pci: if_sip.c
src/sys/dev/raidframe: rf_evenodd_dagfuncs.c
src/sys/dev/usb: if_atureg.h
src/sys/fs/nilfs: nilfs_fs.h
src/sys/fs/udf: udf_vnops.c
src/sys/net80211: ieee80211_node.h
src/sys/netinet: ip_reass.c sctp_timer.c

Log Message:
fix various typos, mainly in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/nvmectl/identify.c
cvs rdiff -u -r1.127 -r1.128 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/samsung/exynos4_reg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ata/satareg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/mvsatareg.h
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/marvell/if_mvxpe.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/marvell/if_mvxpevar.h
cvs rdiff -u -r1.184 -r1.185 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/raidframe/rf_evenodd_dagfuncs.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/if_atureg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/fs/nilfs/nilfs_fs.h
cvs rdiff -u -r1.118 -r1.119 src/sys/fs/udf/udf_vnops.c
cvs rdiff -u -r1.30 -r1.31 src/sys/net80211/ieee80211_node.h
cvs rdiff -u -r1.21 -r1.22 src/sys/netinet/ip_reass.c
cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/sctp_timer.c

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

Modified files:

Index: src/sbin/nvmectl/identify.c
diff -u src/sbin/nvmectl/identify.c:1.7 src/sbin/nvmectl/identify.c:1.8
--- src/sbin/nvmectl/identify.c:1.7	Sun Sep 27 16:45:21 2020
+++ src/sbin/nvmectl/identify.c	Wed Feb 16 22:00:55 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: identify.c,v 1.7 2020/09/27 16:45:21 jdolecek Exp $	*/
+/*	$NetBSD: identify.c,v 1.8 2022/02/16 22:00:55 andvar Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -30,7 +30,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: identify.c,v 1.7 2020/09/27 16:45:21 jdolecek Exp $");
+__RCSID("$NetBSD: identify.c,v 1.8 2022/02/16 22:00:55 andvar Exp $");
 #if 0
 __FBSDID("$FreeBSD: head/sbin/nvmecontrol/identify.c 329824 2018-02-22 13:32:31Z wma $");
 #endif
@@ -88,7 +88,7 @@ print_controller(struct nvm_identify_con
 	printf("Firmware Activate/Download:  %s\n",
 		(cdata->oacs & NVME_ID_CTRLR_OACS_FW) ?
 		"Supported" : "Not Supported");
-	printf("Namespace Managment: %s\n",
+	printf("Namespace Management: %s\n",
 		(cdata->oacs & NVME_ID_CTRLR_OACS_NS) ?
 		"Supported" : "Not Supported");
 	printf("Abort Command Limit: %d\n", cdata->acl+1);

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.127 src/sys/arch/aarch64/aarch64/pmap.c:1.128
--- src/sys/arch/aarch64/aarch64/pmap.c:1.127	Mon Jan 31 09:16:09 2022
+++ src/sys/arch/aarch64/aarch64/pmap.c	Wed Feb 16 22:00:55 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.127 2022/01/31 09:16:09 ryo Exp $	*/
+/*	$NetBSD: pmap.c,v 1.128 2022/02/16 22:00:55 andvar Exp $	*/
 
 /*
  * Copyright (c) 2017 Ryo Shimizu 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.127 2022/01/31 09:16:09 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.128 2022/02/16 22:00:55 andvar Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -1620,7 +1620,7 @@ _pmap_pdp_addref(struct pmap *pm, paddr_
 }
 
 /*
- * decrement reference counter of the page descriptr page.
+ * decrement reference counter of the page descriptor page.
  * if reference counter is 1(=empty), pages will be freed, and return true.
  * otherwise return false.
  * kernel page, or L0 page descriptor page will be never freed.

Index: src/sys/arch/arm/samsung/exynos4_reg.h
diff -u src/sys/arch/arm/samsung/exynos4_reg.h:1.15 src/sys/arch/arm/samsung/exynos4_reg.h:1.16
--- src/sys/arch/arm/samsung/exynos4_reg.h:1.15	Sun Aug 19 07:27:33 2018
+++ src/sys/arch/arm/samsung/exynos4_reg.h	Wed Feb 16 22:00:55 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos4_reg.h,v 1.15 2018/08/19 07:27:33 skrll Exp $	*/
+/*	$NetBSD: exynos4_reg.h,v 1.16 2022/02/16 22:00:55 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -127,7 +127,7 @@
 #define EXYNOS4_RTC_OFFSET			0x0007	/* Real Time Clock */
 #define EXYNOS4_KEYIF_OFFSET			0x000A	/* Keypad interface */
 #define EXYNOS4_HDMI_CEC_OFFSET			0x000B	/* HDMI Consumer Electronic Control */
-#define EXYNOS4_TMU_OFFSET			0x000C	/* Thermal Managment */
+#define EXYNOS4_TMU_OFFSET			0x000C	/* Thermal Management */
 #define EXYNOS4_SECKEY_OFFSET			0x0010	/* XXX unknown XXX */
 #define EXYNOS4_TZPC0_OFFSET			0x0011	/* ARM Trusted Zone Protection Controller */
 #define EXYNOS4_TZPC1_OFFSET			0x0012

CVS commit: src

2022-02-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Feb 16 22:00:57 UTC 2022

Modified Files:
src/sbin/nvmectl: identify.c
src/sys/arch/aarch64/aarch64: pmap.c
src/sys/arch/arm/samsung: exynos4_reg.h
src/sys/dev/ata: satareg.h
src/sys/dev/ic: mvsatareg.h
src/sys/dev/marvell: if_mvxpe.c if_mvxpevar.h
src/sys/dev/pci: if_sip.c
src/sys/dev/raidframe: rf_evenodd_dagfuncs.c
src/sys/dev/usb: if_atureg.h
src/sys/fs/nilfs: nilfs_fs.h
src/sys/fs/udf: udf_vnops.c
src/sys/net80211: ieee80211_node.h
src/sys/netinet: ip_reass.c sctp_timer.c

Log Message:
fix various typos, mainly in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/nvmectl/identify.c
cvs rdiff -u -r1.127 -r1.128 src/sys/arch/aarch64/aarch64/pmap.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/samsung/exynos4_reg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ata/satareg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/mvsatareg.h
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/marvell/if_mvxpe.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/marvell/if_mvxpevar.h
cvs rdiff -u -r1.184 -r1.185 src/sys/dev/pci/if_sip.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/raidframe/rf_evenodd_dagfuncs.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/if_atureg.h
cvs rdiff -u -r1.3 -r1.4 src/sys/fs/nilfs/nilfs_fs.h
cvs rdiff -u -r1.118 -r1.119 src/sys/fs/udf/udf_vnops.c
cvs rdiff -u -r1.30 -r1.31 src/sys/net80211/ieee80211_node.h
cvs rdiff -u -r1.21 -r1.22 src/sys/netinet/ip_reass.c
cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/sctp_timer.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/evbarm/g42xxeb

2022-02-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Feb 16 20:31:43 UTC 2022

Modified Files:
src/sys/arch/evbarm/g42xxeb: gb225var.h

Log Message:
s/baord/board/


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/g42xxeb/gb225var.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/evbarm/g42xxeb/gb225var.h
diff -u src/sys/arch/evbarm/g42xxeb/gb225var.h:1.3 src/sys/arch/evbarm/g42xxeb/gb225var.h:1.4
--- src/sys/arch/evbarm/g42xxeb/gb225var.h:1.3	Sat Mar 13 11:26:42 2010
+++ src/sys/arch/evbarm/g42xxeb/gb225var.h	Wed Feb 16 20:31:43 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: gb225var.h,v 1.3 2010/03/13 11:26:42 bsh Exp $ */
+/*	$NetBSD: gb225var.h,v 1.4 2022/02/16 20:31:43 andvar Exp $ */
 
 /*
  * Copyright (c) 2002, 2003  Genetec corp.  All rights reserved.
@@ -36,7 +36,7 @@
 #include 
 
 /*
- * Interrupt sources for option baord CPLD.
+ * Interrupt sources for option board CPLD.
  */
 #define	OPIO_INTR_CF_INSERT	0
 #define	OPIO_INTR_PCMCIA_INSERT	1



CVS commit: src/sys/arch/evbarm/g42xxeb

2022-02-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Feb 16 20:31:43 UTC 2022

Modified Files:
src/sys/arch/evbarm/g42xxeb: gb225var.h

Log Message:
s/baord/board/


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/g42xxeb/gb225var.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/macppc/conf

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:14:41 UTC 2022

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
macppc: Support GENERIC.local.


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/sys/arch/macppc/conf/GENERIC

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

Modified files:

Index: src/sys/arch/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.372 src/sys/arch/macppc/conf/GENERIC:1.373
--- src/sys/arch/macppc/conf/GENERIC:1.372	Thu Jan 21 06:51:55 2021
+++ src/sys/arch/macppc/conf/GENERIC	Wed Feb 16 20:14:40 2022
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.372 2021/01/21 06:51:55 nia Exp $
+# $NetBSD: GENERIC,v 1.373 2022/02/16 20:14:40 riastradh Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/macppc/conf/std.macppc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.372 $"
+#ident 		"GENERIC-$Revision: 1.373 $"
 
 maxusers	32
 
@@ -568,3 +568,6 @@ pseudo-device   drvctl
 include "dev/veriexec.config"
 
 #options PAX_MPROTECT=0			# PaX mprotect(2) restrictions
+
+# Pull in optional local configuration
+cinclude "arch/evbarm/conf/GENERIC64.local"



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

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:14:41 UTC 2022

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
macppc: Support GENERIC.local.


To generate a diff of this commit:
cvs rdiff -u -r1.372 -r1.373 src/sys/arch/macppc/conf/GENERIC

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



CVS commit: src/sys

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:14:30 UTC 2022

Modified Files:
src/sys/conf: files
src/sys/dev/acpi: files.acpi

Log Message:
sys: Include files.acpica unconditionally.

This way acpica.h always exists unconditionally, so MI code can be
conditional on NACPICA.

It is not great to have such conditionals, but it's better to have

#include "acpica.h"

#ifdef NACPICA > 0

than to have

#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
#include "acpica.h"
#endif

#ifdef NACPICA > 0

and we can still grep for NACPICA to find places that could be
factored better.


To generate a diff of this commit:
cvs rdiff -u -r1.1294 -r1.1295 src/sys/conf/files
cvs rdiff -u -r1.123 -r1.124 src/sys/dev/acpi/files.acpi

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1294 src/sys/conf/files:1.1295
--- src/sys/conf/files:1.1294	Mon Jan 17 16:33:00 2022
+++ src/sys/conf/files	Wed Feb 16 20:14:30 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1294 2022/01/17 16:33:00 thorpej Exp $
+#	$NetBSD: files,v 1.1295 2022/02/16 20:14:30 riastradh Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -1640,6 +1640,13 @@ include "dev/clk/files.clk"
 include "dev/ofw/files.ofw"
 include "dev/fdt/files.fdt"
 
+
+## ACPI -- this should be dev/acpi/files.acpi, but that currently has
+# some MD parts.  Having this here allows conditionals on NACPICA in
+# acpica.h, at least.
+#
+include "dev/acpi/acpica/files.acpica"
+
 #
 # Name value library
 #

Index: src/sys/dev/acpi/files.acpi
diff -u src/sys/dev/acpi/files.acpi:1.123 src/sys/dev/acpi/files.acpi:1.124
--- src/sys/dev/acpi/files.acpi:1.123	Sun Jan  9 15:05:16 2022
+++ src/sys/dev/acpi/files.acpi	Wed Feb 16 20:14:30 2022
@@ -1,6 +1,4 @@
-#	$NetBSD: files.acpi,v 1.123 2022/01/09 15:05:16 jmcneill Exp $
-
-include "dev/acpi/acpica/files.acpica"
+#	$NetBSD: files.acpi,v 1.124 2022/02/16 20:14:30 riastradh Exp $
 
 defflag	opt_acpi.h	ACPIVERBOSE ACPI_DEBUG ACPI_ACTIVATE_DEV
 			ACPI_DSDT_OVERRIDE ACPI_SCANPCI ACPI_BREAKPOINT



CVS commit: src/sys

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:14:30 UTC 2022

Modified Files:
src/sys/conf: files
src/sys/dev/acpi: files.acpi

Log Message:
sys: Include files.acpica unconditionally.

This way acpica.h always exists unconditionally, so MI code can be
conditional on NACPICA.

It is not great to have such conditionals, but it's better to have

#include "acpica.h"

#ifdef NACPICA > 0

than to have

#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
#include "acpica.h"
#endif

#ifdef NACPICA > 0

and we can still grep for NACPICA to find places that could be
factored better.


To generate a diff of this commit:
cvs rdiff -u -r1.1294 -r1.1295 src/sys/conf/files
cvs rdiff -u -r1.123 -r1.124 src/sys/dev/acpi/files.acpi

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



CVS commit: src/sys/uvm/pmap

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:14:06 UTC 2022

Modified Files:
src/sys/uvm/pmap: pmap_pvt.h

Log Message:
pmap_pvt.h: Fix bogus include.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/uvm/pmap/pmap_pvt.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/uvm/pmap/pmap_pvt.h
diff -u src/sys/uvm/pmap/pmap_pvt.h:1.2 src/sys/uvm/pmap/pmap_pvt.h:1.3
--- src/sys/uvm/pmap/pmap_pvt.h:1.2	Sat Jun 24 05:31:03 2017
+++ src/sys/uvm/pmap/pmap_pvt.h	Wed Feb 16 20:14:06 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_pvt.h,v 1.2 2017/06/24 05:31:03 skrll Exp $	*/
+/*	$NetBSD: pmap_pvt.h,v 1.3 2022/02/16 20:14:06 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #ifndef	_UVM_PMAP_PMAP_PVT_H_
 #define	_UVM_PMAP_PMAP_PVT_H_
 
-#include 
+#include 
 
 struct pmap_page;
 



CVS commit: src/sys/uvm/pmap

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:14:06 UTC 2022

Modified Files:
src/sys/uvm/pmap: pmap_pvt.h

Log Message:
pmap_pvt.h: Fix bogus include.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/uvm/pmap/pmap_pvt.h

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



CVS commit: src/sys/uvm

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:13:58 UTC 2022

Modified Files:
src/sys/uvm: uvm_pmap.h

Log Message:
uvm: MI declaration of pmap_pv_protect.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/uvm/uvm_pmap.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/uvm/uvm_pmap.h
diff -u src/sys/uvm/uvm_pmap.h:1.41 src/sys/uvm/uvm_pmap.h:1.42
--- src/sys/uvm/uvm_pmap.h:1.41	Sun Mar  7 08:16:58 2021
+++ src/sys/uvm/uvm_pmap.h	Wed Feb 16 20:13:58 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pmap.h,v 1.41 2021/03/07 08:16:58 skrll Exp $	*/
+/*	$NetBSD: uvm_pmap.h,v 1.42 2022/02/16 20:13:58 riastradh Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -176,6 +176,7 @@ bool		pmap_is_referenced(struct vm_page 
 #endif
 
 void		pmap_page_protect(struct vm_page *, vm_prot_t);
+void		pmap_pv_protect(paddr_t, vm_prot_t);
 
 #if !defined(pmap_phys_address)
 paddr_t		pmap_phys_address(paddr_t);



CVS commit: src/sys/uvm

2022-02-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 16 20:13:58 UTC 2022

Modified Files:
src/sys/uvm: uvm_pmap.h

Log Message:
uvm: MI declaration of pmap_pv_protect.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/uvm/uvm_pmap.h

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

2022-02-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 16 14:37:00 UTC 2022

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

Log Message:
Ticket #1428


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.76 -r1.1.2.77 src/doc/CHANGES-9.3

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.3
diff -u src/doc/CHANGES-9.3:1.1.2.76 src/doc/CHANGES-9.3:1.1.2.77
--- src/doc/CHANGES-9.3:1.1.2.76	Mon Feb 14 06:47:40 2022
+++ src/doc/CHANGES-9.3	Wed Feb 16 14:37:00 2022
@@ -1,4 +1,4 @@
-29~# $NetBSD: CHANGES-9.3,v 1.1.2.76 2022/02/14 06:47:40 msaitoh Exp $
+29~# $NetBSD: CHANGES-9.3,v 1.1.2.77 2022/02/16 14:37:00 martin Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -1486,3 +1486,9 @@ usr.sbin/sysinst/target.c			1.18
 	sysinst: on x86 fix the copying of UEFI bootloaders which got
 	broken by the fixes in ticket #1422.
 	[martin, ticket #1427]
+
+sys/dev/usb/uhidev.c1.82
+
+	PR 55019: do not explicitly set the HID Report Protocol upon attach.
+	[jakllsch, ticket #1428]
+



CVS commit: [netbsd-9] src/doc

2022-02-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 16 14:37:00 UTC 2022

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

Log Message:
Ticket #1428


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.76 -r1.1.2.77 src/doc/CHANGES-9.3

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/dev/usb

2022-02-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 16 14:36:12 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: uhidev.c

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1428):

sys/dev/usb/uhidev.c: revision 1.82

Do not explicitly set the HID Report Protocol upon attach, some devices
don't like it and should be in Report Protocol after enumeration/reset
anyway.

May address PR kern/55019.


To generate a diff of this commit:
cvs rdiff -u -r1.75.2.1 -r1.75.2.2 src/sys/dev/usb/uhidev.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/usb/uhidev.c
diff -u src/sys/dev/usb/uhidev.c:1.75.2.1 src/sys/dev/usb/uhidev.c:1.75.2.2
--- src/sys/dev/usb/uhidev.c:1.75.2.1	Thu Feb  4 19:16:01 2021
+++ src/sys/dev/usb/uhidev.c	Wed Feb 16 14:36:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhidev.c,v 1.75.2.1 2021/02/04 19:16:01 martin Exp $	*/
+/*	$NetBSD: uhidev.c,v 1.75.2.2 2022/02/16 14:36:12 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.75.2.1 2021/02/04 19:16:01 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.75.2.2 2022/02/16 14:36:12 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -169,8 +169,16 @@ uhidev_attach(device_t parent, device_t 
 	}
 	(void)usbd_set_idle(iface, 0, 0);
 
-	if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0)
+#if 0
+	/*
+	 * HID 1.11 says we should do this, but the device firmware is
+	 * supposed to come up in Report Protocol after reset anyway, and
+	 * apparently explicitly requesting it confuses some devices.
+	 */
+	if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0 &&
+	id->bInterfaceSubClass == UISUBCLASS_BOOT)
 		(void)usbd_set_protocol(iface, 1);
+#endif
 
 	maxinpktsize = 0;
 	sc->sc_iep_addr = sc->sc_oep_addr = -1;



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

2022-02-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 16 14:36:12 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: uhidev.c

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1428):

sys/dev/usb/uhidev.c: revision 1.82

Do not explicitly set the HID Report Protocol upon attach, some devices
don't like it and should be in Report Protocol after enumeration/reset
anyway.

May address PR kern/55019.


To generate a diff of this commit:
cvs rdiff -u -r1.75.2.1 -r1.75.2.2 src/sys/dev/usb/uhidev.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/pci/ixgbe

2022-02-16 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb 16 10:29:13 UTC 2022

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

Log Message:
Print Printed Board Assembly (PBA) number.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/dev/pci/ixgbe/ixgbe.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/pci/ixgbe

2022-02-16 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Feb 16 10:29:13 UTC 2022

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

Log Message:
Print Printed Board Assembly (PBA) number.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/sys/dev/pci/ixgbe/ixgbe.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.306 src/sys/dev/pci/ixgbe/ixgbe.c:1.307
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.306	Tue Feb  1 04:59:16 2022
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Feb 16 10:29:13 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.306 2022/02/01 04:59:16 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.307 2022/02/16 10:29:13 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.306 2022/02/01 04:59:16 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.307 2022/02/16 10:29:13 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1118,6 +1118,10 @@ ixgbe_attach(device_t parent, device_t d
 	hw->eeprom.ops.read(hw, IXGBE_ETRACKID_L, &low);
 	aprint_normal(" ETrackID %08x\n", ((uint32_t)high << 16) | low);
 
+	/* Printed Board Assembly number */
+	error = ixgbe_read_pba_string(hw, buf, IXGBE_PBANUM_LENGTH);
+	aprint_normal_dev(dev, "PBA number %s\n", error ? "unknown" : buf);
+
 	if (adapter->feat_en & IXGBE_FEATURE_MSIX) {
 		error = ixgbe_allocate_msix(adapter, pa);
 		if (error) {
@@ -1137,6 +1141,7 @@ ixgbe_attach(device_t parent, device_t d
 			}
 		}
 	}
+
 	/* Recovery mode */
 	switch (adapter->hw.mac.type) {
 	case ixgbe_mac_X550: