CVS commit: src/share/mk
Module Name:src Committed By: lukem Date: Sun Jun 21 03:39:21 UTC 2020 Modified Files: src/share/mk: bsd.dep.mk Log Message: bsd.dep.mk: fix "make tags" Fix "make tags" to actually build a tags file: - Use !commands() instead of !target(), so that the rule actually works - Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET} isn't sufficient). - Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures because of ${targ}: subdir-${targ} in bsd.subdir.mk. Thanks to uwe@ for assistance. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/share/mk/bsd.dep.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.dep.mk diff -u src/share/mk/bsd.dep.mk:1.84 src/share/mk/bsd.dep.mk:1.85 --- src/share/mk/bsd.dep.mk:1.84 Mon Jan 21 21:11:54 2019 +++ src/share/mk/bsd.dep.mk Sun Jun 21 03:39:21 2020 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dep.mk,v 1.84 2019/01/21 21:11:54 christos Exp $ +# $NetBSD: bsd.dep.mk,v 1.85 2020/06/21 03:39:21 lukem Exp $ # Basic targets realdepend: beforedepend .depend afterdepend @@ -94,16 +94,16 @@ _MKDEP_FILEFLAGS= # Clean rules .if defined(SRCS) && !empty(SRCS) -CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} ${.CURDIR}/tags ${CLEANDEPEND} +CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} tags ${CLEANDEPEND} .endif # Custom rules -.if !target(tags) +.if !commands(tags) tags: ${SRCS} .if defined(SRCS) && !empty(SRCS) ${_MKTARGET_CREATE} - -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \ - ${TOOL_SED} "s;\${.CURDIR}/;;" > tags + -cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:M*.[cly]} | \ + ${TOOL_SED} "s;\${.CURDIR}/;;" > ${.OBJDIR}/tags .endif .endif
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: rin Date: Sun Jun 21 00:40:00 UTC 2020 Modified Files: src/sys/arch/powerpc/include: mcontext.h ptrace.h types.h src/sys/arch/powerpc/powerpc: sig_machdep.c Log Message: Fix inconsistency b/w kernel and userland recognitions of TLS, as well as inconsistency whether it is biased or not in kernel. - Obsolete __lwp_settcb() in order to let kernel know new TLS address via _lwp_setprivate(2). Alternatively, we can call _lwp_setprivate(2) within __lwp_settcb() like mips, but it is just double handling; we adjust %r2 appropriately in _lwp_setprivate(2) via cpu_lwp_setprivate(). - Make sure that, like other ports, l_private represents address of tcb, not biased one as in %r2. This guarantees that the returned values from _lwp_getprivate(2) and __lwp_getprivate_fast() are always same. Also, we can obsolete PTRACE_LWP_GETPRIVATE() macro. Now, *_pl_private tests in tests/lib/libc/sys successfully pass, while no other tests become newly falling. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/include/mcontext.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/include/ptrace.h cvs rdiff -u -r1.62 -r1.63 src/sys/arch/powerpc/include/types.h cvs rdiff -u -r1.49 -r1.50 src/sys/arch/powerpc/powerpc/sig_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/include/mcontext.h diff -u src/sys/arch/powerpc/include/mcontext.h:1.19 src/sys/arch/powerpc/include/mcontext.h:1.20 --- src/sys/arch/powerpc/include/mcontext.h:1.19 Sun Jun 21 00:00:27 2020 +++ src/sys/arch/powerpc/include/mcontext.h Sun Jun 21 00:39:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.19 2020/06/21 00:00:27 rin Exp $ */ +/* $NetBSD: mcontext.h,v 1.20 2020/06/21 00:39:59 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -141,7 +141,8 @@ typedef struct { #define _UC_MACHINE_SET_PC(uc, pc) _UC_MACHINE_PC(uc) = (pc) -#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || defined(__LIBPTHREAD_SOURCE__) +#if defined(_KERNEL) || \ +defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || defined(__LIBPTHREAD_SOURCE__) #include /* @@ -153,6 +154,7 @@ typedef struct { #define TLS_DTV_OFFSET 0x8000 __CTASSERT(TLS_TP_OFFSET + sizeof(struct tls_tcb) < 0x8000); +#ifndef _KERNEL static __inline void * __lwp_gettcb_fast(void) { @@ -165,16 +167,7 @@ __lwp_gettcb_fast(void) return __tcb; } - -static __inline void -__lwp_settcb(void *__tcb) -{ - __asm __volatile( - "addi %%r2,%[__tcb],%[__offset]" - : - : [__tcb] "r" (__tcb), - [__offset] "n" (TLS_TP_OFFSET + sizeof(struct tls_tcb))); -} -#endif /* _RTLD_SOURCE || _LIBC_SOURCE || __LIBPTHREAD_SOURCE__ */ +#endif /* !_KERNEL */ +#endif /* _KERNEL || _RTLD_SOURCE || _LIBC_SOURCE || __LIBPTHREAD_SOURCE__ */ #endif /* !_POWERPC_MCONTEXT_H_ */ Index: src/sys/arch/powerpc/include/ptrace.h diff -u src/sys/arch/powerpc/include/ptrace.h:1.16 src/sys/arch/powerpc/include/ptrace.h:1.17 --- src/sys/arch/powerpc/include/ptrace.h:1.16 Tue Dec 24 14:50:59 2019 +++ src/sys/arch/powerpc/include/ptrace.h Sun Jun 21 00:39:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.16 2019/12/24 14:50:59 kamil Exp $ */ +/* $NetBSD: ptrace.h,v 1.17 2020/06/21 00:39:59 rin Exp $ */ #ifndef _POWERPC_PTRACE_H #define _POWERPC_PTRACE_H @@ -77,8 +77,4 @@ int procfs_machdep_validvecregs(struct l #define PTRACE_BREAKPOINT_ASM __asm __volatile("trap") #define PTRACE_BREAKPOINT_SIZE 4 -#ifdef _KERNEL -#define PTRACE_LWP_GETPRIVATE(l) (l)->l_md.md_utf->tf_fixreg[_REG_R2] -#endif - #endif /* _POWERPC_PTRACE_H */ Index: src/sys/arch/powerpc/include/types.h diff -u src/sys/arch/powerpc/include/types.h:1.62 src/sys/arch/powerpc/include/types.h:1.63 --- src/sys/arch/powerpc/include/types.h:1.62 Thu Apr 16 22:11:12 2020 +++ src/sys/arch/powerpc/include/types.h Sun Jun 21 00:39:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.62 2020/04/16 22:11:12 rin Exp $ */ +/* $NetBSD: types.h,v 1.63 2020/06/21 00:39:59 rin Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -89,7 +89,6 @@ typedef __uint32_t tlb_asid_t; /* for b #define __HAVE_CPU_LWP_SETPRIVATE #define __HAVE_COMMON___TLS_GET_ADDR #define __HAVE___LWP_GETTCB_FAST -#define __HAVE___LWP_SETTCB #define __HAVE_TLS_VARIANT_I #if defined(_KERNEL) || defined(_KMEMUSER) Index: src/sys/arch/powerpc/powerpc/sig_machdep.c diff -u src/sys/arch/powerpc/powerpc/sig_machdep.c:1.49 src/sys/arch/powerpc/powerpc/sig_machdep.c:1.50 --- src/sys/arch/powerpc/powerpc/sig_machdep.c:1.49 Sun Jun 21 00:00:27 2020 +++ src/sys/arch/powerpc/powerpc/sig_machdep.c Sun Jun 21 00:40:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sig_machdep.c,v 1.49 2020/06/21 00:00:27 rin Exp $ */ +/* $NetBSD: sig_machdep.c,v 1.50 2020/06/21 00:40:00 rin Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: rin Date: Sun Jun 21 00:00:27 UTC 2020 Modified Files: src/sys/arch/powerpc/include: mcontext.h src/sys/arch/powerpc/powerpc: sig_machdep.c Log Message: Fix SS_ONSTACK, which seems like broken since switched to siginfo. Found by tests/lib/libc/sys/t_sigaltstack, which passes now, while no other tests are not falling newly. XXX Shouldn't we turn _UC_{SET,CLR}STACK into MI? To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/mcontext.h cvs rdiff -u -r1.48 -r1.49 src/sys/arch/powerpc/powerpc/sig_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/include/mcontext.h diff -u src/sys/arch/powerpc/include/mcontext.h:1.18 src/sys/arch/powerpc/include/mcontext.h:1.19 --- src/sys/arch/powerpc/include/mcontext.h:1.18 Thu Feb 15 15:53:56 2018 +++ src/sys/arch/powerpc/include/mcontext.h Sun Jun 21 00:00:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.18 2018/02/15 15:53:56 kamil Exp $ */ +/* $NetBSD: mcontext.h,v 1.19 2020/06/21 00:00:27 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -131,6 +131,8 @@ typedef struct { #define _UC_POWERPC_VEC 0x0001 /* Vector Register File valid */ #define _UC_POWERPC_SPE 0x0002 /* Vector Register File valid */ #define _UC_TLSBASE 0x0008 /* thread context valid in R2 */ +#define _UC_SETSTACK 0x0010 +#define _UC_CLRSTACK 0x0020 #define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_R1]) #define _UC_MACHINE_FP(uc) ((uc)->uc_mcontext.__gregs[_REG_R31]) Index: src/sys/arch/powerpc/powerpc/sig_machdep.c diff -u src/sys/arch/powerpc/powerpc/sig_machdep.c:1.48 src/sys/arch/powerpc/powerpc/sig_machdep.c:1.49 --- src/sys/arch/powerpc/powerpc/sig_machdep.c:1.48 Sat Apr 11 09:15:23 2020 +++ src/sys/arch/powerpc/powerpc/sig_machdep.c Sun Jun 21 00:00:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sig_machdep.c,v 1.48 2020/04/11 09:15:23 rin Exp $ */ +/* $NetBSD: sig_machdep.c,v 1.49 2020/06/21 00:00:27 rin Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.48 2020/04/11 09:15:23 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.49 2020/06/21 00:00:27 rin Exp $"); #include "opt_ppcarch.h" #include "opt_altivec.h" @@ -91,6 +91,8 @@ sendsig_siginfo(const ksiginfo_t *ksi, c /* Save register context. */ memset(, 0, sizeof(uc)); uc.uc_flags = _UC_SIGMASK; + uc.uc_flags |= (ss->ss_flags & SS_ONSTACK) ? + _UC_SETSTACK : _UC_CLRSTACK; uc.uc_sigmask = *mask; uc.uc_link = l->l_ctxlink; sendsig_reset(l, ksi->ksi_signo); @@ -199,6 +201,7 @@ cpu_setmcontext(struct lwp *l, const mco { struct trapframe * const tf = l->l_md.md_utf; const __greg_t * const gr = mcp->__gregs; + struct proc * const p = l->l_proc; int error; /* Restore GPR context, if any. */ @@ -261,6 +264,13 @@ cpu_setmcontext(struct lwp *l, const mco vec_restore_from_mcontext(l, mcp); #endif + mutex_enter(p->p_lock); + if (flags & _UC_SETSTACK) + l->l_sigstk.ss_flags |= SS_ONSTACK; + if (flags & _UC_CLRSTACK) + l->l_sigstk.ss_flags &= ~SS_ONSTACK; + mutex_exit(p->p_lock); + return (0); }
CVS commit: src/usr.bin/calendar/calendars
Module Name:src Committed By: sevan Date: Sat Jun 20 21:58:18 UTC 2020 Modified Files: src/usr.bin/calendar/calendars: calendar.computer Log Message: X turned 36 today http://www.talisman.org/x-debut.shtml To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/calendar/calendars/calendar.computer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/calendar/calendars/calendar.computer diff -u src/usr.bin/calendar/calendars/calendar.computer:1.14 src/usr.bin/calendar/calendars/calendar.computer:1.15 --- src/usr.bin/calendar/calendars/calendar.computer:1.14 Tue May 19 11:07:10 2020 +++ src/usr.bin/calendar/calendars/calendar.computer Sat Jun 20 21:58:17 2020 @@ -51,6 +51,7 @@ 06/16 Super Dimension Fortress (SDF) BBS received it's first caller on an Apple ][e known as the SDF-1, 1987 06/19 FreeBSD project born, 1993 +06/20 X Window System born, 1984 06/23 IBM unbundles software, 1969 06/30 First advanced degree on computer related topic: to H. Karamanian, Temple Univ., Phila, 1948, for symbolic differentiation on the ENIAC
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Jun 20 20:04:18 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Ammend ticket #956 To generate a diff of this commit: cvs rdiff -u -r1.1.2.68 -r1.1.2.69 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.68 src/doc/CHANGES-9.1:1.1.2.69 --- src/doc/CHANGES-9.1:1.1.2.68 Sat Jun 20 16:43:11 2020 +++ src/doc/CHANGES-9.1 Sat Jun 20 20:04:17 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.68 2020/06/20 16:43:11 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.69 2020/06/20 20:04:17 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -2972,7 +2972,7 @@ usr.sbin/npf/npfctl/npfctl.c 1.64 usr.sbin/npf/npfctl/npfctl.h 1.53 usr.sbin/npf/npftest/libnpftest/Makefile 1.11 usr.sbin/npf/npftest/libnpftest/npf_conn_test.c delete -usr.sbin/npf/npftest/libnpftest/npf_gc_test.c 1.1 +usr.sbin/npf/npftest/libnpftest/npf_gc_test.c 1.1 (adapted) usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c 1.11 usr.sbin/npf/npftest/libnpftest/npf_nat_test.c 1.14 usr.sbin/npf/npftest/libnpftest/npf_state_test.c 1.10
CVS commit: [netbsd-9] src/usr.sbin/npf/npftest/libnpftest
Module Name:src Committed By: martin Date: Sat Jun 20 20:03:27 UTC 2020 Modified Files: src/usr.sbin/npf/npftest/libnpftest [netbsd-9]: npf_gc_test.c Log Message: Adapt to netbsd-9 branch To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 \ src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c diff -u src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.1.2.2 src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.1.2.3 --- src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c:1.1.2.2 Sat Jun 20 15:46:48 2020 +++ src/usr.sbin/npf/npftest/libnpftest/npf_gc_test.c Sat Jun 20 20:03:27 2020 @@ -6,6 +6,7 @@ #ifdef _KERNEL #include +#include #include #endif
CVS commit: src/sys/arch/mips/cavium
Module Name:src Committed By: riastradh Date: Sat Jun 20 18:48:28 UTC 2020 Modified Files: src/sys/arch/mips/cavium: octeon_intr.c Log Message: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/cavium/octeon_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/mips/cavium/octeon_intr.c diff -u src/sys/arch/mips/cavium/octeon_intr.c:1.12 src/sys/arch/mips/cavium/octeon_intr.c:1.13 --- src/sys/arch/mips/cavium/octeon_intr.c:1.12 Fri Jun 19 02:23:43 2020 +++ src/sys/arch/mips/cavium/octeon_intr.c Sat Jun 20 18:48:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: octeon_intr.c,v 1.12 2020/06/19 02:23:43 simonb Exp $ */ +/* $NetBSD: octeon_intr.c,v 1.13 2020/06/20 18:48:28 riastradh Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. * All rights reserved. @@ -45,7 +45,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.12 2020/06/19 02:23:43 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: octeon_intr.c,v 1.13 2020/06/20 18:48:28 riastradh Exp $"); #include #include @@ -529,7 +529,7 @@ octeon_iointr(int ipl, vaddr_t pc, uint3 while (hwpend != 0) { const int irq = ffs64(hwpend) - 1; hwpend &= ~__BIT(irq); - + struct octeon_intrhand * const ih = octciu_intrs[irq]; cpu->cpu_intr_evs[irq].ev_count++; if (__predict_true(ih != NULL)) {
CVS commit: src/sys/arch/sun68k/stand/libsa
Module Name:src Committed By: riastradh Date: Sat Jun 20 18:46:14 UTC 2020 Modified Files: src/sys/arch/sun68k/stand/libsa: sun3.c sun3x.c Log Message: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sun68k/stand/libsa/sun3.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sun68k/stand/libsa/sun3x.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/sun68k/stand/libsa/sun3.c diff -u src/sys/arch/sun68k/stand/libsa/sun3.c:1.10 src/sys/arch/sun68k/stand/libsa/sun3.c:1.11 --- src/sys/arch/sun68k/stand/libsa/sun3.c:1.10 Thu Jun 18 17:59:05 2020 +++ src/sys/arch/sun68k/stand/libsa/sun3.c Sat Jun 20 18:46:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sun3.c,v 1.10 2020/06/18 17:59:05 tsutsui Exp $ */ +/* $NetBSD: sun3.c,v 1.11 2020/06/20 18:46:14 riastradh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #define _SUN3_ XXX -/* +/* * We need to get the sun3 NBSG definition, even if we're * building this with a different sun68k target. */ @@ -160,7 +160,7 @@ found: /* This points to the end of the free DVMA space. */ u_int dvma3_end = DVMA_BASE + DVMA_MAPLEN; -static void +static void dvma3_init(void) { int segva, dmava, sme; @@ -273,7 +273,7 @@ sun3_getidprom(u_char *dst) * Init our function pointers, etc. */ -void +void sun3_init(void) { Index: src/sys/arch/sun68k/stand/libsa/sun3x.c diff -u src/sys/arch/sun68k/stand/libsa/sun3x.c:1.13 src/sys/arch/sun68k/stand/libsa/sun3x.c:1.14 --- src/sys/arch/sun68k/stand/libsa/sun3x.c:1.13 Thu Jun 18 17:59:05 2020 +++ src/sys/arch/sun68k/stand/libsa/sun3x.c Sat Jun 20 18:46:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sun3x.c,v 1.13 2020/06/18 17:59:05 tsutsui Exp $ */ +/* $NetBSD: sun3x.c,v 1.14 2020/06/20 18:46:14 riastradh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -150,7 +150,7 @@ found: /* This points to the end of the free DVMA space. */ u_int dvma3x_end = MON_DVMA_BASE + MON_DVMA_MAPLEN; -static void +static void dvma3x_init(void) { u_int va, pa; @@ -274,14 +274,14 @@ sun3x_set_pte(vaddr_t va, paddr_t pa) mmu_atc_flush(va); } -static void +static void mmu_atc_flush(vaddr_t va) { __asm volatile ("pflush #0,#0,%0@" : : "a" (va)); } -static void +static void set_iommupte(vaddr_t va, paddr_t pa) { iommu_pde_t *iommu_va; @@ -302,7 +302,7 @@ set_iommupte(vaddr_t va, paddr_t pa) * Init our function pointers, etc. */ -void +void sun3x_init(void) {
CVS commit: src/sys/arch/sun68k/stand/libsa
Module Name:src Committed By: riastradh Date: Sat Jun 20 18:45:06 UTC 2020 Modified Files: src/sys/arch/sun68k/stand/libsa: sun2.c Log Message: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sun68k/stand/libsa/sun2.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/sun68k/stand/libsa/sun2.c diff -u src/sys/arch/sun68k/stand/libsa/sun2.c:1.12 src/sys/arch/sun68k/stand/libsa/sun2.c:1.13 --- src/sys/arch/sun68k/stand/libsa/sun2.c:1.12 Thu Jun 18 17:59:05 2020 +++ src/sys/arch/sun68k/stand/libsa/sun2.c Sat Jun 20 18:45:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sun2.c,v 1.12 2020/06/18 17:59:05 tsutsui Exp $ */ +/* $NetBSD: sun2.c,v 1.13 2020/06/20 18:45:06 riastradh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ /* - * We need to get the sun2 NBSG definition, even if we're + * We need to get the sun2 NBSG definition, even if we're * building this with a different sun68k target. */ #include @@ -171,7 +171,7 @@ found: /* This points to the end of the free DVMA space. */ u_int dvma2_end = DVMA_BASE + DVMA_MAPLEN; -static void +static void dvma2_init(void) { int segva, dmava, sme; @@ -195,7 +195,7 @@ dvma2_mapin(char *addr, int len) /* Make sure the address is in the DVMA map. */ if ((va < SA_MIN_VA) || (va >= SA_MAX_VA)) - panic("dvma2_mapin: 0x%x outside 0x%x..0x%x", + panic("dvma2_mapin: 0x%x outside 0x%x..0x%x", va, SA_MIN_VA, SA_MAX_VA); va -= SA_MIN_VA; @@ -240,7 +240,7 @@ sun2_get_pte(vaddr_t va) pte = get_control_word(CONTROL_ADDR_BUILD(PGMAP_BASE, va)); if (pte & PG_VALID) { - /* + /* * This clears bit 30 (the kernel readable bit, which * should always be set), bit 28 (which should always * be set) and bit 26 (the user writable bit, which we @@ -325,8 +325,8 @@ sun2_getidprom(u_char *dst) */ /* - * For booting, the PROM in fredette's Sun 2/120 doesn't map - * much main memory, and what is mapped is mapped strangely. + * For booting, the PROM in fredette's Sun 2/120 doesn't map + * much main memory, and what is mapped is mapped strangely. * Low virtual memory is mapped like: * * 0x00 - 0x0b virtual -> 0x00 - 0x0b physical @@ -348,7 +348,7 @@ sun2_getidprom(u_char *dst) * 0x40 - 0x4b virtual -> 0x00 - 0x0b physical * 0x4c - 0x60 virtual -> 0x2c - 0x3f physical * - * And then we load starting at virtual 0x40. We will do + * And then we load starting at virtual 0x40. We will do * all of this mapping just by copying PMEGs. * * After the load is done, but before we enter the kernel, we're @@ -375,7 +375,7 @@ sun2_getidprom(u_char *dst) #define MEM_CHUNK1_COPY_VIRT MEM_CHUNK1_COPY_PHYS /* Maps memory for loading. */ -u_long +u_long sun2_map_mem_load(void) { vaddr_t off; @@ -424,20 +424,20 @@ sun2_map_mem_run(void *entry) /* Set the PTEs in this new PMEG. */ for(off_end = off + NBSG; off < off_end; off += NBPG) - sun2_set_pte(MEM_CHUNK1_COPY_VIRT + off, + sun2_set_pte(MEM_CHUNK1_COPY_VIRT + off, pte | PA_PGNUM(MEM_CHUNK1_COPY_PHYS + off)); - + /* Copy this segment. */ memcpy((void *)(MEM_CHUNK1_COPY_VIRT + (off - NBSG)), (void *)(MEM_CHUNK1_LOAD_VIRT + (off - NBSG)), NBSG); } - + /* Tell our caller where in virtual space to enter. */ return ((char *)entry) - MEM_CHUNK0_LOAD_VIRT; } -void +void sun2_init(void) { /* Set the function pointers. */ @@ -446,7 +446,7 @@ sun2_init(void) dvma_free_p = dvma2_free; dvma_mapin_p = dvma2_mapin; dvma_mapout_p = dvma2_mapout; - + /* Prepare DVMA segment. */ dvma2_init(); }
CVS commit: src/sys/arch/sun68k/stand/libsa
Module Name:src Committed By: riastradh Date: Sat Jun 20 18:44:17 UTC 2020 Modified Files: src/sys/arch/sun68k/stand/libsa: idprom.c Log Message: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sun68k/stand/libsa/idprom.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/sun68k/stand/libsa/idprom.c diff -u src/sys/arch/sun68k/stand/libsa/idprom.c:1.7 src/sys/arch/sun68k/stand/libsa/idprom.c:1.8 --- src/sys/arch/sun68k/stand/libsa/idprom.c:1.7 Thu Jun 18 17:59:05 2020 +++ src/sys/arch/sun68k/stand/libsa/idprom.c Sat Jun 20 18:44:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: idprom.c,v 1.7 2020/06/18 17:59:05 tsutsui Exp $ */ +/* $NetBSD: idprom.c,v 1.8 2020/06/20 18:44:17 riastradh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ idprom_etheraddr(u_char *eaddrp) } /* Fetch a copy of the idprom. */ -void +void idprom_init(void) { @@ -100,7 +100,7 @@ idprom_init(void) * Sun2 version: * Just copy it from control space. */ -static void +static void idprom_init2(void) { @@ -114,7 +114,7 @@ idprom_init2(void) * Sun3 version: * Just copy it from control space. */ -static void +static void idprom_init3(void) { @@ -135,7 +135,7 @@ idprom_init3(void) * to search was determined from some "insider" info. about * the layout of the PROM data area. */ -static void +static void idprom_init3x(void) { u_char *p;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: riastradh Date: Sat Jun 20 18:36:27 UTC 2020 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.384 -r1.385 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.384 src/sys/dev/raidframe/rf_netbsdkintf.c:1.385 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.384 Fri Jun 19 19:29:39 2020 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Sat Jun 20 18:36:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.384 2020/06/19 19:29:39 jdolecek Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.385 2020/06/20 18:36:27 riastradh Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.384 2020/06/19 19:29:39 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.385 2020/06/20 18:36:27 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -192,7 +192,7 @@ static int raid_match(device_t, cfdata_t static void raid_attach(device_t, device_t, void *); static int raid_detach(device_t, int); -static int raidread_component_area(dev_t, struct vnode *, void *, size_t, +static int raidread_component_area(dev_t, struct vnode *, void *, size_t, daddr_t, daddr_t); static int raidwrite_component_area(dev_t, struct vnode *, void *, size_t, daddr_t, daddr_t, int); @@ -379,7 +379,7 @@ raidget(int unit, bool create) { return sc; } -static void +static void raidput(struct raid_softc *sc) { mutex_enter(_lock); LIST_REMOVE(sc, sc_link); @@ -586,13 +586,13 @@ rf_buildroothack(RF_ConfigSet_t *config_ DPRINTF("%s: many roots=%d, %p\n", __func__, num_root, booted_device); - /* + /* * Maybe the MD code can help. If it cannot, then * setroot() will discover that we have no * booted_device and will ask the user if nothing was - * hardwired in the kernel config file + * hardwired in the kernel config file */ - if (booted_device == NULL) + if (booted_device == NULL) return; num_root = 0; @@ -679,7 +679,7 @@ raid_dumpblocks(device_t dev, void *va, raidPtr = >sc_r; /* we only support dumping to RAID 1 sets */ - if (raidPtr->Layout.numDataCol != 1 || + if (raidPtr->Layout.numDataCol != 1 || raidPtr->Layout.numParityCol != 1) return EINVAL; @@ -688,7 +688,7 @@ raid_dumpblocks(device_t dev, void *va, /* figure out what device is alive.. */ - /* + /* Look for a component to dump to. The preference for the component to dump to is as follows: 1) the first component @@ -705,8 +705,8 @@ raid_dumpblocks(device_t dev, void *va, break; } } - - /* + + /* At this point we have possibly selected a live component. If we didn't find a live ocmponent, we now check to see if there is a relevant spared component. @@ -724,7 +724,7 @@ raid_dumpblocks(device_t dev, void *va, } } if (scol == 0) { -/* +/* We must have found a spared first component! We'll take that over anything else found so far. (We @@ -740,17 +740,17 @@ raid_dumpblocks(device_t dev, void *va, dumpto = sparecol; break; } else if (scol != -1) { -/* - Must be a spared second component. - We'll dump to that if we havn't found - anything else so far. +/* + Must be a spared second component. + We'll dump to that if we havn't found + anything else so far. */ if (dumpto == -1) dumpto = sparecol; } } } - + if (dumpto == -1) { /* we couldn't find any live components to dump to!?!? */ @@ -764,12 +764,12 @@ raid_dumpblocks(device_t dev, void *va, goto out; } - error = (*bdev->d_dump)(raidPtr->Disks[dumpto].dev, + error = (*bdev->d_dump)(raidPtr->Disks[dumpto].dev, blkno, va, nblk * raidPtr->bytesPerSector); - + out: raidunlock(rs); - + return error; } @@ -873,7 +873,7 @@ raidclose(dev_t dev, int flags, int fmt, /* free the pseudo device attach bits */ cf = device_cfdata(dksc->sc_dev); error = config_detach(dksc->sc_dev, 0); - if (error == 0) + if (error == 0) free(cf, M_RAIDFRAME); } else if (do_put) { raidput(rs); @@ -1298,7 +1298,7 @@ rf_init_component_label(RF_Raid_t *raidP raidflush_component_label(raidPtr, column); /* XXXjld what about the spares? */ } - + return 0; } @@ -1747,7 +1747,7 @@ raidioctl(dev_t dev, u_long cmd, void *d /* * Add support for "regular" device ioctls here. */ - + switch (cmd) { case DIOCGCACHE: retcode = rf_get_component_caches(raidPtr, (int *)data); @@ -2028,7
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Sat Jun 20 18:33:23 UTC 2020 Modified Files: src/sys/kern: subr_vmem.c Log Message: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/kern/subr_vmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_vmem.c diff -u src/sys/kern/subr_vmem.c:1.104 src/sys/kern/subr_vmem.c:1.105 --- src/sys/kern/subr_vmem.c:1.104 Tue Jun 16 01:29:00 2020 +++ src/sys/kern/subr_vmem.c Sat Jun 20 18:33:23 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_vmem.c,v 1.104 2020/06/16 01:29:00 thorpej Exp $ */ +/* $NetBSD: subr_vmem.c,v 1.105 2020/06/20 18:33:23 riastradh Exp $ */ /*- * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.104 2020/06/16 01:29:00 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.105 2020/06/20 18:33:23 riastradh Exp $"); #if defined(_KERNEL) && defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -172,7 +172,7 @@ static LIST_HEAD(, vmem) vmem_list = LIS /* * BT_RESERVE calculation: * we allocate memory for boundry tags with vmem; therefore we have - * to keep a reserve of bts used to allocated memory for bts. + * to keep a reserve of bts used to allocated memory for bts. * This reserve is 4 for each arena involved in allocating vmems memory. * BT_MAXFREE: don't cache excessive counts of bts in arenas */ @@ -1325,7 +1325,7 @@ vmem_xfree(vmem_t *vm, vmem_addr_t addr, KASSERT(bt->bt_start == addr); KASSERT(bt->bt_size == vmem_roundup_size(vm, size) || bt->bt_size - vmem_roundup_size(vm, size) <= vm->vm_quantum_mask); - + /* vmem_xfree_bt() drops the lock. */ vmem_xfree_bt(vm, bt); }
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: riastradh Date: Sat Jun 20 18:30:54 UTC 2020 Modified Files: src/usr.sbin/postinstall: postinstall.in Log Message: Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.27 src/usr.sbin/postinstall/postinstall.in:1.28 --- src/usr.sbin/postinstall/postinstall.in:1.27 Mon Jun 15 21:56:49 2020 +++ src/usr.sbin/postinstall/postinstall.in Sat Jun 20 18:30:53 2020 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.27 2020/06/15 21:56:49 christos Exp $ +# $NetBSD: postinstall.in,v 1.28 2020/06/20 18:30:53 riastradh Exp $ # # Copyright (c) 2002-2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -863,7 +863,7 @@ additem blocklist "rename old files to b do_blocklist() { local rcfiles="/etc/rc.conf /etc/npf.conf /etc/defaults/rc.conf" - + # if we are actually using blocklistd if [ -f /var/db/blacklist.db ]; then mv /var/db/blacklist.db /var/db/blocklist.db @@ -1110,7 +1110,7 @@ include_nis special_hosts special_media special_noauto -special_null +special_null " op="$1" failed=0 @@ -1656,12 +1656,12 @@ do_rc() failed=$(( ${failed} + $? )) for i in ${rc_external_files}; do - local rc_file + local rc_file case $i in *d) rc_file=${i};; *) rc_file=${i}d;; esac - + update_rc "${op}" "${dir}" ${rc_file} /sbin \ "${SRC_DIR}/external/bsd/$i/etc/rc.d" failed=$(( ${failed} + $? )) @@ -2381,7 +2381,7 @@ listarchsubdirs() { echo "@ARCHSUBDIRS@" else ${SED} -n -e '/ARCHDIR_SUBDIR/s/[[:space:]]//gp' \ - ${SRC_DIR}/compat/archdirs.mk + ${SRC_DIR}/compat/archdirs.mk fi }
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Jun 20 16:43:11 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Tickets #959 - #966 To generate a diff of this commit: cvs rdiff -u -r1.1.2.67 -r1.1.2.68 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.67 src/doc/CHANGES-9.1:1.1.2.68 --- src/doc/CHANGES-9.1:1.1.2.67 Sat Jun 20 15:49:15 2020 +++ src/doc/CHANGES-9.1 Sat Jun 20 16:43:11 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.67 2020/06/20 15:49:15 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.68 2020/06/20 16:43:11 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -2996,3 +2996,55 @@ usr.sbin/npf/npftest/npftest.h 1.17 - Various bug fixes. [rmind, ticket #956] +sys/dev/acpi/acpi_ec.c1.84 + + PR 53687: only install space handler and enable interrupt for EC if + ACPI claims the device is actually present . + [jdolecek, ticket #959] + +sys/arch/x86/x86/cpu_rng.c 1.16 + + Use x86_read_psl/x86_disable_intr/x86_write_psl to defer interrupts. + This avoids accidently enabling interrupts too early. + [riastradh, ticket #960] + +usr.sbin/hdaudioctl/graph.c 1.5 +usr.sbin/hdaudioctl/hdaudioctl.8 1.7 +usr.sbin/hdaudioctl/hdaudioctl.c 1.3,1.4 +usr.sbin/hdaudioctl/hdaudioctl.h 1.3 + + Add show subcommand that displays the codec configuration in + human-readable tabulated form. + [sborrill, ticket #961] + +etc/MAKEDEV.awk 1.29 +etc/etc.cobalt/MAKEDEV.conf 1.18,1.19 +sys/arch/cobalt/conf/majors.cobalt 1.34 + + PR 55009: rename /dev/panel to lcdpanel. + [tsutsui, ticket #962] + +sys/arch/mips/mips/bus_dma.c 1.41 + + PR 54216: fix inconsistent mips_o32, _mips_o32, + and __mips_o32 macro. + [tsutsui, ticket #963] + +sys/arch/mips/mips/cache.c 1.67 + + PR 55138: use 32 byte cacheline ops (not 16 byte ones) for + R5000 picache. + [tsutsui, ticket #964] + +sys/arch/mips/include/cache_r5k.h 1.5 +sys/arch/mips/mips/cache_r5k.c 1.21 +sys/arch/mips/mips/cache_r5k_subr.S 1.4 + + PR 55139: use proper "page" alignments for R5k Page Invalidate(S) op. + [tsutsui, ticket #965] + +etc/rc.d/postfix1.19 + + PR 55396: show "Starting postfix" message at startup. + [rin, ticket #966] +
CVS commit: [netbsd-9] src/etc/rc.d
Module Name:src Committed By: martin Date: Sat Jun 20 16:41:57 UTC 2020 Modified Files: src/etc/rc.d [netbsd-9]: postfix Log Message: Pull up following revision(s) (requested by rin in ticket #966): etc/rc.d/postfix: revision 1.19 little bit verbose for slow machines To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.16.1 src/etc/rc.d/postfix Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/postfix diff -u src/etc/rc.d/postfix:1.18 src/etc/rc.d/postfix:1.18.16.1 --- src/etc/rc.d/postfix:1.18 Sun Oct 30 15:47:06 2016 +++ src/etc/rc.d/postfix Sat Jun 20 16:41:57 2020 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postfix,v 1.18 2016/10/30 15:47:06 riastradh Exp $ +# $NetBSD: postfix,v 1.18.16.1 2020/06/20 16:41:57 martin Exp $ # # PROVIDE: mail @@ -64,6 +64,8 @@ postfix_precmd() ;; esac done + + echo "Starting ${name}." } postfix_op()
CVS commit: [netbsd-9] src/sys/arch/mips
Module Name:src Committed By: martin Date: Sat Jun 20 16:38:42 UTC 2020 Modified Files: src/sys/arch/mips/include [netbsd-9]: cache_r5k.h src/sys/arch/mips/mips [netbsd-9]: cache_r5k.c cache_r5k_subr.S Log Message: Pull up following revision(s) (requested by tsutsui in ticket #965): sys/arch/mips/include/cache_r5k.h: revision 1.5 sys/arch/mips/mips/cache_r5k_subr.S: revision 1.4 sys/arch/mips/mips/cache_r5k.c: revision 1.21 Use proper "page" alignments for R5k Page Invalidate(S) op. PR/55139 According to NEC "User's Manual VR5000, VR1000 64-BIT MICROPROCESSOR INSTRUCTION" (U12754EJ1V0UMJ1), R5000 Page Invalidate (S) op does "a page invalidate by doing a burst of 128 line invalidates to the secondary cache at the page specified by the effective address generated by the CACHE instruction, which must be page aligned." This description looks a bit confusing, but "page" used here implies fixed 32 byte cacheline * 128 lines == 4096 bytes, not our variable "PAGE_SIZE" used in VM paging ops. Note the current default PAGE_SIZE for MIPS3 has been changed to 8192. While here, also define and use proper macro for the "page" and CACHEOP arg for the R5k Page_Invalidate_S op, as the manual also describes the cache op field 10111 as "Page Invalidate" for the secondary cache. No visible regression on Cobalt Qube 2700 (Rm5230) through whole installation using netbsd-9 based Cobalt RestoreCD/USB. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.22.1 src/sys/arch/mips/include/cache_r5k.h cvs rdiff -u -r1.20 -r1.20.14.1 src/sys/arch/mips/mips/cache_r5k.c cvs rdiff -u -r1.3 -r1.3.60.1 src/sys/arch/mips/mips/cache_r5k_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/mips/include/cache_r5k.h diff -u src/sys/arch/mips/include/cache_r5k.h:1.4 src/sys/arch/mips/include/cache_r5k.h:1.4.22.1 --- src/sys/arch/mips/include/cache_r5k.h:1.4 Mon Jul 11 16:15:35 2016 +++ src/sys/arch/mips/include/cache_r5k.h Sat Jun 20 16:38:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r5k.h,v 1.4 2016/07/11 16:15:35 matt Exp $ */ +/* $NetBSD: cache_r5k.h,v 1.4.22.1 2020/06/20 16:38:42 martin Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -61,3 +61,13 @@ void r5k_sdcache_inv_range(register_t, v void r5k_sdcache_wb_range(register_t, vsize_t); #endif /* _KERNEL && !_LOCORE */ + +#define CACHEOP_R5K_Page_Invalidate_S 0x17 + +#define R5K_SC_LINESIZE 32 +#define R5K_SC_PAGESIZE (R5K_SC_LINESIZE * 128) +#define R5K_SC_PAGEMASK (R5K_SC_PAGESIZE - 1) + +#define mips_r5k_round_page(x) (((x) + (register_t)R5K_SC_PAGEMASK) \ +& (register_t)R5K_SC_PAGEMASK) +#define mips_r5k_trunc_page(x) ((x) & (register_t)R5K_SC_PAGEMASK) Index: src/sys/arch/mips/mips/cache_r5k.c diff -u src/sys/arch/mips/mips/cache_r5k.c:1.20 src/sys/arch/mips/mips/cache_r5k.c:1.20.14.1 --- src/sys/arch/mips/mips/cache_r5k.c:1.20 Thu Apr 27 20:05:09 2017 +++ src/sys/arch/mips/mips/cache_r5k.c Sat Jun 20 16:38:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r5k.c,v 1.20 2017/04/27 20:05:09 skrll Exp $ */ +/* $NetBSD: cache_r5k.c,v 1.20.14.1 2020/06/20 16:38:42 martin Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache_r5k.c,v 1.20 2017/04/27 20:05:09 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache_r5k.c,v 1.20.14.1 2020/06/20 16:38:42 martin Exp $"); #include @@ -407,9 +407,6 @@ r4600v2_pdcache_wb_range_32(register_t v __asm(".set mips3"); -#define R5K_Page_Invalidate_S 0x17 -CTASSERT(R5K_Page_Invalidate_S == (CACHEOP_R4K_HIT_WB_INV|CACHE_R4K_SD)); - void r5k_sdcache_wbinv_all(void) { @@ -431,9 +428,6 @@ r5k_sdcache_wbinv_range_index(vaddr_t va r5k_sdcache_wbinv_range((intptr_t)va, size); } -#define mips_r5k_round_page(x) round_line(x, PAGE_SIZE) -#define mips_r5k_trunc_page(x) trunc_line(x, PAGE_SIZE) - void r5k_sdcache_wbinv_range(register_t va, vsize_t size) { @@ -448,8 +442,8 @@ r5k_sdcache_wbinv_range(register_t va, v __asm volatile("mfc0 %0, $28" : "=r"(taglo)); __asm volatile("mtc0 $0, $28"); - for (; va < eva; va += (128 * 32)) { - cache_op_r4k_line(va, CACHEOP_R4K_HIT_WB_INV|CACHE_R4K_SD); + for (; va < eva; va += R5K_SC_PAGESIZE) { + cache_op_r4k_line(va, CACHEOP_R5K_Page_Invalidate_S); } mips_cp0_status_write(ostatus); Index: src/sys/arch/mips/mips/cache_r5k_subr.S diff -u src/sys/arch/mips/mips/cache_r5k_subr.S:1.3 src/sys/arch/mips/mips/cache_r5k_subr.S:1.3.60.1 --- src/sys/arch/mips/mips/cache_r5k_subr.S:1.3 Sun Feb 20 07:45:47 2011 +++ src/sys/arch/mips/mips/cache_r5k_subr.S Sat Jun 20 16:38:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cache_r5k_subr.S,v 1.3 2011/02/20 07:45:47 matt Exp $ */ +/* $NetBSD: cache_r5k_subr.S,v 1.3.60.1 2020/06/20 16:38:42 martin Exp $ */ /* * Redistribution and use in source and binary forms, with or without @@ -65,8 +65,8 @@
CVS commit: [netbsd-9] src/sys/arch/mips/mips
Module Name:src Committed By: martin Date: Sat Jun 20 16:35:02 UTC 2020 Modified Files: src/sys/arch/mips/mips [netbsd-9]: cache.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #964): sys/arch/mips/mips/cache.c: revision 1.67 Use 32 byte cacheline ops (not 16 byte ones) for R5000 picache. PR/55138 Commented "I think this is bad copy" from skrll@. No visible regression on Cobalt Qube 2700 (Rm5230) through whole installation using netbsd-9 based Cobalt RestoreCD/USB. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.60.4.1 src/sys/arch/mips/mips/cache.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/mips/mips/cache.c diff -u src/sys/arch/mips/mips/cache.c:1.60 src/sys/arch/mips/mips/cache.c:1.60.4.1 --- src/sys/arch/mips/mips/cache.c:1.60 Mon Sep 3 16:29:26 2018 +++ src/sys/arch/mips/mips/cache.c Sat Jun 20 16:35:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.60 2018/09/03 16:29:26 riastradh Exp $ */ +/* $NetBSD: cache.c,v 1.60.4.1 2020/06/20 16:35:02 martin Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.60 2018/09/03 16:29:26 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.60.4.1 2020/06/20 16:35:02 martin Exp $"); #include "opt_cputype.h" #include "opt_mips_cache.h" @@ -494,11 +494,11 @@ primary_cache_is_2way: case 32: /* used internally by mipsNN_picache_sync_range */ mco->mco_intern_icache_sync_range = - cache_r4k_icache_hit_inv_16; + cache_r4k_icache_hit_inv_32; /* used internally by mipsNN_picache_sync_range_index */ mco->mco_intern_icache_sync_range_index = - cache_r4k_icache_index_inv_16; + cache_r4k_icache_index_inv_32; break; default:
CVS commit: [netbsd-9] src/sys/arch/mips/mips
Module Name:src Committed By: martin Date: Sat Jun 20 16:22:57 UTC 2020 Modified Files: src/sys/arch/mips/mips [netbsd-9]: bus_dma.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #963): sys/arch/mips/mips/bus_dma.c: revision 1.41 Fix inconsistent mips_o32, _mips_o32, and __mips_o32 macro. PR/54216 Not sure what the original intention was, but no responce for a year, and no visible regression on Cobalt Qube 2700 (Rm5230) through whole installation using netbsd-9 based Cobalt RestoreCD/USB. To generate a diff of this commit: cvs rdiff -u -r1.38.20.1 -r1.38.20.2 src/sys/arch/mips/mips/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.38.20.1 src/sys/arch/mips/mips/bus_dma.c:1.38.20.2 --- src/sys/arch/mips/mips/bus_dma.c:1.38.20.1 Fri Mar 13 05:35:42 2020 +++ src/sys/arch/mips/mips/bus_dma.c Sat Jun 20 16:22:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.38.20.1 2020/03/13 05:35:42 martin Exp $ */ +/* $NetBSD: bus_dma.c,v 1.38.20.2 2020/06/20 16:22:57 martin Exp $ */ /*- * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.38.20.1 2020/03/13 05:35:42 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.38.20.2 2020/06/20 16:22:57 martin Exp $"); #define _MIPS_BUS_DMA_PRIVATE @@ -829,7 +829,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm || (ops & (BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE)) == 0) goto bounce_it; -#ifdef _mips_o32 +#ifdef __mips_o32 /* * If the mapping belongs to the kernel, or it belongs * to the currently-running process (XXX actually, vmspace), @@ -871,7 +871,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm * If we are forced to use Index ops, it's always a * Write-back,Invalidate, so just do one test. */ -#ifdef mips_o32 +#ifdef __mips_o32 if (__predict_false(useindex || vaddr == 0)) { mips_dcache_wbinv_range_index(vaddr, minlen); #ifdef BUS_DMA_DEBUG
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Sat Jun 20 16:19:43 UTC 2020 Modified Files: src/etc [netbsd-9]: MAKEDEV.awk src/etc/etc.cobalt [netbsd-9]: MAKEDEV.conf src/sys/arch/cobalt/conf [netbsd-9]: majors.cobalt Log Message: Pull up following revision(s) (requested by tsutsui in ticket #962): sys/arch/cobalt/conf/majors.cobalt: revision 1.34 etc/MAKEDEV.awk: revision 1.29 etc/etc.cobalt/MAKEDEV.conf: revision 1.18 etc/etc.cobalt/MAKEDEV.conf: revision 1.19 panel -> lcdpanel Part of PR port-cobalt/55009 When reading in the MD MAKEDEV.conf, perform block / char major substitutions that may be present in that file. PR port-cobalt/55009 Create a compatibility symlink panel0 -> lcdpanel0 PR port-cobalt/55009 Fix leading 8 spaces to a tab. To generate a diff of this commit: cvs rdiff -u -r1.26.2.1 -r1.26.2.2 src/etc/MAKEDEV.awk cvs rdiff -u -r1.16 -r1.16.2.1 src/etc/etc.cobalt/MAKEDEV.conf cvs rdiff -u -r1.32 -r1.32.4.1 src/sys/arch/cobalt/conf/majors.cobalt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.awk diff -u src/etc/MAKEDEV.awk:1.26.2.1 src/etc/MAKEDEV.awk:1.26.2.2 --- src/etc/MAKEDEV.awk:1.26.2.1 Mon Nov 4 14:35:57 2019 +++ src/etc/MAKEDEV.awk Sat Jun 20 16:19:43 2020 @@ -1,6 +1,6 @@ #!/usr/bin/awk - # -# $NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $ +# $NetBSD: MAKEDEV.awk,v 1.26.2.2 2020/06/20 16:19:43 martin Exp $ # # Copyright (c) 2003 The NetBSD Foundation, Inc. # All rights reserved. @@ -104,10 +104,33 @@ BEGIN { getline < cfgfile # blank line MDDEV = 0 # MD device targets while (getline < cfgfile) { + # + # Perform the same blk / chr subsitution that happens below. + # + md_deventry = $0 + if (match(md_deventry, /%[a-z0-9]*_(blk|chr)%/)) { + nam = substr(md_deventry, RSTART + 1, RLENGTH - 6); + typ = substr(md_deventry, RSTART + RLENGTH - 4, 3); + dev = "" + if (typ == "blk") { +if (nam in blk) { + dev = blk[nam]; +} + } else { +if (nam in chr) { + dev = chr[nam]; +} + } + if (dev != "") { +parsed = substr(md_deventry, 1, RSTART - 1) dev +md_deventry = substr(md_deventry, RSTART + RLENGTH) + } + md_deventry = parsed md_deventry + } if (MDDEV) - MDDEV = MDDEV "\n" $0 + MDDEV = MDDEV "\n" md_deventry else - MDDEV = $0 + MDDEV = md_deventry } close(cfgfile) @@ -225,7 +248,7 @@ BEGIN { print "# Generated from:" # MAKEDEV.awk (this script) RCS Id - ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $" + ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.2 2020/06/20 16:19:43 martin Exp $" gsub(/\$/, "", ARCSID) print "# " ARCSID Index: src/etc/etc.cobalt/MAKEDEV.conf diff -u src/etc/etc.cobalt/MAKEDEV.conf:1.16 src/etc/etc.cobalt/MAKEDEV.conf:1.16.2.1 --- src/etc/etc.cobalt/MAKEDEV.conf:1.16 Sun Sep 23 09:20:58 2018 +++ src/etc/etc.cobalt/MAKEDEV.conf Sat Jun 20 16:19:43 2020 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.16 2018/09/23 09:20:58 maxv Exp $ +# $NetBSD: MAKEDEV.conf,v 1.16.2.1 2020/06/20 16:19:43 martin Exp $ all_md) makedev wd0 wd1 sd0 sd1 sd2 sd3 @@ -26,7 +26,9 @@ minimal) ;; lcdpanel) -mkdev lcdpanel0 c %lcdpanel_chr% 0 660 + mkdev lcdpanel0 c %lcdpanel_chr% 0 660 + # Support the legacy "panel0" name. + lndev lcdpanel0 panel0 ;; Index: src/sys/arch/cobalt/conf/majors.cobalt diff -u src/sys/arch/cobalt/conf/majors.cobalt:1.32 src/sys/arch/cobalt/conf/majors.cobalt:1.32.4.1 --- src/sys/arch/cobalt/conf/majors.cobalt:1.32 Mon Jan 28 02:28:57 2019 +++ src/sys/arch/cobalt/conf/majors.cobalt Sat Jun 20 16:19:43 2020 @@ -1,4 +1,4 @@ -# $NetBSD: majors.cobalt,v 1.32 2019/01/28 02:28:57 dholland Exp $ +# $NetBSD: majors.cobalt,v 1.32.4.1 2020/06/20 16:19:43 martin Exp $ # # Device majors for cobalt # @@ -39,7 +39,7 @@ device-major ld char 27 block 10 ld device-major clockctl char 33 clockctl #device-major obsolete char 34 obsolete (systrace) device-major cgd char 35 block 11 cgd -device-major panel char 36 panel +device-major lcdpanel char 36 lcdpanel device-major ksyms char 37 ksyms device-major pci char 38 pci device-major zstty char 39 zstty
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sat Jun 20 16:16:51 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1736 To generate a diff of this commit: cvs rdiff -u -r1.1.2.86 -r1.1.2.87 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.86 src/doc/CHANGES-7.3:1.1.2.87 --- src/doc/CHANGES-7.3:1.1.2.86 Tue Jun 16 10:36:03 2020 +++ src/doc/CHANGES-7.3 Sat Jun 20 16:16:51 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.86 2020/06/16 10:36:03 bouyer Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.87 2020/06/20 16:16:51 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -880,3 +880,12 @@ sys/dev/usb/if_run.c1.41 corruption. Pointed out by Ilja Van Sprundel. [martin, ticket #1735] +usr.sbin/hdaudioctl/graph.c 1.5 +usr.sbin/hdaudioctl/hdaudioctl.8 1.7 +usr.sbin/hdaudioctl/hdaudioctl.c 1.3,1.4 +usr.sbin/hdaudioctl/hdaudioctl.h 1.3 + + Add show subcommand that displays the codec configuration in + human-readable tabulated form. + [sborrill, ticket #1736] +
CVS commit: [netbsd-7] src/usr.sbin/hdaudioctl
Module Name:src Committed By: martin Date: Sat Jun 20 16:15:45 UTC 2020 Modified Files: src/usr.sbin/hdaudioctl [netbsd-7]: graph.c hdaudioctl.8 hdaudioctl.c hdaudioctl.h Log Message: Pull up following revision(s) (requested by sborrill in ticket #1736): usr.sbin/hdaudioctl/hdaudioctl.8: revision 1.7 usr.sbin/hdaudioctl/graph.c: revision 1.5 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.3 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.4 usr.sbin/hdaudioctl/hdaudioctl.h: revision 1.3 Add show subcommand that displays the codec configuration in human-readable tabulated form Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.24.1 src/usr.sbin/hdaudioctl/graph.c cvs rdiff -u -r1.6 -r1.6.4.1 src/usr.sbin/hdaudioctl/hdaudioctl.8 cvs rdiff -u -r1.1 -r1.1.28.1 src/usr.sbin/hdaudioctl/hdaudioctl.c cvs rdiff -u -r1.2 -r1.2.20.1 src/usr.sbin/hdaudioctl/hdaudioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/hdaudioctl/graph.c diff -u src/usr.sbin/hdaudioctl/graph.c:1.2 src/usr.sbin/hdaudioctl/graph.c:1.2.24.1 --- src/usr.sbin/hdaudioctl/graph.c:1.2 Tue Aug 10 13:52:13 2010 +++ src/usr.sbin/hdaudioctl/graph.c Sat Jun 20 16:15:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: graph.c,v 1.2 2010/08/10 13:52:13 joerg Exp $ */ +/* $NetBSD: graph.c,v 1.2.24.1 2020/06/20 16:15:45 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -45,13 +45,6 @@ #include "hdaudioctl.h" -static const char *pin_devices[16] = { - "Line Out", "Speaker", "HP Out", "CD", - "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", - "Line In", "AUX", "Mic In", "Telephony", - "SPDIF In", "Digital In", "Reserved", "Other" -}; - int hdaudioctl_graph(int fd, int argc, char *argv[]) { Index: src/usr.sbin/hdaudioctl/hdaudioctl.8 diff -u src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6.4.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 Tue Mar 18 18:20:46 2014 +++ src/usr.sbin/hdaudioctl/hdaudioctl.8 Sat Jun 20 16:15:45 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: hdaudioctl.8,v 1.6 2014/03/18 18:20:46 riastradh Exp $ +.\" $NetBSD: hdaudioctl.8,v 1.6.4.1 2020/06/20 16:15:45 martin Exp $ .\" .\" Copyright (c) 2009 Precedence Technologies Ltd .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 6, 2009 +.Dd June 12, 2020 .Dt HDAUDIOCTL 8 .Os .Sh NAME @@ -55,6 +55,8 @@ Valid commands are: For each child codec of the chosen .Xr hdaudio 4 device, display the nid, vendor, product, subsystem and device IDs. +.It show +Retrieve and display the current codec configuration in human-readable form. .It get Ar codecid Ar nid Retrieve and display the current codec configuration as a .Xr proplib 3 Index: src/usr.sbin/hdaudioctl/hdaudioctl.c diff -u src/usr.sbin/hdaudioctl/hdaudioctl.c:1.1 src/usr.sbin/hdaudioctl/hdaudioctl.c:1.1.28.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.c:1.1 Sun Oct 11 08:57:54 2009 +++ src/usr.sbin/hdaudioctl/hdaudioctl.c Sat Jun 20 16:15:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudioctl.c,v 1.1 2009/10/11 08:57:54 sborrill Exp $ */ +/* $NetBSD: hdaudioctl.c,v 1.1.28.1 2020/06/20 16:15:45 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -49,13 +49,54 @@ #define DEVPATH_HDAUDIO "/dev/hdaudio0" +const char *pin_devices[16] = { + "Line out", "Speaker", "Headphones", "CD", + "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", + "Line In", "AUX", "Mic In", "Telephony", + "SPDIF In", "Digital In", "Reserved", "Other" +}; +static const char *pin_jacks[16] = { + "Unknown", "1/8\"", "1/4\"", "ATAPI", + "RCA", "Optic", "Digital", "Analog", + "DIN", "XLR", "RJ-11", "Combo", + "0xC", "0xD", "0xE", "Other" +}; +static const char *pin_connections[4] = { + "Jack", "None", "Fixed", "Both" +}; +static const char *pin_colors[16] = { + "Unknown", "Black", "Grey", "Blue", + "Green", "Red", "Orange", "Yellow", + "Purple", "Pink", "Res. A", "Res. B", + "Res. C", "Res. D", "White", "Other" +}; +static const char *pin_locations[64] = { + "0x00", "Rear", "Front", "Left", + "Right", "Top", "Bottom", "Rear-panel", + "Drive-bay", "0x09", "0x0a", "0x0b", + "0x0c", "0x0d", "0x0e", "0x0f", + "Internal", "0x11", "0x12", "0x13", + "0x14", "0x15", "0x16", "Riser", + "0x18", "Onboard", "0x1a", "0x1b", + "0x1c", "0x1d", "0x1e", "0x1f", + "External", "Ext-Rear", "Ext-Front", "Ext-Left", + "Ext-Right", "Ext-Top", "Ext-Bottom", "0x07", + "0x28", "0x29", "0x2a", "0x2b", + "0x2c", "0x2d", "0x2e", "0x2f", + "Other", "0x31", "0x32", "0x33", + "0x34", "0x35", "Other-Bott", "Lid-In", + "Lid-Out", "0x39", "0x3a", "0x3b", + "0x3c", "0x3d", "0x3e", "0x3f" +}; + void usage(void) { const char *prog; prog = getprogname(); - + fprintf(stderr, "usage: %s [-f
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sat Jun 20 16:14:16 UTC 2020 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Tickets #1560 and #1561 To generate a diff of this commit: cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.14 src/doc/CHANGES-8.3:1.1.2.15 --- src/doc/CHANGES-8.3:1.1.2.14 Tue Jun 16 10:29:16 2020 +++ src/doc/CHANGES-8.3 Sat Jun 20 16:14:15 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.14 2020/06/16 10:29:16 bouyer Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.15 2020/06/20 16:14:15 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -202,3 +202,18 @@ sys/dev/usb/if_run.c1.41 corruption. Pointed out by Ilja Van Sprundel. [martin, ticket #1559] +sys/arch/x86/x86/cpu_rng.c 1.16 + + Use x86_read_psl/x86_disable_intr/x86_write_psl to defer interrupts. + This avoids accidently enabling interrupts too early. + [riastradh, ticket #1560] + +usr.sbin/hdaudioctl/graph.c 1.5 +usr.sbin/hdaudioctl/hdaudioctl.8 1.7 +usr.sbin/hdaudioctl/hdaudioctl.c 1.3,1.4 +usr.sbin/hdaudioctl/hdaudioctl.h 1.3 + + Add show subcommand that displays the codec configuration in + human-readable tabulated form. + [sborrill, ticket #1561] +
CVS commit: [netbsd-8] src/usr.sbin/hdaudioctl
Module Name:src Committed By: martin Date: Sat Jun 20 16:11:58 UTC 2020 Modified Files: src/usr.sbin/hdaudioctl [netbsd-8]: graph.c hdaudioctl.8 hdaudioctl.c hdaudioctl.h Log Message: Pull up following revision(s) (requested by sborrill in ticket #1561): usr.sbin/hdaudioctl/hdaudioctl.8: revision 1.7 usr.sbin/hdaudioctl/graph.c: revision 1.5 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.3 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.4 usr.sbin/hdaudioctl/hdaudioctl.h: revision 1.3 Add show subcommand that displays the codec configuration in human-readable tabulated form Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.8.1 src/usr.sbin/hdaudioctl/graph.c cvs rdiff -u -r1.6 -r1.6.18.1 src/usr.sbin/hdaudioctl/hdaudioctl.8 cvs rdiff -u -r1.2 -r1.2.8.1 src/usr.sbin/hdaudioctl/hdaudioctl.c cvs rdiff -u -r1.2 -r1.2.34.1 src/usr.sbin/hdaudioctl/hdaudioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/hdaudioctl/graph.c diff -u src/usr.sbin/hdaudioctl/graph.c:1.3 src/usr.sbin/hdaudioctl/graph.c:1.3.8.1 --- src/usr.sbin/hdaudioctl/graph.c:1.3 Sat Mar 28 14:09:59 2015 +++ src/usr.sbin/hdaudioctl/graph.c Sat Jun 20 16:11:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: graph.c,v 1.3 2015/03/28 14:09:59 jmcneill Exp $ */ +/* $NetBSD: graph.c,v 1.3.8.1 2020/06/20 16:11:58 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -45,13 +45,6 @@ #include "hdaudioctl.h" -static const char *pin_devices[16] = { - "Line Out", "Speaker", "HP Out", "CD", - "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", - "Line In", "AUX", "Mic In", "Telephony", - "SPDIF In", "Digital In", "Reserved", "Other" -}; - int hdaudioctl_graph(int fd, int argc, char *argv[]) { Index: src/usr.sbin/hdaudioctl/hdaudioctl.8 diff -u src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6.18.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 Tue Mar 18 18:20:46 2014 +++ src/usr.sbin/hdaudioctl/hdaudioctl.8 Sat Jun 20 16:11:58 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: hdaudioctl.8,v 1.6 2014/03/18 18:20:46 riastradh Exp $ +.\" $NetBSD: hdaudioctl.8,v 1.6.18.1 2020/06/20 16:11:58 martin Exp $ .\" .\" Copyright (c) 2009 Precedence Technologies Ltd .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 6, 2009 +.Dd June 12, 2020 .Dt HDAUDIOCTL 8 .Os .Sh NAME @@ -55,6 +55,8 @@ Valid commands are: For each child codec of the chosen .Xr hdaudio 4 device, display the nid, vendor, product, subsystem and device IDs. +.It show +Retrieve and display the current codec configuration in human-readable form. .It get Ar codecid Ar nid Retrieve and display the current codec configuration as a .Xr proplib 3 Index: src/usr.sbin/hdaudioctl/hdaudioctl.c diff -u src/usr.sbin/hdaudioctl/hdaudioctl.c:1.2 src/usr.sbin/hdaudioctl/hdaudioctl.c:1.2.8.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.c:1.2 Sat Mar 28 14:09:59 2015 +++ src/usr.sbin/hdaudioctl/hdaudioctl.c Sat Jun 20 16:11:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudioctl.c,v 1.2 2015/03/28 14:09:59 jmcneill Exp $ */ +/* $NetBSD: hdaudioctl.c,v 1.2.8.1 2020/06/20 16:11:58 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -49,13 +49,54 @@ #define DEVPATH_HDAUDIO "/dev/hdaudio0" +const char *pin_devices[16] = { + "Line out", "Speaker", "Headphones", "CD", + "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", + "Line In", "AUX", "Mic In", "Telephony", + "SPDIF In", "Digital In", "Reserved", "Other" +}; +static const char *pin_jacks[16] = { + "Unknown", "1/8\"", "1/4\"", "ATAPI", + "RCA", "Optic", "Digital", "Analog", + "DIN", "XLR", "RJ-11", "Combo", + "0xC", "0xD", "0xE", "Other" +}; +static const char *pin_connections[4] = { + "Jack", "None", "Fixed", "Both" +}; +static const char *pin_colors[16] = { + "Unknown", "Black", "Grey", "Blue", + "Green", "Red", "Orange", "Yellow", + "Purple", "Pink", "Res. A", "Res. B", + "Res. C", "Res. D", "White", "Other" +}; +static const char *pin_locations[64] = { + "0x00", "Rear", "Front", "Left", + "Right", "Top", "Bottom", "Rear-panel", + "Drive-bay", "0x09", "0x0a", "0x0b", + "0x0c", "0x0d", "0x0e", "0x0f", + "Internal", "0x11", "0x12", "0x13", + "0x14", "0x15", "0x16", "Riser", + "0x18", "Onboard", "0x1a", "0x1b", + "0x1c", "0x1d", "0x1e", "0x1f", + "External", "Ext-Rear", "Ext-Front", "Ext-Left", + "Ext-Right", "Ext-Top", "Ext-Bottom", "0x07", + "0x28", "0x29", "0x2a", "0x2b", + "0x2c", "0x2d", "0x2e", "0x2f", + "Other", "0x31", "0x32", "0x33", + "0x34", "0x35", "Other-Bott", "Lid-In", + "Lid-Out", "0x39", "0x3a", "0x3b", + "0x3c", "0x3d", "0x3e", "0x3f" +}; + void usage(void) { const char *prog; prog = getprogname(); - + fprintf(stderr, "usage: %s [-f
CVS commit: [netbsd-9] src/usr.sbin/hdaudioctl
Module Name:src Committed By: martin Date: Sat Jun 20 16:08:57 UTC 2020 Modified Files: src/usr.sbin/hdaudioctl [netbsd-9]: graph.c hdaudioctl.8 hdaudioctl.c hdaudioctl.h Log Message: Pull up following revision(s) (requested by sborrill in ticket #961): usr.sbin/hdaudioctl/hdaudioctl.8: revision 1.7 usr.sbin/hdaudioctl/graph.c: revision 1.5 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.3 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.4 usr.sbin/hdaudioctl/hdaudioctl.h: revision 1.3 Add show subcommand that displays the codec configuration in human-readable tabulated form Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.18.1 src/usr.sbin/hdaudioctl/graph.c cvs rdiff -u -r1.6 -r1.6.28.1 src/usr.sbin/hdaudioctl/hdaudioctl.8 cvs rdiff -u -r1.2 -r1.2.18.1 src/usr.sbin/hdaudioctl/hdaudioctl.c cvs rdiff -u -r1.2 -r1.2.44.1 src/usr.sbin/hdaudioctl/hdaudioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/hdaudioctl/graph.c diff -u src/usr.sbin/hdaudioctl/graph.c:1.3 src/usr.sbin/hdaudioctl/graph.c:1.3.18.1 --- src/usr.sbin/hdaudioctl/graph.c:1.3 Sat Mar 28 14:09:59 2015 +++ src/usr.sbin/hdaudioctl/graph.c Sat Jun 20 16:08:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: graph.c,v 1.3 2015/03/28 14:09:59 jmcneill Exp $ */ +/* $NetBSD: graph.c,v 1.3.18.1 2020/06/20 16:08:57 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -45,13 +45,6 @@ #include "hdaudioctl.h" -static const char *pin_devices[16] = { - "Line Out", "Speaker", "HP Out", "CD", - "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", - "Line In", "AUX", "Mic In", "Telephony", - "SPDIF In", "Digital In", "Reserved", "Other" -}; - int hdaudioctl_graph(int fd, int argc, char *argv[]) { Index: src/usr.sbin/hdaudioctl/hdaudioctl.8 diff -u src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6.28.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 Tue Mar 18 18:20:46 2014 +++ src/usr.sbin/hdaudioctl/hdaudioctl.8 Sat Jun 20 16:08:57 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: hdaudioctl.8,v 1.6 2014/03/18 18:20:46 riastradh Exp $ +.\" $NetBSD: hdaudioctl.8,v 1.6.28.1 2020/06/20 16:08:57 martin Exp $ .\" .\" Copyright (c) 2009 Precedence Technologies Ltd .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 6, 2009 +.Dd June 12, 2020 .Dt HDAUDIOCTL 8 .Os .Sh NAME @@ -55,6 +55,8 @@ Valid commands are: For each child codec of the chosen .Xr hdaudio 4 device, display the nid, vendor, product, subsystem and device IDs. +.It show +Retrieve and display the current codec configuration in human-readable form. .It get Ar codecid Ar nid Retrieve and display the current codec configuration as a .Xr proplib 3 Index: src/usr.sbin/hdaudioctl/hdaudioctl.c diff -u src/usr.sbin/hdaudioctl/hdaudioctl.c:1.2 src/usr.sbin/hdaudioctl/hdaudioctl.c:1.2.18.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.c:1.2 Sat Mar 28 14:09:59 2015 +++ src/usr.sbin/hdaudioctl/hdaudioctl.c Sat Jun 20 16:08:57 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudioctl.c,v 1.2 2015/03/28 14:09:59 jmcneill Exp $ */ +/* $NetBSD: hdaudioctl.c,v 1.2.18.1 2020/06/20 16:08:57 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -49,13 +49,54 @@ #define DEVPATH_HDAUDIO "/dev/hdaudio0" +const char *pin_devices[16] = { + "Line out", "Speaker", "Headphones", "CD", + "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", + "Line In", "AUX", "Mic In", "Telephony", + "SPDIF In", "Digital In", "Reserved", "Other" +}; +static const char *pin_jacks[16] = { + "Unknown", "1/8\"", "1/4\"", "ATAPI", + "RCA", "Optic", "Digital", "Analog", + "DIN", "XLR", "RJ-11", "Combo", + "0xC", "0xD", "0xE", "Other" +}; +static const char *pin_connections[4] = { + "Jack", "None", "Fixed", "Both" +}; +static const char *pin_colors[16] = { + "Unknown", "Black", "Grey", "Blue", + "Green", "Red", "Orange", "Yellow", + "Purple", "Pink", "Res. A", "Res. B", + "Res. C", "Res. D", "White", "Other" +}; +static const char *pin_locations[64] = { + "0x00", "Rear", "Front", "Left", + "Right", "Top", "Bottom", "Rear-panel", + "Drive-bay", "0x09", "0x0a", "0x0b", + "0x0c", "0x0d", "0x0e", "0x0f", + "Internal", "0x11", "0x12", "0x13", + "0x14", "0x15", "0x16", "Riser", + "0x18", "Onboard", "0x1a", "0x1b", + "0x1c", "0x1d", "0x1e", "0x1f", + "External", "Ext-Rear", "Ext-Front", "Ext-Left", + "Ext-Right", "Ext-Top", "Ext-Bottom", "0x07", + "0x28", "0x29", "0x2a", "0x2b", + "0x2c", "0x2d", "0x2e", "0x2f", + "Other", "0x31", "0x32", "0x33", + "0x34", "0x35", "Other-Bott", "Lid-In", + "Lid-Out", "0x39", "0x3a", "0x3b", + "0x3c", "0x3d", "0x3e", "0x3f" +}; + void usage(void) { const char *prog; prog = getprogname(); - + fprintf(stderr, "usage: %s
CVS commit: [netbsd-8] src/sys/arch/x86/x86
Module Name:src Committed By: martin Date: Sat Jun 20 16:05:06 UTC 2020 Modified Files: src/sys/arch/x86/x86 [netbsd-8]: cpu_rng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1560): sys/arch/x86/x86/cpu_rng.c: revision 1.16 Use x86_read_psl/x86_disable_intr/x86_read_psl to defer interrupts. Using x86_disable_intr/x86_enable_intr causes a bit of a snag when we try it early at boot before we're ready to handle interrupts, because it has the effect of enabling interrupts! Fixes instant reset at boot on VIA CPUs. The instant reset on boot is new since the entropy rework, which initialized the x86 CPU RNG earlier than before, but in principle this could also cause other problems while not early at boot too. XXX pullup To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.12.1 src/sys/arch/x86/x86/cpu_rng.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/cpu_rng.c diff -u src/sys/arch/x86/x86/cpu_rng.c:1.5 src/sys/arch/x86/x86/cpu_rng.c:1.5.12.1 --- src/sys/arch/x86/x86/cpu_rng.c:1.5 Mon Feb 29 00:17:54 2016 +++ src/sys/arch/x86/x86/cpu_rng.c Sat Jun 20 16:05:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_rng.c,v 1.5 2016/02/29 00:17:54 riastradh Exp $ */ +/* $NetBSD: cpu_rng.c,v 1.5.12.1 2020/06/20 16:05:06 martin Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -136,6 +136,7 @@ exhausted: static size_t cpu_rng_via(cpu_rng_t *out) { + u_long psl; uint32_t creg0, rndsts; /* @@ -149,9 +150,9 @@ cpu_rng_via(cpu_rng_t *out) * even if such a fault is generated. * * XXX can this really happen if we don't use "rep xstorrng"? - * */ kpreempt_disable(); + psl = x86_read_psl(); x86_disable_intr(); creg0 = rcr0(); lcr0(creg0 & ~(CR0_EM|CR0_TS)); /* Permit access to SIMD/FPU path */ @@ -165,7 +166,7 @@ cpu_rng_via(cpu_rng_t *out) : "=a" (rndsts), "+D" (out) : "d" (0) : "memory"); /* Put CR0 back how it was */ lcr0(creg0); - x86_enable_intr(); + x86_write_psl(psl); kpreempt_enable(); /*
CVS commit: [netbsd-9] src/sys/arch/x86/x86
Module Name:src Committed By: martin Date: Sat Jun 20 16:03:36 UTC 2020 Modified Files: src/sys/arch/x86/x86 [netbsd-9]: cpu_rng.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #960): sys/arch/x86/x86/cpu_rng.c: revision 1.16 Use x86_read_psl/x86_disable_intr/x86_read_psl to defer interrupts. Using x86_disable_intr/x86_enable_intr causes a bit of a snag when we try it early at boot before we're ready to handle interrupts, because it has the effect of enabling interrupts! Fixes instant reset at boot on VIA CPUs. The instant reset on boot is new since the entropy rework, which initialized the x86 CPU RNG earlier than before, but in principle this could also cause other problems while not early at boot too. XXX pullup To generate a diff of this commit: cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/arch/x86/x86/cpu_rng.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/cpu_rng.c diff -u src/sys/arch/x86/x86/cpu_rng.c:1.9.4.1 src/sys/arch/x86/x86/cpu_rng.c:1.9.4.2 --- src/sys/arch/x86/x86/cpu_rng.c:1.9.4.1 Fri Nov 1 18:17:55 2019 +++ src/sys/arch/x86/x86/cpu_rng.c Sat Jun 20 16:03:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_rng.c,v 1.9.4.1 2019/11/01 18:17:55 martin Exp $ */ +/* $NetBSD: cpu_rng.c,v 1.9.4.2 2020/06/20 16:03:35 martin Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -142,6 +142,7 @@ exhausted: static size_t cpu_rng_via(cpu_rng_t *out) { + u_long psl; uint32_t creg0, rndsts; /* @@ -155,9 +156,9 @@ cpu_rng_via(cpu_rng_t *out) * even if such a fault is generated. * * XXX can this really happen if we don't use "rep xstorrng"? - * */ kpreempt_disable(); + psl = x86_read_psl(); x86_disable_intr(); creg0 = rcr0(); lcr0(creg0 & ~(CR0_EM|CR0_TS)); /* Permit access to SIMD/FPU path */ @@ -171,7 +172,7 @@ cpu_rng_via(cpu_rng_t *out) : "=a" (rndsts), "+D" (out) : "d" (0) : "memory"); /* Put CR0 back how it was */ lcr0(creg0); - x86_enable_intr(); + x86_write_psl(psl); kpreempt_enable(); /*
CVS commit: src/sys/arch/arm
Module Name:src Committed By: skrll Date: Sat Jun 20 15:48:19 UTC 2020 Modified Files: src/sys/arch/arm/amlogic: meson_platform.c src/sys/arch/arm/nvidia: tegra_platform.c Log Message: Convert to new proplib api To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/amlogic/meson_platform.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/nvidia/tegra_platform.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/amlogic/meson_platform.c diff -u src/sys/arch/arm/amlogic/meson_platform.c:1.13 src/sys/arch/arm/amlogic/meson_platform.c:1.14 --- src/sys/arch/arm/amlogic/meson_platform.c:1.13 Tue Aug 13 09:56:08 2019 +++ src/sys/arch/arm/amlogic/meson_platform.c Sat Jun 20 15:48:19 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: meson_platform.c,v 1.13 2019/08/13 09:56:08 skrll Exp $ */ +/* $NetBSD: meson_platform.c,v 1.14 2020/06/20 15:48:19 skrll Exp $ */ /*- * Copyright (c) 2019 Jared McNeill @@ -33,7 +33,7 @@ #include "arml2cc.h" #include -__KERNEL_RCSID(0, "$NetBSD: meson_platform.c,v 1.13 2019/08/13 09:56:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: meson_platform.c,v 1.14 2020/06/20 15:48:19 skrll Exp $"); #include #include @@ -189,10 +189,8 @@ meson_platform_device_register(device_t uint8_t enaddr[ETHER_ADDR_LEN]; if (get_bootconf_option(boot_args, "awge0.mac-address", BOOTOPT_TYPE_MACADDR, enaddr)) { - prop_data_t pd = prop_data_create_data(enaddr, + prop_dictionary_set_data(dict, "mac-address", enaddr, sizeof(enaddr)); - prop_dictionary_set(dict, "mac-address", pd); - prop_object_release(pd); } } Index: src/sys/arch/arm/nvidia/tegra_platform.c diff -u src/sys/arch/arm/nvidia/tegra_platform.c:1.20 src/sys/arch/arm/nvidia/tegra_platform.c:1.21 --- src/sys/arch/arm/nvidia/tegra_platform.c:1.20 Thu Jan 3 12:52:40 2019 +++ src/sys/arch/arm/nvidia/tegra_platform.c Sat Jun 20 15:48:19 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_platform.c,v 1.20 2019/01/03 12:52:40 jmcneill Exp $ */ +/* $NetBSD: tegra_platform.c,v 1.21 2020/06/20 15:48:19 skrll Exp $ */ /*- * Copyright (c) 2017 Jared D. McNeill @@ -34,7 +34,7 @@ #include "ukbd.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.20 2019/01/03 12:52:40 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.21 2020/06/20 15:48:19 skrll Exp $"); #include #include @@ -161,23 +161,23 @@ tegra_platform_device_register(device_t if (device_is_a(self, "tegradrm")) { const char *video = get_bootconf_string(boot_args, "video"); if (video) - prop_dictionary_set_cstring(dict, "HDMI-A-1", video); + prop_dictionary_set_string(dict, "HDMI-A-1", video); if (match_bootconf_option(boot_args, "hdmi.forcemode", "dvi")) prop_dictionary_set_bool(dict, "force-dvi", true); } if (device_is_a(self, "tegracec")) - prop_dictionary_set_cstring(dict, "hdmi-device", "tegradrm0"); + prop_dictionary_set_string(dict, "hdmi-device", "tegradrm0"); if (device_is_a(self, "nouveau")) { const char *config = get_bootconf_string(boot_args, "nouveau.config"); if (config) - prop_dictionary_set_cstring(dict, "config", config); + prop_dictionary_set_string(dict, "config", config); const char *debug = get_bootconf_string(boot_args, "nouveau.debug"); if (debug) - prop_dictionary_set_cstring(dict, "debug", debug); + prop_dictionary_set_string(dict, "debug", debug); } if (device_is_a(self, "tegrapcie")) {
CVS commit: [netbsd-9] src/sys/dev/acpi
Module Name:src Committed By: martin Date: Sat Jun 20 15:52:50 UTC 2020 Modified Files: src/sys/dev/acpi [netbsd-9]: acpi_ec.c Log Message: Pull up following revision(s) (requested by jdolecek in ticket #959): sys/dev/acpi/acpi_ec.c: revision 1.84 only install space handler and enable interrupt for EC if ACPI claims the device is actually present, it's not enough when there is entry for it in the ACPI tables fixes interrupt storm triggered on Dell PowerEdge R220 by enabling GPE interrupt on a non-enabled EC (for which _REG call later fails), reported and fix tested by Dima Veselov: http://mail-index.netbsd.org/netbsd-users/2020/03/02/msg024166.html XXX pullup netbsd-9 To generate a diff of this commit: cvs rdiff -u -r1.75.20.3 -r1.75.20.4 src/sys/dev/acpi/acpi_ec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_ec.c diff -u src/sys/dev/acpi/acpi_ec.c:1.75.20.3 src/sys/dev/acpi/acpi_ec.c:1.75.20.4 --- src/sys/dev/acpi/acpi_ec.c:1.75.20.3 Wed Apr 29 13:33:35 2020 +++ src/sys/dev/acpi/acpi_ec.c Sat Jun 20 15:52:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_ec.c,v 1.75.20.3 2020/04/29 13:33:35 martin Exp $ */ +/* $NetBSD: acpi_ec.c,v 1.75.20.4 2020/06/20 15:52:50 martin Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger . @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.75.20.3 2020/04/29 13:33:35 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.75.20.4 2020/06/20 15:52:50 martin Exp $"); #include #include @@ -268,6 +268,11 @@ acpiec_attach(device_t parent, device_t goto fail0; } + if (!acpi_device_present(aa->aa_node->ad_handle)) { + aprint_normal(": not present\n"); + goto fail0; + } + if (!acpiec_parse_gpe_package(self, aa->aa_node->ad_handle, _handle, )) goto fail0;
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Jun 20 15:49:15 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Tickets #952 - #956 To generate a diff of this commit: cvs rdiff -u -r1.1.2.66 -r1.1.2.67 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.66 src/doc/CHANGES-9.1:1.1.2.67 --- src/doc/CHANGES-9.1:1.1.2.66 Sat Jun 13 05:56:44 2020 +++ src/doc/CHANGES-9.1 Sat Jun 20 15:49:15 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.66 2020/06/13 05:56:44 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.67 2020/06/20 15:49:15 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -2899,3 +2899,100 @@ src/sys/dev/usb/if_run.c 1.41 corruption. Pointed out by Ilja Van Sprundel. [martin, ticket #958] +sys/arch/ews4800mips/stand/common/bootxx.c 1.6 + + Fix "illegal exception" error on loading a secondary boot. + [tsutsui, ticket #952] + +usr.sbin/installboot/installboot.8 1.98,1.99 + + Fix ews4800mips example. Its raw partition is rsd0p, not rsd0c. + [tsutsui, ticket #953] + +sys/dev/pckbport/synaptics.c 1.67 + + synaptics: Don't reset the device multiple times in succession. + [nia, ticket #954] + +sys/arch/mac68k/dev/ams.c 1.23 + + Fix inverted Y-axis value passed to wsmouse_input(9). + [tsutsui, ticket #955] + +lib/libnpf/libnpf.31.12 +lib/libnpf/npf.c1.49 +lib/libnpf/npf.h1.39 +sys/net/npf/files.npf1.23 +sys/net/npf/npf.c1.43 +sys/net/npf/npf.h1.63 +sys/net/npf/npf_alg.c1.22 +sys/net/npf/npf_alg_icmp.c 1.33 +sys/net/npf/npf_conf.c1.17 +sys/net/npf/npf_conn.c1.32 +sys/net/npf/npf_conn.h1.20 +sys/net/npf/npf_conndb.c 1.9 +sys/net/npf/npf_connkey.c 1.2 +sys/net/npf/npf_ctl.c1.60 +sys/net/npf/npf_ext_log.c 1.17 +sys/net/npf/npf_ext_normalize.c 1.10 +sys/net/npf/npf_ext_rndblock.c 1.9 +sys/net/npf/npf_handler.c 1.49 +sys/net/npf/npf_if.c1.13 +sys/net/npf/npf_ifaddr.c 1.7 +sys/net/npf/npf_impl.h1.81 +sys/net/npf/npf_inet.c1.57 +sys/net/npf/npf_mbuf.c1.24 +sys/net/npf/npf_nat.c1.50 +sys/net/npf/npf_os.c1.18 +sys/net/npf/npf_params.c 1.3 +sys/net/npf/npf_portmap.c 1.5 +sys/net/npf/npf_rproc.c1.20 +sys/net/npf/npf_ruleset.c 1.51 +sys/net/npf/npf_sendpkt.c 1.22 +sys/net/npf/npf_state.c1.23 +sys/net/npf/npf_state_tcp.c 1.21 +sys/net/npf/npf_tableset.c 1.35 +sys/net/npf/npf_worker.c 1.8 +sys/net/npf/npf_worker.c 1.9 +sys/net/npf/npfkern.h1.5 +tests/net/npf/t_npf.sh1.4 +usr.sbin/npf/npf-params.7 1.4-1.7 +usr.sbin/npf/npfctl/Makefile 1.15 +usr.sbin/npf/npfctl/npf.conf.5 1.91 +usr.sbin/npf/npfctl/npf_bpf_comp.c 1.16 +usr.sbin/npf/npfctl/npf_build.c 1.55 +usr.sbin/npf/npfctl/npf_cmd.c 1.1 +usr.sbin/npf/npfctl/npf_parse.y 1.51 +usr.sbin/npf/npfctl/npf_scan.l 1.32 +usr.sbin/npf/npfctl/npf_show.c 1.32 +usr.sbin/npf/npfctl/npf_var.c 1.13 +usr.sbin/npf/npfctl/npf_var.h 1.10 +usr.sbin/npf/npfctl/npfctl.8 1.25 +usr.sbin/npf/npfctl/npfctl.c 1.64 +usr.sbin/npf/npfctl/npfctl.h 1.53 +usr.sbin/npf/npftest/libnpftest/Makefile 1.11 +usr.sbin/npf/npftest/libnpftest/npf_conn_test.c delete +usr.sbin/npf/npftest/libnpftest/npf_gc_test.c 1.1 +usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c 1.11 +usr.sbin/npf/npftest/libnpftest/npf_nat_test.c 1.14 +usr.sbin/npf/npftest/libnpftest/npf_state_test.c 1.10 +usr.sbin/npf/npftest/libnpftest/npf_test.h 1.21 +usr.sbin/npf/npftest/libnpftest/npf_test_subr.c 1.17 +usr.sbin/npf/npftest/libnpftest/npf_test_subr.c 1.18 +usr.sbin/npf/npftest/npftest.c 1.25 +usr.sbin/npf/npftest/npftest.conf 1.9 +usr.sbin/npf/npftest/npftest.h 1.17 + + Major NPF improvements: + - npfkern: introduce the 'state.key.interface' and + 'state.key.direction' settings. + Users can now choose whether the connection state should be + strictly per-interface or global at the configuration level. + Keep NAT logic to be always per-interface, though. + - npfctl: lots of fixes for the 'npfctl show' logic; + make 'npfctl list' more informative; misc usability improvements + and more user-friendly error messages. + - Amend and improve the manual pages. + - Various bug fixes. + [rmind, ticket #956] +
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Jun 20 15:45:22 UTC 2020 Modified Files: src/sys/arch/arm/arm32: arm32_machdep.c db_interface.c fault.c kgdb_machdep.c stubs.c sys_machdep.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/arch/arm/arm32/arm32_machdep.c cvs rdiff -u -r1.60 -r1.61 src/sys/arch/arm/arm32/db_interface.c cvs rdiff -u -r1.112 -r1.113 src/sys/arch/arm/arm32/fault.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/arm32/kgdb_machdep.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/arm32/stubs.c \ src/sys/arch/arm/arm32/sys_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/arm/arm32/arm32_machdep.c diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.133 src/sys/arch/arm/arm32/arm32_machdep.c:1.134 --- src/sys/arch/arm/arm32/arm32_machdep.c:1.133 Sat Apr 18 11:00:37 2020 +++ src/sys/arch/arm/arm32/arm32_machdep.c Sat Jun 20 15:45:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_machdep.c,v 1.133 2020/04/18 11:00:37 skrll Exp $ */ +/* $NetBSD: arm32_machdep.c,v 1.134 2020/06/20 15:45:22 skrll Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.133 2020/04/18 11:00:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.134 2020/06/20 15:45:22 skrll Exp $"); #include "opt_arm_debug.h" #include "opt_arm_start.h" @@ -371,12 +371,12 @@ sysctl_machdep_booted_device(SYSCTLFN_AR struct sysctlnode node; if (booted_device == NULL) - return (EOPNOTSUPP); + return EOPNOTSUPP; node = *rnode; node.sysctl_data = __UNCONST(device_xname(booted_device)); node.sysctl_size = strlen(device_xname(booted_device)) + 1; - return (sysctl_lookup(SYSCTLFN_CALL())); + return sysctl_lookup(SYSCTLFN_CALL()); } static int @@ -385,12 +385,12 @@ sysctl_machdep_booted_kernel(SYSCTLFN_AR struct sysctlnode node; if (booted_kernel == NULL || booted_kernel[0] == '\0') - return (EOPNOTSUPP); + return EOPNOTSUPP; node = *rnode; node.sysctl_data = booted_kernel; node.sysctl_size = strlen(booted_kernel) + 1; - return (sysctl_lookup(SYSCTLFN_CALL())); + return sysctl_lookup(SYSCTLFN_CALL()); } static int @@ -414,13 +414,13 @@ sysctl_machdep_powersave(SYSCTLFN_ARGS) node.sysctl_flags &= ~CTLFLAG_READWRITE; error = sysctl_lookup(SYSCTLFN_CALL()); if (error || newp == NULL || newval == cpu_do_powersave) - return (error); + return error; if (newval < 0 || newval > 1) - return (EINVAL); + return EINVAL; cpu_do_powersave = newval; - return (0); + return 0; } SYSCTL_SETUP(sysctl_machdep_setup, "sysctl machdep subtree setup") Index: src/sys/arch/arm/arm32/db_interface.c diff -u src/sys/arch/arm/arm32/db_interface.c:1.60 src/sys/arch/arm/arm32/db_interface.c:1.61 --- src/sys/arch/arm/arm32/db_interface.c:1.60 Sat Jun 20 07:10:36 2020 +++ src/sys/arch/arm/arm32/db_interface.c Sat Jun 20 15:45:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.60 2020/06/20 07:10:36 skrll Exp $ */ +/* $NetBSD: db_interface.c,v 1.61 2020/06/20 15:45:22 skrll Exp $ */ /* * Copyright (c) 1996 Scott K. Stevens @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.60 2020/06/20 07:10:36 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.61 2020/06/20 15:45:22 skrll Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -210,7 +210,7 @@ db_validate_address(vaddr_t addr) else pmap = p->p_vmspace->vm_map.pmap; - return (pmap_extract(pmap, addr, NULL) == false); + return pmap_extract(pmap, addr, NULL) == false; } /* Index: src/sys/arch/arm/arm32/fault.c diff -u src/sys/arch/arm/arm32/fault.c:1.112 src/sys/arch/arm/arm32/fault.c:1.113 --- src/sys/arch/arm/arm32/fault.c:1.112 Sat Jun 20 07:10:36 2020 +++ src/sys/arch/arm/arm32/fault.c Sat Jun 20 15:45:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fault.c,v 1.112 2020/06/20 07:10:36 skrll Exp $ */ +/* $NetBSD: fault.c,v 1.113 2020/06/20 15:45:22 skrll Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ #include "opt_kgdb.h" #include -__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.112 2020/06/20 07:10:36 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.113 2020/06/20 15:45:22 skrll Exp $"); #include @@ -194,7 +194,7 @@ data_abort_fixup(trapframe_t *tf, u_int /* Call the CPU specific data abort fixup routine */ error = cpu_dataabt_fixup(tf); if (__predict_true(error != ABORT_FIXUP_FAILED)) - return (error); + return error; /* * Oops, couldn't fix up the instruction @@ -219,9 +219,9 @@ data_abort_fixup(trapframe_t *tf, u_int if (!TRAP_USERMODE(tf)) dab_fatal(tf, fsr, far, l, NULL); - return (error); + return error; #else - return (ABORT_FIXUP_OK); + return ABORT_FIXUP_OK; #endif /* CPU_ABORT_FIXUP_REQUIRED */ } @@ -641,7 +641,7 @@ dab_align(trapframe_t *tf,
CVS commit: [netbsd-9] src/sys/arch/mac68k/dev
Module Name:src Committed By: martin Date: Sat Jun 20 13:55:30 UTC 2020 Modified Files: src/sys/arch/mac68k/dev [netbsd-9]: ams.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #955): sys/arch/mac68k/dev/ams.c: revision 1.23 Fix inverted Y-axis value passed to wsmouse_input(9). Note this is what src/sys/arch/macppc/dev/ams.c does as "upward (moving the mouse forward) is positive" as noted in wsmouse(9): http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/macppc/dev/ams.c#rev1.4 Reported and tested by @NonameInsect on his SE/30 and Xorg server. Should be pulled up to netbsd-8 and netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.22.34.1 src/sys/arch/mac68k/dev/ams.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/mac68k/dev/ams.c diff -u src/sys/arch/mac68k/dev/ams.c:1.22 src/sys/arch/mac68k/dev/ams.c:1.22.34.1 --- src/sys/arch/mac68k/dev/ams.c:1.22 Sat Oct 19 16:23:17 2013 +++ src/sys/arch/mac68k/dev/ams.c Sat Jun 20 13:55:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ams.c,v 1.22 2013/10/19 16:23:17 martin Exp $ */ +/* $NetBSD: ams.c,v 1.22.34.1 2020/06/20 13:55:30 martin Exp $ */ /* * Copyright (C) 1998 Colin Wood @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.22 2013/10/19 16:23:17 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.22.34.1 2020/06/20 13:55:30 martin Exp $"); #include #include @@ -506,7 +506,7 @@ ms_processevent(adb_event_t *event, stru if (amsc->sc_wsmousedev != NULL) /* wsmouse is attached? */ wsmouse_input(amsc->sc_wsmousedev, new_event.u.m.buttons, - new_event.u.m.dx, new_event.u.m.dy, 0, 0, + new_event.u.m.dx, -new_event.u.m.dy, 0, 0, WSMOUSE_INPUT_DELTA); #else /* do nothing */ ;
CVS commit: [netbsd-9] src/sys/dev/pckbport
Module Name:src Committed By: martin Date: Sat Jun 20 13:53:14 UTC 2020 Modified Files: src/sys/dev/pckbport [netbsd-9]: synaptics.c Log Message: Pull up following revision(s) (requested by nia in ticket #954): sys/dev/pckbport/synaptics.c: revision 1.67 synaptics: Don't reset the device multiple times in succession Cherrypicked from a patch from an anonymous contributor. To generate a diff of this commit: cvs rdiff -u -r1.50.2.5 -r1.50.2.6 src/sys/dev/pckbport/synaptics.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/pckbport/synaptics.c diff -u src/sys/dev/pckbport/synaptics.c:1.50.2.5 src/sys/dev/pckbport/synaptics.c:1.50.2.6 --- src/sys/dev/pckbport/synaptics.c:1.50.2.5 Wed Apr 29 13:25:42 2020 +++ src/sys/dev/pckbport/synaptics.c Sat Jun 20 13:53:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: synaptics.c,v 1.50.2.5 2020/04/29 13:25:42 martin Exp $ */ +/* $NetBSD: synaptics.c,v 1.50.2.6 2020/06/20 13:53:14 martin Exp $ */ /* * Copyright (c) 2005, Steve C. Woodford @@ -48,7 +48,7 @@ #include "opt_pms.h" #include -__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.50.2.5 2020/04/29 13:25:42 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.50.2.6 2020/06/20 13:53:14 martin Exp $"); #include #include @@ -1191,7 +1191,7 @@ pms_synaptics_input(void *vsc, int data) getmicrouptime(>current); - if (psc->inputstate != 0) { + if (psc->inputstate > 0) { timersub(>current, >last, ); if (diff.tv_sec > 0 || diff.tv_usec >= 4) { aprint_debug_dev(psc->sc_dev,
CVS commit: [netbsd-9] src/usr.sbin/installboot
Module Name:src Committed By: martin Date: Sat Jun 20 13:51:46 UTC 2020 Modified Files: src/usr.sbin/installboot [netbsd-9]: installboot.8 Log Message: Pull up following revision(s) (requested by tsutsui in ticket #953): usr.sbin/installboot/installboot.8: revision 1.99 usr.sbin/installboot/installboot.8: revision 1.98 Fix ews4800mips example. Its raw partition is rsd0p, not rsd0c. Reduce macro arguments. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.97.2.1 src/usr.sbin/installboot/installboot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/installboot/installboot.8 diff -u src/usr.sbin/installboot/installboot.8:1.97 src/usr.sbin/installboot/installboot.8:1.97.2.1 --- src/usr.sbin/installboot/installboot.8:1.97 Tue May 7 08:14:59 2019 +++ src/usr.sbin/installboot/installboot.8 Sat Jun 20 13:51:46 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: installboot.8,v 1.97 2019/05/07 08:14:59 wiz Exp $ +.\" $NetBSD: installboot.8,v 1.97.2.1 2020/06/20 13:51:46 martin Exp $ .\" .\" Copyright (c) 2002-2019 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -770,8 +770,15 @@ Install the System V Boot File System pr with the secondary bootstrap .Sq Pa /boot already present in the SysVBFS partition on the disk: -.Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_bfs -. +.Dl Ic installboot /dev/rsd0p /usr/mdec/bootxx_bfs +.Bd -ragged -offset indent-two -compact +.Em Note : +On +.Nx Ns /ews4800mips +the p partition is the +.Dq whole disk +(i.e., raw) partition. +.Ed .Ss Nx Ns /i386 and Nx Ns /amd64 Install new boot blocks on an existing .Sy FFSv2
CVS commit: [netbsd-9] src/sys/arch/ews4800mips/stand/common
Module Name:src Committed By: martin Date: Sat Jun 20 13:49:32 UTC 2020 Modified Files: src/sys/arch/ews4800mips/stand/common [netbsd-9]: bootxx.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #952): sys/arch/ews4800mips/stand/common/bootxx.c: revision 1.6 Fix "illegal exception" error on loading a secondary boot. Recent gcc/binutils create more than two problem header sections so the primary bootxx should handle them accordingly. See my port-mips@ port for more details: https://mail-index.netbsd.org/port-mips/2020/06/06/msg000948.html Should be pulled up to netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.70.1 src/sys/arch/ews4800mips/stand/common/bootxx.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/ews4800mips/stand/common/bootxx.c diff -u src/sys/arch/ews4800mips/stand/common/bootxx.c:1.5 src/sys/arch/ews4800mips/stand/common/bootxx.c:1.5.70.1 --- src/sys/arch/ews4800mips/stand/common/bootxx.c:1.5 Wed Feb 4 15:22:13 2009 +++ src/sys/arch/ews4800mips/stand/common/bootxx.c Sat Jun 20 13:49:32 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.5 2009/02/04 15:22:13 tsutsui Exp $ */ +/* $NetBSD: bootxx.c,v 1.5.70.1 2020/06/20 13:49:32 martin Exp $ */ /*- * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc. @@ -46,6 +46,10 @@ #include "common.h" +#define IS_TEXT(p) (p.p_flags & PF_X) +#define IS_DATA(p) ((p.p_flags & PF_X) == 0) +#define IS_BSS(p) (p.p_filesz < p.p_memsz) + #define FILHSZ (sizeof(struct ecoff_filehdr)) #define SCNHSZ (sizeof(struct ecoff_scnhdr)) #define N_TXTOFF(f, a) \ @@ -186,6 +190,7 @@ load_elf(uint8_t *buf, uint32_t *entry) { Elf32_Ehdr *e = (void *)buf; Elf32_Phdr *p; + int i; if (e->e_ident[EI_MAG2] != 'L' || e->e_ident[EI_MAG3] != 'F' || e->e_ident[EI_CLASS] != ELFCLASS32 || @@ -197,16 +202,35 @@ load_elf(uint8_t *buf, uint32_t *entry) BASSERT(e->e_phentsize == sizeof(Elf32_Phdr)); p = (void *)(buf + e->e_phoff); #ifdef _STANDALONE - memcpy((void *)p->p_vaddr, buf + p->p_offset, p->p_filesz); - p++; - memcpy((void *)p->p_vaddr, buf + p->p_offset, p->p_filesz); + for (i = 0; i < e->e_phnum; i++) { + if (p[i].p_type != PT_LOAD || + (p[i].p_flags & (PF_W|PF_R|PF_X)) == 0) + continue; + if (IS_TEXT(p[i]) || IS_DATA(p[i])) { + memcpy((void *)p[i].p_vaddr, + buf + p[i].p_offset, p[i].p_filesz); + } + if (IS_BSS(p[i])) { + memset((void *)(p[i].p_vaddr + p[i].p_filesz), 0, + p[i].p_memsz - p[i].p_filesz); + } + } #else DPRINTF("ELF entry point 0x%08x\n", e->e_entry); - DPRINTF("[text] 0x%08x 0x%x %dbyte.\n", p->p_vaddr, p->p_offset, - p->p_filesz); - p++; - DPRINTF("[data] 0x%08x 0x%x %dbyte.\n", p->p_vaddr, p->p_offset, - p->p_filesz); + for (i = 0; i < e->e_phnum; i++) { + if (p[i].p_type != PT_LOAD || + (p[i].p_flags & (PF_W|PF_R|PF_X)) == 0) + continue; + if (IS_TEXT(p[i]) || IS_DATA(p[i])) { + DPRINTF("[text/data] 0x%08x 0x%x %dbyte.\n", + p[i].p_vaddr, p[i].p_offset, p[i].p_filesz); + } + if (IS_BSS(p[i])) { + DPRINTF("[bss] 0x%08x %dbyte.\n", + p[i].p_vaddr + p[i].p_filesz, + p[i].p_memsz - p[i].p_filesz); + } + } #endif *entry = e->e_entry;
CVS commit: src/usr.bin/tail
Module Name:src Committed By: kamil Date: Sat Jun 20 10:53:28 UTC 2020 Modified Files: src/usr.bin/tail: tac.1 Log Message: Remove double 'each of' Reported by Weitian LI liweitianux (DragonFly). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/tail/tac.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tail/tac.1 diff -u src/usr.bin/tail/tac.1:1.2 src/usr.bin/tail/tac.1:1.3 --- src/usr.bin/tail/tac.1:1.2 Sun Oct 1 22:35:23 2017 +++ src/usr.bin/tail/tac.1 Sat Jun 20 10:53:28 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: tac.1,v 1.2 2017/10/01 22:35:23 kre Exp $ +.\" $NetBSD: tac.1,v 1.3 2020/06/20 10:53:28 kamil Exp $ .\" .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -30,7 +30,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 1, 2017 +.Dd June 20, 2020 .Dt TAC 1 .Os .Sh NAME @@ -42,7 +42,7 @@ .Sh DESCRIPTION .Nm .Pq cat backwards -outputs the contents of each of each of the specified files, +outputs the contents of each of the specified files, or the standard input if no files are specified, in reverse line order to the standard output. .Sh EXIT STATUS
CVS commit: src/tests/lib/libcurses
Module Name:src Committed By: rin Date: Sat Jun 20 07:50:16 UTC 2020 Modified Files: src/tests/lib/libcurses/slave: curses_commands.c src/tests/lib/libcurses/tests: mvscanw Log Message: Fix false positive for mvscanw tests on big endian machines. When conversion specifier is not a derivative form of "%s", retrieve input as 32bit integer, and then convert to string literal. Then we can avoid interpretation from ASCII code to integer, which is apparently byte-order depended. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libcurses/slave/curses_commands.c cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libcurses/tests/mvscanw Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libcurses/slave/curses_commands.c diff -u src/tests/lib/libcurses/slave/curses_commands.c:1.9 src/tests/lib/libcurses/slave/curses_commands.c:1.10 --- src/tests/lib/libcurses/slave/curses_commands.c:1.9 Sun May 26 07:47:37 2019 +++ src/tests/lib/libcurses/slave/curses_commands.c Sat Jun 20 07:50:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: curses_commands.c,v 1.9 2019/05/26 07:47:37 blymn Exp $ */ +/* $NetBSD: curses_commands.c,v 1.10 2020/06/20 07:50:16 rin Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -3061,7 +3061,7 @@ cmd_mvprintw(int nargs, char **args) void cmd_mvscanw(int nargs, char **args) { - int y, x; + int y, x, val; char string[256]; if (check_arg_count(nargs, 3) == 1) @@ -3081,7 +3081,13 @@ cmd_mvscanw(int nargs, char **args) /* XXX - call2 */ report_count(2); - report_return(mvscanw(y, x, args[2], )); + if (strchr(args[2], 's') != NULL) + report_return(mvscanw(y, x, args[2], )); + else { + /* XXX assume 32bit integer */ + report_return(mvscanw(y, x, args[2], )); + snprintf(string, sizeof(string), args[2], val); + } report_status(string); } Index: src/tests/lib/libcurses/tests/mvscanw diff -u src/tests/lib/libcurses/tests/mvscanw:1.3 src/tests/lib/libcurses/tests/mvscanw:1.4 --- src/tests/lib/libcurses/tests/mvscanw:1.3 Fri Feb 7 19:56:51 2020 +++ src/tests/lib/libcurses/tests/mvscanw Sat Jun 20 07:50:16 2020 @@ -1,11 +1,12 @@ +# XXX For this test, only one string or 32bit integer are supported as +# conversion specifiers at the moment. include start input "testing 1 2 3\n" call2 OK "testing" mvscanw 3 5 "%s" input "testing 1 2 3\n" call2 OK "test" mvscanw 3 5 "%4s" -# 50 will translate into number 2 in ascii input "50 12\n" -call2 OK "2" mvscanw 3 5 "%d" +call2 OK "50" mvscanw 3 5 "%d" input "aa bb 50 12\n" # expect ERR because input has alpha and scanw wants integer -call2 ERR "2" mvscanw 3 5 "%d" +call2 ERR "50" mvscanw 3 5 "%d"
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: rin Date: Sat Jun 20 07:30:09 UTC 2020 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: Skip sigbus_adraln for powerpc. SIGBUS for unaligned accesses is not mandatory for powerpc; most processors (not all, e.g., 403) can deal with that. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/tests/lib/libc/gen/t_siginfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.39 src/tests/lib/libc/gen/t_siginfo.c:1.40 --- src/tests/lib/libc/gen/t_siginfo.c:1.39 Sat Feb 22 19:09:51 2020 +++ src/tests/lib/libc/gen/t_siginfo.c Sat Jun 20 07:30:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.39 2020/02/22 19:09:51 kamil Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.40 2020/06/20 07:30:09 rin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -465,6 +465,15 @@ ATF_TC_BODY(sigbus_adraln, tc) atf_tc_skip("No SIGBUS signal for unaligned accesses"); #endif +#ifdef __powerpc__ + /* + * SIGBUS is not mandatory for powerpc; most processors (not all) + * can deal with unaligned accesses. + */ + atf_tc_skip("SIGBUS signal for unaligned accesses is " + "not mandatory for this architecture"); +#endif + /* m68k (except sun2) never issue SIGBUS (PR lib/49653), * same for armv8 or newer */ if (strcmp(MACHINE_ARCH, "m68k") == 0 ||
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Jun 20 07:10:36 UTC 2020 Modified Files: src/sys/arch/arm/arm32: arm11_pmc.c arm32_kvminit.c arm32_reboot.c armv7_generic_space.c bus_dma.c cortex_pmc.c cpu.c db_interface.c db_machdep.c fault.c intr.c kgdb_machdep.c kobj_machdep.c netbsd32_machdep.c netbsd32_machdep_13.c netbsd32_machdep_16.c stubs.c sys_machdep.c vm_machdep.c Log Message: KNF #includes Remove some unnecessary ones while I'm here. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm32/arm11_pmc.c \ src/sys/arch/arm/arm32/cortex_pmc.c cvs rdiff -u -r1.58 -r1.59 src/sys/arch/arm/arm32/arm32_kvminit.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/arm32/arm32_reboot.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/arm32/armv7_generic_space.c cvs rdiff -u -r1.121 -r1.122 src/sys/arch/arm/arm32/bus_dma.c cvs rdiff -u -r1.144 -r1.145 src/sys/arch/arm/arm32/cpu.c cvs rdiff -u -r1.59 -r1.60 src/sys/arch/arm/arm32/db_interface.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/arm32/db_machdep.c cvs rdiff -u -r1.111 -r1.112 src/sys/arch/arm/arm32/fault.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arm/arm32/intr.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/arm32/kgdb_machdep.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/arm32/kobj_machdep.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm32/netbsd32_machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/arm32/netbsd32_machdep_13.c \ src/sys/arch/arm/arm32/netbsd32_machdep_16.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/arm32/stubs.c \ src/sys/arch/arm/arm32/sys_machdep.c cvs rdiff -u -r1.76 -r1.77 src/sys/arch/arm/arm32/vm_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/arm/arm32/arm11_pmc.c diff -u src/sys/arch/arm/arm32/arm11_pmc.c:1.7 src/sys/arch/arm/arm32/arm11_pmc.c:1.8 --- src/sys/arch/arm/arm32/arm11_pmc.c:1.7 Sat Jun 20 07:01:16 2020 +++ src/sys/arch/arm/arm32/arm11_pmc.c Sat Jun 20 07:10:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arm11_pmc.c,v 1.7 2020/06/20 07:01:16 skrll Exp $ */ +/* $NetBSD: arm11_pmc.c,v 1.8 2020/06/20 07:10:36 skrll Exp $ */ /* Copyright (c) 2007 Microsoft * All rights reserved. @@ -34,14 +34,18 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm11_pmc.c,v 1.7 2020/06/20 07:01:16 skrll Exp $"); -#include +__KERNEL_RCSID(0, "$NetBSD: arm11_pmc.c,v 1.8 2020/06/20 07:10:36 skrll Exp $"); + #include -#include +#include + #include +#include #include #include + #include + #include #include Index: src/sys/arch/arm/arm32/cortex_pmc.c diff -u src/sys/arch/arm/arm32/cortex_pmc.c:1.7 src/sys/arch/arm/arm32/cortex_pmc.c:1.8 --- src/sys/arch/arm/arm32/cortex_pmc.c:1.7 Sun Jan 27 02:08:37 2019 +++ src/sys/arch/arm/arm32/cortex_pmc.c Sat Jun 20 07:10:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cortex_pmc.c,v 1.7 2019/01/27 02:08:37 pgoyette Exp $ */ +/* $NetBSD: cortex_pmc.c,v 1.8 2020/06/20 07:10:36 skrll Exp $ */ /* Copyright (c) 2007 Microsoft * All rights reserved. @@ -35,11 +35,13 @@ */ #include -/* __KERNEL_RCSID(0, "$NetBSD: cortex_pmc.c,v 1.7 2019/01/27 02:08:37 pgoyette Exp $"); */ -#include +/* __KERNEL_RCSID(0, "$NetBSD: cortex_pmc.c,v 1.8 2020/06/20 07:10:36 skrll Exp $"); */ + #include -#include +#include + #include +#include #include #include Index: src/sys/arch/arm/arm32/arm32_kvminit.c diff -u src/sys/arch/arm/arm32/arm32_kvminit.c:1.58 src/sys/arch/arm/arm32/arm32_kvminit.c:1.59 --- src/sys/arch/arm/arm32/arm32_kvminit.c:1.58 Tue Feb 4 10:59:21 2020 +++ src/sys/arch/arm/arm32/arm32_kvminit.c Sat Jun 20 07:10:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_kvminit.c,v 1.58 2020/02/04 10:59:21 skrll Exp $ */ +/* $NetBSD: arm32_kvminit.c,v 1.59 2020/06/20 07:10:36 skrll Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -127,9 +127,10 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.58 2020/02/04 10:59:21 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.59 2020/06/20 07:10:36 skrll Exp $"); #include + #include #include #include Index: src/sys/arch/arm/arm32/arm32_reboot.c diff -u src/sys/arch/arm/arm32/arm32_reboot.c:1.12 src/sys/arch/arm/arm32/arm32_reboot.c:1.13 --- src/sys/arch/arm/arm32/arm32_reboot.c:1.12 Sat Jun 20 07:01:16 2020 +++ src/sys/arch/arm/arm32/arm32_reboot.c Sat Jun 20 07:10:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_reboot.c,v 1.12 2020/06/20 07:01:16 skrll Exp $ */ +/* $NetBSD: arm32_reboot.c,v 1.13 2020/06/20 07:10:36 skrll Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -122,15 +122,15 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.12 2020/06/20 07:01:16 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.13 2020/06/20 07:10:36 skrll Exp $"); #include +
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Sat Jun 20 07:01:16 UTC 2020 Modified Files: src/sys/arch/arm/arm32: arm11_pmc.c arm32_reboot.c intr.c kgdb_machdep.c kobj_machdep.c netbsd32_machdep.c netbsd32_machdep_13.c netbsd32_machdep_16.c sys_machdep.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/arm32/arm11_pmc.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/arm32/arm32_reboot.c cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/arm32/intr.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/arm32/kgdb_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/arm32/kobj_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/arm32/netbsd32_machdep.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm32/netbsd32_machdep_13.c \ src/sys/arch/arm/arm32/netbsd32_machdep_16.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/arm32/sys_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/arm/arm32/arm11_pmc.c diff -u src/sys/arch/arm/arm32/arm11_pmc.c:1.6 src/sys/arch/arm/arm32/arm11_pmc.c:1.7 --- src/sys/arch/arm/arm32/arm11_pmc.c:1.6 Sun Jan 27 02:08:37 2019 +++ src/sys/arch/arm/arm32/arm11_pmc.c Sat Jun 20 07:01:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arm11_pmc.c,v 1.6 2019/01/27 02:08:37 pgoyette Exp $ */ +/* $NetBSD: arm11_pmc.c,v 1.7 2020/06/20 07:01:16 skrll Exp $ */ /* Copyright (c) 2007 Microsoft * All rights reserved. @@ -34,11 +34,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm11_pmc.c,v 1.6 2019/01/27 02:08:37 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm11_pmc.c,v 1.7 2020/06/20 07:01:16 skrll Exp $"); #include #include #include -#include +#include #include #include #include Index: src/sys/arch/arm/arm32/arm32_reboot.c diff -u src/sys/arch/arm/arm32/arm32_reboot.c:1.11 src/sys/arch/arm/arm32/arm32_reboot.c:1.12 --- src/sys/arch/arm/arm32/arm32_reboot.c:1.11 Thu May 31 23:22:50 2018 +++ src/sys/arch/arm/arm32/arm32_reboot.c Sat Jun 20 07:01:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arm32_reboot.c,v 1.11 2018/05/31 23:22:50 mrg Exp $ */ +/* $NetBSD: arm32_reboot.c,v 1.12 2020/06/20 07:01:16 skrll Exp $ */ /* * Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved. @@ -122,7 +122,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.11 2018/05/31 23:22:50 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm32_reboot.c,v 1.12 2020/06/20 07:01:16 skrll Exp $"); #include #include @@ -157,7 +157,7 @@ docpureset(int howto) /* If there is no keyboard, cngetc() returns 0, so loop */ while (cngetc() == 0) delay(10); - cnpollc(false); + cnpollc(false); } printf("rebooting...\r\n"); Index: src/sys/arch/arm/arm32/intr.c diff -u src/sys/arch/arm/arm32/intr.c:1.34 src/sys/arch/arm/arm32/intr.c:1.35 --- src/sys/arch/arm/arm32/intr.c:1.34 Sat Sep 1 12:15:39 2012 +++ src/sys/arch/arm/arm32/intr.c Sat Jun 20 07:01:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.34 2012/09/01 12:15:39 matt Exp $ */ +/* $NetBSD: intr.c,v 1.35 2020/06/20 07:01:16 skrll Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.34 2012/09/01 12:15:39 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.35 2020/06/20 07:01:16 skrll Exp $"); #include #include @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3 #include #include - + u_int spl_masks[NIPL]; extern u_int irqmasks[]; Index: src/sys/arch/arm/arm32/kgdb_machdep.c diff -u src/sys/arch/arm/arm32/kgdb_machdep.c:1.7 src/sys/arch/arm/arm32/kgdb_machdep.c:1.8 --- src/sys/arch/arm/arm32/kgdb_machdep.c:1.7 Sun Oct 18 18:14:00 2009 +++ src/sys/arch/arm/arm32/kgdb_machdep.c Sat Jun 20 07:01:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kgdb_machdep.c,v 1.7 2009/10/18 18:14:00 snj Exp $ */ +/* $NetBSD: kgdb_machdep.c,v 1.8 2020/06/20 07:01:16 skrll Exp $ */ /* * Copyright (c) 1996 Matthias Pfaller. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.7 2009/10/18 18:14:00 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.8 2020/06/20 07:01:16 skrll Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -66,7 +66,7 @@ kgdb_acc(vaddr_t va, size_t len) * Translate a trap number into a unix compatible signal value. * (gdb only understands unix signal numbers). */ -int +int kgdb_signal(int type) { @@ -136,7 +136,7 @@ kgdb_setregs(db_regs_t *regs, kgdb_reg_t regs->tf_pc = gdb_regs[KGDB_REGNUM_R0 + 15]; regs->tf_spsr = gdb_regs[KGDB_REGNUM_SPSR]; -} +} /* * Trap into kgdb to wait for debugger to connect, Index: src/sys/arch/arm/arm32/kobj_machdep.c diff -u src/sys/arch/arm/arm32/kobj_machdep.c:1.12 src/sys/arch/arm/arm32/kobj_machdep.c:1.13 --- src/sys/arch/arm/arm32/kobj_machdep.c:1.12 Fri Nov 3 09:59:08 2017 +++