Re: CVS commit: src/sys/arch/aarch64
>> Has any consideration be given to perhaps creating a new MACHINE_ARCH for >> this, or somehow otherwise decorating the ELF files to indicate their >> exec-ability? > >I am under the impression that PAC was designed to be forewards >compatible, so older CPUs can execute code with this annotation. I don't >whether it works in practice though. Yes. That's right. Even binaries compiled with "gcc -msign-return-address=all" work fine on ARMv8.0-v8.2 CPUs. This is because the "paciasp" and "autiasp" instructions are treated as "nop" on ARMv8.0-v8.2 CPUs. Therefore, I don't think it's necessary to add detailed attributes to the ELF header. So, even if we default the PAC option right now, we won't have any problems. But we might as well enable PAC by default after real ARMv8.3 hardware becomes available easily. (now tested on "qemu-system-aarch64 -cpu max") -- ryo shimizu
CVS commit: src
Module Name:src Committed By: rin Date: Sun May 24 04:55:53 UTC 2020 Modified Files: src: build.sh Log Message: Add missing MACHINE_ARCH=earmv5hf{,eb} for evbarm. To generate a diff of this commit: cvs rdiff -u -r1.338 -r1.339 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rin Date: Sun May 24 04:55:53 UTC 2020 Modified Files: src: build.sh Log Message: Add missing MACHINE_ARCH=earmv5hf{,eb} for evbarm. To generate a diff of this commit: cvs rdiff -u -r1.338 -r1.339 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.338 src/build.sh:1.339 --- src/build.sh:1.338 Sat May 23 17:26:32 2020 +++ src/build.sh Sun May 24 04:55:53 2020 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.338 2020/05/23 17:26:32 jmcneill Exp $ +# $NetBSD: build.sh,v 1.339 2020/05/24 04:55:53 rin Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -641,7 +641,9 @@ MACHINE=evbarm MACHINE_ARCH= NO_DEFAUL MACHINE=evbarm MACHINE_ARCH=earmv4 ALIAS=evbearmv4-el ALIAS=evbarmv4-el MACHINE=evbarm MACHINE_ARCH=earmv4eb ALIAS=evbearmv4-eb ALIAS=evbarmv4-eb MACHINE=evbarm MACHINE_ARCH=earmv5 ALIAS=evbearmv5-el ALIAS=evbarmv5-el +MACHINE=evbarm MACHINE_ARCH=earmv5hf ALIAS=evbearmv5hf-el ALIAS=evbarmv5hf-el MACHINE=evbarm MACHINE_ARCH=earmv5eb ALIAS=evbearmv5-eb ALIAS=evbarmv5-eb +MACHINE=evbarm MACHINE_ARCH=earmv5hfeb ALIAS=evbearmv5hf-eb ALIAS=evbarmv5hf-eb MACHINE=evbarm MACHINE_ARCH=earmv6 ALIAS=evbearmv6-el ALIAS=evbarmv6-el MACHINE=evbarm MACHINE_ARCH=earmv6hf ALIAS=evbearmv6hf-el ALIAS=evbarmv6hf-el MACHINE=evbarm MACHINE_ARCH=earmv6eb ALIAS=evbearmv6-eb ALIAS=evbarmv6-eb @@ -1935,7 +1937,7 @@ createmakewrapper() eval cat <
CVS commit: src/libexec/ld.elf_so/arch/powerpc
Module Name:src Committed By: macallan Date: Sun May 24 02:33:11 UTC 2020 Modified Files: src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c Log Message: new binutils/gcc started emitting R_PPC_UADDR32 reloc entries, so for now treat them like R_PPC_ADDR32 XXX these relocs have been observed in the xf86-video-radeon driver, but only in the AtomBios support code, which is unused on PowerPC. This allows the driver to load but it's not clear if the affected parts would actually function. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c diff -u src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.60 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.61 --- src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.60 Sun Dec 8 23:49:16 2019 +++ src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c Sun May 24 02:33:11 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ppc_reloc.c,v 1.60 2019/12/08 23:49:16 uwe Exp $ */ +/* $NetBSD: ppc_reloc.c,v 1.61 2020/05/24 02:33:11 macallan Exp $ */ /*- * Copyright (C) 1998 Tsubai Masanari @@ -30,7 +30,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ppc_reloc.c,v 1.60 2019/12/08 23:49:16 uwe Exp $"); +__RCSID("$NetBSD: ppc_reloc.c,v 1.61 2020/05/24 02:33:11 macallan Exp $"); #endif /* not lint */ #include @@ -195,6 +195,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry case R_TYPE(ADDR64): /* S + A */ #else case R_TYPE(ADDR32): /* S + A */ + case R_TYPE(UADDR32): /* S + A */ #endif case R_TYPE(GLOB_DAT): /* S + A */ case R_TYPE(ADDR16_LO): @@ -226,6 +227,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry case R_TYPE(ADDR64): /* S + A */ #else case R_TYPE(ADDR32): /* S + A */ + case R_TYPE(UADDR32): /* S + A */ #endif case R_TYPE(GLOB_DAT): /* S + A */ tmp = (Elf_Addr)(defobj->relocbase + def->st_value +
CVS commit: src/libexec/ld.elf_so/arch/powerpc
Module Name:src Committed By: macallan Date: Sun May 24 02:33:11 UTC 2020 Modified Files: src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c Log Message: new binutils/gcc started emitting R_PPC_UADDR32 reloc entries, so for now treat them like R_PPC_ADDR32 XXX these relocs have been observed in the xf86-video-radeon driver, but only in the AtomBios support code, which is unused on PowerPC. This allows the driver to load but it's not clear if the affected parts would actually function. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: ad Date: Sat May 23 23:42:44 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c src/sys/arch/vax/vax: pmap.c src/sys/arch/x68k/dev: event.c src/sys/compat/common: kern_sig_16.c tty_43.c src/sys/compat/linux/arch/arm: linux_ptrace.c src/sys/compat/linux/arch/i386: linux_ptrace.c src/sys/compat/linux/arch/powerpc: linux_ptrace.c src/sys/compat/linux/common: linux_file.c linux_sched.c linux_signal.c src/sys/compat/netbsd32: netbsd32_fs.c src/sys/ddb: db_xxx.c src/sys/dev: lockstat.c midi.c sequencer.c src/sys/dev/audio: audio.c src/sys/dev/pci/bktr: bktr_core.c src/sys/dev/sbus: bpp.c src/sys/dev/usb: uhid.c usb.c src/sys/dev/wscons: wsdisplay_compat_usl.c wsevent.c src/sys/external/bsd/drm/dist/bsd-core: drm_irq.c src/sys/external/bsd/drm2/drm: drm_lock.c src/sys/fs/autofs: autofs.c src/sys/kern: core_elf32.c init_main.c init_sysctl.c kern_acct.c kern_core.c kern_cpu.c kern_descrip.c kern_event.c kern_exec.c kern_exit.c kern_fork.c kern_ktrace.c kern_lwp.c kern_proc.c kern_prot.c kern_resource.c kern_sig.c kern_stub.c kern_synch.c kern_syscall.c kern_tc.c kern_time.c subr_copy.c subr_exec_fd.c subr_prf.c subr_time.c sys_aio.c sys_generic.c sys_lwp.c sys_mqueue.c sys_pset.c sys_ptrace_common.c sys_sched.c sys_sig.c tty.c tty_tty.c uipc_socket2.c uipc_syscalls.c vfs_mount.c vfs_vnops.c src/sys/miscfs/procfs: procfs_limit.c procfs_linux.c procfs_status.c procfs_subr.c procfs_vfsops.c procfs_vnops.c src/sys/miscfs/specfs: spec_vnops.c src/sys/nfs: nfs_bio.c src/sys/rump/librump/rumpkern: lwproc.c rump.c signals.c src/sys/sys: proc.h src/sys/ufs/chfs: chfs_vnops.c src/sys/uvm: uvm_meter.c src/tests/rump/kernspace: sendsig.c Log Message: Move proc_lock into the data segment. It was dynamically allocated because at the time we had mutex_obj_alloc() but not __cacheline_aligned. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 \ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c cvs rdiff -u -r1.190 -r1.191 src/sys/arch/vax/vax/pmap.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/dev/event.c cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/kern_sig_16.c cvs rdiff -u -r1.35 -r1.36 src/sys/compat/common/tty_43.c cvs rdiff -u -r1.21 -r1.22 src/sys/compat/linux/arch/arm/linux_ptrace.c cvs rdiff -u -r1.33 -r1.34 src/sys/compat/linux/arch/i386/linux_ptrace.c cvs rdiff -u -r1.31 -r1.32 src/sys/compat/linux/arch/powerpc/linux_ptrace.c cvs rdiff -u -r1.117 -r1.118 src/sys/compat/linux/common/linux_file.c cvs rdiff -u -r1.77 -r1.78 src/sys/compat/linux/common/linux_sched.c cvs rdiff -u -r1.82 -r1.83 src/sys/compat/linux/common/linux_signal.c cvs rdiff -u -r1.89 -r1.90 src/sys/compat/netbsd32/netbsd32_fs.c cvs rdiff -u -r1.74 -r1.75 src/sys/ddb/db_xxx.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/lockstat.c cvs rdiff -u -r1.89 -r1.90 src/sys/dev/midi.c cvs rdiff -u -r1.71 -r1.72 src/sys/dev/sequencer.c cvs rdiff -u -r1.69 -r1.70 src/sys/dev/audio/audio.c cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/bktr/bktr_core.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/sbus/bpp.c cvs rdiff -u -r1.113 -r1.114 src/sys/dev/usb/uhid.c cvs rdiff -u -r1.183 -r1.184 src/sys/dev/usb/usb.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/wscons/wsdisplay_compat_usl.c cvs rdiff -u -r1.44 -r1.45 src/sys/dev/wscons/wsevent.c cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/drm/dist/bsd-core/drm_irq.c cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/drm/drm_lock.c cvs rdiff -u -r1.5 -r1.6 src/sys/fs/autofs/autofs.c cvs rdiff -u -r1.62 -r1.63 src/sys/kern/core_elf32.c cvs rdiff -u -r1.525 -r1.526 src/sys/kern/init_main.c cvs rdiff -u -r1.225 -r1.226 src/sys/kern/init_sysctl.c \ src/sys/kern/kern_fork.c cvs rdiff -u -r1.96 -r1.97 src/sys/kern/kern_acct.c cvs rdiff -u -r1.29 -r1.30 src/sys/kern/kern_core.c cvs rdiff -u -r1.89 -r1.90 src/sys/kern/kern_cpu.c cvs rdiff -u -r1.245 -r1.246 src/sys/kern/kern_descrip.c cvs rdiff -u -r1.106 -r1.107 src/sys/kern/kern_event.c cvs rdiff -u -r1.500 -r1.501 src/sys/kern/kern_exec.c cvs rdiff -u -r1.289 -r1.290 src/sys/kern/kern_exit.c cvs rdiff -u -r1.176 -r1.177 src/sys/kern/kern_ktrace.c cvs rdiff -u -r1.238 -r1.239 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.252 -r1.253 src/sys/kern/kern_proc.c cvs rdiff -u -r1.121 -r1.122 src/sys/kern/kern_prot.c cvs rdiff -u -r1.186 -r1.187 src/sys/kern/kern_resource.c cvs rdiff -u -r1.389 -r1.390 src/sys/kern/kern_sig.c cvs rdiff -u -r1.48 -r1.49 src/sys/kern/kern_stub.c src/sys/kern/sys_sched.c cvs rdiff -u -r1.348 -r1.349 src/sys/kern/kern_synch.c cvs rdiff -u -r1.19 -r1.20 src/sys/kern/kern_syscall.c cvs rdiff -u -r1.54 -r1.55 src/sys/kern/kern_tc.c cvs rdiff -u
CVS commit: src/sys/sys
Module Name:src Committed By: ad Date: Sat May 23 23:37:17 UTC 2020 Modified Files: src/sys/sys: sched.h Log Message: Oops. If a SCHED_RR thread is preempted and has exceeded its timeslice it needs to go to the back of the run queue so round-robin actually happens, otherwise it should go to the front. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/sys/sched.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: ad Date: Sat May 23 23:37:17 UTC 2020 Modified Files: src/sys/sys: sched.h Log Message: Oops. If a SCHED_RR thread is preempted and has exceeded its timeslice it needs to go to the back of the run queue so round-robin actually happens, otherwise it should go to the front. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/sys/sched.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sched.h diff -u src/sys/sys/sched.h:1.89 src/sys/sys/sched.h:1.90 --- src/sys/sys/sched.h:1.89 Tue May 12 11:21:09 2020 +++ src/sys/sys/sched.h Sat May 23 23:37:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sched.h,v 1.89 2020/05/12 11:21:09 kamil Exp $ */ +/* $NetBSD: sched.h,v 1.90 2020/05/23 23:37:17 ad Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008, 2019, 2020 @@ -210,6 +210,7 @@ struct schedstate_percpu { #ifdef _KERNEL extern int schedhz; /* ideally: 16 */ +extern u_int sched_rrticks; struct proc; struct cpu_info;
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Sat May 23 22:16:17 UTC 2020 Modified Files: src/sys/kern: tty_ptm.c Log Message: PR kern/55237: Panic: vrelel: bad ref count (9.99.54) Adjust v_writecount with v_interlock held. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/kern/tty_ptm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Sat May 23 22:16:17 UTC 2020 Modified Files: src/sys/kern: tty_ptm.c Log Message: PR kern/55237: Panic: vrelel: bad ref count (9.99.54) Adjust v_writecount with v_interlock held. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/kern/tty_ptm.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/tty_ptm.c diff -u src/sys/kern/tty_ptm.c:1.41 src/sys/kern/tty_ptm.c:1.42 --- src/sys/kern/tty_ptm.c:1.41 Sat Nov 30 20:45:49 2019 +++ src/sys/kern/tty_ptm.c Sat May 23 22:16:17 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: tty_ptm.c,v 1.41 2019/11/30 20:45:49 ad Exp $ */ +/* $NetBSD: tty_ptm.c,v 1.42 2020/05/23 22:16:17 ad Exp $ */ /*- - * Copyright (c) 2004 The NetBSD Foundation, Inc. + * Copyright (c) 2004, 2020 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tty_ptm.c,v 1.41 2019/11/30 20:45:49 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tty_ptm.c,v 1.42 2020/05/23 22:16:17 ad Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -145,7 +145,9 @@ pty_vn_open(struct vnode *vp, struct lwp return error; } + mutex_enter(vp->v_interlock); vp->v_writecount++; + mutex_exit(vp->v_interlock); return 0; }
Re: CVS commit: src/sys/arch/aarch64
On Sat, May 23, 2020 at 02:13:46PM -0700, Jason Thorpe wrote: > > > On May 23, 2020, at 11:08 AM, Ryo Shimizu wrote: > > > > Module Name:src > > Committed By: ryo > > Date: Sat May 23 18:08:59 UTC 2020 > > > > Modified Files: > > src/sys/arch/aarch64/aarch64: cpufunc.c cpuswitch.S exec_machdep.c > > genassym.cf netbsd32_machdep.c vectors.S vm_machdep.c > > src/sys/arch/aarch64/include: armreg.h machdep.h proc.h > > > > Log Message: > > Not only the kernel thread, but also the userland PAC keys > > (APIA,APIB,APDA,APDB,APGA) are now randomly initialized at exec, and > > switched > > when context switch. > > userland programs are able to perform pointer authentication on ARMv8.3+PAC > > cpu. > > Has any consideration be given to perhaps creating a new MACHINE_ARCH for > this, or somehow otherwise decorating the ELF files to indicate their > exec-ability? I am under the impression that PAC was designed to be forewards compatible, so older CPUs can execute code with this annotation. I don't whether it works in practice though.
CVS commit: src/sys/sys
Module Name:src Committed By: ad Date: Sat May 23 21:49:43 UTC 2020 Modified Files: src/sys/sys: param.h Log Message: NetBSD 9.99.64 - struct lwp changed To generate a diff of this commit: cvs rdiff -u -r1.666 -r1.667 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.666 src/sys/sys/param.h:1.667 --- src/sys/sys/param.h:1.666 Sat May 16 18:58:56 2020 +++ src/sys/sys/param.h Sat May 23 21:49:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.666 2020/05/16 18:58:56 christos Exp $ */ +/* $NetBSD: param.h,v 1.667 2020/05/23 21:49:43 ad Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 999006300 /* NetBSD 9.99.63 */ +#define __NetBSD_Version__ 999006400 /* NetBSD 9.99.64 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/sys/sys
Module Name:src Committed By: ad Date: Sat May 23 21:49:43 UTC 2020 Modified Files: src/sys/sys: param.h Log Message: NetBSD 9.99.64 - struct lwp changed To generate a diff of this commit: cvs rdiff -u -r1.666 -r1.667 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Sat May 23 21:24:41 UTC 2020 Modified Files: src/sys/kern: kern_runq.c sched_4bsd.c sched_m2.c Log Message: Oops. If a SCHED_RR thread is preempted and has exceeded its timeslice it needs to go to the back of the run queue so round-robin actually happens, otherwise it should go to the front. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/kern/kern_runq.c cvs rdiff -u -r1.43 -r1.44 src/sys/kern/sched_4bsd.c cvs rdiff -u -r1.38 -r1.39 src/sys/kern/sched_m2.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/kern_runq.c diff -u src/sys/kern/kern_runq.c:1.68 src/sys/kern/kern_runq.c:1.69 --- src/sys/kern/kern_runq.c:1.68 Sat May 23 21:14:55 2020 +++ src/sys/kern/kern_runq.c Sat May 23 21:24:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_runq.c,v 1.68 2020/05/23 21:14:55 ad Exp $ */ +/* $NetBSD: kern_runq.c,v 1.69 2020/05/23 21:24:41 ad Exp $ */ /*- * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.68 2020/05/23 21:14:55 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.69 2020/05/23 21:24:41 ad Exp $"); #include "opt_dtrace.h" @@ -206,9 +206,31 @@ sched_enqueue(struct lwp *l) KASSERT((spc->spc_bitmap[i] & q) == 0); spc->spc_bitmap[i] |= q; } - /* Preempted SCHED_RR and SCHED_FIFO LWPs go to the queue head. */ - if (l->l_class != SCHED_OTHER && (l->l_pflag & LP_PREEMPTING) != 0) { - TAILQ_INSERT_HEAD(q_head, l, l_runq); + + /* + * Determine run queue position according to POSIX. XXX Explicitly + * lowering a thread's priority with pthread_setschedparam() is not + * handled. + */ + if ((l->l_pflag & LP_PREEMPTING) != 0) { + switch (l->l_class) { + case SCHED_OTHER: + TAILQ_INSERT_TAIL(q_head, l, l_runq); + break; + case SCHED_FIFO: + TAILQ_INSERT_HEAD(q_head, l, l_runq); + break; + case SCHED_RR: + if (getticks() - l->l_rticks >= sched_rrticks) { +TAILQ_INSERT_TAIL(q_head, l, l_runq); + } else { +TAILQ_INSERT_HEAD(q_head, l, l_runq); + } + break; + default: /* SCHED_OTHER */ + panic("sched_enqueue: LWP %p has class %d\n", + l, l->l_class); + } } else { TAILQ_INSERT_TAIL(q_head, l, l_runq); } Index: src/sys/kern/sched_4bsd.c diff -u src/sys/kern/sched_4bsd.c:1.43 src/sys/kern/sched_4bsd.c:1.44 --- src/sys/kern/sched_4bsd.c:1.43 Thu Mar 12 10:44:00 2020 +++ src/sys/kern/sched_4bsd.c Sat May 23 21:24:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sched_4bsd.c,v 1.43 2020/03/12 10:44:00 ad Exp $ */ +/* $NetBSD: sched_4bsd.c,v 1.44 2020/05/23 21:24:41 ad Exp $ */ /* * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2019, 2020 @@ -69,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sched_4bsd.c,v 1.43 2020/03/12 10:44:00 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sched_4bsd.c,v 1.44 2020/05/23 21:24:41 ad Exp $"); #include "opt_ddb.h" #include "opt_lockdebug.h" @@ -93,11 +93,11 @@ static void resetpriority(struct lwp *); extern unsigned int sched_pstats_ticks; /* defined in kern_synch.c */ /* Number of hardclock ticks per sched_tick() */ -static int rrticks __read_mostly; +u_int sched_rrticks __read_mostly; /* * Force switch among equal priority processes every 100ms. - * Called from hardclock every hz/10 == rrticks hardclock ticks. + * Called from hardclock every hz/10 == sched_rrticks hardclock ticks. */ /* ARGSUSED */ void @@ -107,7 +107,7 @@ sched_tick(struct cpu_info *ci) pri_t pri = PRI_NONE; lwp_t *l; - spc->spc_ticks = rrticks; + spc->spc_ticks = sched_rrticks; if (CURCPU_IDLE_P()) { spc_lock(ci); @@ -534,7 +534,7 @@ static int sysctl_sched_rtts(SYSCTLFN_ARGS) { struct sysctlnode node; - int rttsms = hztoms(rrticks); + int rttsms = hztoms(sched_rrticks); node = *rnode; node.sysctl_data = @@ -555,7 +555,7 @@ SYSCTL_SETUP(sysctl_sched_4bsd_setup, "s if (node == NULL) return; - rrticks = hz / 10; + sched_rrticks = hz / 10; sysctl_createv(NULL, 0, , NULL, CTLFLAG_PERMANENT, Index: src/sys/kern/sched_m2.c diff -u src/sys/kern/sched_m2.c:1.38 src/sys/kern/sched_m2.c:1.39 --- src/sys/kern/sched_m2.c:1.38 Mon Apr 13 15:54:45 2020 +++ src/sys/kern/sched_m2.c Sat May 23 21:24:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sched_m2.c,v 1.38 2020/04/13 15:54:45 maxv Exp $ */ +/* $NetBSD: sched_m2.c,v 1.39 2020/05/23 21:24:41 ad Exp $ */ /* * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sched_m2.c,v 1.38 2020/04/13 15:54:45 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sched_m2.c,v 1.39 2020/05/23 21:24:41 ad Exp $"); #include @@ -68,9 +68,9 @@ __KERNEL_RCSID(0, "$NetBSD: sched_m2.c,v */ static u_int min_ts; /* Minimal time-slice */ static u_int max_ts; /* Maximal time-slice */ -static u_int rt_ts; /* Real-time time-slice */ static u_int
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Sat May 23 21:24:41 UTC 2020 Modified Files: src/sys/kern: kern_runq.c sched_4bsd.c sched_m2.c Log Message: Oops. If a SCHED_RR thread is preempted and has exceeded its timeslice it needs to go to the back of the run queue so round-robin actually happens, otherwise it should go to the front. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/kern/kern_runq.c cvs rdiff -u -r1.43 -r1.44 src/sys/kern/sched_4bsd.c cvs rdiff -u -r1.38 -r1.39 src/sys/kern/sched_m2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Sat May 23 21:14:56 UTC 2020 Modified Files: src/sys/kern: kern_runq.c Log Message: sched_bestcpu(): There is a fallback CPU, in case the user manages to set the system up so no CPU is permitted to run a given LWP. Fix a bug where that fallback CPU would sometimes get picked even if there was another CPU that could legitimately run the LWP. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/kern/kern_runq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: ad Date: Sat May 23 21:14:56 UTC 2020 Modified Files: src/sys/kern: kern_runq.c Log Message: sched_bestcpu(): There is a fallback CPU, in case the user manages to set the system up so no CPU is permitted to run a given LWP. Fix a bug where that fallback CPU would sometimes get picked even if there was another CPU that could legitimately run the LWP. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/kern/kern_runq.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/kern_runq.c diff -u src/sys/kern/kern_runq.c:1.67 src/sys/kern/kern_runq.c:1.68 --- src/sys/kern/kern_runq.c:1.67 Mon Apr 13 16:09:21 2020 +++ src/sys/kern/kern_runq.c Sat May 23 21:14:55 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_runq.c,v 1.67 2020/04/13 16:09:21 maxv Exp $ */ +/* $NetBSD: kern_runq.c,v 1.68 2020/05/23 21:14:55 ad Exp $ */ /*- * Copyright (c) 2019, 2020 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.67 2020/04/13 16:09:21 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.68 2020/05/23 21:14:55 ad Exp $"); #include "opt_dtrace.h" @@ -479,7 +479,13 @@ sched_bestcpu(struct lwp *l, struct cpu_ */ bestci = pivot; bestspc = >ci_schedstate; - bestpri = MAX(bestspc->spc_curpriority, bestspc->spc_maxpriority); + if (sched_migratable(l, bestci)) { + bestpri = MAX(bestspc->spc_curpriority, + bestspc->spc_maxpriority); + } else { + /* Invalidate the priority. */ + bestpri = PRI_COUNT; + } /* In the outer loop scroll through all CPU packages. */ pivot = pivot->ci_package1st;
Re: CVS commit: src/sys/arch/aarch64
> On May 23, 2020, at 11:08 AM, Ryo Shimizu wrote: > > Module Name: src > Committed By: ryo > Date: Sat May 23 18:08:59 UTC 2020 > > Modified Files: > src/sys/arch/aarch64/aarch64: cpufunc.c cpuswitch.S exec_machdep.c > genassym.cf netbsd32_machdep.c vectors.S vm_machdep.c > src/sys/arch/aarch64/include: armreg.h machdep.h proc.h > > Log Message: > Not only the kernel thread, but also the userland PAC keys > (APIA,APIB,APDA,APDB,APGA) are now randomly initialized at exec, and switched > when context switch. > userland programs are able to perform pointer authentication on ARMv8.3+PAC > cpu. Has any consideration be given to perhaps creating a new MACHINE_ARCH for this, or somehow otherwise decorating the ELF files to indicate their exec-ability? > > reviewd by maxv@, thanks. > > > To generate a diff of this commit: > cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/aarch64/cpufunc.c > cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/aarch64/cpuswitch.S > cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/exec_machdep.c > cvs rdiff -u -r1.24 -r1.25 src/sys/arch/aarch64/aarch64/genassym.cf > cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c > cvs rdiff -u -r1.16 -r1.17 src/sys/arch/aarch64/aarch64/vectors.S > cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/vm_machdep.c > cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/include/armreg.h > cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/include/machdep.h > cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/include/proc.h > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. > -- thorpej
CVS commit: src/sys
Module Name:src Committed By: ad Date: Sat May 23 20:45:11 UTC 2020 Modified Files: src/sys/kern: kern_lwp.c kern_proc.c kern_turnstile.c sys_lwp.c src/sys/rump/librump/rumpkern: lwproc.c src/sys/sys: lwp.h proc.h sleepq.h Log Message: - Replace pid_table_lock with a lockless lookup covered by pserialize, with the "writer" side being pid_table expansion. The basic idea is that when doing an LWP lookup there is usually already a lock held (p->p_lock), or a spin mutex that needs to be taken (l->l_mutex), and either can be used to get the found LWP stable and confidently determine that all is correct. - For user processes LSLARVAL implies the same thing as LSIDL ("not visible by ID"), and lookup by ID in proc0 doesn't really happen. In-tree the new state should be understood by top(1), the tty subsystem and so on, and would attract the attention of 3rd party kernel grovellers in time, so remove it and just rely on LSIDL. To generate a diff of this commit: cvs rdiff -u -r1.237 -r1.238 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.251 -r1.252 src/sys/kern/kern_proc.c cvs rdiff -u -r1.39 -r1.40 src/sys/kern/kern_turnstile.c cvs rdiff -u -r1.80 -r1.81 src/sys/kern/sys_lwp.c cvs rdiff -u -r1.48 -r1.49 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.209 -r1.210 src/sys/sys/lwp.h cvs rdiff -u -r1.365 -r1.366 src/sys/sys/proc.h cvs rdiff -u -r1.30 -r1.31 src/sys/sys/sleepq.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_lwp.c diff -u src/sys/kern/kern_lwp.c:1.237 src/sys/kern/kern_lwp.c:1.238 --- src/sys/kern/kern_lwp.c:1.237 Wed Apr 29 01:52:26 2020 +++ src/sys/kern/kern_lwp.c Sat May 23 20:45:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.237 2020/04/29 01:52:26 thorpej Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.238 2020/05/23 20:45:10 ad Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020 @@ -65,9 +65,15 @@ * * LSIDL * - * Idle: the LWP has been created but has not yet executed, - * or it has ceased executing a unit of work and is waiting - * to be started again. + * Idle: the LWP has been created but has not yet executed, or + * it has ceased executing a unit of work and is waiting to be + * started again. This state exists so that the LWP can occupy + * a slot in the process & PID table, but without having to + * worry about being touched; lookups of the LWP by ID will + * fail while in this state. The LWP will become visible for + * lookup once its state transitions further. Some special + * kernel threads also (ab)use this state to indicate that they + * are idle (soft interrupts and idle LWPs). * * LSSUSPENDED: * @@ -83,16 +89,6 @@ * The LP_RUNNING flag in lwp::l_pflag indicates that an LWP is running. * Importantly, it indicates that its state is tied to a CPU. * - * LSLARVAL: - * - * Born, but not fully mature: the LWP is in the process - * of being constructed. This state exists so that the - * LWP can occupy a slot in the PID table, but without - * having to worry about being touched; lookups of the - * LWP will fail while in this state. The LWP will become - * visible in the PID table once its state transitions - * to LSIDL. - * * LSZOMB: * * Dead or dying: the LWP has released most of its resources @@ -130,8 +126,6 @@ * * LWPs may transition states in the following ways: * - * LARVAL > IDL - * * RUN ---> ONPROC ONPROC -> RUN * > SLEEP * > STOPPED @@ -223,7 +217,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.237 2020/04/29 01:52:26 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.238 2020/05/23 20:45:10 ad Exp $"); #include "opt_ddb.h" #include "opt_lockdebug.h" @@ -266,6 +260,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v static pool_cache_t lwp_cache __read_mostly; struct lwplist alllwp __cacheline_aligned; +static int lwp_ctor(void *, void *, int); static void lwp_dtor(void *, void *); /* DTrace proc provider probes */ @@ -347,7 +342,7 @@ lwpinit(void) LIST_INIT(); lwpinit_specificdata(); lwp_cache = pool_cache_init(sizeof(lwp_t), MIN_LWP_ALIGNMENT, 0, 0, - "lwppl", NULL, IPL_NONE, NULL, lwp_dtor, NULL); + "lwppl", NULL, IPL_NONE, lwp_ctor, lwp_dtor, NULL); maxlwp = cpu_maxlwp(); sysctl_kern_lwp_setup(); @@ -376,6 +371,27 @@ lwp0_init(void) SYSCALL_TIME_LWP_INIT(l); } +/* + * Initialize the non-zeroed portion of an lwp_t. + */ +static int +lwp_ctor(void *arg, void *obj, int flags) +{ + lwp_t *l = obj; + + l->l_stat = LSIDL; + l->l_cpu = curcpu(); + l->l_mutex = l->l_cpu->ci_schedstate.spc_lwplock; + l->l_ts = pool_get(_pool, flags); + + if (l->l_ts == NULL) { + return ENOMEM; + } else { + turnstile_ctor(l->l_ts); + return 0; + } +} + static void lwp_dtor(void *arg, void *obj) { @@ -389,13 +405,22 @@ lwp_dtor(void *arg, void *obj)
CVS commit: src/sys
Module Name:src Committed By: ad Date: Sat May 23 20:45:11 UTC 2020 Modified Files: src/sys/kern: kern_lwp.c kern_proc.c kern_turnstile.c sys_lwp.c src/sys/rump/librump/rumpkern: lwproc.c src/sys/sys: lwp.h proc.h sleepq.h Log Message: - Replace pid_table_lock with a lockless lookup covered by pserialize, with the "writer" side being pid_table expansion. The basic idea is that when doing an LWP lookup there is usually already a lock held (p->p_lock), or a spin mutex that needs to be taken (l->l_mutex), and either can be used to get the found LWP stable and confidently determine that all is correct. - For user processes LSLARVAL implies the same thing as LSIDL ("not visible by ID"), and lookup by ID in proc0 doesn't really happen. In-tree the new state should be understood by top(1), the tty subsystem and so on, and would attract the attention of 3rd party kernel grovellers in time, so remove it and just rely on LSIDL. To generate a diff of this commit: cvs rdiff -u -r1.237 -r1.238 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.251 -r1.252 src/sys/kern/kern_proc.c cvs rdiff -u -r1.39 -r1.40 src/sys/kern/kern_turnstile.c cvs rdiff -u -r1.80 -r1.81 src/sys/kern/sys_lwp.c cvs rdiff -u -r1.48 -r1.49 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.209 -r1.210 src/sys/sys/lwp.h cvs rdiff -u -r1.365 -r1.366 src/sys/sys/proc.h cvs rdiff -u -r1.30 -r1.31 src/sys/sys/sleepq.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm
Module Name:src Committed By: ad Date: Sat May 23 20:22:42 UTC 2020 Modified Files: src/sys/uvm: uvm_pglist.c Log Message: uvm_pglistfree(): just use uvm_pagefree(). To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/uvm/uvm_pglist.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/uvm/uvm_pglist.c diff -u src/sys/uvm/uvm_pglist.c:1.81 src/sys/uvm/uvm_pglist.c:1.82 --- src/sys/uvm/uvm_pglist.c:1.81 Sun Mar 1 21:43:56 2020 +++ src/sys/uvm/uvm_pglist.c Sat May 23 20:22:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.c,v 1.81 2020/03/01 21:43:56 ad Exp $ */ +/* $NetBSD: uvm_pglist.c,v 1.82 2020/05/23 20:22:42 ad Exp $ */ /*- * Copyright (c) 1997, 2019 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.81 2020/03/01 21:43:56 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.82 2020/05/23 20:22:42 ad Exp $"); #include #include @@ -560,37 +560,14 @@ uvm_pglistalloc(psize_t size, paddr_t lo void uvm_pglistfree(struct pglist *list) { - struct pgfreelist *pgfl; - struct pgflbucket *pgb; struct vm_page *pg; - int c, b; KASSERT(!cpu_intr_p()); KASSERT(!cpu_softintr_p()); - /* - * Lock the free list and free each page. - */ - - uvm_pgfl_lock(); while ((pg = TAILQ_FIRST(list)) != NULL) { TAILQ_REMOVE(list, pg, pageq.queue); - pg->flags = (pg->flags & PG_ZERO) | PG_FREE; -#ifdef DEBUG - pg->uobject = (void *)0xdeadbeef; - pg->uanon = (void *)0xdeadbeef; - if (pg->flags & PG_ZERO) - uvm_pagezerocheck(pg); -#endif /* DEBUG */ - c = VM_PGCOLOR(pg); - b = uvm_page_get_bucket(pg); - pgfl = _free[uvm_page_get_freelist(pg)]; - pgb = pgfl->pgfl_buckets[b]; - if (pg->flags & PG_ZERO) - CPU_COUNT(CPU_COUNT_ZEROPAGES, 1); - pgb->pgb_nfree++; - LIST_INSERT_HEAD(>pgb_colors[c], pg, pageq.list); + uvm_pagefree(pg); STAT_DECR(uvm_pglistalloc_npages); } - uvm_pgfl_unlock(); }
CVS commit: src/sys/uvm
Module Name:src Committed By: ad Date: Sat May 23 20:22:42 UTC 2020 Modified Files: src/sys/uvm: uvm_pglist.c Log Message: uvm_pglistfree(): just use uvm_pagefree(). To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/uvm/uvm_pglist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rmind Date: Sat May 23 19:56:00 UTC 2020 Modified Files: src/sys/net/npf: npf_conf.c npf_conn.c npf_conn.h npf_conndb.c npf_inet.c npf_nat.c src/usr.sbin/npf/npfctl: npf_build.c npf_show.c npfctl.h Log Message: Backport selected NPF fixes from the upstream (to be pulled up): - npf_conndb_lookup: protect the connection lookup with pserialize(9), instead of incorrectly assuming that the handler always runs at IPL_SOFNET. Should fix crashes reported on high load (PR/55182). - npf_config_destroy: handle partially initialized config; fixes crashes with some invalid configurations. - NAT policy creation / destruction: set the initial reference and do not wait for reference draining on destruction; destroy the policy on the last reference drop instead. Fixes a lockup with the dynamic NAT rules. - npf_nat_{export,import}: fix a regression since dynamic NAT rules. - npfctl: fix a regression and restore the default group behaviour. - Add npf_cache_tcp() and validate the TCP data offset (from maxv@). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_conf.c cvs rdiff -u -r1.30 -r1.31 src/sys/net/npf/npf_conn.c cvs rdiff -u -r1.18 -r1.19 src/sys/net/npf/npf_conn.h cvs rdiff -u -r1.7 -r1.8 src/sys/net/npf/npf_conndb.c cvs rdiff -u -r1.55 -r1.56 src/sys/net/npf/npf_inet.c cvs rdiff -u -r1.48 -r1.49 src/sys/net/npf/npf_nat.c cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/npf/npfctl/npf_build.c cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/npf/npfctl/npf_show.c cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/npf/npfctl/npfctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf_conf.c diff -u src/sys/net/npf/npf_conf.c:1.15 src/sys/net/npf/npf_conf.c:1.16 --- src/sys/net/npf/npf_conf.c:1.15 Sun Aug 25 13:21:03 2019 +++ src/sys/net/npf/npf_conf.c Sat May 23 19:56:00 2020 @@ -47,7 +47,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_conf.c,v 1.15 2019/08/25 13:21:03 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conf.c,v 1.16 2020/05/23 19:56:00 rmind Exp $"); #include #include @@ -94,10 +94,18 @@ npf_config_destroy(npf_config_t *nc) * Note: the rulesets must be destroyed first, in order to drop * any references to the tableset. */ - npf_ruleset_destroy(nc->ruleset); - npf_ruleset_destroy(nc->nat_ruleset); - npf_rprocset_destroy(nc->rule_procs); - npf_tableset_destroy(nc->tableset); + if (nc->ruleset) { + npf_ruleset_destroy(nc->ruleset); + } + if (nc->nat_ruleset) { + npf_ruleset_destroy(nc->nat_ruleset); + } + if (nc->rule_procs) { + npf_rprocset_destroy(nc->rule_procs); + } + if (nc->tableset) { + npf_tableset_destroy(nc->tableset); + } kmem_free(nc, sizeof(npf_config_t)); } Index: src/sys/net/npf/npf_conn.c diff -u src/sys/net/npf/npf_conn.c:1.30 src/sys/net/npf/npf_conn.c:1.31 --- src/sys/net/npf/npf_conn.c:1.30 Sun Sep 29 17:00:29 2019 +++ src/sys/net/npf/npf_conn.c Sat May 23 19:56:00 2020 @@ -107,7 +107,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.30 2019/09/29 17:00:29 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.31 2020/05/23 19:56:00 rmind Exp $"); #include #include @@ -311,7 +311,7 @@ npf_conn_lookup(const npf_cache_t *npc, if (!npf_conn_conkey(npc, , true)) { return NULL; } - con = npf_conndb_lookup(npf->conn_db, , forw); + con = npf_conndb_lookup(npf, , forw); if (con == NULL) { return NULL; } @@ -908,7 +908,7 @@ npf_conn_find(npf_t *npf, const nvlist_t if (!kdict || !npf_connkey_import(kdict, )) { return EINVAL; } - con = npf_conndb_lookup(npf->conn_db, , ); + con = npf_conndb_lookup(npf, , ); if (con == NULL) { return ESRCH; } Index: src/sys/net/npf/npf_conn.h diff -u src/sys/net/npf/npf_conn.h:1.18 src/sys/net/npf/npf_conn.h:1.19 --- src/sys/net/npf/npf_conn.h:1.18 Sun Aug 11 20:26:33 2019 +++ src/sys/net/npf/npf_conn.h Sat May 23 19:56:00 2020 @@ -157,7 +157,7 @@ void npf_conndb_sysfini(npf_t *); npf_conndb_t * npf_conndb_create(void); void npf_conndb_destroy(npf_conndb_t *); -npf_conn_t * npf_conndb_lookup(npf_conndb_t *, const npf_connkey_t *, bool *); +npf_conn_t * npf_conndb_lookup(npf_t *, const npf_connkey_t *, bool *); bool npf_conndb_insert(npf_conndb_t *, const npf_connkey_t *, npf_conn_t *, bool); npf_conn_t * npf_conndb_remove(npf_conndb_t *, npf_connkey_t *); Index: src/sys/net/npf/npf_conndb.c diff -u src/sys/net/npf/npf_conndb.c:1.7 src/sys/net/npf/npf_conndb.c:1.8 --- src/sys/net/npf/npf_conndb.c:1.7 Sat Dec 14 15:21:51 2019 +++ src/sys/net/npf/npf_conndb.c Sat May 23 19:56:00 2020 @@ -46,7 +46,7 @@ #ifdef _KERNEL #include -__KERNEL_RCSID(0, "$NetBSD: npf_conndb.c,v 1.7 2019/12/14 15:21:51 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conndb.c,v 1.8 2020/05/23 19:56:00 rmind Exp $"); #include #include @@ -143,8 +143,9 @@
CVS commit: src
Module Name:src Committed By: rmind Date: Sat May 23 19:56:00 UTC 2020 Modified Files: src/sys/net/npf: npf_conf.c npf_conn.c npf_conn.h npf_conndb.c npf_inet.c npf_nat.c src/usr.sbin/npf/npfctl: npf_build.c npf_show.c npfctl.h Log Message: Backport selected NPF fixes from the upstream (to be pulled up): - npf_conndb_lookup: protect the connection lookup with pserialize(9), instead of incorrectly assuming that the handler always runs at IPL_SOFNET. Should fix crashes reported on high load (PR/55182). - npf_config_destroy: handle partially initialized config; fixes crashes with some invalid configurations. - NAT policy creation / destruction: set the initial reference and do not wait for reference draining on destruction; destroy the policy on the last reference drop instead. Fixes a lockup with the dynamic NAT rules. - npf_nat_{export,import}: fix a regression since dynamic NAT rules. - npfctl: fix a regression and restore the default group behaviour. - Add npf_cache_tcp() and validate the TCP data offset (from maxv@). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_conf.c cvs rdiff -u -r1.30 -r1.31 src/sys/net/npf/npf_conn.c cvs rdiff -u -r1.18 -r1.19 src/sys/net/npf/npf_conn.h cvs rdiff -u -r1.7 -r1.8 src/sys/net/npf/npf_conndb.c cvs rdiff -u -r1.55 -r1.56 src/sys/net/npf/npf_inet.c cvs rdiff -u -r1.48 -r1.49 src/sys/net/npf/npf_nat.c cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/npf/npfctl/npf_build.c cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/npf/npfctl/npf_show.c cvs rdiff -u -r1.51 -r1.52 src/usr.sbin/npf/npfctl/npfctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Sat May 23 19:52:12 UTC 2020 Modified Files: src/sys/kern: subr_thmap.c Log Message: thmap(9): merge changes from the upstream -- primarily, switch to the C11-style memory fences and atomic primitives; in NetBSD, this translates to using the atomic_loadstore(9) primitives. To be pulled up (just in case). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_thmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: rmind Date: Sat May 23 19:52:12 UTC 2020 Modified Files: src/sys/kern: subr_thmap.c Log Message: thmap(9): merge changes from the upstream -- primarily, switch to the C11-style memory fences and atomic primitives; in NetBSD, this translates to using the atomic_loadstore(9) primitives. To be pulled up (just in case). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/kern/subr_thmap.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_thmap.c diff -u src/sys/kern/subr_thmap.c:1.5 src/sys/kern/subr_thmap.c:1.6 --- src/sys/kern/subr_thmap.c:1.5 Mon Feb 4 08:00:27 2019 +++ src/sys/kern/subr_thmap.c Sat May 23 19:52:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_thmap.c,v 1.5 2019/02/04 08:00:27 mrg Exp $ */ +/* $NetBSD: subr_thmap.c,v 1.6 2020/05/23 19:52:12 rmind Exp $ */ /*- * Copyright (c) 2018 Mindaugas Rasiukevicius @@ -53,7 +53,7 @@ * re-try from the root; this is a case for deletions and is achieved * using the NODE_DELETED flag. * - * iii) the node destruction must be synchronised with the readers, + * iii) the node destruction must be synchronized with the readers, * e.g. by using the Epoch-based reclamation or other techniques. * * - WRITERS AND LOCKING: Each intermediate node has a spin-lock (which @@ -87,7 +87,6 @@ * https://www.csd.uoc.gr/~hy460/pdf/p650-lehman.pdf */ - #ifdef _KERNEL #include #include @@ -112,20 +111,19 @@ #include "utils.h" #endif -THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.5 2019/02/04 08:00:27 mrg Exp $"); +THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.6 2020/05/23 19:52:12 rmind Exp $"); /* * NetBSD kernel wrappers */ #ifdef _KERNEL #define ASSERT KASSERT -#define atomic_thread_fence(x) x -#define memory_order_stores membar_producer() -#define memory_order_loads membar_consumer() -#define atomic_cas_32_p(p, e, n) (atomic_cas_32((p), (e), (n)) == (e)) -#define atomic_cas_ptr_p(p, e, n) \ -(atomic_cas_ptr((p), (void *)(e), (void *)(n)) == (e)) -#define atomic_exchange atomic_swap_ptr +#define atomic_thread_fence(x) membar_sync() +#define atomic_compare_exchange_weak_explicit_32(p, e, n, m1, m2) \ +(atomic_cas_32((p), *(e), (n)) == *(e)) +#define atomic_compare_exchange_weak_explicit_ptr(p, e, n, m1, m2) \ +(atomic_cas_ptr((p), *(void **)(e), (void *)(n)) == *(void **)(e)) +#define atomic_exchange_explicit(o, n, m1) atomic_swap_ptr((o), (n)) #define murmurhash3 murmurhash2 #endif @@ -160,6 +158,7 @@ THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.5 * least significant bit. */ typedef uintptr_t thmap_ptr_t; +typedef uintptr_t atomic_thmap_ptr_t; // C11 _Atomic #define THMAP_NULL ((thmap_ptr_t)0) @@ -188,9 +187,9 @@ typedef uintptr_t thmap_ptr_t; */ typedef struct { - uint32_t state; - thmap_ptr_t parent; - thmap_ptr_t slots[LEVEL_SIZE]; + uint32_t state; // C11 _Atomic + thmap_ptr_t parent; + atomic_thmap_ptr_t slots[LEVEL_SIZE]; } thmap_inode_t; #define THMAP_INODE_LEN sizeof(thmap_inode_t) @@ -217,11 +216,11 @@ typedef struct { #define THMAP_ROOT_LEN (sizeof(thmap_ptr_t) * ROOT_SIZE) struct thmap { - uintptr_t baseptr; - thmap_ptr_t * root; - unsigned flags; - const thmap_ops_t *ops; - thmap_gc_t * gc_list; + uintptr_t baseptr; + atomic_thmap_ptr_t * root; + unsigned flags; + const thmap_ops_t * ops; + thmap_gc_t * gc_list; // C11 _Atomic }; static void stage_mem_gc(thmap_t *, uintptr_t, size_t); @@ -253,9 +252,9 @@ static const thmap_ops_t thmap_default_o #ifdef DIAGNOSTIC static inline bool -node_locked_p(const thmap_inode_t *node) +node_locked_p(thmap_inode_t *node) { - return (node->state & NODE_LOCKED) != 0; + return (atomic_load_relaxed(>state) & NODE_LOCKED) != 0; } #endif @@ -265,18 +264,14 @@ lock_node(thmap_inode_t *node) unsigned bcount = SPINLOCK_BACKOFF_MIN; uint32_t s; again: - s = node->state; + s = atomic_load_relaxed(>state); if (s & NODE_LOCKED) { SPINLOCK_BACKOFF(bcount); goto again; } - /* - * CAS will issue a full memory fence for us. - * - * WARNING: for optimisations purposes, callers rely on us - * issuing load and store fence - */ - if (!atomic_cas_32_p(>state, s, s | NODE_LOCKED)) { + /* Acquire from prior release in unlock_node.() */ + if (!atomic_compare_exchange_weak_explicit_32(>state, + , s | NODE_LOCKED, memory_order_acquire, memory_order_relaxed)) { bcount = SPINLOCK_BACKOFF_MIN; goto again; } @@ -285,11 +280,11 @@ again: static void unlock_node(thmap_inode_t *node) { - uint32_t s = node->state & ~NODE_LOCKED; + uint32_t s = atomic_load_relaxed(>state) & ~NODE_LOCKED; ASSERT(node_locked_p(node)); - atomic_thread_fence(memory_order_stores); - node->state = s; // atomic store + /* Release to subsequent acquire in lock_node(). */ + atomic_store_release(>state, s); } /* @@ -375,7 +370,8 @@ node_create(thmap_t *thmap, thmap_inode_
CVS commit: src/doc
Module Name:src Committed By: nia Date: Sat May 23 18:42:17 UTC 2020 Modified Files: src/doc: TODO.smpnet Log Message: strip(4) was removed To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/doc/TODO.smpnet Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.smpnet diff -u src/doc/TODO.smpnet:1.36 src/doc/TODO.smpnet:1.37 --- src/doc/TODO.smpnet:1.36 Wed May 6 14:33:52 2020 +++ src/doc/TODO.smpnet Sat May 23 18:42:17 2020 @@ -1,4 +1,4 @@ -$NetBSD: TODO.smpnet,v 1.36 2020/05/06 14:33:52 snj Exp $ +$NetBSD: TODO.smpnet,v 1.37 2020/05/23 18:42:17 nia Exp $ MP-safe components == @@ -78,7 +78,6 @@ Unprotected ones - ppp(4) - sl(4) - stf(4) - - strip(4) - if_srt - tap(4) - Packet filters
CVS commit: src/doc
Module Name:src Committed By: nia Date: Sat May 23 18:42:17 UTC 2020 Modified Files: src/doc: TODO.smpnet Log Message: strip(4) was removed To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/doc/TODO.smpnet Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64
Module Name:src Committed By: ryo Date: Sat May 23 18:08:59 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: cpufunc.c cpuswitch.S exec_machdep.c genassym.cf netbsd32_machdep.c vectors.S vm_machdep.c src/sys/arch/aarch64/include: armreg.h machdep.h proc.h Log Message: Not only the kernel thread, but also the userland PAC keys (APIA,APIB,APDA,APDB,APGA) are now randomly initialized at exec, and switched when context switch. userland programs are able to perform pointer authentication on ARMv8.3+PAC cpu. reviewd by maxv@, thanks. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/aarch64/cpufunc.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/aarch64/cpuswitch.S cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/exec_machdep.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/aarch64/aarch64/genassym.cf cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/aarch64/aarch64/vectors.S cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/vm_machdep.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/include/armreg.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/include/machdep.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/include/proc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpufunc.c diff -u src/sys/arch/aarch64/aarch64/cpufunc.c:1.18 src/sys/arch/aarch64/aarch64/cpufunc.c:1.19 --- src/sys/arch/aarch64/aarch64/cpufunc.c:1.18 Fri May 15 04:55:40 2020 +++ src/sys/arch/aarch64/aarch64/cpufunc.c Sat May 23 18:08:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.18 2020/05/15 04:55:40 ryo Exp $ */ +/* $NetBSD: cpufunc.c,v 1.19 2020/05/23 18:08:58 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -30,7 +30,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.18 2020/05/15 04:55:40 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.19 2020/05/23 18:08:58 ryo Exp $"); #include #include @@ -474,8 +474,8 @@ aarch64_pac_init(int primary) return -1; /* Set the key. Curlwp here is the CPU's idlelwp. */ - reg_APIAKeyLo_EL1_write(curlwp->l_md.md_ia_kern_lo); - reg_APIAKeyHi_EL1_write(curlwp->l_md.md_ia_kern_hi); + reg_APIAKeyLo_EL1_write(curlwp->l_md.md_ia_kern[0]); + reg_APIAKeyHi_EL1_write(curlwp->l_md.md_ia_kern[1]); return 0; #else Index: src/sys/arch/aarch64/aarch64/cpuswitch.S diff -u src/sys/arch/aarch64/aarch64/cpuswitch.S:1.20 src/sys/arch/aarch64/aarch64/cpuswitch.S:1.21 --- src/sys/arch/aarch64/aarch64/cpuswitch.S:1.20 Fri May 22 19:29:26 2020 +++ src/sys/arch/aarch64/aarch64/cpuswitch.S Sat May 23 18:08:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuswitch.S,v 1.20 2020/05/22 19:29:26 ryo Exp $ */ +/* $NetBSD: cpuswitch.S,v 1.21 2020/05/23 18:08:59 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "opt_ddb.h" #include "opt_kasan.h" -RCSID("$NetBSD: cpuswitch.S,v 1.20 2020/05/22 19:29:26 ryo Exp $") +RCSID("$NetBSD: cpuswitch.S,v 1.21 2020/05/23 18:08:59 ryo Exp $") ARMV8_DEFINE_OPTIONS @@ -92,14 +92,27 @@ ENTRY_NP(cpu_switchto) adrl x4, _C_LABEL(aarch64_pac_enabled) ldr w4, [x4] cbz w4, 1f -#if L_MD_IA_KERN_LO + 8 == L_MD_IA_KERN_HI - ldp x5, x6, [x1, #L_MD_IA_KERN_LO] -#else - ldr x5, [x1, #L_MD_IA_KERN_LO] - ldr x6, [x1, #L_MD_IA_KERN_HI] -#endif + ldp x5, x6, [x1, #L_MD_IA_KERN] msr APIAKeyLo_EL1, x5 msr APIAKeyHi_EL1, x6 + + /* Other keys only need to be updated when switching to user process */ + ldr w5, [x1, #L_FLAG] + and w5, w5, #LW_SYSTEM /* (lwp->l_flag & LW_SYSTEM) ? */ + cbnz w5, 1f + + ldp x5, x6, [x1, #L_MD_IB_USER] + msr APIBKeyLo_EL1, x5 + msr APIBKeyHi_EL1, x6 + ldp x5, x6, [x1, #L_MD_DA_USER] + msr APDAKeyLo_EL1, x5 + msr APDAKeyHi_EL1, x6 + ldp x5, x6, [x1, #L_MD_DB_USER] + msr APDBKeyLo_EL1, x5 + msr APDBKeyHi_EL1, x6 + ldp x5, x6, [x1, #L_MD_GA_USER] + msr APGAKeyLo_EL1, x5 + msr APGAKeyHi_EL1, x6 1: #endif @@ -163,12 +176,7 @@ ENTRY_NP(cpu_switchto_softint) adrl x4, _C_LABEL(aarch64_pac_enabled) ldr w4, [x4] cbz w4, 1f -#if L_MD_IA_KERN_LO + 8 == L_MD_IA_KERN_HI - ldp x5, x6, [x0, #L_MD_IA_KERN_LO] -#else - ldr x5, [x0, #L_MD_IA_KERN_LO] - ldr x6, [x0, #L_MD_IA_KERN_HI] -#endif + ldp x5, x6, [x0, #L_MD_IA_KERN] msr APIAKeyLo_EL1, x5 msr APIAKeyHi_EL1, x6 1: @@ -209,12 +217,7 @@ ENTRY_NP(cpu_switchto_softint) adrl x4, _C_LABEL(aarch64_pac_enabled) ldr w4, [x4] cbz w4, 1f -#if L_MD_IA_KERN_LO + 8 == L_MD_IA_KERN_HI - ldp x5, x6, [x19, #L_MD_IA_KERN_LO] -#else - ldr x5, [x19, #L_MD_IA_KERN_LO] - ldr x6, [x19, #L_MD_IA_KERN_HI] -#endif + ldp x5, x6, [x19, #L_MD_IA_KERN] msr APIAKeyLo_EL1, x5 msr APIAKeyHi_EL1, x6 1: @@ -271,10 +274,10 @@ ENTRY_NP(lwp_trampoline) cbz w4, 1f mov x26, x1 bl _C_LABEL(cprng_strong64) - str x0, [x26, #L_MD_IA_KERN_LO] + str x0, [x26,
CVS commit: src/sys/arch/aarch64
Module Name:src Committed By: ryo Date: Sat May 23 18:08:59 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: cpufunc.c cpuswitch.S exec_machdep.c genassym.cf netbsd32_machdep.c vectors.S vm_machdep.c src/sys/arch/aarch64/include: armreg.h machdep.h proc.h Log Message: Not only the kernel thread, but also the userland PAC keys (APIA,APIB,APDA,APDB,APGA) are now randomly initialized at exec, and switched when context switch. userland programs are able to perform pointer authentication on ARMv8.3+PAC cpu. reviewd by maxv@, thanks. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/aarch64/cpufunc.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/aarch64/cpuswitch.S cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/exec_machdep.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/aarch64/aarch64/genassym.cf cvs rdiff -u -r1.12 -r1.13 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/aarch64/aarch64/vectors.S cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/vm_machdep.c cvs rdiff -u -r1.44 -r1.45 src/sys/arch/aarch64/include/armreg.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/include/machdep.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/include/proc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/xlint
Module Name:src Committed By: christos Date: Sat May 23 17:28:27 UTC 2020 Modified Files: src/usr.bin/xlint/xlint: lint.1 xlint.c Log Message: Use -Z to pass arguments to ccp(1) directly. Can be used as: -Z-include -Zfile.h To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.bin/xlint/xlint/lint.1 cvs rdiff -u -r1.49 -r1.50 src/usr.bin/xlint/xlint/xlint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/xlint
Module Name:src Committed By: christos Date: Sat May 23 17:28:27 UTC 2020 Modified Files: src/usr.bin/xlint/xlint: lint.1 xlint.c Log Message: Use -Z to pass arguments to ccp(1) directly. Can be used as: -Z-include -Zfile.h To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/usr.bin/xlint/xlint/lint.1 cvs rdiff -u -r1.49 -r1.50 src/usr.bin/xlint/xlint/xlint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/xlint/lint.1 diff -u src/usr.bin/xlint/xlint/lint.1:1.39 src/usr.bin/xlint/xlint/lint.1:1.40 --- src/usr.bin/xlint/xlint/lint.1:1.39 Sun Dec 25 06:10:53 2016 +++ src/usr.bin/xlint/xlint/lint.1 Sat May 23 13:28:27 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: lint.1,v 1.39 2016/12/25 11:10:53 wiz Exp $ +.\" $NetBSD: lint.1,v 1.40 2020/05/23 17:28:27 christos Exp $ .\" .\" Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. .\" Copyright (c) 1994, 1995 Jochen Pohl @@ -30,7 +30,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 24, 2016 +.Dd May 23, 2020 .Dt LINT 1 .Os .Sh NAME @@ -51,6 +51,7 @@ .Op Fl o Ar outputfile .Op Fl U Ar name .Op Fl X Ar id Ns Op ,id ... +.Op Fl Z Ar cpparg .Ar .Nm lint .Op Fl abceFgHhprVvwz @@ -64,6 +65,7 @@ .Op Fl R Ar old=new .Op Fl U Ar name .Op Fl X Ar id Ns Op ,id ... +.Op Fl Z Ar cpparg .Ar .Sh DESCRIPTION .Nm @@ -413,6 +415,16 @@ A list of messages and ids can be found Report variables referred to by .Sy extern declarations, but never used. +.It Fl Z Ar cpparg +Pass +.Ar cpparg +to +.Xr cpp 1 +directly. +Multiple +.Fl Z +.Ar cppargs +can passed in the order they are received. .It Fl z Do not complain about structures that are never defined (for example, using a structure pointer without knowing Index: src/usr.bin/xlint/xlint/xlint.c diff -u src/usr.bin/xlint/xlint/xlint.c:1.49 src/usr.bin/xlint/xlint/xlint.c:1.50 --- src/usr.bin/xlint/xlint/xlint.c:1.49 Sun Feb 9 23:54:01 2020 +++ src/usr.bin/xlint/xlint/xlint.c Sat May 23 13:28:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xlint.c,v 1.49 2020/02/10 04:54:01 christos Exp $ */ +/* $NetBSD: xlint.c,v 1.50 2020/05/23 17:28:27 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: xlint.c,v 1.49 2020/02/10 04:54:01 christos Exp $"); +__RCSID("$NetBSD: xlint.c,v 1.50 2020/05/23 17:28:27 christos Exp $"); #endif #include @@ -291,13 +291,13 @@ usage(void) (void)fprintf(stderr, "Usage: %s [-abceghprvwxzHFS] [-s|-t] [-i|-nu] [-Dname[=def]]" - " [-Uname] [-X [,]...\n", getprogname()); + " [-Uname] [-X [,]... [-Z ]\n", getprogname()); (void)fprintf(stderr, "\t[-Idirectory] [-Ldirectory] [-llibrary] [-ooutputfile]" " file...\n"); (void)fprintf(stderr, " %s [-abceghprvwzHFS] [|-s|-t] -Clibrary [-Dname[=def]]\n" - " [-X [,]...\n", getprogname()); + " [-X [,]... [-Z ]\n", getprogname()); (void)fprintf(stderr, "\t[-Idirectory] [-Uname] [-Bpath] [-R old=new]" " file ...\n"); terminate(-1); @@ -370,7 +370,7 @@ main(int argc, char *argv[]) (void)signal(SIGINT, terminate); (void)signal(SIGQUIT, terminate); (void)signal(SIGTERM, terminate); - while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:M:PR:SU:VX:")) != -1) { + while ((c = getopt(argc, argv, "abcd:eghil:no:prstuvwxzB:C:D:FHI:L:M:PR:SU:VX:Z:")) != -1) { switch (c) { case 'a': @@ -523,6 +523,10 @@ main(int argc, char *argv[]) Vflag = 1; break; + case 'Z': + appcstrg(, optarg); + break; + default: usage(); /* NOTREACHED */
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat May 23 17:26:32 UTC 2020 Modified Files: src: build.sh Log Message: When MACHINE_ARCH is missing, give direction on how to get a list of valid options To generate a diff of this commit: cvs rdiff -u -r1.337 -r1.338 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat May 23 17:26:32 UTC 2020 Modified Files: src: build.sh Log Message: When MACHINE_ARCH is missing, give direction on how to get a list of valid options To generate a diff of this commit: cvs rdiff -u -r1.337 -r1.338 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.337 src/build.sh:1.338 --- src/build.sh:1.337 Sat May 23 11:04:43 2020 +++ src/build.sh Sat May 23 17:26:32 2020 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.337 2020/05/23 11:04:43 jmcneill Exp $ +# $NetBSD: build.sh,v 1.338 2020/05/23 17:26:32 jmcneill Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -812,7 +812,7 @@ validatearch() case "${MACHINE_ARCH}" in "") - bomb "No MACHINE_ARCH provided" + bomb "No MACHINE_ARCH provided. Use 'build.sh -m ${MACHINE} list-arch' to show options." ;; esac @@ -1935,7 +1935,7 @@ createmakewrapper() eval cat <
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: thorpej Date: Sat May 23 16:40:42 UTC 2020 Modified Files: src/sys/stand/efiboot: exec.c Log Message: If a device tree overlay does not have a "compatible" match, don't load it. (Oops, missing return statement.) To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/stand/efiboot/exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: thorpej Date: Sat May 23 16:40:42 UTC 2020 Modified Files: src/sys/stand/efiboot: exec.c Log Message: If a device tree overlay does not have a "compatible" match, don't load it. (Oops, missing return statement.) To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/stand/efiboot/exec.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/stand/efiboot/exec.c diff -u src/sys/stand/efiboot/exec.c:1.14 src/sys/stand/efiboot/exec.c:1.15 --- src/sys/stand/efiboot/exec.c:1.14 Thu May 14 19:20:08 2020 +++ src/sys/stand/efiboot/exec.c Sat May 23 16:40:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.14 2020/05/14 19:20:08 riastradh Exp $ */ +/* $NetBSD: exec.c,v 1.15 2020/05/23 16:40:41 thorpej Exp $ */ /*- * Copyright (c) 2019 Jason R. Thorpe @@ -199,6 +199,7 @@ apply_overlay(void *dtbo) if (!efi_fdt_overlay_is_compatible(dtbo)) { printf("boot: incompatible overlay\n"); + return; } int fdterr;
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 14:52:45 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Log Message: Add missing entries. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbarm/conf/README.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/README.evbarm diff -u src/sys/arch/evbarm/conf/README.evbarm:1.29 src/sys/arch/evbarm/conf/README.evbarm:1.30 --- src/sys/arch/evbarm/conf/README.evbarm:1.29 Sat May 23 14:14:55 2020 +++ src/sys/arch/evbarm/conf/README.evbarm Sat May 23 14:52:45 2020 @@ -1,21 +1,27 @@ -$NetBSD: README.evbarm,v 1.29 2020/05/23 14:14:55 rin Exp $ +$NetBSD: README.evbarm,v 1.30 2020/05/23 14:52:45 rin Exp $ config date boards --- ADI_BRH 2003/01/25 ADI Eng. Big Read Head i80200 eval board +ARMADAXP 2013/05/29 Marvell Armada XP development board +ARMADILLO-IOT-G3 2016/05/17 Atmark Techno Armadillo-IoT G3 boards ARMADILLO210 2006/02/06 Atmark Techno Armadillo-210 ARMADILLO9 2005/11/13 Atmark Techno Armadillo-9 BCM5301X 2012/08/31 Broadcom BCM95301X evaluation/reference board +BCM56340 2013/10/28 Broadcom BCM56340 iProc based switch CP3100 2006/11/08 Certance IOP321 CP-3100 CUBOX 2017/01/07 SolidRun Cubox DNS323 2010/10/02 D-Link DNS-323 Marvell SoC based NAS DUOVERO 2016/10/15 Gumstix Inc. DuoVero COMS boards GEMINI 2008/10/24 Cortina Systems SL3516 eval board GUMSTIX 2006/10/16 Gumstix Inc. PXA255/270 based boards +HAWK 2013/10/02 TI OMAP-L138 based Hawkboard HDL_G 2006/04/16 I-O DATA HDL-G Giga LANDISK HPT5325 2012/03/31 HP t5325 Thin Client +IMX23_OLINUXINO 2012/11/20 Olimex iMX233 based OLinuXino boards IMX31LITE 2008/04/27 Freescale i.M31 DEV LITE KIT INTEGRATOR 2001/10/27 ARM Integrator board +INTEGRATOR_CP 2013/02/19 ARM Integrator/CP board IQ31244 2003/05/14 Intel IQ31244 reference board IQ80310 2001/09/05 Intel IQ80310 eval board IQ80321 2002/03/27 Intel IQ321 eval board @@ -27,6 +33,7 @@ KURONAS_X4 2016/07/11 Kuroutoshikou KURO LUBBOCK 2003/06/18 Intel Lubbock DBPXA250 board MARVELL_NAS 2010/10/02 Generic Marvell SoC based NAS MINI2440 2012/01/30 FrendlyARM Mini2440 S3C2440 SoC board +MIRABOX 2014/05/15 GlobalScale Technologies MiraBox MMNET_GENERIC 2011/11/04 Propox MMnet1002 board MPCSA_GENERIC 2008/07/03 MPCSA Atmel AT91RM9200 based board MV2120 2011/07/20 HP Media Vault MV2011 Marvell Orion board @@ -34,6 +41,7 @@ N900 2012/12/07 Nokia N900 smartphone NAPPI 2002/07/15 Netwise APlication Platform Board NETWALKER 2010/11/13 Sharp NetWalker NSLU2 2006/02/28 Linksys NSLU2 (a.k.a. "Slug") +OMAP5EVM 2013/07/16 TI OMAP 5 based boards OPENBLOCKS_A6 2012/08/01 Plat'Home. OpenBlockS A6 OPENBLOCKS_AX3 2013/09/30 Plat'Home. OpenBlockS AX3 OPENRD 2012/08/10 open-rd.org Marvell Orion board @@ -41,6 +49,7 @@ OSK5912 2007/01/06 TI OMAP 5912 OSK boa PANDABOARD 2012/08/20 TI OMAP4430 PandaBoard PARALLELLA 2015/01/23 Xilinx Zynq and Epiphany multi-core chips PEPPER 2016/10/15 Gumstix Inc. Pepper SBC(Single Board Computer) +POGO 2016/05/12 CloudEngines Pogoplug NAS RPI 2012/07/26 Raspberry Pi RPI2 2015/03/04 Raspberry Pi 2 SHEEVAPLUG 2010/10/02 Marvell SheevaPlug
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 14:52:45 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Log Message: Add missing entries. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/evbarm/conf/README.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 14:51:49 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: OMAP5EVM Log Message: Fix typo in comment. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/OMAP5EVM Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 14:51:49 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: OMAP5EVM Log Message: Fix typo in comment. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/OMAP5EVM Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/OMAP5EVM diff -u src/sys/arch/evbarm/conf/OMAP5EVM:1.17 src/sys/arch/evbarm/conf/OMAP5EVM:1.18 --- src/sys/arch/evbarm/conf/OMAP5EVM:1.17 Sat Apr 18 11:00:38 2020 +++ src/sys/arch/evbarm/conf/OMAP5EVM Sat May 23 14:51:49 2020 @@ -1,7 +1,7 @@ # -# $NetBSD: OMAP5EVM,v 1.17 2020/04/18 11:00:38 skrll Exp $ +# $NetBSD: OMAP5EVM,v 1.18 2020/05/23 14:51:49 rin Exp $ # -# PANDABOARD -- TI OMAP 4430 Eval Board Kernel +# OMAP5EVM -- TI OMAP 543x Eval Board Kernel # include "arch/evbarm/conf/std.beagle"
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: jdolecek Date: Sat May 23 14:51:19 UTC 2020 Modified Files: src/sys/arch/xen/x86: pintr.c Log Message: switch back to PHYSDEVOP_alloc_irq_vector for non-MSI interrupts - on my computer it works the same as PHYSDEVOP_map_pirq, but seems it doesn't on other systems fixes PR port-xen/55285 for Patrick Welche, but not yet for another system by Frank Kardel To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/x86/pintr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: jdolecek Date: Sat May 23 14:51:19 UTC 2020 Modified Files: src/sys/arch/xen/x86: pintr.c Log Message: switch back to PHYSDEVOP_alloc_irq_vector for non-MSI interrupts - on my computer it works the same as PHYSDEVOP_map_pirq, but seems it doesn't on other systems fixes PR port-xen/55285 for Patrick Welche, but not yet for another system by Frank Kardel To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/x86/pintr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/x86/pintr.c diff -u src/sys/arch/xen/x86/pintr.c:1.16 src/sys/arch/xen/x86/pintr.c:1.17 --- src/sys/arch/xen/x86/pintr.c:1.16 Fri May 15 07:42:58 2020 +++ src/sys/arch/xen/x86/pintr.c Sat May 23 14:51:19 2020 @@ -103,7 +103,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pintr.c,v 1.16 2020/05/15 07:42:58 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pintr.c,v 1.17 2020/05/23 14:51:19 jdolecek Exp $"); #include "opt_multiprocessor.h" #include "opt_xen.h" @@ -173,7 +173,6 @@ short irq2port[NR_EVENT_CHANNELS] = {0}; int xen_pic_to_gsi(struct pic *pic, int pin) { - struct physdev_map_pirq map_irq; int ret; int gsi; @@ -199,21 +198,23 @@ xen_pic_to_gsi(struct pic *pic, int pin) break; } - memset(_irq, 0, sizeof(map_irq)); - map_irq.domid = DOMID_SELF; - map_irq.type = MAP_PIRQ_TYPE_GSI; - map_irq.index = pin; - map_irq.pirq = gsi; - ret = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, _irq); - if (ret != 0) - panic("physdev_op(PHYSDEVOP_map_pirq) GSI fail %d", - ret); + struct physdev_irq irq_op; + memset(_op, 0, sizeof(irq_op)); + irq_op.irq = gsi; + ret = HYPERVISOR_physdev_op(PHYSDEVOP_alloc_irq_vector, + _op); + if (ret < 0) { + panic("physdev_op(PHYSDEVOP_alloc_irq_vector) %d" + " fail %d", gsi, ret); + } + KASSERT(irq_op.vector == gsi); break; } case PIC_MSI: case PIC_MSIX: #ifdef __HAVE_PCI_MSI_MSIX { + struct physdev_map_pirq map_irq; const struct msipic_pci_info *i = msipic_get_pci_info(pic); memset(_irq, 0, sizeof(map_irq));
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 14:14:55 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Log Message: sort To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/README.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 14:14:55 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Log Message: sort To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/README.evbarm Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/README.evbarm diff -u src/sys/arch/evbarm/conf/README.evbarm:1.28 src/sys/arch/evbarm/conf/README.evbarm:1.29 --- src/sys/arch/evbarm/conf/README.evbarm:1.28 Sat May 23 13:43:34 2020 +++ src/sys/arch/evbarm/conf/README.evbarm Sat May 23 14:14:55 2020 @@ -1,4 +1,4 @@ -$NetBSD: README.evbarm,v 1.28 2020/05/23 13:43:34 jmcneill Exp $ +$NetBSD: README.evbarm,v 1.29 2020/05/23 14:14:55 rin Exp $ config date boards --- @@ -6,8 +6,8 @@ ADI_BRH 2003/01/25 ADI Eng. Big Read He ARMADILLO210 2006/02/06 Atmark Techno Armadillo-210 ARMADILLO9 2005/11/13 Atmark Techno Armadillo-9 BCM5301X 2012/08/31 Broadcom BCM95301X evaluation/reference board -CUBOX 2017/01/07 SolidRun Cubox CP3100 2006/11/08 Certance IOP321 CP-3100 +CUBOX 2017/01/07 SolidRun Cubox DNS323 2010/10/02 D-Link DNS-323 Marvell SoC based NAS DUOVERO 2016/10/15 Gumstix Inc. DuoVero COMS boards GEMINI 2008/10/24 Cortina Systems SL3516 eval board @@ -41,11 +41,11 @@ OSK5912 2007/01/06 TI OMAP 5912 OSK boa PANDABOARD 2012/08/20 TI OMAP4430 PandaBoard PARALLELLA 2015/01/23 Xilinx Zynq and Epiphany multi-core chips PEPPER 2016/10/15 Gumstix Inc. Pepper SBC(Single Board Computer) +RPI 2012/07/26 Raspberry Pi +RPI2 2015/03/04 Raspberry Pi 2 SHEEVAPLUG 2010/10/02 Marvell SheevaPlug SMDK2410 2003/07/31 Samsung SMDK2410 S3C2410 eval board SMDK2800 2002/11/20 Samsung SMDK2800 S3C2800 eval board -RPI 2012/07/26 Raspberry Pi -RPI2 2015/03/04 Raspberry Pi 2 TEAMASA_NPWR 2002/02/07 Team ASA Npwr IOP310 based server appliance TEAMASA_NPWR_FC 2003/12/24 Team ASA NPWR-FC i80321 server appliance TISDP2420 2008/04/27 TI OMAP 2420 eval board
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: rin Date: Sat May 23 14:10:47 UTC 2020 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: Fix typo in comment: IMX21_OLINUXINO --> IMX23_OLINUXINO To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.117 src/etc/etc.evbarm/Makefile.inc:1.118 --- src/etc/etc.evbarm/Makefile.inc:1.117 Sat May 23 11:06:23 2020 +++ src/etc/etc.evbarm/Makefile.inc Sat May 23 14:10:47 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.117 2020/05/23 11:06:23 jmcneill Exp $ +# $NetBSD: Makefile.inc,v 1.118 2020/05/23 14:10:47 rin Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -52,7 +52,7 @@ EVBARM_BOARDS.xscale+= TWINTAIL #EVBARM_BOARDS.armv5t+= DNS323 #EVBARM_BOARDS.armv5t+= HPT5325 -#EVBARM_BOARDS.armv5t+= IMX21_OLINUXINO +#EVBARM_BOARDS.armv5t+= IMX23_OLINUXINO EVBARM_BOARDS.armv5t+= KUROBOX_PRO #EVBARM_BOARDS.armv5t+= MARVELL_NAS #EVBARM_BOARDS.armv5t+= MMNET_GENERIC
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: rin Date: Sat May 23 14:10:47 UTC 2020 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: Fix typo in comment: IMX21_OLINUXINO --> IMX23_OLINUXINO To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: jmcneill Date: Sat May 23 13:48:08 UTC 2020 Modified Files: src/sys/dev/isa: files.isa Removed Files: src/sys/dev/isa: toaster.c toasterlcd.c Log Message: GC toaster drivers To generate a diff of this commit: cvs rdiff -u -r1.175 -r1.176 src/sys/dev/isa/files.isa cvs rdiff -u -r1.13 -r0 src/sys/dev/isa/toaster.c cvs rdiff -u -r1.11 -r0 src/sys/dev/isa/toasterlcd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/isa
Module Name:src Committed By: jmcneill Date: Sat May 23 13:48:08 UTC 2020 Modified Files: src/sys/dev/isa: files.isa Removed Files: src/sys/dev/isa: toaster.c toasterlcd.c Log Message: GC toaster drivers To generate a diff of this commit: cvs rdiff -u -r1.175 -r1.176 src/sys/dev/isa/files.isa cvs rdiff -u -r1.13 -r0 src/sys/dev/isa/toaster.c cvs rdiff -u -r1.11 -r0 src/sys/dev/isa/toasterlcd.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/isa/files.isa diff -u src/sys/dev/isa/files.isa:1.175 src/sys/dev/isa/files.isa:1.176 --- src/sys/dev/isa/files.isa:1.175 Sun Jan 19 20:00:35 2020 +++ src/sys/dev/isa/files.isa Sat May 23 13:48:08 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.isa,v 1.175 2020/01/19 20:00:35 thorpej Exp $ +# $NetBSD: files.isa,v 1.176 2020/05/23 13:48:08 jmcneill Exp $ # # Config file and device description for machine-independent ISA code. # Included by ports that need it. Requires that the SCSI files be @@ -487,14 +487,6 @@ device tsdio {} attach tsdio at isa file dev/isa/tsdio.c tsdio -device toasterlcd: hd44780, wsemuldisplaydev -attach toasterlcd at tsdio -file dev/isa/toasterlcd.c toasterlcd - -device toaster -attach toaster at tsdio -file dev/isa/toaster.c toaster - # Trusted Platform Module attach tpm at isa with tpm_isa file dev/isa/tpm_isa.c tpm_isa needs-flag
CVS commit: src/sys/arch/evbarm
Module Name:src Committed By: jmcneill Date: Sat May 23 13:46:36 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: files.tsarm Removed Files: src/sys/arch/evbarm/tsarm: toastersensors.c Log Message: GC toastersensors driver To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/files.tsarm cvs rdiff -u -r1.12 -r0 src/sys/arch/evbarm/tsarm/toastersensors.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm
Module Name:src Committed By: jmcneill Date: Sat May 23 13:46:36 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: files.tsarm Removed Files: src/sys/arch/evbarm/tsarm: toastersensors.c Log Message: GC toastersensors driver To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/files.tsarm cvs rdiff -u -r1.12 -r0 src/sys/arch/evbarm/tsarm/toastersensors.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/evbarm/conf/files.tsarm diff -u src/sys/arch/evbarm/conf/files.tsarm:1.11 src/sys/arch/evbarm/conf/files.tsarm:1.12 --- src/sys/arch/evbarm/conf/files.tsarm:1.11 Mon Mar 17 09:30:02 2008 +++ src/sys/arch/evbarm/conf/files.tsarm Sat May 23 13:46:36 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.tsarm,v 1.11 2008/03/17 09:30:02 kiyohara Exp $ +# $NetBSD: files.tsarm,v 1.12 2020/05/23 13:46:36 jmcneill Exp $ # # First try for arm-specific configuration info # @@ -37,10 +37,6 @@ device tskp: matrixkp, wskbddev attach tskp at tspldbus file arch/evbarm/tsarm/tskp.c tskp -device toastersensors: matrixkp, wskbddev -attach toastersensors at tspldbus -file arch/evbarm/tsarm/toastersensors.c toastersensors - # pcic here because it needs to be late. The catch: pcic needs # to be late, so devices which attach to it are attached late. But it # needs to be before its isa and pci attachments. This answer is
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat May 23 13:43:34 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Removed Files: src/sys/arch/evbarm/conf: TOASTER Log Message: GC TOASTER kernel To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/conf/README.evbarm cvs rdiff -u -r1.3 -r0 src/sys/arch/evbarm/conf/TOASTER Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/README.evbarm diff -u src/sys/arch/evbarm/conf/README.evbarm:1.27 src/sys/arch/evbarm/conf/README.evbarm:1.28 --- src/sys/arch/evbarm/conf/README.evbarm:1.27 Sun Nov 3 12:17:32 2019 +++ src/sys/arch/evbarm/conf/README.evbarm Sat May 23 13:43:34 2020 @@ -1,4 +1,4 @@ -$NetBSD: README.evbarm,v 1.27 2019/11/03 12:17:32 jmcneill Exp $ +$NetBSD: README.evbarm,v 1.28 2020/05/23 13:43:34 jmcneill Exp $ config date boards --- @@ -50,7 +50,6 @@ TEAMASA_NPWR 2002/02/07 Team ASA Npwr IO TEAMASA_NPWR_FC 2003/12/24 Team ASA NPWR-FC i80321 server appliance TISDP2420 2008/04/27 TI OMAP 2420 eval board TISDP2430 2008/04/27 TI OMAP 2430 eval board -TOASTER 2005/08/14 NetBSD/toaster based on TS-7200 TS7200 2004/12/23 Technologic Systems TS-7200 board TWINTAIL 2005/02/26 Genetec corp. "Twintail" PXA255 eval board VIPER 2005/06/06 Arcom Viper PXA255 ARM board
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat May 23 13:43:34 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: README.evbarm Removed Files: src/sys/arch/evbarm/conf: TOASTER Log Message: GC TOASTER kernel To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/conf/README.evbarm cvs rdiff -u -r1.3 -r0 src/sys/arch/evbarm/conf/TOASTER Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: rin Date: Sat May 23 13:39:24 UTC 2020 Modified Files: src/sys/arch/arm/imx/fdt: files.imx6 Log Message: Oops, two more missing clk dependencies... To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/imx/fdt/files.imx6 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/imx/fdt/files.imx6 diff -u src/sys/arch/arm/imx/fdt/files.imx6:1.10 src/sys/arch/arm/imx/fdt/files.imx6:1.11 --- src/sys/arch/arm/imx/fdt/files.imx6:1.10 Sat May 23 13:24:08 2020 +++ src/sys/arch/arm/imx/fdt/files.imx6 Sat May 23 13:39:24 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.imx6,v 1.10 2020/05/23 13:24:08 skrll Exp $ +# $NetBSD: files.imx6,v 1.11 2020/05/23 13:39:24 rin Exp $ # # Configuration info for the Freescale i.MX6 # @@ -16,7 +16,7 @@ file arch/arm/imx/imx6_ccm.c imxccm file arch/arm/imx/fdt/imx6_clk.c imxccm # Common FDT clock framework -define imx_ccm +define imx_ccm: clk file arch/arm/imx/fdt/imx_ccm.c imx_ccm file arch/arm/imx/fdt/imx_ccm_extclk.c imx_ccm file arch/arm/imx/fdt/imx_ccm_gate.c imx_ccm @@ -106,7 +106,7 @@ file arch/arm/imx/fdt/imx6_spi.c imxspi defparam opt_imxspi.h IMXSPINSLAVES # PWM -device imxpwm: pwm +device imxpwm: pwm, clk attach imxpwm at fdt with imxpwm_fdt file arch/arm/imx/imxpwm.c imxpwm file arch/arm/imx/fdt/imx6_pwm.c imxpwm_fdt
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: rin Date: Sat May 23 13:39:24 UTC 2020 Modified Files: src/sys/arch/arm/imx/fdt: files.imx6 Log Message: Oops, two more missing clk dependencies... To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/imx/fdt/files.imx6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: skrll Date: Sat May 23 13:24:08 UTC 2020 Modified Files: src/distrib/sets/lists/dtb: ad.earmv7 ad.earmv7hf ad.earmv7hfeb src/sys/arch/arm/imx/fdt: files.imx6 src/sys/dtb/arm: Makefile Removed Files: src/sys/arch/arm/imx: files.imx6 src/sys/arch/evbarm/conf: CUBOX-I HUMMINGBOARD IMX6UL-STARTER NITROGEN6X files.nitrogen6 mk.imx6ul mk.nitrogen6 std.imx6ul std.nitrogen6 src/sys/arch/evbarm/nitrogen6: nitrogen6_iomux.c nitrogen6_machdep.c nitrogen6_usb.c platform.h Log Message: imx6 kernels are part of GENERIC now To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/dtb/ad.earmv7 \ src/distrib/sets/lists/dtb/ad.earmv7hf \ src/distrib/sets/lists/dtb/ad.earmv7hfeb cvs rdiff -u -r1.20 -r0 src/sys/arch/arm/imx/files.imx6 cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/imx/fdt/files.imx6 cvs rdiff -u -r1.26 -r0 src/sys/arch/evbarm/conf/CUBOX-I cvs rdiff -u -r1.11 -r0 src/sys/arch/evbarm/conf/HUMMINGBOARD \ src/sys/arch/evbarm/conf/std.nitrogen6 cvs rdiff -u -r1.16 -r0 src/sys/arch/evbarm/conf/IMX6UL-STARTER cvs rdiff -u -r1.24 -r0 src/sys/arch/evbarm/conf/NITROGEN6X cvs rdiff -u -r1.3 -r0 src/sys/arch/evbarm/conf/files.nitrogen6 cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/mk.imx6ul cvs rdiff -u -r1.5 -r0 src/sys/arch/evbarm/conf/mk.nitrogen6 cvs rdiff -u -r1.6 -r0 src/sys/arch/evbarm/conf/std.imx6ul cvs rdiff -u -r1.5 -r0 src/sys/arch/evbarm/nitrogen6/nitrogen6_iomux.c cvs rdiff -u -r1.20 -r0 src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c cvs rdiff -u -r1.6 -r0 src/sys/arch/evbarm/nitrogen6/nitrogen6_usb.c cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/nitrogen6/platform.h cvs rdiff -u -r1.1 -r1.2 src/sys/dtb/arm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/dtb/ad.earmv7 diff -u src/distrib/sets/lists/dtb/ad.earmv7:1.3 src/distrib/sets/lists/dtb/ad.earmv7:1.4 --- src/distrib/sets/lists/dtb/ad.earmv7:1.3 Fri May 22 23:58:22 2020 +++ src/distrib/sets/lists/dtb/ad.earmv7 Sat May 23 13:24:08 2020 @@ -1,4 +1,4 @@ -# $NetBSD: ad.earmv7,v 1.3 2020/05/22 23:58:22 rin Exp $ +# $NetBSD: ad.earmv7,v 1.4 2020/05/23 13:24:08 skrll Exp $ # # DO NOT EDIT THIS FILE MANUALLY # Generated by "make update-sets" in sys/dtb @@ -70,6 +70,158 @@ ./boot/dtb/exynos5422-odroidxu3.dtb dtb-base-boot dtb ./boot/dtb/exynos5422-odroidxu4.dtb dtb-base-boot dtb ./boot/dtb/exynos5800-peach-pi.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-apf6dev.dtbdtb-base-boot dtb +./boot/dtb/imx6dl-aristainetos2_4.dtbdtb-base-boot dtb +./boot/dtb/imx6dl-aristainetos2_7.dtbdtb-base-boot dtb +./boot/dtb/imx6dl-aristainetos_4.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-aristainetos_7.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-colibri-eval-v3.dtbdtb-base-boot dtb +./boot/dtb/imx6dl-cubox-i-emmc-som-v15.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-cubox-i-som-v15.dtbdtb-base-boot dtb +./boot/dtb/imx6dl-cubox-i.dtbdtb-base-boot dtb +./boot/dtb/imx6dl-dfi-fs700-m60.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-eckelmann-ci4x10.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-emcon-avari.dtbdtb-base-boot dtb +./boot/dtb/imx6dl-gw51xx.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw52xx.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw53xx.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw54xx.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw551x.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw552x.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw553x.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw560x.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw5903.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-gw5904.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-hummingboard-emmc-som-v15.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-hummingboard-som-v15.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-hummingboard.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-hummingboard2-emmc-som-v15.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-hummingboard2-som-v15.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-hummingboard2.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-icore-mipi.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-icore-rqs.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-icore.dtb dtb-base-boot dtb +./boot/dtb/imx6dl-mamoj.dtb
CVS commit: src
Module Name:src Committed By: skrll Date: Sat May 23 13:24:08 UTC 2020 Modified Files: src/distrib/sets/lists/dtb: ad.earmv7 ad.earmv7hf ad.earmv7hfeb src/sys/arch/arm/imx/fdt: files.imx6 src/sys/dtb/arm: Makefile Removed Files: src/sys/arch/arm/imx: files.imx6 src/sys/arch/evbarm/conf: CUBOX-I HUMMINGBOARD IMX6UL-STARTER NITROGEN6X files.nitrogen6 mk.imx6ul mk.nitrogen6 std.imx6ul std.nitrogen6 src/sys/arch/evbarm/nitrogen6: nitrogen6_iomux.c nitrogen6_machdep.c nitrogen6_usb.c platform.h Log Message: imx6 kernels are part of GENERIC now To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/sets/lists/dtb/ad.earmv7 \ src/distrib/sets/lists/dtb/ad.earmv7hf \ src/distrib/sets/lists/dtb/ad.earmv7hfeb cvs rdiff -u -r1.20 -r0 src/sys/arch/arm/imx/files.imx6 cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/imx/fdt/files.imx6 cvs rdiff -u -r1.26 -r0 src/sys/arch/evbarm/conf/CUBOX-I cvs rdiff -u -r1.11 -r0 src/sys/arch/evbarm/conf/HUMMINGBOARD \ src/sys/arch/evbarm/conf/std.nitrogen6 cvs rdiff -u -r1.16 -r0 src/sys/arch/evbarm/conf/IMX6UL-STARTER cvs rdiff -u -r1.24 -r0 src/sys/arch/evbarm/conf/NITROGEN6X cvs rdiff -u -r1.3 -r0 src/sys/arch/evbarm/conf/files.nitrogen6 cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/mk.imx6ul cvs rdiff -u -r1.5 -r0 src/sys/arch/evbarm/conf/mk.nitrogen6 cvs rdiff -u -r1.6 -r0 src/sys/arch/evbarm/conf/std.imx6ul cvs rdiff -u -r1.5 -r0 src/sys/arch/evbarm/nitrogen6/nitrogen6_iomux.c cvs rdiff -u -r1.20 -r0 src/sys/arch/evbarm/nitrogen6/nitrogen6_machdep.c cvs rdiff -u -r1.6 -r0 src/sys/arch/evbarm/nitrogen6/nitrogen6_usb.c cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/nitrogen6/platform.h cvs rdiff -u -r1.1 -r1.2 src/sys/dtb/arm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat May 23 12:22:57 UTC 2020 Removed Files: src/sys/arch/evbarm/conf: VIRT std.virt Log Message: Use GENERIC instead. To generate a diff of this commit: cvs rdiff -u -r1.10 -r0 src/sys/arch/evbarm/conf/VIRT cvs rdiff -u -r1.7 -r0 src/sys/arch/evbarm/conf/std.virt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat May 23 12:22:57 UTC 2020 Removed Files: src/sys/arch/evbarm/conf: VIRT std.virt Log Message: Use GENERIC instead. To generate a diff of this commit: cvs rdiff -u -r1.10 -r0 src/sys/arch/evbarm/conf/VIRT cvs rdiff -u -r1.7 -r0 src/sys/arch/evbarm/conf/std.virt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Sat May 23 10:48:44 UTC 2020 Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: Add SiByte SB-1 rev 0x11 cores and CN70xx CPUs to the CPU table. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/sys/arch/mips/mips/mips_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Sat May 23 10:48:44 UTC 2020 Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: Add SiByte SB-1 rev 0x11 cores and CN70xx CPUs to the CPU table. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/sys/arch/mips/mips/mips_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/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.279 src/sys/arch/mips/mips/mips_machdep.c:1.280 --- src/sys/arch/mips/mips/mips_machdep.c:1.279 Fri Mar 29 05:23:12 2019 +++ src/sys/arch/mips/mips/mips_machdep.c Sat May 23 10:48:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.279 2019/03/29 05:23:12 simonb Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.280 2020/05/23 10:48:43 simonb Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -111,7 +111,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.279 2019/03/29 05:23:12 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.280 2020/05/23 10:48:43 simonb Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -532,8 +532,14 @@ static const struct pridtab cputab[] = { /* The SB-1 CPU uses a CCA of 5 - "Cacheable Coherent Shareable" */ { MIPS_PRID_CID_SIBYTE, MIPS_SB1, -1, -1, -1, 0, MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | - CPU_MIPS_HAVE_SPECIAL_CCA | (5 << CPU_MIPS_CACHED_CCA_SHIFT), 0, 0, + CPU_MIPS_HAVE_SPECIAL_CCA | + (CCA_SB_CACHEABLE_COHERENT << CPU_MIPS_CACHED_CCA_SHIFT), 0, 0, "SB-1" }, + { MIPS_PRID_CID_SIBYTE, MIPS_SB1_11, -1, -1, -1, 0, + MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | + CPU_MIPS_HAVE_SPECIAL_CCA | + (CCA_SB_CACHEABLE_COHERENT << CPU_MIPS_CACHED_CCA_SHIFT), 0, 0, + "SB-1 (0x11)" }, { MIPS_PRID_CID_RMI, MIPS_XLR732B, -1, -1, -1, 0, MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR | @@ -658,6 +664,14 @@ static const struct pridtab cputab[] = { 0, "CN50xx" }, + { MIPS_PRID_CID_CAVIUM, MIPS_CN70XX, -1, -1, -1, 0, + MIPS64_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_NO_LLADDR, + MIPS_CP0FL_USE | + MIPS_CP0FL_EBASE | MIPS_CP0FL_CONFIG | MIPS_CP0FL_HWRENA | + MIPS_CP0FL_CONFIG1 | MIPS_CP0FL_CONFIG2 | MIPS_CP0FL_CONFIG3, + 0, + "CN70xx" }, + /* Microsoft Research' extensible MIPS */ { MIPS_PRID_CID_MICROSOFT, MIPS_eMIPS, 1, -1, CPU_ARCH_MIPS1, 64, CPU_MIPS_NO_WAIT, 0, 0, "eMIPS CPU" },
CVS commit: src/sys/uvm
Module Name:src Committed By: ad Date: Sat May 23 11:59:03 UTC 2020 Modified Files: src/sys/uvm: uvm_bio.c Log Message: - In ubc_alloc() take initial offset into account in the UBC_FAULTBUSY case or one too few pages can be mapped. - In ubc_release() with UBC_FAULTBUSY, chances are that pages are newly allocated and freshly enqueued, so avoid uvm_pageactivate() if possible - Keep track of the pages mapped in ubc_alloc() in an array on the stack, and use this to avoid calling pmap_extract() in ubc_release(). To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/uvm/uvm_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm
Module Name:src Committed By: ad Date: Sat May 23 11:59:03 UTC 2020 Modified Files: src/sys/uvm: uvm_bio.c Log Message: - In ubc_alloc() take initial offset into account in the UBC_FAULTBUSY case or one too few pages can be mapped. - In ubc_release() with UBC_FAULTBUSY, chances are that pages are newly allocated and freshly enqueued, so avoid uvm_pageactivate() if possible - Keep track of the pages mapped in ubc_alloc() in an array on the stack, and use this to avoid calling pmap_extract() in ubc_release(). To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/uvm/uvm_bio.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/uvm/uvm_bio.c diff -u src/sys/uvm/uvm_bio.c:1.114 src/sys/uvm/uvm_bio.c:1.115 --- src/sys/uvm/uvm_bio.c:1.114 Tue May 19 22:22:15 2020 +++ src/sys/uvm/uvm_bio.c Sat May 23 11:59:03 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_bio.c,v 1.114 2020/05/19 22:22:15 ad Exp $ */ +/* $NetBSD: uvm_bio.c,v 1.115 2020/05/23 11:59:03 ad Exp $ */ /* * Copyright (c) 1998 Chuck Silvers. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.114 2020/05/19 22:22:15 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.115 2020/05/23 11:59:03 ad Exp $"); #include "opt_uvmhist.h" #include "opt_ubc.h" @@ -47,6 +47,7 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v #include #include +#include #ifdef PMAP_DIRECT # define UBC_USE_PMAP_DIRECT @@ -472,7 +473,7 @@ ubc_find_mapping(struct uvm_object *uobj static void * __noinline ubc_alloc(struct uvm_object *uobj, voff_t offset, vsize_t *lenp, int advice, -int flags) +int flags, struct vm_page **pgs, int *npagesp) { vaddr_t slot_offset, va; struct ubc_map *umap; @@ -487,6 +488,7 @@ ubc_alloc(struct uvm_object *uobj, voff_ umap_offset = (offset & ~((voff_t)ubc_winsize - 1)); slot_offset = (vaddr_t)(offset & ((voff_t)ubc_winsize - 1)); *lenp = MIN(*lenp, ubc_winsize - slot_offset); + KASSERT(*lenp > 0); rw_enter(ubc_object.uobj.vmobjlock, RW_WRITER); again: @@ -560,14 +562,14 @@ again: (uintptr_t)umap, umap->refcount, (uintptr_t)va, flags); if (flags & UBC_FAULTBUSY) { - // XXX add offset from slot_offset? - int npages = (*lenp + PAGE_SIZE - 1) >> PAGE_SHIFT; - struct vm_page *pgs[npages]; + int npages = (*lenp + (offset & (PAGE_SIZE - 1)) + + PAGE_SIZE - 1) >> PAGE_SHIFT; int gpflags = PGO_SYNCIO|PGO_OVERWRITE|PGO_PASTEOF|PGO_NOBLOCKALLOC| PGO_NOTIMESTAMP; int i; KDASSERT(flags & UBC_WRITE); + KASSERT(npages <= *npagesp); KASSERT(umap->refcount == 1); UBC_EVCNT_INCR(faultbusy); @@ -577,7 +579,7 @@ again_faultbusy: umap->flags &= ~UMAP_MAPPING_CACHED; pmap_remove(pmap_kernel(), va, va + ubc_winsize); } - memset(pgs, 0, sizeof(pgs)); + memset(pgs, 0, *npagesp * sizeof(pgs[0])); error = (*uobj->pgops->pgo_get)(uobj, trunc_page(offset), pgs, , 0, VM_PROT_READ | VM_PROT_WRITE, advice, gpflags); @@ -615,6 +617,7 @@ again_faultbusy: } pmap_update(pmap_kernel()); umap->flags |= UMAP_PAGES_LOCKED; + *npagesp = npages; } else { KASSERT((umap->flags & UMAP_PAGES_LOCKED) == 0); } @@ -628,7 +631,7 @@ out: */ static void __noinline -ubc_release(void *va, int flags) +ubc_release(void *va, int flags, struct vm_page **pgs, int npages) { struct ubc_map *umap; struct uvm_object *uobj; @@ -643,13 +646,11 @@ ubc_release(void *va, int flags) KASSERT(uobj != NULL); if (umap->flags & UMAP_PAGES_LOCKED) { - const voff_t slot_offset = umap->writeoff; const voff_t endoff = umap->writeoff + umap->writelen; const voff_t zerolen = round_page(endoff) - endoff; - const u_int npages = (round_page(endoff) - - trunc_page(slot_offset)) >> PAGE_SHIFT; - struct vm_page *pgs[npages]; + KASSERT(npages == (round_page(endoff) - + trunc_page(umap->writeoff)) >> PAGE_SHIFT); KASSERT((umap->flags & UMAP_MAPPING_CACHED) == 0); if (zerolen) { memset((char *)umapva + endoff, 0, zerolen); @@ -657,21 +658,25 @@ ubc_release(void *va, int flags) umap->flags &= ~UMAP_PAGES_LOCKED; rw_enter(uobj->vmobjlock, RW_WRITER); for (u_int i = 0; i < npages; i++) { + struct vm_page *pg = pgs[i]; +#ifdef DIAGNOSTIC paddr_t pa; - bool rv __diagused; - - rv = pmap_extract(pmap_kernel(), - umapva + slot_offset + (i << PAGE_SHIFT), ); + bool rv; + rv = pmap_extract(pmap_kernel(), umapva + + umap->writeoff + (i << PAGE_SHIFT), ); KASSERT(rv); - pgs[i] = PHYS_TO_VM_PAGE(pa); - pgs[i]->flags &= ~PG_FAKE; - KASSERTMSG(uvm_pagegetdirty(pgs[i]) == + KASSERT(PHYS_TO_VM_PAGE(pa) == pg); +#endif + pg->flags &= ~PG_FAKE; + KASSERTMSG(uvm_pagegetdirty(pg) == UVM_PAGE_STATUS_DIRTY, - "page %p not dirty", pgs[i]); - KASSERT(pgs[i]->loan_count == 0); - uvm_pagelock(pgs[i]); - uvm_pageactivate(pgs[i]); - uvm_pageunlock(pgs[i]); +
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Sat May 23 10:39:25 UTC 2020 Modified Files: src/sys/arch/mips/include: cpuregs.h Log Message: Add CX73xx and CXF75xx Cavium Octeon PRIDs. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/mips/include/cpuregs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Sat May 23 10:39:25 UTC 2020 Modified Files: src/sys/arch/mips/include: cpuregs.h Log Message: Add CX73xx and CXF75xx Cavium Octeon PRIDs. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/mips/include/cpuregs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpuregs.h diff -u src/sys/arch/mips/include/cpuregs.h:1.97 src/sys/arch/mips/include/cpuregs.h:1.98 --- src/sys/arch/mips/include/cpuregs.h:1.97 Thu May 7 11:43:28 2020 +++ src/sys/arch/mips/include/cpuregs.h Sat May 23 10:39:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuregs.h,v 1.97 2020/05/07 11:43:28 simonb Exp $ */ +/* $NetBSD: cpuregs.h,v 1.98 2020/05/23 10:39:25 simonb Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -1024,6 +1024,8 @@ #define MIPS_CNF71XX 0x94 /* Cavium Octeon CNF71XX ISA 64 */ #define MIPS_CN78XX 0x95 /* Cavium Octeon CN78XX ISA 64 */ #define MIPS_CN70XX 0x96 /* Cavium Octeon CN70XX ISA 64 */ +#define MIPS_CN73XX 0x97 /* Cavium Octeon CN73XX ISA 64 */ +#define MIPS_CNF75XX 0x98 /* Cavium Octeon CNF75XX ISA 64 */ /* * CPU processor revision IDs for company ID == 7 (Microsoft)
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat May 23 11:04:44 UTC 2020 Modified Files: src: build.sh Log Message: Remove plain "earm" targets, and require an explicit MACHINE_ARCH for evbarm instead of selecting a default. To generate a diff of this commit: cvs rdiff -u -r1.336 -r1.337 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: jmcneill Date: Sat May 23 11:06:23 UTC 2020 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: Remove references to defunct arm and earm arches To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.116 src/etc/etc.evbarm/Makefile.inc:1.117 --- src/etc/etc.evbarm/Makefile.inc:1.116 Fri May 22 14:09:54 2020 +++ src/etc/etc.evbarm/Makefile.inc Sat May 23 11:06:23 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.116 2020/05/22 14:09:54 jmcneill Exp $ +# $NetBSD: Makefile.inc,v 1.117 2020/05/23 11:06:23 jmcneill Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -100,12 +100,6 @@ __mkimage: .USE -S ${NETBSDSRCDIR} -B ${IMAGEENDIAN} ${MKI_OPTS.${.TARGET}} \ ${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz -ARCHES.arm= armv4 xscale armv5t armv6 armv7 -ARCHES.armeb= armv4 xscale armv5t armv6 -ARCHES.earm= armv4 xscale armv5t armv6 armv7 -ARCHES.earmeb= armv4 xscale armv5t armv6 -ARCHES.earmhf= armv6hf armv7hf -ARCHES.earmhfeb= armv6hf ARCHES.earmv4= armv4 ARCHES.earmv4eb= armv4 ARCHES.earmv5= xscale armv5t
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat May 23 11:04:44 UTC 2020 Modified Files: src: build.sh Log Message: Remove plain "earm" targets, and require an explicit MACHINE_ARCH for evbarm instead of selecting a default. To generate a diff of this commit: cvs rdiff -u -r1.336 -r1.337 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.336 src/build.sh:1.337 --- src/build.sh:1.336 Sat May 23 10:59:25 2020 +++ src/build.sh Sat May 23 11:04:43 2020 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.336 2020/05/23 10:59:25 jmcneill Exp $ +# $NetBSD: build.sh,v 1.337 2020/05/23 11:04:43 jmcneill Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -637,10 +637,7 @@ MACHINE=dreamcast MACHINE_ARCH=sh3el MACHINE=emips MACHINE_ARCH=mipseb MACHINE=epoc32 MACHINE_ARCH=arm MACHINE=epoc32 MACHINE_ARCH=earmv4 ALIAS=eepoc32 DEFAULT -MACHINE=evbarm MACHINE_ARCH=earm ALIAS=evbearm-el ALIAS=evbarm-el DEFAULT -MACHINE=evbarm MACHINE_ARCH=earmeb ALIAS=evbearm-eb ALIAS=evbarm-eb -MACHINE=evbarm MACHINE_ARCH=earmhf ALIAS=evbearmhf-el ALIAS=evbarmhf-el -MACHINE=evbarm MACHINE_ARCH=earmhfeb ALIAS=evbearmhf-eb ALIAS=evbarmhf-eb +MACHINE=evbarm MACHINE_ARCH= NO_DEFAULT MACHINE=evbarm MACHINE_ARCH=earmv4 ALIAS=evbearmv4-el ALIAS=evbarmv4-el MACHINE=evbarm MACHINE_ARCH=earmv4eb ALIAS=evbearmv4-eb ALIAS=evbarmv4-eb MACHINE=evbarm MACHINE_ARCH=earmv5 ALIAS=evbearmv5-el ALIAS=evbarmv5-el @@ -653,7 +650,7 @@ MACHINE=evbarm MACHINE_ARCH=earmv7 ALIA MACHINE=evbarm MACHINE_ARCH=earmv7eb ALIAS=evbearmv7-eb ALIAS=evbarmv7-eb MACHINE=evbarm MACHINE_ARCH=earmv7hf ALIAS=evbearmv7hf-el ALIAS=evbarmv7hf-el MACHINE=evbarm MACHINE_ARCH=earmv7hfeb ALIAS=evbearmv7hf-eb ALIAS=evbarmv7hf-eb -MACHINE=evbarm MACHINE_ARCH=aarch64 ALIAS=evbarm64-el ALIAS=evbarm64 DEFAULT +MACHINE=evbarm MACHINE_ARCH=aarch64 ALIAS=evbarm64-el ALIAS=evbarm64 MACHINE=evbarm MACHINE_ARCH=aarch64eb ALIAS=evbarm64-eb MACHINE=evbcf MACHINE_ARCH=coldfire MACHINE=evbmips MACHINE_ARCH= NO_DEFAULT @@ -1938,7 +1935,7 @@ createmakewrapper() eval cat <
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: jmcneill Date: Sat May 23 11:06:23 UTC 2020 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: Remove references to defunct arm and earm arches To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat May 23 10:59:25 UTC 2020 Modified Files: src: build.sh Log Message: Remove evbarm OABI targets To generate a diff of this commit: cvs rdiff -u -r1.335 -r1.336 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat May 23 11:32:02 UTC 2020 Removed Files: src/sys/arch/evbarm/conf: ARMADAXP_INSTALL ARMADILLO-IOT-G3_INSTALL BCM5301X_INSTALL BCM56340_INSTALL CUBOX-I_INSTALL CUBOX_INSTALL IMX23_OLINUXINO_INSTALL IMX6UL-STARTER_INSTALL KOBO_INSTALL MIRABOX_INSTALL NETWALKER_INSTALL NITROGEN6X_INSTALL OMAP5EVM_INSTALL PANDABOARD_INSTALL PARALLELLA_INSTALL ZEDBOARD_INSTALL Log Message: GC unused INSTALL kernel configs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/ARMADAXP_INSTALL \ src/sys/arch/evbarm/conf/BCM5301X_INSTALL \ src/sys/arch/evbarm/conf/BCM56340_INSTALL \ src/sys/arch/evbarm/conf/IMX23_OLINUXINO_INSTALL \ src/sys/arch/evbarm/conf/OMAP5EVM_INSTALL \ src/sys/arch/evbarm/conf/PANDABOARD_INSTALL cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3_INSTALL \ src/sys/arch/evbarm/conf/CUBOX-I_INSTALL \ src/sys/arch/evbarm/conf/CUBOX_INSTALL \ src/sys/arch/evbarm/conf/IMX6UL-STARTER_INSTALL \ src/sys/arch/evbarm/conf/KOBO_INSTALL \ src/sys/arch/evbarm/conf/MIRABOX_INSTALL \ src/sys/arch/evbarm/conf/NITROGEN6X_INSTALL \ src/sys/arch/evbarm/conf/PARALLELLA_INSTALL \ src/sys/arch/evbarm/conf/ZEDBOARD_INSTALL cvs rdiff -u -r1.3 -r0 src/sys/arch/evbarm/conf/NETWALKER_INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat May 23 11:32:02 UTC 2020 Removed Files: src/sys/arch/evbarm/conf: ARMADAXP_INSTALL ARMADILLO-IOT-G3_INSTALL BCM5301X_INSTALL BCM56340_INSTALL CUBOX-I_INSTALL CUBOX_INSTALL IMX23_OLINUXINO_INSTALL IMX6UL-STARTER_INSTALL KOBO_INSTALL MIRABOX_INSTALL NETWALKER_INSTALL NITROGEN6X_INSTALL OMAP5EVM_INSTALL PANDABOARD_INSTALL PARALLELLA_INSTALL ZEDBOARD_INSTALL Log Message: GC unused INSTALL kernel configs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/conf/ARMADAXP_INSTALL \ src/sys/arch/evbarm/conf/BCM5301X_INSTALL \ src/sys/arch/evbarm/conf/BCM56340_INSTALL \ src/sys/arch/evbarm/conf/IMX23_OLINUXINO_INSTALL \ src/sys/arch/evbarm/conf/OMAP5EVM_INSTALL \ src/sys/arch/evbarm/conf/PANDABOARD_INSTALL cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3_INSTALL \ src/sys/arch/evbarm/conf/CUBOX-I_INSTALL \ src/sys/arch/evbarm/conf/CUBOX_INSTALL \ src/sys/arch/evbarm/conf/IMX6UL-STARTER_INSTALL \ src/sys/arch/evbarm/conf/KOBO_INSTALL \ src/sys/arch/evbarm/conf/MIRABOX_INSTALL \ src/sys/arch/evbarm/conf/NITROGEN6X_INSTALL \ src/sys/arch/evbarm/conf/PARALLELLA_INSTALL \ src/sys/arch/evbarm/conf/ZEDBOARD_INSTALL cvs rdiff -u -r1.3 -r0 src/sys/arch/evbarm/conf/NETWALKER_INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat May 23 10:59:25 UTC 2020 Modified Files: src: build.sh Log Message: Remove evbarm OABI targets To generate a diff of this commit: cvs rdiff -u -r1.335 -r1.336 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.335 src/build.sh:1.336 --- src/build.sh:1.335 Mon May 18 21:19:34 2020 +++ src/build.sh Sat May 23 10:59:25 2020 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.335 2020/05/18 21:19:34 jmcneill Exp $ +# $NetBSD: build.sh,v 1.336 2020/05/23 10:59:25 jmcneill Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -637,8 +637,6 @@ MACHINE=dreamcast MACHINE_ARCH=sh3el MACHINE=emips MACHINE_ARCH=mipseb MACHINE=epoc32 MACHINE_ARCH=arm MACHINE=epoc32 MACHINE_ARCH=earmv4 ALIAS=eepoc32 DEFAULT -MACHINE=evbarm MACHINE_ARCH=arm ALIAS=evboarm-el -MACHINE=evbarm MACHINE_ARCH=armeb ALIAS=evboarm-eb MACHINE=evbarm MACHINE_ARCH=earm ALIAS=evbearm-el ALIAS=evbarm-el DEFAULT MACHINE=evbarm MACHINE_ARCH=earmeb ALIAS=evbearm-eb ALIAS=evbarm-eb MACHINE=evbarm MACHINE_ARCH=earmhf ALIAS=evbearmhf-el ALIAS=evbarmhf-el @@ -1940,7 +1938,7 @@ createmakewrapper() eval cat <
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Sat May 23 11:33:56 UTC 2020 Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: The Cavium CN70xx PRID covers both the CN70xx and CN71xx CPU families. To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/arch/mips/mips/mips_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/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.280 src/sys/arch/mips/mips/mips_machdep.c:1.281 --- src/sys/arch/mips/mips/mips_machdep.c:1.280 Sat May 23 10:48:43 2020 +++ src/sys/arch/mips/mips/mips_machdep.c Sat May 23 11:33:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.280 2020/05/23 10:48:43 simonb Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.281 2020/05/23 11:33:56 simonb Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -111,7 +111,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.280 2020/05/23 10:48:43 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.281 2020/05/23 11:33:56 simonb Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -670,7 +670,7 @@ static const struct pridtab cputab[] = { MIPS_CP0FL_EBASE | MIPS_CP0FL_CONFIG | MIPS_CP0FL_HWRENA | MIPS_CP0FL_CONFIG1 | MIPS_CP0FL_CONFIG2 | MIPS_CP0FL_CONFIG3, 0, - "CN70xx" }, + "CN70xx/CN71xx" }, /* Microsoft Research' extensible MIPS */ { MIPS_PRID_CID_MICROSOFT, MIPS_eMIPS, 1, -1, CPU_ARCH_MIPS1, 64,
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Sat May 23 11:33:56 UTC 2020 Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: The Cavium CN70xx PRID covers both the CN70xx and CN71xx CPU families. To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/arch/mips/mips/mips_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: maxv Date: Sat May 23 08:25:32 UTC 2020 Modified Files: src/sys/arch/amd64/stand/prekern: console.c pdir.h prekern.c prekern.h redef.h trap.S Log Message: Bump copyrights. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/stand/prekern/console.c \ src/sys/arch/amd64/stand/prekern/trap.S cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/pdir.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/stand/prekern/prekern.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/stand/prekern/prekern.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amd64/stand/prekern/redef.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/stand/prekern/console.c diff -u src/sys/arch/amd64/stand/prekern/console.c:1.5 src/sys/arch/amd64/stand/prekern/console.c:1.6 --- src/sys/arch/amd64/stand/prekern/console.c:1.5 Sat May 23 08:23:28 2020 +++ src/sys/arch/amd64/stand/prekern/console.c Sat May 23 08:25:32 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: console.c,v 1.5 2020/05/23 08:23:28 maxv Exp $ */ +/* $NetBSD: console.c,v 1.6 2020/05/23 08:25:32 maxv Exp $ */ /* - * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Maxime Villard. Index: src/sys/arch/amd64/stand/prekern/trap.S diff -u src/sys/arch/amd64/stand/prekern/trap.S:1.5 src/sys/arch/amd64/stand/prekern/trap.S:1.6 --- src/sys/arch/amd64/stand/prekern/trap.S:1.5 Tue Mar 19 19:15:57 2019 +++ src/sys/arch/amd64/stand/prekern/trap.S Sat May 23 08:25:32 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: trap.S,v 1.5 2019/03/19 19:15:57 maxv Exp $ */ +/* $NetBSD: trap.S,v 1.6 2020/05/23 08:25:32 maxv Exp $ */ /* - * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Maxime Villard. Index: src/sys/arch/amd64/stand/prekern/pdir.h diff -u src/sys/arch/amd64/stand/prekern/pdir.h:1.6 src/sys/arch/amd64/stand/prekern/pdir.h:1.7 --- src/sys/arch/amd64/stand/prekern/pdir.h:1.6 Sat Nov 3 08:27:16 2018 +++ src/sys/arch/amd64/stand/prekern/pdir.h Sat May 23 08:25:32 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: pdir.h,v 1.6 2018/11/03 08:27:16 maxv Exp $ */ +/* $NetBSD: pdir.h,v 1.7 2020/05/23 08:25:32 maxv Exp $ */ /* - * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Maxime Villard. Index: src/sys/arch/amd64/stand/prekern/prekern.c diff -u src/sys/arch/amd64/stand/prekern/prekern.c:1.12 src/sys/arch/amd64/stand/prekern/prekern.c:1.13 --- src/sys/arch/amd64/stand/prekern/prekern.c:1.12 Sat May 23 08:10:50 2020 +++ src/sys/arch/amd64/stand/prekern/prekern.c Sat May 23 08:25:32 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: prekern.c,v 1.12 2020/05/23 08:10:50 maxv Exp $ */ +/* $NetBSD: prekern.c,v 1.13 2020/05/23 08:25:32 maxv Exp $ */ /* - * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Maxime Villard. Index: src/sys/arch/amd64/stand/prekern/prekern.h diff -u src/sys/arch/amd64/stand/prekern/prekern.h:1.22 src/sys/arch/amd64/stand/prekern/prekern.h:1.23 --- src/sys/arch/amd64/stand/prekern/prekern.h:1.22 Thu May 7 21:05:37 2020 +++ src/sys/arch/amd64/stand/prekern/prekern.h Sat May 23 08:25:32 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: prekern.h,v 1.22 2020/05/07 21:05:37 maxv Exp $ */ +/* $NetBSD: prekern.h,v 1.23 2020/05/23 08:25:32 maxv Exp $ */ /* - * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Maxime Villard. Index: src/sys/arch/amd64/stand/prekern/redef.h diff -u src/sys/arch/amd64/stand/prekern/redef.h:1.2 src/sys/arch/amd64/stand/prekern/redef.h:1.3 --- src/sys/arch/amd64/stand/prekern/redef.h:1.2 Tue Nov 14 13:58:07 2017 +++ src/sys/arch/amd64/stand/prekern/redef.h Sat May 23 08:25:32 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: redef.h,v 1.2 2017/11/14 13:58:07 maxv Exp $ */ +/* $NetBSD: redef.h,v 1.3 2020/05/23 08:25:32 maxv Exp $ */ /* - * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. + * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Maxime Villard.
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: maxv Date: Sat May 23 08:25:32 UTC 2020 Modified Files: src/sys/arch/amd64/stand/prekern: console.c pdir.h prekern.c prekern.h redef.h trap.S Log Message: Bump copyrights. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amd64/stand/prekern/console.c \ src/sys/arch/amd64/stand/prekern/trap.S cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/pdir.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amd64/stand/prekern/prekern.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/stand/prekern/prekern.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amd64/stand/prekern/redef.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: maxv Date: Sat May 23 08:23:29 UTC 2020 Modified Files: src/sys/arch/amd64/stand/prekern: console.c Log Message: Extract putc(). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/console.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/amd64/stand/prekern/console.c diff -u src/sys/arch/amd64/stand/prekern/console.c:1.4 src/sys/arch/amd64/stand/prekern/console.c:1.5 --- src/sys/arch/amd64/stand/prekern/console.c:1.4 Wed Apr 3 19:14:25 2019 +++ src/sys/arch/amd64/stand/prekern/console.c Sat May 23 08:23:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: console.c,v 1.4 2019/04/03 19:14:25 maxv Exp $ */ +/* $NetBSD: console.c,v 1.5 2020/05/23 08:23:28 maxv Exp $ */ /* * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. @@ -64,28 +64,34 @@ static void check_scroll(void) memcpy(cons_start, _buffer[0], CONS_WID * 2 * CONS_HEI); } -void print_ext(int color, char *buf) +static void putc(int color, char c) { char *ptr, *scr; - size_t i; - for (i = 0; buf[i] != '\0'; i++) { - if (buf[i] == '\n') { + if (c == '\n') { + cons_x = 0; + cons_y++; + check_scroll(); + } else { + if (cons_x + 1 == CONS_WID) { cons_x = 0; cons_y++; check_scroll(); - } else { - if (cons_x + 1 == CONS_WID) { -cons_x = 0; -cons_y++; -check_scroll(); - } - ptr = (cons_start + 2 * cons_x + 160 * cons_y); - scr = (cons_buffer + 2 * cons_x + 160 * cons_y); - ptr[0] = scr[0] = buf[i]; - ptr[1] = scr[1] = color; - cons_x++; } + ptr = (cons_start + 2 * cons_x + 160 * cons_y); + scr = (cons_buffer + 2 * cons_x + 160 * cons_y); + ptr[0] = scr[0] = c; + ptr[1] = scr[1] = color; + cons_x++; + } +} + +void print_ext(int color, char *buf) +{ + size_t i; + + for (i = 0; buf[i] != '\0'; i++) { + putc(color, buf[i]); } }
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: maxv Date: Sat May 23 08:23:29 UTC 2020 Modified Files: src/sys/arch/amd64/stand/prekern: console.c Log Message: Extract putc(). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/console.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: maxv Date: Sat May 23 08:10:50 UTC 2020 Modified Files: src/sys/arch/amd64/stand/prekern: prekern.c Log Message: Hum, forgot to include this file in my "Clarify." commit on mm.c:rev1.27 and elf.c:rev1.21. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/stand/prekern/prekern.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/amd64/stand/prekern/prekern.c diff -u src/sys/arch/amd64/stand/prekern/prekern.c:1.11 src/sys/arch/amd64/stand/prekern/prekern.c:1.12 --- src/sys/arch/amd64/stand/prekern/prekern.c:1.11 Tue Mar 19 19:15:57 2019 +++ src/sys/arch/amd64/stand/prekern/prekern.c Sat May 23 08:10:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: prekern.c,v 1.11 2019/03/19 19:15:57 maxv Exp $ */ +/* $NetBSD: prekern.c,v 1.12 2020/05/23 08:10:50 maxv Exp $ */ /* * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved. @@ -297,6 +297,7 @@ init_prekern(paddr_t pa_start) * Relocate the kernel. */ mm_map_kernel(); + elf_build_info(); ent = elf_kernel_reloc(); mm_bootspace_mprotect();
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: maxv Date: Sat May 23 08:10:50 UTC 2020 Modified Files: src/sys/arch/amd64/stand/prekern: prekern.c Log Message: Hum, forgot to include this file in my "Clarify." commit on mm.c:rev1.27 and elf.c:rev1.21. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amd64/stand/prekern/prekern.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 06:22:34 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: HUMMINGBOARD Log Message: Deduplicate "options IMXUARTCONSOLE". To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/HUMMINGBOARD Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Sat May 23 06:22:34 UTC 2020 Modified Files: src/sys/arch/evbarm/conf: HUMMINGBOARD Log Message: Deduplicate "options IMXUARTCONSOLE". To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/HUMMINGBOARD Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/HUMMINGBOARD diff -u src/sys/arch/evbarm/conf/HUMMINGBOARD:1.10 src/sys/arch/evbarm/conf/HUMMINGBOARD:1.11 --- src/sys/arch/evbarm/conf/HUMMINGBOARD:1.10 Sat Apr 18 11:00:38 2020 +++ src/sys/arch/evbarm/conf/HUMMINGBOARD Sat May 23 06:22:34 2020 @@ -1,5 +1,5 @@ # -# $NetBSD: HUMMINGBOARD,v 1.10 2020/04/18 11:00:38 skrll Exp $ +# $NetBSD: HUMMINGBOARD,v 1.11 2020/05/23 06:22:34 rin Exp $ # # Hummingboard -- Freescale i.MX6 Eval Board Kernel # @@ -90,7 +90,6 @@ imxuart0 at axi? addr 0x0202 irq 58 #imxuart2 at axi? addr 0x021ec000 irq 60 # UART3 #imxuart3 at axi? addr 0x021f irq 61 # UART4 #imxuart4 at axi? addr 0x021f4000 irq 62 # UART5 -options IMXUARTCONSOLE # I2C imxi2c0 at axi? addr 0x021A irq 68
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: rin Date: Sat May 23 06:21:36 UTC 2020 Modified Files: src/sys/arch/arm/imx: files.imx6 Log Message: imxpcie also depends on clk. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/imx/files.imx6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: rin Date: Sat May 23 06:21:36 UTC 2020 Modified Files: src/sys/arch/arm/imx: files.imx6 Log Message: imxpcie also depends on clk. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/imx/files.imx6 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/imx/files.imx6 diff -u src/sys/arch/arm/imx/files.imx6:1.19 src/sys/arch/arm/imx/files.imx6:1.20 --- src/sys/arch/arm/imx/files.imx6:1.19 Sat Oct 12 06:46:13 2019 +++ src/sys/arch/arm/imx/files.imx6 Sat May 23 06:21:36 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.imx6,v 1.19 2019/10/12 06:46:13 skrll Exp $ +# $NetBSD: files.imx6,v 1.20 2020/05/23 06:21:36 rin Exp $ # # Configuration info for the Freescale i.MX6 # @@ -27,13 +27,13 @@ attach axi at mainbus file arch/arm/imx/imx6_axi.c axi # iMX6 PCIe -device imxpcie: pcibus +device imxpcie: pcibus, clk attach imxpcie at axi with imx6_pcie file arch/arm/imx/imxpcie.c imxpcie file arch/arm/imx/imx6_pcie.c imx6_pcie # iMX6 Clock Control Module -device imxccm : clk +device imxccm: clk attach imxccm at axi file arch/arm/imx/imx6_ccm.c imxccm needs-flag file arch/arm/imx/imx6_clk.c imxccm
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: rin Date: Sat May 23 06:21:15 UTC 2020 Modified Files: src/sys/arch/arm/imx: files.imx51 Log Message: imxpwm depends on clk. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/imx/files.imx51 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/imx/files.imx51 diff -u src/sys/arch/arm/imx/files.imx51:1.21 src/sys/arch/arm/imx/files.imx51:1.22 --- src/sys/arch/arm/imx/files.imx51:1.21 Wed May 20 05:10:42 2020 +++ src/sys/arch/arm/imx/files.imx51 Sat May 23 06:21:15 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.imx51,v 1.21 2020/05/20 05:10:42 hkenken Exp $ +# $NetBSD: files.imx51,v 1.22 2020/05/23 06:21:15 rin Exp $ # # Configuration info for the Freescale i.MX5x # @@ -137,6 +137,6 @@ defparam opt_imxspi.hIMXSPI_DEBUG # file arch/arm/imx/imx51_i2s.c imxi2s needs-flag # PWM controller -device imxpwm: pwm +device imxpwm: pwm, clk file arch/arm/imx/imxpwm.c imxpwm file arch/arm/imx/imx51_pwm.c imxpwm
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: rin Date: Sat May 23 06:21:15 UTC 2020 Modified Files: src/sys/arch/arm/imx: files.imx51 Log Message: imxpwm depends on clk. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/imx/files.imx51 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.