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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:30:10 UTC 2020

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

Log Message:
db_stack_trace_print():
For ibm4xx, show fault address in dear register also for EXC_DTMISS.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/powerpc/powerpc/db_trace.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/db_trace.c
diff -u src/sys/arch/powerpc/powerpc/db_trace.c:1.58 src/sys/arch/powerpc/powerpc/db_trace.c:1.59
--- src/sys/arch/powerpc/powerpc/db_trace.c:1.58	Wed Feb 28 20:11:09 2018
+++ src/sys/arch/powerpc/powerpc/db_trace.c	Mon Jul  6 08:30:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trace.c,v 1.58 2018/02/28 20:11:09 mrg Exp $	*/
+/*	$NetBSD: db_trace.c,v 1.59 2020/07/06 08:30:10 rin Exp $	*/
 /*	$OpenBSD: db_trace.c,v 1.3 1997/03/21 02:10:48 niklas Exp $	*/
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.58 2018/02/28 20:11:09 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.59 2020/07/06 08:30:10 rin Exp $");
 
 #include "opt_ppcarch.h"
 
@@ -213,7 +213,9 @@ db_stack_trace_print(db_expr_t addr, boo
 tf->tf_dar);
 #endif
 #ifdef PPC_IBM4XX
-(*pr)("DSI %s trap @ %#x by ",
+trapstr = "DSI";
+dsi:
+(*pr)("%s %s trap @ %#x by ", trapstr,
 tf->tf_esr & ESR_DST ? "write" : "read",
 tf->tf_dear);
 #endif
@@ -241,7 +243,11 @@ db_stack_trace_print(db_expr_t addr, boo
 			case EXC_PERF: trapstr = "PERF"; break;
 			case EXC_SMI: trapstr = "SMI"; break;
 			case EXC_RST: trapstr = "RST"; break;
-			case EXC_DTMISS: trapstr = "DTMISS"; break;
+			case EXC_DTMISS: trapstr = "DTMISS";
+#ifdef PPC_IBM4XX
+goto dsi;
+#endif
+break;
 			case EXC_ITMISS: trapstr = "ITMISS"; break;
 			case EXC_FIT: trapstr = "FIT"; break;
 			case EXC_PIT: trapstr = "PIT"; break;
@@ -278,7 +284,8 @@ db_stack_trace_print(db_expr_t addr, boo
 #endif /* PPC_OEA601 */
 #endif /* PPC_OEA */
 #ifdef PPC_IBM4XX
-			if (tf->tf_exc == EXC_DSI)
+			if (tf->tf_exc == EXC_DSI ||
+			tf->tf_exc == EXC_DTMISS)
 (*pr)(" dear=%#x", tf->tf_dear);
 			(*pr)(" esr=%#x pid=%#x", tf->tf_esr, tf->tf_pid);
 #endif



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:30:10 UTC 2020

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

Log Message:
db_stack_trace_print():
For ibm4xx, show fault address in dear register also for EXC_DTMISS.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/powerpc/powerpc/db_trace.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 09:34:18 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: booke_cache.c booke_machdep.c booke_pmap.c
booke_stubs.c copyin.c copyout.c e500_intr.c e500_tlb.c kcopy.c
spe.c spe_subr.S trap.c
src/sys/arch/powerpc/booke/dev: cpunode.c e500wdog.c pq3cfi.c pq3ddrc.c
pq3diic.c pq3duart.c pq3ehci.c pq3etsec.c pq3gpio.c pq3nandfcm.c
pq3obio.c
src/sys/arch/powerpc/booke/pci: pq3pci.c
src/sys/arch/powerpc/fpu: fpu_emu.c
src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c pic_uic.c trap.c
src/sys/arch/powerpc/ibm4xx/dev: com_opb.c emacreg.h if_emac.c opb.c
plb.c rgmii.c
src/sys/arch/powerpc/ibm4xx/openbios: locore.S
src/sys/arch/powerpc/ibm4xx/pci: pchb.c
src/sys/arch/powerpc/include: aout_machdep.h bus_defs.h db_machdep.h
fpu.h frame.h param.h psl.h reloc.h signal.h trap.h userret.h
src/sys/arch/powerpc/include/booke: e500var.h pmap.h
src/sys/arch/powerpc/include/oea: bat.h
src/sys/arch/powerpc/marvell: marvell_intr.h
src/sys/arch/powerpc/oea: altivec.c altivec_subr.S cpu_speedctl.c
cpu_subr.c genassym.cf oea_machdep.c ofw_consinit.c
ofwoea_machdep.c pmap.c pmap_kernel.c prep_machdep.c
src/sys/arch/powerpc/pci: pchb.c pci_machdep_common.c pci_module.c
pcib.c pciconf_ofmethod.c
src/sys/arch/powerpc/pic: intr.c ipi.c ipi_openpic.c openpic_common.c
pic_distopenpic.c pic_mpcsoc.c pic_openpic.c
src/sys/arch/powerpc/powerpc: bus_dma.c bus_space.c compat_16_machdep.c
db_interface.c db_trace.c fixup.c fpu.c intr_stubs.c kgdb_machdep.c
linux_syscall.c lock_stubs.S locore_subr.S ofwreal.S openfirm.c
pmap_subr.c powerpc_machdep.c process_machdep.c setfault.S
sig_machdep.c syscall.c trap.c trap_subr.S vm_machdep.c

Log Message:
Style and cosmetic changes. No binary changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/booke_cache.c \
src/sys/arch/powerpc/booke/spe_subr.S
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/booke/booke_pmap.c \
src/sys/arch/powerpc/booke/trap.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/booke/booke_stubs.c \
src/sys/arch/powerpc/booke/spe.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/booke/copyin.c \
src/sys/arch/powerpc/booke/copyout.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/powerpc/booke/e500_intr.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/booke/e500_tlb.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/kcopy.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/booke/dev/cpunode.c \
src/sys/arch/powerpc/booke/dev/pq3cfi.c \
src/sys/arch/powerpc/booke/dev/pq3duart.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/dev/e500wdog.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/booke/dev/pq3ddrc.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/dev/pq3diic.c \
src/sys/arch/powerpc/booke/dev/pq3obio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/dev/pq3ehci.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/powerpc/booke/dev/pq3etsec.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/booke/dev/pq3gpio.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/dev/pq3nandfcm.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/booke/pci/pq3pci.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/fpu/fpu_emu.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/ibm4xx/pic_uic.c
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/powerpc/ibm4xx/trap.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/ibm4xx/dev/com_opb.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/ibm4xx/dev/emacreg.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/ibm4xx/dev/opb.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/ibm4xx/dev/plb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/ibm4xx/dev/rgmii.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/ibm4xx/openbios/locore.S
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/ibm4xx/pci/pchb.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/aout_machdep.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/bus_defs.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/include/db_machdep.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/fpu.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/include/frame.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/include/param.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/psl.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/include/reloc.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/signal.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/trap.h
cvs rdiff -u -r1.30 -r1.31 

CVS commit: src/sys/arch/powerpc

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 09:34:18 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: booke_cache.c booke_machdep.c booke_pmap.c
booke_stubs.c copyin.c copyout.c e500_intr.c e500_tlb.c kcopy.c
spe.c spe_subr.S trap.c
src/sys/arch/powerpc/booke/dev: cpunode.c e500wdog.c pq3cfi.c pq3ddrc.c
pq3diic.c pq3duart.c pq3ehci.c pq3etsec.c pq3gpio.c pq3nandfcm.c
pq3obio.c
src/sys/arch/powerpc/booke/pci: pq3pci.c
src/sys/arch/powerpc/fpu: fpu_emu.c
src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c pic_uic.c trap.c
src/sys/arch/powerpc/ibm4xx/dev: com_opb.c emacreg.h if_emac.c opb.c
plb.c rgmii.c
src/sys/arch/powerpc/ibm4xx/openbios: locore.S
src/sys/arch/powerpc/ibm4xx/pci: pchb.c
src/sys/arch/powerpc/include: aout_machdep.h bus_defs.h db_machdep.h
fpu.h frame.h param.h psl.h reloc.h signal.h trap.h userret.h
src/sys/arch/powerpc/include/booke: e500var.h pmap.h
src/sys/arch/powerpc/include/oea: bat.h
src/sys/arch/powerpc/marvell: marvell_intr.h
src/sys/arch/powerpc/oea: altivec.c altivec_subr.S cpu_speedctl.c
cpu_subr.c genassym.cf oea_machdep.c ofw_consinit.c
ofwoea_machdep.c pmap.c pmap_kernel.c prep_machdep.c
src/sys/arch/powerpc/pci: pchb.c pci_machdep_common.c pci_module.c
pcib.c pciconf_ofmethod.c
src/sys/arch/powerpc/pic: intr.c ipi.c ipi_openpic.c openpic_common.c
pic_distopenpic.c pic_mpcsoc.c pic_openpic.c
src/sys/arch/powerpc/powerpc: bus_dma.c bus_space.c compat_16_machdep.c
db_interface.c db_trace.c fixup.c fpu.c intr_stubs.c kgdb_machdep.c
linux_syscall.c lock_stubs.S locore_subr.S ofwreal.S openfirm.c
pmap_subr.c powerpc_machdep.c process_machdep.c setfault.S
sig_machdep.c syscall.c trap.c trap_subr.S vm_machdep.c

Log Message:
Style and cosmetic changes. No binary changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/booke_cache.c \
src/sys/arch/powerpc/booke/spe_subr.S
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/booke/booke_pmap.c \
src/sys/arch/powerpc/booke/trap.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/booke/booke_stubs.c \
src/sys/arch/powerpc/booke/spe.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/booke/copyin.c \
src/sys/arch/powerpc/booke/copyout.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/powerpc/booke/e500_intr.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/booke/e500_tlb.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/kcopy.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/booke/dev/cpunode.c \
src/sys/arch/powerpc/booke/dev/pq3cfi.c \
src/sys/arch/powerpc/booke/dev/pq3duart.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/dev/e500wdog.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/booke/dev/pq3ddrc.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/dev/pq3diic.c \
src/sys/arch/powerpc/booke/dev/pq3obio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/dev/pq3ehci.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/powerpc/booke/dev/pq3etsec.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/booke/dev/pq3gpio.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/dev/pq3nandfcm.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/booke/pci/pq3pci.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/fpu/fpu_emu.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/ibm4xx/pic_uic.c
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/powerpc/ibm4xx/trap.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/ibm4xx/dev/com_opb.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/ibm4xx/dev/emacreg.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/powerpc/ibm4xx/dev/if_emac.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/ibm4xx/dev/opb.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/ibm4xx/dev/plb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/ibm4xx/dev/rgmii.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/ibm4xx/openbios/locore.S
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/ibm4xx/pci/pchb.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/aout_machdep.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/bus_defs.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/include/db_machdep.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/fpu.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/include/frame.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/include/param.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/psl.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/include/reloc.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/signal.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/trap.h
cvs rdiff -u -r1.30 -r1.31 

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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:09:23 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: booke_pmap.c

Log Message:
Include missing opt_multiprocessor.h and opt_pmap.h.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/booke/booke_pmap.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/booke/booke_pmap.c
diff -u src/sys/arch/powerpc/booke/booke_pmap.c:1.28 src/sys/arch/powerpc/booke/booke_pmap.c:1.29
--- src/sys/arch/powerpc/booke/booke_pmap.c:1.28	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/booke/booke_pmap.c	Mon Jul  6 10:09:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: booke_pmap.c,v 1.28 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: booke_pmap.c,v 1.29 2020/07/06 10:09:23 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,7 +37,12 @@
 #define __PMAP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.28 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.29 2020/07/06 10:09:23 rin Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_multiprocessor.h"
+#include "opt_pmap.h"
+#endif
 
 #include 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:09:23 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: booke_pmap.c

Log Message:
Include missing opt_multiprocessor.h and opt_pmap.h.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/booke/booke_pmap.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:10:57 UTC 2020

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

Log Message:
Make this compile without __HAVE_FAST_SOFTINTS for debug.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/powerpc/intr_stubs.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/intr_stubs.c
diff -u src/sys/arch/powerpc/powerpc/intr_stubs.c:1.5 src/sys/arch/powerpc/powerpc/intr_stubs.c:1.6
--- src/sys/arch/powerpc/powerpc/intr_stubs.c:1.5	Wed Oct 19 00:08:42 2016
+++ src/sys/arch/powerpc/powerpc/intr_stubs.c	Mon Jul  6 08:10:57 2020
@@ -38,7 +38,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: intr_stubs.c,v 1.5 2016/10/19 00:08:42 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr_stubs.c,v 1.6 2020/07/06 08:10:57 rin Exp $");
 
 #include 
 #include 
@@ -137,6 +137,7 @@ splx(int ipl)
 	return (*powerpc_intrsw->intrsw_splx)(ipl);
 }
 
+#ifdef __HAVE_FAST_SOFTINTS
 void softint_init_md(struct lwp *, u_int, uintptr_t *) __stub;
 
 void
@@ -152,6 +153,7 @@ softint_trigger(uintptr_t machdep)
 {
 	(*powerpc_intrsw->intrsw_softint_trigger)(machdep);
 }
+#endif
 
 void intr_cpu_attach(struct cpu_info *) __stub;
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:26:10 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
Correct #ifdef; _MODULE not _MODULAR here.

Now __HAVE_PMAP_PHYSSEG is defined correctly for modules, which was
missing accidentally.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/vmparam.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/powerpc/include/vmparam.h
diff -u src/sys/arch/powerpc/include/vmparam.h:1.23 src/sys/arch/powerpc/include/vmparam.h:1.24
--- src/sys/arch/powerpc/include/vmparam.h:1.23	Sat Jun 27 02:51:23 2020
+++ src/sys/arch/powerpc/include/vmparam.h	Mon Jul  6 08:26:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.23 2020/06/27 02:51:23 rin Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.24 2020/07/06 08:26:10 rin Exp $	*/
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -77,7 +77,7 @@ extern const char __USRSTACK;		/* let th
 
 #endif /* !_MODULE */
 
-#if defined(MODULAR) || defined(_MODULAR)
+#if defined(MODULAR) || defined(_MODULE)
 /*
  * If we are a module or support modules, we need to define a compatible
  * pmap_physseg since IBM4XX uses one.  This will waste a tiny of space



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:26:10 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
Correct #ifdef; _MODULE not _MODULAR here.

Now __HAVE_PMAP_PHYSSEG is defined correctly for modules, which was
missing accidentally.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/vmparam.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/powerpc/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:13:02 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: trap.c

Log Message:
Include missing opt_altivec.h for PPC_HAVE_SPE.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/booke/trap.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/booke/trap.c
diff -u src/sys/arch/powerpc/booke/trap.c:1.28 src/sys/arch/powerpc/booke/trap.c:1.29
--- src/sys/arch/powerpc/booke/trap.c:1.28	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/booke/trap.c	Mon Jul  6 10:13:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.28 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: trap.c,v 1.29 2020/07/06 10:13:02 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,9 +35,10 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.28 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.29 2020/07/06 10:13:02 rin Exp $");
 
 #ifdef _KERNEL_OPT
+#include "opt_altivec.h"
 #include "opt_ddb.h"
 #endif
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:13:02 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: trap.c

Log Message:
Include missing opt_altivec.h for PPC_HAVE_SPE.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/booke/trap.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/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:12:04 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: e500_tlb.c

Log Message:
Include missing opt_multiprocessor.h and opt_pmap.h.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/booke/e500_tlb.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/booke/e500_tlb.c
diff -u src/sys/arch/powerpc/booke/e500_tlb.c:1.20 src/sys/arch/powerpc/booke/e500_tlb.c:1.21
--- src/sys/arch/powerpc/booke/e500_tlb.c:1.20	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/booke/e500_tlb.c	Mon Jul  6 10:12:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_tlb.c,v 1.20 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: e500_tlb.c,v 1.21 2020/07/06 10:12:04 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,9 +37,11 @@
 #define	__PMAP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.20 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.21 2020/07/06 10:12:04 rin Exp $");
 
 #ifdef _KERNEL_OPT
+#include "opt_multiprocessor.h"
+#include "opt_pmap.h"
 #include "opt_ppcparam.h"
 #endif
 



CVS commit: src/sys/arch/powerpc

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:34:23 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c
src/sys/arch/powerpc/oea: oea_machdep.c

Log Message:
Drop unused opt_compat_netbsd.h include.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/powerpc/oea/oea_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
diff -u src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.30 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.31
--- src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.30	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c	Mon Jul  6 10:34:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibm4xx_machdep.c,v 1.30 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: ibm4xx_machdep.c,v 1.31 2020/07/06 10:34:23 rin Exp $	*/
 /*	Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
 
 /*
@@ -68,12 +68,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.30 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.31 2020/07/06 10:34:23 rin Exp $");
 
 #include "ksyms.h"
 
 #ifdef _KERNEL_OPT
-#include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
 #include "opt_modular.h"

Index: src/sys/arch/powerpc/oea/oea_machdep.c
diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.80 src/sys/arch/powerpc/oea/oea_machdep.c:1.81
--- src/sys/arch/powerpc/oea/oea_machdep.c:1.80	Mon Jul  6 09:34:17 2020
+++ src/sys/arch/powerpc/oea/oea_machdep.c	Mon Jul  6 10:34:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: oea_machdep.c,v 1.80 2020/07/06 09:34:17 rin Exp $	*/
+/*	$NetBSD: oea_machdep.c,v 1.81 2020/07/06 10:34:23 rin Exp $	*/
 
 /*
  * Copyright (C) 2002 Matt Thomas
@@ -33,11 +33,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.80 2020/07/06 09:34:17 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.81 2020/07/06 10:34:23 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
-#include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
 #include "opt_multiprocessor.h"



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:35:29 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: pic_uic.c

Log Message:
Include missing opt_ppcarch.h and opt_uic.h.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/ibm4xx/pic_uic.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/ibm4xx/pic_uic.c
diff -u src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.6 src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.7
--- src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.6	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/ibm4xx/pic_uic.c	Mon Jul  6 10:35:28 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_uic.c,v 1.6 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: pic_uic.c,v 1.7 2020/07/06 10:35:28 rin Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic_uic.c,v 1.6 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_uic.c,v 1.7 2020/07/06 10:35:28 rin Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_ppcarch.h"
+#include "opt_uic.h"
+#endif
 
 #include 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:35:29 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: pic_uic.c

Log Message:
Include missing opt_ppcarch.h and opt_uic.h.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/ibm4xx/pic_uic.c

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



CVS commit: src/tests/sbin/ifconfig

2020-07-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul  6 10:35:01 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Remove the expected timeout; there is something more sinister behind the
timeouts seen on the Qemu/evbarm-aarch64 runs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

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

Modified files:

Index: src/tests/sbin/ifconfig/t_repeated_link_addr.sh
diff -u src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.2 src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.3
--- src/tests/sbin/ifconfig/t_repeated_link_addr.sh:1.2	Fri Jul  3 02:51:13 2020
+++ src/tests/sbin/ifconfig/t_repeated_link_addr.sh	Mon Jul  6 10:35:00 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_repeated_link_addr.sh,v 1.2 2020/07/03 02:51:13 jruoho Exp $
+# $NetBSD: t_repeated_link_addr.sh,v 1.3 2020/07/06 10:35:00 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,12 +37,6 @@ repeated_link_addr_head() {
 
 repeated_link_addr_body() {
 
-	case $(uname -m) in
-		evbarm)
-			atf_expect_timeout "reason for timeout unknown"
-			;;
-	esac
-
 	fail=0
 	addrs="00:11:00:00:00:00 \
 	   00:11:11:00:00:00 \



CVS commit: src/sys/arch/powerpc

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:34:23 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c
src/sys/arch/powerpc/oea: oea_machdep.c

Log Message:
Drop unused opt_compat_netbsd.h include.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/powerpc/oea/oea_machdep.c

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



CVS commit: src/tests/sbin/ifconfig

2020-07-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul  6 10:35:01 UTC 2020

Modified Files:
src/tests/sbin/ifconfig: t_repeated_link_addr.sh

Log Message:
Remove the expected timeout; there is something more sinister behind the
timeouts seen on the Qemu/evbarm-aarch64 runs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_repeated_link_addr.sh

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/ibm4xx/openbios

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:44:38 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx/openbios: locore.S

Log Message:
Drop unused opt_lockdebug.h, opt_multiprocessor.h, and opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/ibm4xx/openbios/locore.S

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/ibm4xx/openbios/locore.S
diff -u src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.13 src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.14
--- src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.13	Mon Jul  6 09:34:17 2020
+++ src/sys/arch/powerpc/ibm4xx/openbios/locore.S	Mon Jul  6 10:44:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.13 2020/07/06 09:34:17 rin Exp $	*/
+/*	$NetBSD: locore.S,v 1.14 2020/07/06 10:44:38 rin Exp $	*/
 /*	$OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $	*/
 
 /*
@@ -74,10 +74,7 @@
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
-#include "opt_lockdebug.h"
 #include "opt_modular.h"
-#include "opt_multiprocessor.h"
-#include "opt_ppcarch.h"
 #include "opt_ppcparam.h"
 #endif
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:44:38 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx/openbios: locore.S

Log Message:
Drop unused opt_lockdebug.h, opt_multiprocessor.h, and opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/ibm4xx/openbios/locore.S

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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:10:57 UTC 2020

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

Log Message:
Make this compile without __HAVE_FAST_SOFTINTS for debug.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/powerpc/intr_stubs.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/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:11:14 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: e500_intr.c

Log Message:
Drop unused opt_ddb.h.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/powerpc/booke/e500_intr.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/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.43 src/sys/arch/powerpc/booke/e500_intr.c:1.44
--- src/sys/arch/powerpc/booke/e500_intr.c:1.43	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/booke/e500_intr.c	Mon Jul  6 10:11:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_intr.c,v 1.43 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: e500_intr.c,v 1.44 2020/07/06 10:11:14 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,10 +37,9 @@
 #define __INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.43 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.44 2020/07/06 10:11:14 rin Exp $");
 
 #ifdef _KERNEL_OPT
-#include "opt_ddb.h"
 #include "opt_mpc85xx.h"
 #include "opt_multiprocessor.h"
 #endif



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:12:04 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: e500_tlb.c

Log Message:
Include missing opt_multiprocessor.h and opt_pmap.h.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/booke/e500_tlb.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/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:11:14 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: e500_intr.c

Log Message:
Drop unused opt_ddb.h.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/powerpc/booke/e500_intr.c

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



CVS commit: src/tests/usr.sbin

2020-07-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul  6 10:32:18 UTC 2020

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh
src/tests/usr.sbin/opensnoop: t_opensnoop.sh

Log Message:
Sleep more.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.sbin/execsnoop/t_execsnoop.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.sbin/opensnoop/t_opensnoop.sh

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

Modified files:

Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.1 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.2
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.1	Tue Jun 30 14:30:49 2020
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Mon Jul  6 10:32:18 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.1 2020/06/30 14:30:49 jruoho Exp $
+# $NetBSD: t_execsnoop.sh,v 1.2 2020/07/06 10:32:18 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,7 +47,7 @@ basic_body() {
 		n=$(expr $n - 1)
 	done
 
-	sleep 1
+	sleep 3
 	pkill -9 execsnoop
 
 	if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then

Index: src/tests/usr.sbin/opensnoop/t_opensnoop.sh
diff -u src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.1 src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.2
--- src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.1	Tue Jun 30 14:30:50 2020
+++ src/tests/usr.sbin/opensnoop/t_opensnoop.sh	Mon Jul  6 10:32:18 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_opensnoop.sh,v 1.1 2020/06/30 14:30:50 jruoho Exp $
+# $NetBSD: t_opensnoop.sh,v 1.2 2020/07/06 10:32:18 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,7 +47,7 @@ basic_body() {
 		n=$(expr $n - 1)
 	done
 
-	sleep 1
+	sleep 3
 	pkill -9 opensnoop
 
 	if [ ! $(cat $tmp | grep "/etc/spwd.db" | wc -l) -eq 10 ]; then



CVS commit: src/tests/usr.sbin

2020-07-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jul  6 10:32:18 UTC 2020

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh
src/tests/usr.sbin/opensnoop: t_opensnoop.sh

Log Message:
Sleep more.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.sbin/execsnoop/t_execsnoop.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.sbin/opensnoop/t_opensnoop.sh

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/ibm4xx

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:41:43 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: trap.c

Log Message:
- Drop unused opt_altivec.h.
- Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/powerpc/ibm4xx/trap.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/ibm4xx/trap.c
diff -u src/sys/arch/powerpc/ibm4xx/trap.c:1.82 src/sys/arch/powerpc/ibm4xx/trap.c:1.83
--- src/sys/arch/powerpc/ibm4xx/trap.c:1.82	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/ibm4xx/trap.c	Mon Jul  6 10:41:43 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.82 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: trap.c,v 1.83 2020/07/06 10:41:43 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -69,12 +69,12 @@
 #define	__UFETCHSTORE_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.82 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.83 2020/07/06 10:41:43 rin Exp $");
 
 #ifdef _KERNEL_OPT
-#include "opt_altivec.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
+#include "opt_ppcarch.h"
 #endif
 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:41:43 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: trap.c

Log Message:
- Drop unused opt_altivec.h.
- Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/powerpc/ibm4xx/trap.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/ibm4xx

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:40:21 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: pmap.c

Log Message:
Include missing opt_ddb.h.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/powerpc/ibm4xx/pmap.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/ibm4xx/pmap.c
diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.89 src/sys/arch/powerpc/ibm4xx/pmap.c:1.90
--- src/sys/arch/powerpc/ibm4xx/pmap.c:1.89	Mon Jun 29 06:51:32 2020
+++ src/sys/arch/powerpc/ibm4xx/pmap.c	Mon Jul  6 10:40:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.89 2020/06/29 06:51:32 rin Exp $	*/
+/*	$NetBSD: pmap.c,v 1.90 2020/07/06 10:40:21 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.89 2020/06/29 06:51:32 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.90 2020/07/06 10:40:21 rin Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_ddb.h"
+#endif
 
 #include 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:42:21 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: trap_subr.S

Log Message:
Include required opt_*.h for sure.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/ibm4xx/trap_subr.S

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/ibm4xx/trap_subr.S
diff -u src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.28 src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.29
--- src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.28	Sun Mar  1 23:23:36 2020
+++ src/sys/arch/powerpc/ibm4xx/trap_subr.S	Mon Jul  6 10:42:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.28 2020/03/01 23:23:36 rin Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.29 2020/07/06 10:42:21 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -73,6 +73,11 @@
  *	#include 
  */
 
+#ifdef _KERNEL_OPT
+#include "opt_ddb.h"
+#include "opt_kgdb.h"
+#endif
+
 /*
  * XXX Interrupt and spill stacks need to be per-CPU.
  */



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:17:01 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: pmap.h
src/sys/arch/powerpc/include/oea: pte.h

Log Message:
Fix comments. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/oea/pte.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:17:01 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: pmap.h
src/sys/arch/powerpc/include/oea: pte.h

Log Message:
Fix comments. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/include/oea/pte.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/powerpc/include/pmap.h
diff -u src/sys/arch/powerpc/include/pmap.h:1.39 src/sys/arch/powerpc/include/pmap.h:1.40
--- src/sys/arch/powerpc/include/pmap.h:1.39	Sat Jun 27 02:40:24 2020
+++ src/sys/arch/powerpc/include/pmap.h	Mon Jul  6 08:17:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.39 2020/06/27 02:40:24 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.40 2020/07/06 08:17:01 rin Exp $	*/
 
 #ifndef _POWERPC_PMAP_H_
 #define _POWERPC_PMAP_H_
@@ -35,7 +35,7 @@
 struct vm_page_md {
 	uintptr_t mdpg_dummy[5];
 };
-#endif /* !__HVE_VM_PAGE_MD */
+#endif /* !__HAVE_VM_PAGE_MD */
 
 __CTASSERT(sizeof(struct vm_page_md) == sizeof(uintptr_t)*5);
 

Index: src/sys/arch/powerpc/include/oea/pte.h
diff -u src/sys/arch/powerpc/include/oea/pte.h:1.9 src/sys/arch/powerpc/include/oea/pte.h:1.10
--- src/sys/arch/powerpc/include/oea/pte.h:1.9	Tue Feb  5 18:10:47 2008
+++ src/sys/arch/powerpc/include/oea/pte.h	Mon Jul  6 08:17:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.9 2008/02/05 18:10:47 garbled Exp $	*/
+/*	$NetBSD: pte.h,v 1.10 2020/07/06 08:17:01 rin Exp $	*/
 
 /*-
  * Copyright (C) 2003 Matt Thomas
@@ -46,7 +46,7 @@ struct pte {
 	register64_t pte_hi;
 	register64_t pte_lo;
 };
-#else	/* PPC_OEA || PPC_OEA64 */
+#else	/* PMAP_OEA */
 struct pte {
 	register_t pte_hi;
 	register_t pte_lo;



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:38:46 UTC 2020

Modified Files:
src/sys/arch/evbppc/conf: files.explora

Log Message:
Now, sys/arch/powerpc/ibm4xx/pic_uic.c requires opt_uic.h.

XXX
Switch to powerpc/conf/files.ibm4xx.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbppc/conf/files.explora

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/conf/files.explora
diff -u src/sys/arch/evbppc/conf/files.explora:1.9 src/sys/arch/evbppc/conf/files.explora:1.10
--- src/sys/arch/evbppc/conf/files.explora:1.9	Mon Jun 20 17:44:33 2011
+++ src/sys/arch/evbppc/conf/files.explora	Mon Jul  6 10:38:46 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.explora,v 1.9 2011/06/20 17:44:33 matt Exp $
+#	$NetBSD: files.explora,v 1.10 2020/07/06 10:38:46 rin Exp $
 
 # maxpartitions must be first item in files.${ARCH}
 
@@ -16,6 +16,7 @@ file	arch/evbppc/explora/autoconf.c
 file	arch/evbppc/explora/consinit.c
 file	arch/evbppc/explora/machdep.c
 file	arch/powerpc/ibm4xx/ibm4xx_machdep.c
+defflag	opt_uic.h	MULTIUIC
 file	arch/powerpc/ibm4xx/pic_uic.c
 file	dev/md_root.cmemory_disk_hooks
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:38:46 UTC 2020

Modified Files:
src/sys/arch/evbppc/conf: files.explora

Log Message:
Now, sys/arch/powerpc/ibm4xx/pic_uic.c requires opt_uic.h.

XXX
Switch to powerpc/conf/files.ibm4xx.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbppc/conf/files.explora

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/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:20:40 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: asm.h

Log Message:
Consistently use _LP64 instead of __LP64__, although both are defined for
powerpc64.

No binary changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/powerpc/include/asm.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:20:40 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: asm.h

Log Message:
Consistently use _LP64 instead of __LP64__, although both are defined for
powerpc64.

No binary changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/powerpc/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/powerpc/include/asm.h
diff -u src/sys/arch/powerpc/include/asm.h:1.51 src/sys/arch/powerpc/include/asm.h:1.52
--- src/sys/arch/powerpc/include/asm.h:1.51	Sat Apr 18 10:37:37 2020
+++ src/sys/arch/powerpc/include/asm.h	Mon Jul  6 08:20:40 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.51 2020/04/18 10:37:37 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.52 2020/07/06 08:20:40 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -81,7 +81,7 @@
 #  define PIC_TOCSETUP(n, r)
 # endif /* __PIC__ */
 
-#endif /* __LP64__ */
+#endif /* _LP64 */
 
 #define	_C_LABEL(x)	x
 #define	_ASM_LABEL(x)	x
@@ -148,7 +148,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 
 # define ENTRY_NOPROFILE(y) _ENTRY(_C_LABEL(y))
 # define ASENTRY(y)	_ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
-#endif /* __LP64__ */
+#endif /* _LP64 */
 
 #define	GLOBAL(y)	_GLOBAL(_C_LABEL(y))
 
@@ -369,7 +369,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 # define cmplongli	cmplwi
 # define cmpregli	cmplwi
 
-#else /* __LP64__ */
+#else /* _LP64 */
 
 # define ldlong		ld	/* load "C" long */
 # define ldlongu	ldu	/* load "C" long with update */
@@ -414,7 +414,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 # define cmplongli	cmpldi
 # define cmpregli	cmpldi
 
-#endif /* __LP64__ */
+#endif /* _LP64 */
 
 #ifdef _LOCORE
 .macro	stmd	r,dst
@@ -435,7 +435,7 @@ y:	.quad	.##y,.TOC.@tocbase,0;	\
 #endif /* _LOCORE */
 
 #if defined(IBM405_ERRATA77) || \
-((defined(_MODULE) || !defined(_KERNEL)) && !defined(__LP64__))
+((defined(_MODULE) || !defined(_KERNEL)) && !defined(_LP64))
 /*
  * Workaround for IBM405 Errata 77 (CPU_210): interrupted stwcx. may
  * errantly write data to memory



CVS commit: src/sys/arch/powerpc

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:31:24 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c
src/sys/arch/powerpc/ibm4xx: clock.c
src/sys/arch/powerpc/include: cpu_counter.h pio.h spr.h
src/sys/arch/powerpc/include/oea: bat.h hid.h spr.h
src/sys/arch/powerpc/oea: cpu_subr.c ofw_subr.S
src/sys/arch/powerpc/pic: intr.c
src/sys/arch/powerpc/powerpc: bus_dma.c bus_space.c clock.c db_disasm.c
fixup.c pio_subr.S pmap_subr.c

Log Message:
Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/fpu/fpu_emu.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/ibm4xx/clock.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/cpu_counter.h \
src/sys/arch/powerpc/include/pio.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/powerpc/include/spr.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/include/oea/bat.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/include/oea/hid.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/oea/spr.h
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/oea/ofw_subr.S
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/powerpc/powerpc/bus_dma.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/powerpc/bus_space.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/powerpc/clock.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/powerpc/db_disasm.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/powerpc/fixup.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/powerpc/pio_subr.S
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/powerpc/pmap_subr.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:31:24 UTC 2020

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c
src/sys/arch/powerpc/ibm4xx: clock.c
src/sys/arch/powerpc/include: cpu_counter.h pio.h spr.h
src/sys/arch/powerpc/include/oea: bat.h hid.h spr.h
src/sys/arch/powerpc/oea: cpu_subr.c ofw_subr.S
src/sys/arch/powerpc/pic: intr.c
src/sys/arch/powerpc/powerpc: bus_dma.c bus_space.c clock.c db_disasm.c
fixup.c pio_subr.S pmap_subr.c

Log Message:
Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/fpu/fpu_emu.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/ibm4xx/clock.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/cpu_counter.h \
src/sys/arch/powerpc/include/pio.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/powerpc/include/spr.h
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/include/oea/bat.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/include/oea/hid.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/oea/spr.h
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/oea/ofw_subr.S
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/powerpc/powerpc/bus_dma.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/powerpc/bus_space.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/powerpc/clock.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/powerpc/db_disasm.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/powerpc/fixup.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/powerpc/pio_subr.S
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/powerpc/pmap_subr.c

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

Modified files:

Index: src/sys/arch/powerpc/fpu/fpu_emu.c
diff -u src/sys/arch/powerpc/fpu/fpu_emu.c:1.23 src/sys/arch/powerpc/fpu/fpu_emu.c:1.24
--- src/sys/arch/powerpc/fpu/fpu_emu.c:1.23	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/fpu/fpu_emu.c	Mon Jul  6 10:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu_emu.c,v 1.23 2020/07/06 09:34:16 rin Exp $ */
+/*	$NetBSD: fpu_emu.c,v 1.24 2020/07/06 10:31:23 rin Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -76,10 +76,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.23 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.24 2020/07/06 10:31:23 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
+#include "opt_ppcarch.h"
 #endif
 
 #include 

Index: src/sys/arch/powerpc/ibm4xx/clock.c
diff -u src/sys/arch/powerpc/ibm4xx/clock.c:1.28 src/sys/arch/powerpc/ibm4xx/clock.c:1.29
--- src/sys/arch/powerpc/ibm4xx/clock.c:1.28	Fri May 29 12:30:40 2020
+++ src/sys/arch/powerpc/ibm4xx/clock.c	Mon Jul  6 10:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.28 2020/05/29 12:30:40 rin Exp $	*/
+/*	$NetBSD: clock.c,v 1.29 2020/07/06 10:31:23 rin Exp $	*/
 /*  $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $  */
 
 /*
@@ -33,7 +33,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.28 2020/05/29 12:30:40 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.29 2020/07/06 10:31:23 rin Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_ppcarch.h"
+#endif
 
 #include 
 #include 

Index: src/sys/arch/powerpc/include/cpu_counter.h
diff -u src/sys/arch/powerpc/include/cpu_counter.h:1.8 src/sys/arch/powerpc/include/cpu_counter.h:1.9
--- src/sys/arch/powerpc/include/cpu_counter.h:1.8	Tue Jan 18 01:02:54 2011
+++ src/sys/arch/powerpc/include/cpu_counter.h	Mon Jul  6 10:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_counter.h,v 1.8 2011/01/18 01:02:54 matt Exp $	*/
+/*	$NetBSD: cpu_counter.h,v 1.9 2020/07/06 10:31:23 rin Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -35,6 +35,10 @@
 
 #ifdef _KERNEL
 
+#ifdef _KERNEL_OPT
+#include "opt_ppcarch.h"
+#endif
+
 #include 
 #ifdef PPC_OEA601
 #include 
Index: src/sys/arch/powerpc/include/pio.h
diff -u src/sys/arch/powerpc/include/pio.h:1.8 src/sys/arch/powerpc/include/pio.h:1.9
--- src/sys/arch/powerpc/include/pio.h:1.8	Thu Feb 20 05:10:01 2020
+++ src/sys/arch/powerpc/include/pio.h	Mon Jul  6 10:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pio.h,v 1.8 2020/02/20 05:10:01 rin Exp $ */
+/*	$NetBSD: pio.h,v 1.9 2020/07/06 10:31:23 rin Exp $ */
 /*	$OpenBSD: pio.h,v 1.1 1997/10/13 10:53:47 pefo Exp $ */
 
 /*
@@ -35,6 +35,11 @@
 
 #ifndef _POWERPC_PIO_H_
 #define _POWERPC_PIO_H_
+
+#ifdef _KERNEL_OPT
+#include "opt_ppcarch.h"
+#endif
+
 /*
  * I/O macros.
  */

Index: src/sys/arch/powerpc/include/spr.h
diff -u src/sys/arch/powerpc/include/spr.h:1.52 src/sys/arch/powerpc/include/spr.h:1.53
--- src/sys/arch/powerpc/include/spr.h:1.52	Thu Apr 19 21:50:07 2018
+++ src/sys/arch/powerpc/include/spr.h	Mon Jul  6 10:31:23 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spr.h,v 1.52 2018/04/19 21:50:07 christos Exp $	*/
+/*	

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

2020-07-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jul  6 07:36:14 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: cpuswitch.S

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/arm/arm32/cpuswitch.S

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/arm32/cpuswitch.S
diff -u src/sys/arch/arm/arm32/cpuswitch.S:1.99 src/sys/arch/arm/arm32/cpuswitch.S:1.100
--- src/sys/arch/arm/arm32/cpuswitch.S:1.99	Fri Jul  3 06:35:05 2020
+++ src/sys/arch/arm/arm32/cpuswitch.S	Mon Jul  6 07:36:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuswitch.S,v 1.99 2020/07/03 06:35:05 skrll Exp $	*/
+/*	$NetBSD: cpuswitch.S,v 1.100 2020/07/06 07:36:14 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -86,7 +86,7 @@
 #include 
 #include 
 
-	RCSID("$NetBSD: cpuswitch.S,v 1.99 2020/07/03 06:35:05 skrll Exp $")
+	RCSID("$NetBSD: cpuswitch.S,v 1.100 2020/07/06 07:36:14 skrll Exp $")
 
 /* LINTSTUB: include  */
 
@@ -190,6 +190,7 @@ ENTRY(cpu_switchto)
 
 	/* We have a new curlwp now so make a note of it */
 	str	r6, [r5, #(CI_CURLWP)]
+
 	/* Get the new pcb */
 	ldr	r7, [r6, #(L_PCB)]
 
@@ -236,7 +237,6 @@ ENTRY(cpu_switchto)
 	/*
 	 * Check for restartable atomic sequences (RAS).
 	 */
-
 	ldr	r0, [r6, #(L_PROC)]	/* fetch the proc for ras_lookup */
 	ldr	r2, [r0, #(P_RASLIST)]
 	cmp	r2, #0			/* p->p_nras == 0? */



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

2020-07-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Jul  6 07:36:14 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: cpuswitch.S

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/arm/arm32/cpuswitch.S

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/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:13:00 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: e500_intr.c

Log Message:
XXX
Skip KASSERT which fires when !__HAVE_FAST_SOFTINTS. Just for debug.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/powerpc/booke/e500_intr.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/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:13:00 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: e500_intr.c

Log Message:
XXX
Skip KASSERT which fires when !__HAVE_FAST_SOFTINTS. Just for debug.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/powerpc/booke/e500_intr.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/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.41 src/sys/arch/powerpc/booke/e500_intr.c:1.42
--- src/sys/arch/powerpc/booke/e500_intr.c:1.41	Sat Jul  4 17:20:45 2020
+++ src/sys/arch/powerpc/booke/e500_intr.c	Mon Jul  6 08:13:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_intr.c,v 1.41 2020/07/04 17:20:45 rin Exp $	*/
+/*	$NetBSD: e500_intr.c,v 1.42 2020/07/06 08:13:00 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -41,7 +41,7 @@
 #define __INTR_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.41 2020/07/04 17:20:45 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: e500_intr.c,v 1.42 2020/07/06 08:13:00 rin Exp $");
 
 #include 
 #include 
@@ -510,7 +510,9 @@ e500_splset(struct cpu_info *ci, int ipl
 {
 	struct cpu_softc * const cpu = ci->ci_softc;
 
+#ifdef __HAVE_FAST_SOFTINTS /* XXX */
 	KASSERT((curlwp->l_pflag & LP_INTR) == 0 || ipl != IPL_NONE);
+#endif
 	const u_int ctpr = IPL2CTPR(ipl);
 	KASSERT(openpic_read(cpu, OPENPIC_CTPR) == IPL2CTPR(ci->ci_cpl));
 	openpic_write(cpu, OPENPIC_CTPR, ctpr);



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:08:16 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: booke_machdep.c

Log Message:
Include missing ksyms.h, opt_ddb.h, and opt_multiprocessor.h.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/booke/booke_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/booke/booke_machdep.c
diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.31 src/sys/arch/powerpc/booke/booke_machdep.c:1.32
--- src/sys/arch/powerpc/booke/booke_machdep.c:1.31	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/booke/booke_machdep.c	Mon Jul  6 10:08:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: booke_machdep.c,v 1.31 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: booke_machdep.c,v 1.32 2020/07/06 10:08:16 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,10 +38,14 @@
 #define	_POWERPC_BUS_DMA_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.31 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_machdep.c,v 1.32 2020/07/06 10:08:16 rin Exp $");
+
+#include "ksyms.h"
 
 #ifdef _KERNEL_OPT
+#include "opt_ddb.h"
 #include "opt_modular.h"
+#include "opt_multiprocessor.h"
 #endif
 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:08:16 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: booke_machdep.c

Log Message:
Include missing ksyms.h, opt_ddb.h, and opt_multiprocessor.h.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/booke/booke_machdep.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/nand

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:22:07 UTC 2020

Modified Files:
src/sys/dev/nand: nand.h

Log Message:
Include opt_nand.h for NAND_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/nand/nand.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/nand/nand.h
diff -u src/sys/dev/nand/nand.h:1.19 src/sys/dev/nand/nand.h:1.20
--- src/sys/dev/nand/nand.h:1.19	Thu Apr 19 21:50:09 2018
+++ src/sys/dev/nand/nand.h	Mon Jul  6 10:22:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nand.h,v 1.19 2018/04/19 21:50:09 christos Exp $	*/
+/*	$NetBSD: nand.h,v 1.20 2020/07/06 10:22:07 rin Exp $	*/
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -37,6 +37,10 @@
 #include 
 #include 
 
+#ifdef _KERNEL_OPT
+#include "opt_nand.h"
+#endif
+
 #include 
 #include 
 #include 



CVS commit: src/sys/dev/nand

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:22:07 UTC 2020

Modified Files:
src/sys/dev/nand: nand.h

Log Message:
Include opt_nand.h for NAND_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/nand/nand.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/powerpc/ibm4xx

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:40:21 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: pmap.c

Log Message:
Include missing opt_ddb.h.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/powerpc/ibm4xx/pmap.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/ibm4xx

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:42:21 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: trap_subr.S

Log Message:
Include required opt_*.h for sure.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/powerpc/ibm4xx/trap_subr.S

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

2020-07-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul  6 07:51:09 UTC 2020

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

Log Message:
 Fix a bug that the WMREG_EEARBC_I210 register is incorrectly set if the system
uses iNVM.


To generate a diff of this commit:
cvs rdiff -u -r1.679 -r1.680 src/sys/dev/pci/if_wm.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/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.679 src/sys/dev/pci/if_wm.c:1.680
--- src/sys/dev/pci/if_wm.c:1.679	Sat Jun 27 13:32:00 2020
+++ src/sys/dev/pci/if_wm.c	Mon Jul  6 07:51:09 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.679 2020/06/27 13:32:00 jmcneill Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.680 2020/07/06 07:51:09 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.679 2020/06/27 13:32:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.680 2020/07/06 07:51:09 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -13582,6 +13582,13 @@ wm_nvm_read_invm(struct wm_softc *sc, in
 rv = -1;
 			}
 			break;
+		case NVM_OFF_CFG1: /* == INVM_AUTOLOAD */
+			rv = wm_nvm_read_word_invm(sc, offset, data);
+			if (rv != 0) {
+*data = INVM_DEFAULT_AL;
+rv = 0;
+			}
+			break;
 		case NVM_OFF_CFG2:
 			rv = wm_nvm_read_word_invm(sc, offset, data);
 			if (rv != 0) {
@@ -16442,6 +16449,8 @@ wm_platform_pm_pch_lpt(struct wm_softc *
 /*
  * I210 Errata 25 and I211 Errata 10
  * Slow System Clock.
+ *
+ * Note that this function is called on both FLASH and iNVM case on NetBSD.
  */
 static int
 wm_pll_workaround_i210(struct wm_softc *sc)
@@ -16467,8 +16476,13 @@ wm_pll_workaround_i210(struct wm_softc *
 	reg = mdicnfg & ~MDICNFG_DEST;
 	CSR_WRITE(sc, WMREG_MDICNFG, reg);
 
-	if (wm_nvm_read(sc, INVM_AUTOLOAD, 1, ) != 0)
+	if (wm_nvm_read(sc, INVM_AUTOLOAD, 1, ) != 0) {
+		/*
+		 * The default value of the Initialization Control Word 1
+		 * is the same on both I210's FLASH_HW and I21[01]'s iNVM.
+		 */
 		nvmword = INVM_DEFAULT_AL;
+	}
 	tmp_nvmword = nvmword | INVM_PLL_WO_VAL;
 
 	for (i = 0; i < WM_MAX_PLL_TRIES; i++) {



CVS commit: src/sys/dev/pci

2020-07-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jul  6 07:51:09 UTC 2020

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

Log Message:
 Fix a bug that the WMREG_EEARBC_I210 register is incorrectly set if the system
uses iNVM.


To generate a diff of this commit:
cvs rdiff -u -r1.679 -r1.680 src/sys/dev/pci/if_wm.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/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:18:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: frame.h

Log Message:
LKM was gone. _KERNEL is always defined for module.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/include/frame.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/powerpc/include

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:18:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: frame.h

Log Message:
LKM was gone. _KERNEL is always defined for module.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/include/frame.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/powerpc/include/frame.h
diff -u src/sys/arch/powerpc/include/frame.h:1.27 src/sys/arch/powerpc/include/frame.h:1.28
--- src/sys/arch/powerpc/include/frame.h:1.27	Sun Jan 24 19:49:35 2016
+++ src/sys/arch/powerpc/include/frame.h	Mon Jul  6 08:18:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.27 2016/01/24 19:49:35 christos Exp $	*/
+/*	$NetBSD: frame.h,v 1.28 2020/07/06 08:18:57 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -159,7 +159,7 @@ struct ktrapframe {
 	__register_t ktf_cframe_lr;	/* for DDB */
 };
 
-#if defined(_KERNEL) || defined(_LKM)
+#if defined(_KERNEL)
 #ifdef _LP64
 struct utrapframe32 {
 	__register32_t fixreg[32];
@@ -174,7 +174,7 @@ struct utrapframe32 {
 	int spare;
 };
 #endif
-#endif /* _KERNEL || _LKM */
+#endif /* _KERNEL */
 
 /*
  * This is to ensure alignment of the stackpointer



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:16:12 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: trap_subr.S

Log Message:
Include required opt_*.h for sure.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/booke/trap_subr.S

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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:22:44 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke/dev: pq3cfi.c pq3nandfcm.c

Log Message:
Drop unused opt_flash.h.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/booke/dev/pq3cfi.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/dev/pq3nandfcm.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/booke/dev/pq3cfi.c
diff -u src/sys/arch/powerpc/booke/dev/pq3cfi.c:1.6 src/sys/arch/powerpc/booke/dev/pq3cfi.c:1.7
--- src/sys/arch/powerpc/booke/dev/pq3cfi.c:1.6	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/booke/dev/pq3cfi.c	Mon Jul  6 10:22:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3cfi.c,v 1.6 2020/07/06 09:34:16 rin Exp $	*/
+/*	$NetBSD: pq3cfi.c,v 1.7 2020/07/06 10:22:44 rin Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,14 +33,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pq3cfi.c,v 1.6 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3cfi.c,v 1.7 2020/07/06 10:22:44 rin Exp $");
 
 #include "locators.h"
 
-#ifdef _KERNEL_OPT
-#include "opt_flash.h"
-#endif
-
 #include 
 #include 
 #include 

Index: src/sys/arch/powerpc/booke/dev/pq3nandfcm.c
diff -u src/sys/arch/powerpc/booke/dev/pq3nandfcm.c:1.3 src/sys/arch/powerpc/booke/dev/pq3nandfcm.c:1.4
--- src/sys/arch/powerpc/booke/dev/pq3nandfcm.c:1.3	Mon Jul  6 09:34:16 2020
+++ src/sys/arch/powerpc/booke/dev/pq3nandfcm.c	Mon Jul  6 10:22:44 2020
@@ -30,11 +30,7 @@
 #define LBC_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pq3nandfcm.c,v 1.3 2020/07/06 09:34:16 rin Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_flash.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: pq3nandfcm.c,v 1.4 2020/07/06 10:22:44 rin Exp $");
 
 #include 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:22:44 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke/dev: pq3cfi.c pq3nandfcm.c

Log Message:
Drop unused opt_flash.h.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/booke/dev/pq3cfi.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/dev/pq3nandfcm.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/include/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:14:54 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: e500var.h

Log Message:
e500_cpunode_submatch() should be declared regardless of _KERNEL_OPT.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/e500var.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/powerpc/include/booke/e500var.h
diff -u src/sys/arch/powerpc/include/booke/e500var.h:1.7 src/sys/arch/powerpc/include/booke/e500var.h:1.8
--- src/sys/arch/powerpc/include/booke/e500var.h:1.7	Tue Nov 27 19:24:47 2012
+++ src/sys/arch/powerpc/include/booke/e500var.h	Mon Jul  6 08:14:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500var.h,v 1.7 2012/11/27 19:24:47 matt Exp $	*/
+/*	$NetBSD: e500var.h,v 1.8 2020/07/06 08:14:54 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -78,9 +78,7 @@ struct e500_truthtab {
 u_int	e500_truth_decode(u_int, uint32_t, const struct e500_truthtab *,
 	size_t, u_int);
 uint16_t e500_get_svr(void);
-#ifdef _KERNEL_OPT
 int	e500_cpunode_submatch(device_t, cfdata_t, const char *, void *);
-#endif
 
 /*
  * Used by MP hatch code to fetch the TLB1 entries so they be setup on the



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 08:14:54 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: e500var.h

Log Message:
e500_cpunode_submatch() should be declared regardless of _KERNEL_OPT.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/booke/e500var.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/powerpc/include/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 09:10:02 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
LKM was gone.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/include/oea/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/arch/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.30 src/sys/arch/powerpc/include/oea/pmap.h:1.31
--- src/sys/arch/powerpc/include/oea/pmap.h:1.30	Sat Mar 14 14:05:43 2020
+++ src/sys/arch/powerpc/include/oea/pmap.h	Mon Jul  6 09:10:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.30 2020/03/14 14:05:43 ad Exp $	*/
+/*	$NetBSD: pmap.h,v 1.31 2020/07/06 09:10:02 rin Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -38,7 +38,7 @@
 #error use assym.h instead
 #endif
 
-#if defined(_LKM) || defined(_MODULE)
+#ifdef _MODULE
 #error this file should not be included by loadable kernel modules
 #endif
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 09:10:02 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
LKM was gone.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/booke

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:16:12 UTC 2020

Modified Files:
src/sys/arch/powerpc/booke: trap_subr.S

Log Message:
Include required opt_*.h for sure.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/booke/trap_subr.S

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/booke/trap_subr.S
diff -u src/sys/arch/powerpc/booke/trap_subr.S:1.12 src/sys/arch/powerpc/booke/trap_subr.S:1.13
--- src/sys/arch/powerpc/booke/trap_subr.S:1.12	Mon Jan 26 04:47:53 2015
+++ src/sys/arch/powerpc/booke/trap_subr.S	Mon Jul  6 10:16:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.12 2015/01/26 04:47:53 nonaka Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.13 2020/07/06 10:16:12 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,14 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-RCSID("$NetBSD: trap_subr.S,v 1.12 2015/01/26 04:47:53 nonaka Exp $")
+RCSID("$NetBSD: trap_subr.S,v 1.13 2020/07/06 10:16:12 rin Exp $")
+
+#ifdef _KERNEL_OPT
+#include "opt_altivec.h"
+#include "opt_ddb.h"
+#include "opt_mpc85xx.h"
+#include "opt_multiprocessor.h"
+#endif
 
 	.globl	_C_LABEL(sctrapexit), _C_LABEL(trapexit), _C_LABEL(intrcall)
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:01:24 UTC 2020

Modified Files:
src/sys/arch/powerpc/pic: ipi.c

Log Message:
Drop unused opt_altivec.h, opt_interrupt.h, opt_ipi.h, and opt_pic.h.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/pic/ipi.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/pic

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:01:24 UTC 2020

Modified Files:
src/sys/arch/powerpc/pic: ipi.c

Log Message:
Drop unused opt_altivec.h, opt_interrupt.h, opt_ipi.h, and opt_pic.h.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/pic/ipi.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/pic/ipi.c
diff -u src/sys/arch/powerpc/pic/ipi.c:1.15 src/sys/arch/powerpc/pic/ipi.c:1.16
--- src/sys/arch/powerpc/pic/ipi.c:1.15	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/pic/ipi.c	Mon Jul  6 11:01:24 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ipi.c,v 1.15 2020/07/06 09:34:18 rin Exp $ */
+/* $NetBSD: ipi.c,v 1.16 2020/07/06 11:01:24 rin Exp $ */
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,14 +29,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.15 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.16 2020/07/06 11:01:24 rin Exp $");
 
 #ifdef _KERNEL_OPT
-#include "opt_altivec.h"
-#include "opt_interrupt.h"
-#include "opt_ipi.h"
 #include "opt_multiprocessor.h"
-#include "opt_pic.h"
 #endif
 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:23:59 UTC 2020

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

Log Message:
This file is not used for ibm4xx.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/powerpc/powerpc/trap.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/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.159 src/sys/arch/powerpc/powerpc/trap.c:1.160
--- src/sys/arch/powerpc/powerpc/trap.c:1.159	Mon Jul  6 11:08:21 2020
+++ src/sys/arch/powerpc/powerpc/trap.c	Mon Jul  6 11:23:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.159 2020/07/06 11:08:21 rin Exp $	*/
+/*	$NetBSD: trap.c,v 1.160 2020/07/06 11:23:59 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,7 +35,7 @@
 #define	__UCAS_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.159 2020/07/06 11:08:21 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.160 2020/07/06 11:23:59 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -160,7 +160,7 @@ trap(struct trapframe *tf)
 	trunc_page(va), false)) {
 	return;
 }
-#if defined(DIAGNOSTIC) && !defined(PPC_OEA64) && !defined (PPC_IBM4XX)
+#if defined(DIAGNOSTIC) && !defined(PPC_OEA64)
 			} else if ((va >> ADDR_SR_SHFT) == USER_SR) {
 printf("trap: kernel %s DSI trap @ %#lx by %#lx"
 " (DSISR %#x): USER_SR unset\n",



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:23:59 UTC 2020

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

Log Message:
This file is not used for ibm4xx.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/powerpc/powerpc/trap.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/include/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:57:03 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Include missing opt_modular.h so that struct vm_page_md is compatible to
that for booke.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/include/oea/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/arch/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.31 src/sys/arch/powerpc/include/oea/pmap.h:1.32
--- src/sys/arch/powerpc/include/oea/pmap.h:1.31	Mon Jul  6 09:10:02 2020
+++ src/sys/arch/powerpc/include/oea/pmap.h	Mon Jul  6 10:57:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.31 2020/07/06 09:10:02 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.32 2020/07/06 10:57:03 rin Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -44,6 +44,7 @@
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
+#include "opt_modular.h"
 #endif
 #include 
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:48:54 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx/openbios: locore.S

Log Message:
Do not silently #undef PPC_4XX_NOCACHE, which results in terrible confusion.
Raise #error instead.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/ibm4xx/openbios/locore.S

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/include/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:57:03 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Include missing opt_modular.h so that struct vm_page_md is compatible to
that for booke.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/include/oea/pmap.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/powerpc/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:58:06 UTC 2020

Modified Files:
src/sys/arch/powerpc/oea: cpu_speedctl.c

Log Message:
Drop unused opt_ppcparam.h.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/oea/cpu_speedctl.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/oea

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:58:06 UTC 2020

Modified Files:
src/sys/arch/powerpc/oea: cpu_speedctl.c

Log Message:
Drop unused opt_ppcparam.h.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/oea/cpu_speedctl.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/oea/cpu_speedctl.c
diff -u src/sys/arch/powerpc/oea/cpu_speedctl.c:1.2 src/sys/arch/powerpc/oea/cpu_speedctl.c:1.3
--- src/sys/arch/powerpc/oea/cpu_speedctl.c:1.2	Mon Jul  6 09:34:17 2020
+++ src/sys/arch/powerpc/oea/cpu_speedctl.c	Mon Jul  6 10:58:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_speedctl.c,v 1.2 2020/07/06 09:34:17 rin Exp $ */
+/*	$NetBSD: cpu_speedctl.c,v 1.3 2020/07/06 10:58:06 rin Exp $ */
 
 /*-
  * Copyright (c) 2006 Michael Lorenz
@@ -27,11 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_speedctl.c,v 1.2 2020/07/06 09:34:17 rin Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_ppcparam.h"
-#endif
+__KERNEL_RCSID(0, "$NetBSD: cpu_speedctl.c,v 1.3 2020/07/06 10:58:06 rin Exp $");
 
 #include 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:48:54 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx/openbios: locore.S

Log Message:
Do not silently #undef PPC_4XX_NOCACHE, which results in terrible confusion.
Raise #error instead.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/ibm4xx/openbios/locore.S

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/ibm4xx/openbios/locore.S
diff -u src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.14 src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.15
--- src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.14	Mon Jul  6 10:44:38 2020
+++ src/sys/arch/powerpc/ibm4xx/openbios/locore.S	Mon Jul  6 10:48:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.14 2020/07/06 10:44:38 rin Exp $	*/
+/*	$NetBSD: locore.S,v 1.15 2020/07/06 10:48:54 rin Exp $	*/
 /*	$OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $	*/
 
 /*
@@ -67,7 +67,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#undef PPC_4XX_NOCACHE
+#ifdef PPC_4XX_NOCACHE
+#error "Fix me"
+#endif
 
 #include "assym.h"
 #include "ksyms.h"



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:59:37 UTC 2020

Modified Files:
src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
- Drop unused opt_compat_netbsd.h.
- Include missing opt_multiprocessor.h.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/powerpc/oea/ofwoea_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.48 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.49
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.48	Mon Jul  6 09:34:17 2020
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Mon Jul  6 10:59:37 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.48 2020/07/06 09:34:17 rin Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.49 2020/07/06 10:59:37 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,16 +30,16 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.48 2020/07/06 09:34:17 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.49 2020/07/06 10:59:37 rin Exp $");
 
 #include "ksyms.h"
 #include "wsdisplay.h"
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
-#include "opt_compat_netbsd.h"
 #include "opt_kgdb.h"
 #include "opt_modular.h"
+#include "opt_multiprocessor.h"
 #include "opt_oea.h"
 #include "opt_ofwoea.h"
 #include "opt_ppcarch.h"



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:59:37 UTC 2020

Modified Files:
src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
- Drop unused opt_compat_netbsd.h.
- Include missing opt_multiprocessor.h.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/powerpc/oea/ofwoea_machdep.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:08:22 UTC 2020

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

Log Message:
- Drop unused opt_multiprocessor.h.
- Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/powerpc/powerpc/trap.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/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.158 src/sys/arch/powerpc/powerpc/trap.c:1.159
--- src/sys/arch/powerpc/powerpc/trap.c:1.158	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/powerpc/trap.c	Mon Jul  6 11:08:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.158 2020/07/06 09:34:18 rin Exp $	*/
+/*	$NetBSD: trap.c,v 1.159 2020/07/06 11:08:21 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,12 +35,12 @@
 #define	__UCAS_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.158 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.159 2020/07/06 11:08:21 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
 #include "opt_ddb.h"
-#include "opt_multiprocessor.h"
+#include "opt_ppcarch.h"
 #endif
 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:08:22 UTC 2020

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

Log Message:
- Drop unused opt_multiprocessor.h.
- Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/powerpc/powerpc/trap.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:09:15 UTC 2020

Modified Files:
src/sys/arch/powerpc/powerpc: trap_subr.S

Log Message:
Include required opt_*.h for sure.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/powerpc/powerpc/trap_subr.S

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/trap_subr.S
diff -u src/sys/arch/powerpc/powerpc/trap_subr.S:1.82 src/sys/arch/powerpc/powerpc/trap_subr.S:1.83
--- src/sys/arch/powerpc/powerpc/trap_subr.S:1.82	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/powerpc/trap_subr.S	Mon Jul  6 11:09:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.82 2020/07/06 09:34:18 rin Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.83 2020/07/06 11:09:15 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -40,6 +40,9 @@
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
+#include "opt_ddb.h"
+#include "opt_kgdb.h"
+#include "opt_ppcarch.h"
 #endif
 
 /* LINTSTUB: include  */



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:09:15 UTC 2020

Modified Files:
src/sys/arch/powerpc/powerpc: trap_subr.S

Log Message:
Include required opt_*.h for sure.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/powerpc/powerpc/trap_subr.S

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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:24:57 UTC 2020

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

Log Message:
Stop using DDBX which is defined nowhere.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/arch/powerpc/powerpc/trap.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:24:57 UTC 2020

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

Log Message:
Stop using DDBX which is defined nowhere.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/arch/powerpc/powerpc/trap.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/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.160 src/sys/arch/powerpc/powerpc/trap.c:1.161
--- src/sys/arch/powerpc/powerpc/trap.c:1.160	Mon Jul  6 11:23:59 2020
+++ src/sys/arch/powerpc/powerpc/trap.c	Mon Jul  6 11:24:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.160 2020/07/06 11:23:59 rin Exp $	*/
+/*	$NetBSD: trap.c,v 1.161 2020/07/06 11:24:57 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,7 +35,7 @@
 #define	__UCAS_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.160 2020/07/06 11:23:59 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.161 2020/07/06 11:24:57 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -486,7 +486,7 @@ vm_signal:
 	default:
 		printf("trap type %x at %lx\n", type, tf->tf_srr0);
 brain_damage2:
-#ifdef DDBX
+#if defined(DDB) && 0 /* XXX */
 		if (kdb_trap(type, tf))
 			return;
 #endif



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 13:10:19 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c

Log Message:
Set cpu_psluserset, cpu_pslusermod, cpu_pslusermask for MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
diff -u src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.31 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.32
--- src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.31	Mon Jul  6 10:34:23 2020
+++ src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c	Mon Jul  6 13:10:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibm4xx_machdep.c,v 1.31 2020/07/06 10:34:23 rin Exp $	*/
+/*	$NetBSD: ibm4xx_machdep.c,v 1.32 2020/07/06 13:10:19 rin Exp $	*/
 /*	Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
 
 /*
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.31 2020/07/06 10:34:23 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.32 2020/07/06 13:10:19 rin Exp $");
 
 #include "ksyms.h"
 
@@ -115,6 +115,12 @@ char msgbuf[MSGBUFSIZE];
 void *startsym, *endsym;
 #endif
 
+#ifdef MODULAR
+register_t cpu_psluserset = PSL_USERSET;
+register_t cpu_pslusermod = PSL_USERMOD;
+register_t cpu_pslusermask = PSL_USERMASK;
+#endif
+
 /*
  * Trap vectors
  */



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 13:10:19 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c

Log Message:
Set cpu_psluserset, cpu_pslusermod, cpu_pslusermask for MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:54:56 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: cpuvar.h
src/sys/arch/powerpc/pic: pic_openpic.c

Log Message:
Include missing opt_multiprocessor.h.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/booke/cpuvar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/pic/pic_openpic.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/include/booke/cpuvar.h
diff -u src/sys/arch/powerpc/include/booke/cpuvar.h:1.20 src/sys/arch/powerpc/include/booke/cpuvar.h:1.21
--- src/sys/arch/powerpc/include/booke/cpuvar.h:1.20	Sun Apr  7 05:25:55 2019
+++ src/sys/arch/powerpc/include/booke/cpuvar.h	Mon Jul  6 10:54:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuvar.h,v 1.20 2019/04/07 05:25:55 thorpej Exp $	*/
+/*	$NetBSD: cpuvar.h,v 1.21 2020/07/06 10:54:56 rin Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,6 +37,10 @@
 #ifndef _POWERPC_BOOKE_CPUVAR_H_
 #define _POWERPC_BOOKE_CPUVAR_H_
 
+#ifdef _KERNEL_OPT
+#include "opt_multiprocessor.h"
+#endif
+
 #include 
 #include 
 #include 

Index: src/sys/arch/powerpc/pic/pic_openpic.c
diff -u src/sys/arch/powerpc/pic/pic_openpic.c:1.16 src/sys/arch/powerpc/pic/pic_openpic.c:1.17
--- src/sys/arch/powerpc/pic/pic_openpic.c:1.16	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/pic/pic_openpic.c	Mon Jul  6 10:54:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_openpic.c,v 1.16 2020/07/06 09:34:18 rin Exp $ */
+/*	$NetBSD: pic_openpic.c,v 1.17 2020/07/06 10:54:56 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,12 +27,16 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.16 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.17 2020/07/06 10:54:56 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_interrupt.h"
 #endif
 
+#ifdef _KERNEL_OPT
+#include "opt_multiprocessor.h"
+#endif
+
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/powerpc

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:54:56 UTC 2020

Modified Files:
src/sys/arch/powerpc/include/booke: cpuvar.h
src/sys/arch/powerpc/pic: pic_openpic.c

Log Message:
Include missing opt_multiprocessor.h.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/booke/cpuvar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/pic/pic_openpic.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/pic

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:02:44 UTC 2020

Modified Files:
src/sys/arch/powerpc/pic: openpic_common.c pic_distopenpic.c

Log Message:
Drop unused opt_interrupt.h.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/pic/openpic_common.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/pic/pic_distopenpic.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/pic

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:02:44 UTC 2020

Modified Files:
src/sys/arch/powerpc/pic: openpic_common.c pic_distopenpic.c

Log Message:
Drop unused opt_interrupt.h.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/pic/openpic_common.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/pic/pic_distopenpic.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/pic/openpic_common.c
diff -u src/sys/arch/powerpc/pic/openpic_common.c:1.8 src/sys/arch/powerpc/pic/openpic_common.c:1.9
--- src/sys/arch/powerpc/pic/openpic_common.c:1.8	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/pic/openpic_common.c	Mon Jul  6 11:02:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpic_common.c,v 1.8 2020/07/06 09:34:18 rin Exp $ */
+/*	$NetBSD: openpic_common.c,v 1.9 2020/07/06 11:02:44 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,10 +27,9 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: openpic_common.c,v 1.8 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: openpic_common.c,v 1.9 2020/07/06 11:02:44 rin Exp $");
 
 #ifdef _KERNEL_OPT
-#include "opt_interrupt.h"
 #include "opt_openpic.h"
 #endif
 

Index: src/sys/arch/powerpc/pic/pic_distopenpic.c
diff -u src/sys/arch/powerpc/pic/pic_distopenpic.c:1.12 src/sys/arch/powerpc/pic/pic_distopenpic.c:1.13
--- src/sys/arch/powerpc/pic/pic_distopenpic.c:1.12	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/pic/pic_distopenpic.c	Mon Jul  6 11:02:44 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_distopenpic.c,v 1.12 2020/07/06 09:34:18 rin Exp $ */
+/*	$NetBSD: pic_distopenpic.c,v 1.13 2020/07/06 11:02:44 rin Exp $ */
 
 /*-
  * Copyright (c) 2008 Tim Rightnour
@@ -30,10 +30,9 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic_distopenpic.c,v 1.12 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_distopenpic.c,v 1.13 2020/07/06 11:02:44 rin Exp $");
 
 #ifdef _KERNEL_OPT
-#include "opt_interrupt.h"
 #include "opt_openpic.h"
 #endif
 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:49:41 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx/pci: pci_machdep.c

Log Message:
Include missing opt_pci.h


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.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/ibm4xx/pci

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 10:49:41 UTC 2020

Modified Files:
src/sys/arch/powerpc/ibm4xx/pci: pci_machdep.c

Log Message:
Include missing opt_pci.h


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c
diff -u src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.11 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.12
--- src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.11	Fri Oct  2 05:22:51 2015
+++ src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c	Mon Jul  6 10:49:41 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.c,v 1.11 2015/10/02 05:22:51 msaitoh Exp $	*/
+/*	$NetBSD: pci_machdep.c,v 1.12 2020/07/06 10:49:41 rin Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -43,7 +43,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.11 2015/10/02 05:22:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.12 2020/07/06 10:49:41 rin Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_pci.h"
+#endif
 
 #include 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:05:54 UTC 2020

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

Log Message:
- Drop unused opt_ddb.h.
- Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/powerpc/kgdb_machdep.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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:06:52 UTC 2020

Modified Files:
src/sys/arch/powerpc/powerpc: locore_subr.S

Log Message:
Drop unused opt_lockdebug.h.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/powerpc/powerpc/locore_subr.S

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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:05:54 UTC 2020

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

Log Message:
- Drop unused opt_ddb.h.
- Include missing opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/powerpc/kgdb_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/powerpc/kgdb_machdep.c
diff -u src/sys/arch/powerpc/powerpc/kgdb_machdep.c:1.23 src/sys/arch/powerpc/powerpc/kgdb_machdep.c:1.24
--- src/sys/arch/powerpc/powerpc/kgdb_machdep.c:1.23	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/powerpc/kgdb_machdep.c	Mon Jul  6 11:05:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kgdb_machdep.c,v 1.23 2020/07/06 09:34:18 rin Exp $	*/
+/*	$NetBSD: kgdb_machdep.c,v 1.24 2020/07/06 11:05:54 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,10 +36,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.23 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.24 2020/07/06 11:05:54 rin Exp $");
 
 #ifdef _KERNEL_OPT
-#include "opt_ddb.h"
+#include "opt_ppcarch.h"
 #endif
 
 /*



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:05:05 UTC 2020

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

Log Message:
Drop unused opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/powerpc/core_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/powerpc/core_machdep.c
diff -u src/sys/arch/powerpc/powerpc/core_machdep.c:1.10 src/sys/arch/powerpc/powerpc/core_machdep.c:1.11
--- src/sys/arch/powerpc/powerpc/core_machdep.c:1.10	Wed Nov 20 19:37:52 2019
+++ src/sys/arch/powerpc/powerpc/core_machdep.c	Mon Jul  6 11:05:05 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: core_machdep.c,v 1.10 2019/11/20 19:37:52 pgoyette Exp $	*/
+/*	$NetBSD: core_machdep.c,v 1.11 2020/07/06 11:05:05 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,11 +32,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.10 2019/11/20 19:37:52 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.11 2020/07/06 11:05:05 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
-#include "opt_ppcarch.h"
 #endif
 
 #include 



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

2020-07-06 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jul  6 11:05:05 UTC 2020

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

Log Message:
Drop unused opt_ppcarch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/powerpc/core_machdep.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/x86/x86

2020-07-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  6 18:30:48 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Restore the lwp's fpu state, not zeros, and leave with fpu enabled.

We need to clear the fpu state anyway because it is likely to contain
secrets at this point.  Previously we set it to zeros, and then issued
stts to disable the fpu in order to detect the mistake of further use
of the fpu in kernel.  But there must be some path I haven't identified
yet that doesn't do fpu_handle_deferred, leading to fpudna panics.

In any case, there's no benefit to restoring the fpu state twice
(once with zeros and once with the real data).  The downside is,
although this avoids spurious fpudna traps, using fpu_kern_enter in a
softint has the side effect that -- until the next userland context
switch triggering stts -- we no longer detect misuse of fpu in the
kernel in that lwp.  This will serve for now, but we should find
another way to issue clts/stts judiciously to detect such misuse.

May improve the continued symptoms of
https://mail-index.netbsd.org/current-users/2020/07/02/msg039051.html
although may not fix everything.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/x86/x86/fpu.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/x86/fpu.c
diff -u src/sys/arch/x86/x86/fpu.c:1.66 src/sys/arch/x86/x86/fpu.c:1.67
--- src/sys/arch/x86/x86/fpu.c:1.66	Mon Jul  6 01:08:15 2020
+++ src/sys/arch/x86/x86/fpu.c	Mon Jul  6 18:30:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu.c,v 1.66 2020/07/06 01:08:15 riastradh Exp $	*/
+/*	$NetBSD: fpu.c,v 1.67 2020/07/06 18:30:48 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2008, 2019 The NetBSD Foundation, Inc.  All
@@ -96,7 +96,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.66 2020/07/06 01:08:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.67 2020/07/06 18:30:48 riastradh Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -417,6 +417,9 @@ void
 fpu_kern_leave(void)
 {
 	static const union savefpu zero_fpu __aligned(64);
+	const union savefpu *savefpu;
+	struct lwp *l = curlwp;
+	struct pcb *pcb;
 	struct cpu_info *ci = curcpu();
 	int s;
 
@@ -424,17 +427,18 @@ fpu_kern_leave(void)
 	KASSERT(ci->ci_kfpu_spl != -1);
 
 	/*
-	 * Zero the fpu registers; otherwise we might leak secrets
-	 * through Spectre-class attacks to userland, even if there are
-	 * no bugs in fpu state management.
-	 */
-	fpu_area_restore(_fpu, x86_xsave_features);
-
-	/*
-	 * Set CR0_TS again so that the kernel can't accidentally use
-	 * the FPU.
+	 * Restore the FPU state immediately to avoid leaking any
+	 * kernel secrets, or zero it if this is a kthread.
 	 */
-	stts();
+	if ((l->l_pflag & LP_INTR) && (l->l_switchto != NULL))
+		l = l->l_switchto;
+	if (l->l_flag & LW_SYSTEM) {
+		savefpu = _fpu;
+	} else {
+		pcb = lwp_getpcb(l);
+		savefpu = >pcb_savefpu;
+	}
+	fpu_area_restore(savefpu, x86_xsave_features);
 
 	s = ci->ci_kfpu_spl;
 	ci->ci_kfpu_spl = -1;



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

2020-07-06 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Jul  6 18:30:48 UTC 2020

Modified Files:
src/sys/arch/x86/x86: fpu.c

Log Message:
Restore the lwp's fpu state, not zeros, and leave with fpu enabled.

We need to clear the fpu state anyway because it is likely to contain
secrets at this point.  Previously we set it to zeros, and then issued
stts to disable the fpu in order to detect the mistake of further use
of the fpu in kernel.  But there must be some path I haven't identified
yet that doesn't do fpu_handle_deferred, leading to fpudna panics.

In any case, there's no benefit to restoring the fpu state twice
(once with zeros and once with the real data).  The downside is,
although this avoids spurious fpudna traps, using fpu_kern_enter in a
softint has the side effect that -- until the next userland context
switch triggering stts -- we no longer detect misuse of fpu in the
kernel in that lwp.  This will serve for now, but we should find
another way to issue clts/stts judiciously to detect such misuse.

May improve the continued symptoms of
https://mail-index.netbsd.org/current-users/2020/07/02/msg039051.html
although may not fix everything.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/x86/x86/fpu.c

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



CVS commit: src/distrib/sets/lists

2020-07-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul  6 18:47:02 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
new mapped test.


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.872 -r1.873 src/distrib/sets/lists/tests/mi

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



CVS commit: src/tests/net/net

2020-07-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul  6 18:45:26 UTC 2020

Modified Files:
src/tests/net/net: Makefile
Added Files:
src/tests/net/net: t_mapped.c

Log Message:
add a test for v4 mapped addresses


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/net/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/net/t_mapped.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/net/net/Makefile
diff -u src/tests/net/net/Makefile:1.23 src/tests/net/net/Makefile:1.24
--- src/tests/net/net/Makefile:1.23	Sun Mar  1 13:08:16 2020
+++ src/tests/net/net/Makefile	Mon Jul  6 14:45:25 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2020/03/01 18:08:16 christos Exp $
+# $NetBSD: Makefile,v 1.24 2020/07/06 18:45:25 christos Exp $
 #
 
 .include 
@@ -6,6 +6,7 @@
 TESTSDIR=	${TESTSBASE}/net/net
 
 TESTS_C=	t_unix
+TESTS_C+=	t_mapped
 TESTS_C+=	t_tcp
 TESTS_C+=	t_udp
 TESTS_C+=	t_pktinfo
@@ -26,4 +27,6 @@ LDADD.t_pktinfo_send+=	${LIBRUMPBASE}
 LDADD.t_raw+=	-lrumpnet_local -lrumpnet_netinet -lrumpnet_net
 LDADD.t_raw+=	-lrumpnet ${LIBRUMPBASE}
 
+LDADD.t_mapped+=	-lutil
+
 .include 

Added files:

Index: src/tests/net/net/t_mapped.c
diff -u /dev/null src/tests/net/net/t_mapped.c:1.1
--- /dev/null	Mon Jul  6 14:45:26 2020
+++ src/tests/net/net/t_mapped.c	Mon Jul  6 14:45:25 2020
@@ -0,0 +1,320 @@
+/*	$NetBSD: t_mapped.c,v 1.1 2020/07/06 18:45:25 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2020 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define _GNU_SOURCE
+
+#include 
+#ifdef __RCSID
+__RCSID("$Id: t_mapped.c,v 1.1 2020/07/06 18:45:25 christos Exp $");
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "util.h"
+
+#include "test.h"
+
+static char mymsg[] = "hi mom!";
+
+static void
+print(const char *msg, const struct sockaddr *addr)
+{
+	char buf[1024];
+
+	sockaddr_snprintf(buf, sizeof(buf), "%a:%p", addr);
+	printf("%s: %s\n", msg, buf);
+}
+
+static int
+mksocket(int sfam)
+{
+	int fd = socket(sfam, SOCK_STREAM, 0);
+	if (fd ==  -1)
+		FAIL("socket");
+	if (sfam != AF_INET6)
+		return fd;
+	int f = 0;
+#if 0
+	/* crashes the kernel, should not be allowed kernel only? */
+	if (setsockopt(fd, IPPROTO_IPV6, 24 /* IPV6_2292RTHDR */,
+	, sizeof(f)) == -1)
+		FAIL("setsockopt");
+#endif
+	if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, , sizeof(f)) == -1)
+		FAIL("setsockopt");
+	return fd;
+fail:
+	return -1;
+}
+
+static socklen_t
+mkserver(int sfam, struct sockaddr_storage *ss)
+{
+	struct sockaddr_in *sin;
+	struct sockaddr_in6 *sin6;
+
+	memset(ss, 0, sizeof(*ss));
+	ss->ss_family = sfam;
+	switch (sfam) {
+	case AF_INET:
+		sin = (struct sockaddr_in *)ss;
+		sin->sin_port = htons(12345);
+#ifdef BSD4_4
+		sin->sin_len = sizeof(*sin);
+#endif
+		return sizeof(*sin);
+	case AF_INET6:
+		sin6 = (struct sockaddr_in6 *)ss;
+		sin6->sin6_port = htons(12345);
+#ifdef BSD4_4
+		sin6->sin6_len = sizeof(*sin6);
+#endif
+		return sizeof(*sin6);
+	default:
+		FAIL("bad family");
+	}
+fail:
+	return -1;
+}
+
+#if 0
+static const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
+#endif
+static socklen_t
+mkclient(int sfam, struct sockaddr_storage *ss)
+{
+	struct sockaddr_in *sin;
+	struct sockaddr_in6 *sin6;
+
+	memset(ss, 0, sizeof(*ss));
+	ss->ss_family = sfam;
+	switch (sfam) {
+	case AF_INET:
+		sin = 

CVS commit: src/tests/net/net

2020-07-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul  6 18:45:26 UTC 2020

Modified Files:
src/tests/net/net: Makefile
Added Files:
src/tests/net/net: t_mapped.c

Log Message:
add a test for v4 mapped addresses


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/net/net/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/net/t_mapped.c

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



CVS commit: src/distrib/sets/lists

2020-07-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul  6 18:47:02 UTC 2020

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi

Log Message:
new mapped test.


To generate a diff of this commit:
cvs rdiff -u -r1.323 -r1.324 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.872 -r1.873 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.323 src/distrib/sets/lists/debug/mi:1.324
--- src/distrib/sets/lists/debug/mi:1.323	Wed Jul  1 03:16:38 2020
+++ src/distrib/sets/lists/debug/mi	Mon Jul  6 14:47:02 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.323 2020/07/01 07:16:38 jruoho Exp $
+# $NetBSD: mi,v 1.324 2020/07/06 18:47:02 christos Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -2376,6 +2376,7 @@
 ./usr/libdata/debug/usr/tests/net/ipsec/natt_terminator.debug	tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/mcast/mcast.debug		tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/mcast/t_mcast.debug		tests-obsolete		debug,atf,rump,obsolete
+./usr/libdata/debug/usr/tests/net/net/t_mapped.debug		tests-net-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/net/net/t_pktinfo.debug		tests-net-debug		debug,atf,compattestfile
 ./usr/libdata/debug/usr/tests/net/net/t_pktinfo_send.debug	tests-net-debug		debug,atf,rump
 ./usr/libdata/debug/usr/tests/net/net/t_raw.debug		tests-net-debug		debug,atf,rump

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.872 src/distrib/sets/lists/tests/mi:1.873
--- src/distrib/sets/lists/tests/mi:1.872	Fri Jul  3 00:25:28 2020
+++ src/distrib/sets/lists/tests/mi	Mon Jul  6 14:47:02 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.872 2020/07/03 04:25:28 jruoho Exp $
+# $NetBSD: mi,v 1.873 2020/07/06 18:47:02 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3910,6 +3910,7 @@
 ./usr/tests/net/net/t_ipaddress			tests-net-tests		atf,rump
 ./usr/tests/net/net/t_ipv6_lifetime		tests-net-tests		atf,rump
 ./usr/tests/net/net/t_ipv6address		tests-net-tests		atf,rump
+./usr/tests/net/net/t_mapped			tests-net-tests		atf
 ./usr/tests/net/net/t_mtudisc			tests-net-tests		atf,rump
 ./usr/tests/net/net/t_mtudisc6			tests-net-tests		atf,rump
 ./usr/tests/net/net/t_ping6_opts		tests-net-tests		atf,rump



CVS commit: src/sys/netinet

2020-07-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul  6 18:49:12 UTC 2020

Modified Files:
src/sys/netinet: tcp_input.c

Log Message:
- always set both ip and ip6, otherwise a kernel assertion can be triggered
- move alignment early so that we do less work


To generate a diff of this commit:
cvs rdiff -u -r1.417 -r1.418 src/sys/netinet/tcp_input.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/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.417 src/sys/netinet/tcp_input.c:1.418
--- src/sys/netinet/tcp_input.c:1.417	Sat Nov 16 05:15:10 2019
+++ src/sys/netinet/tcp_input.c	Mon Jul  6 14:49:12 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.417 2019/11/16 10:15:10 maxv Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.418 2020/07/06 18:49:12 christos Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.417 2019/11/16 10:15:10 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.418 2020/07/06 18:49:12 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1240,15 +1240,29 @@ tcp_input(struct mbuf *m, int off, int p
 	}
 
 	/*
+	 * Enforce alignment requirements that are violated in
+	 * some cases, see kern/50766 for details.
+	 */
+	if (TCP_HDR_ALIGNED_P(th) == 0) {
+		m = m_copyup(m, off + sizeof(struct tcphdr), 0);
+		if (m == NULL) {
+			TCP_STATINC(TCP_STAT_RCVSHORT);
+			return;
+		}
+		th = (struct tcphdr *)(mtod(m, char *) + off);
+	}
+	KASSERT(TCP_HDR_ALIGNED_P(th));
+
+	/*
 	 * Get IP and TCP header.
 	 * Note: IP leaves IP header in first mbuf.
 	 */
 	ip = mtod(m, struct ip *);
-	switch (ip->ip_v) {
-	case 4:
 #ifdef INET6
-		ip6 = NULL;
+	ip6 = mtod(m, struct ip6_hdr *);
 #endif
+	switch (ip->ip_v) {
+	case 4:
 		af = AF_INET;
 		iphlen = sizeof(struct ip);
 
@@ -1263,10 +1277,8 @@ tcp_input(struct mbuf *m, int off, int p
 		break;
 #ifdef INET6
 	case 6:
-		ip = NULL;
 		iphlen = sizeof(struct ip6_hdr);
 		af = AF_INET6;
-		ip6 = mtod(m, struct ip6_hdr *);
 
 		/*
 		 * Be proactive about unspecified IPv6 address in source.
@@ -1301,23 +1313,6 @@ tcp_input(struct mbuf *m, int off, int p
 		return;
 	}
 
-	/*
-	 * Enforce alignment requirements that are violated in
-	 * some cases, see kern/50766 for details.
-	 */
-	if (TCP_HDR_ALIGNED_P(th) == 0) {
-		m = m_copyup(m, off + sizeof(struct tcphdr), 0);
-		if (m == NULL) {
-			TCP_STATINC(TCP_STAT_RCVSHORT);
-			return;
-		}
-		ip = mtod(m, struct ip *);
-#ifdef INET6
-		ip6 = mtod(m, struct ip6_hdr *);
-#endif
-		th = (struct tcphdr *)(mtod(m, char *) + off);
-	}
-	KASSERT(TCP_HDR_ALIGNED_P(th));
 
 	/*
 	 * Check that TCP offset makes sense, pull out TCP options and
@@ -1515,7 +1510,6 @@ findpcb:
 			m_freem(in6p->in6p_options);
 			in6p->in6p_options = NULL;
 		}
-		KASSERT(ip6 != NULL);
 		ip6_savecontrol(in6p, >in6p_options, ip6, m);
 	}
 #endif



CVS commit: src/sys/netinet

2020-07-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul  6 18:49:12 UTC 2020

Modified Files:
src/sys/netinet: tcp_input.c

Log Message:
- always set both ip and ip6, otherwise a kernel assertion can be triggered
- move alignment early so that we do less work


To generate a diff of this commit:
cvs rdiff -u -r1.417 -r1.418 src/sys/netinet/tcp_input.c

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



CVS commit: src/tests/net/net

2020-07-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul  6 16:24:06 UTC 2020

Modified Files:
src/tests/net/net: t_unix.c

Log Message:
don't open the socket twice.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/net/net/t_unix.c

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



  1   2   >