CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Sun May 30 05:59:23 UTC 2021 Modified Files: src/sys/arch/i386/stand/boot: boot2.c src/sys/arch/i386/stand/efiboot: boot.c src/sys/arch/i386/stand/lib: biosdisk.c biosdisk.h exec.c src/sys/lib/libsa: bootcfg.c bootcfg.h Log Message: Add "root" command to provide a BTINFO_ROOTDEVICE parameter. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/i386/stand/boot/boot2.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/i386/stand/efiboot/boot.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/i386/stand/lib/biosdisk.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/stand/lib/biosdisk.h cvs rdiff -u -r1.76 -r1.77 src/sys/arch/i386/stand/lib/exec.c cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libsa/bootcfg.c cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libsa/bootcfg.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/i386/stand/boot/boot2.c diff -u src/sys/arch/i386/stand/boot/boot2.c:1.74 src/sys/arch/i386/stand/boot/boot2.c:1.75 --- src/sys/arch/i386/stand/boot/boot2.c:1.74 Wed Jul 15 12:36:30 2020 +++ src/sys/arch/i386/stand/boot/boot2.c Sun May 30 05:59:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: boot2.c,v 1.74 2020/07/15 12:36:30 kim Exp $ */ +/* $NetBSD: boot2.c,v 1.75 2021/05/30 05:59:22 mlelstv Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -83,6 +83,9 @@ #include #include "devopen.h" +#ifdef _STANDALONE +#include +#endif #ifdef SUPPORT_PS2 #include #endif @@ -130,6 +133,7 @@ void command_boot(char *); void command_pkboot(char *); void command_dev(char *); void command_consdev(char *); +void command_root(char *); #ifndef SMALL void command_menu(char *); #endif @@ -147,6 +151,7 @@ const struct bootblk_command commands[] { "pkboot", command_pkboot }, { "dev", command_dev }, { "consdev", command_consdev }, + { "root", command_root }, #ifndef SMALL { "menu", command_menu }, #endif @@ -450,6 +455,9 @@ command_help(char *arg) #endif "dev [dev:]\n" "consdev {pc|{com[0123]|com[0123]kbd|auto}[,{speed}]}\n" + "root{spec}\n" + " spec can be disk, e.g. wd0, sd0\n" + " or string like wedge:name\n" "vesa {modenum|on|off|enabled|disabled|list}\n" #ifndef SMALL "menu (reenters boot menu, if defined in boot.cfg)\n" @@ -610,6 +618,18 @@ error: printf("invalid console device.\n"); } +void +command_root(char *arg) +{ + struct btinfo_rootdevice *biv = _root; + + strncpy(biv->devname, arg, sizeof(biv->devname)); + if (biv->devname[sizeof(biv->devname)-1] != '\0') { + biv->devname[sizeof(biv->devname)-1] = '\0'; + printf("truncated to %s\n",biv->devname); + } +} + #ifndef SMALL /* ARGSUSED */ void Index: src/sys/arch/i386/stand/efiboot/boot.c diff -u src/sys/arch/i386/stand/efiboot/boot.c:1.17 src/sys/arch/i386/stand/efiboot/boot.c:1.18 --- src/sys/arch/i386/stand/efiboot/boot.c:1.17 Thu Sep 26 12:21:03 2019 +++ src/sys/arch/i386/stand/efiboot/boot.c Sun May 30 05:59:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.17 2019/09/26 12:21:03 nonaka Exp $ */ +/* $NetBSD: boot.c,v 1.18 2021/05/30 05:59:22 mlelstv Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -38,6 +38,10 @@ #include "biosdisk.h" #include "devopen.h" +#ifdef _STANDALONE +#include +#endif + int errno; int boot_biosdev; daddr_t boot_biossector; @@ -65,6 +69,7 @@ void command_quit(char *); void command_boot(char *); void command_pkboot(char *); void command_consdev(char *); +void command_root(char *); void command_dev(char *); void command_devpath(char *); void command_efivar(char *); @@ -88,6 +93,7 @@ const struct bootblk_command commands[] { "boot", command_boot }, { "pkboot", command_pkboot }, { "consdev", command_consdev }, + { "root", command_root }, { "dev", command_dev }, { "devpath", command_devpath }, { "efivar", command_efivar }, @@ -396,6 +402,9 @@ command_help(char *arg) "pkboot [dev:][filename] [-12acdqsvxz]\n" "dev [dev:]\n" "consdev {pc|com[0123][,{speed}]|com,{ioport}[,{speed}]}\n" + "root{spec}\n" + " spec can be disk, e.g. wd0, sd0\n" + " or string like wedge:name\n" "devpath\n" "efivar\n" "gop [{modenum|list}]\n" @@ -590,6 +599,19 @@ error: printf("invalid console device.\n"); } +void +command_root(char *arg) +{ + struct btinfo_rootdevice *biv = _root; + + strncpy(biv->devname, arg, sizeof(biv->devname)); + if (biv->devname[sizeof(biv->devname)-1] != '\0') { + biv->devname[sizeof(biv->devname)-1] = '\0'; + printf("truncated to %s\n",biv->devname); + } +} + + #ifndef SMALL /* ARGSUSED */ void Index: src/sys/arch/i386/stand/lib/biosdisk.c diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.54 src/sys/arch/i386/stand/lib/biosdisk.c:1.55 --- src/sys/arch/i386/stand/lib/biosdisk.c:1.54 Tue Dec 17 01:37:53 2019 +++
CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Sun May 30 05:59:23 UTC 2021 Modified Files: src/sys/arch/i386/stand/boot: boot2.c src/sys/arch/i386/stand/efiboot: boot.c src/sys/arch/i386/stand/lib: biosdisk.c biosdisk.h exec.c src/sys/lib/libsa: bootcfg.c bootcfg.h Log Message: Add "root" command to provide a BTINFO_ROOTDEVICE parameter. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/i386/stand/boot/boot2.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/i386/stand/efiboot/boot.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/i386/stand/lib/biosdisk.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/stand/lib/biosdisk.h cvs rdiff -u -r1.76 -r1.77 src/sys/arch/i386/stand/lib/exec.c cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libsa/bootcfg.c cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libsa/bootcfg.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/aarch64/aarch64
Module Name:src Committed By: rin Date: Sun May 30 05:40:57 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: netbsd32_machdep.c Log Message: Fix conversion between aarch64 and aarch32 fpreg's; in aarch32 mode, d0-d31 are packed into v0-v15 (== q0-q15). This fixes crashes in VFP-optimized codes running on COMPAT_NETBSD32. OK ryo To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/netbsd32_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/aarch64/aarch64
Module Name:src Committed By: rin Date: Sun May 30 05:40:57 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: netbsd32_machdep.c Log Message: Fix conversion between aarch64 and aarch32 fpreg's; in aarch32 mode, d0-d31 are packed into v0-v15 (== q0-q15). This fixes crashes in VFP-optimized codes running on COMPAT_NETBSD32. OK ryo To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/aarch64/aarch64/netbsd32_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/aarch64/aarch64/netbsd32_machdep.c diff -u src/sys/arch/aarch64/aarch64/netbsd32_machdep.c:1.17 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c:1.18 --- src/sys/arch/aarch64/aarch64/netbsd32_machdep.c:1.17 Fri Dec 11 18:03:33 2020 +++ src/sys/arch/aarch64/aarch64/netbsd32_machdep.c Sun May 30 05:40:56 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.17 2020/12/11 18:03:33 skrll Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.18 2021/05/30 05:40:56 rin Exp $ */ /* * Copyright (c) 2018 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.17 2020/12/11 18:03:33 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.18 2021/05/30 05:40:56 rin Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -158,7 +158,7 @@ netbsd32_process_read_fpregs(struct lwp { struct proc * const p = l->l_proc; struct pcb * const pcb = lwp_getpcb(l); - int i; + int i, j; if ((p->p_flag & PK_32) == 0) return EINVAL; @@ -180,11 +180,17 @@ netbsd32_process_read_fpregs(struct lwp fpregs->fpr_vfp.vfp_fpinst = 0; fpregs->fpr_vfp.vfp_fpinst2 = 0; - for (i = 0; i < 32; i++) { + for (i = j = 0; i < 16; i++) { #ifdef __AARCH64EB__ - fpregs->fpr_vfp.vfp_regs[i] = pcb->pcb_fpregs.fp_reg[i].u64[1]; + fpregs->fpr_vfp.vfp_regs[j++] = + pcb->pcb_fpregs.fp_reg[i].u64[1]; + fpregs->fpr_vfp.vfp_regs[j++] = + pcb->pcb_fpregs.fp_reg[i].u64[0]; #else - fpregs->fpr_vfp.vfp_regs[i] = pcb->pcb_fpregs.fp_reg[i].u64[0]; + fpregs->fpr_vfp.vfp_regs[j++] = + pcb->pcb_fpregs.fp_reg[i].u64[0]; + fpregs->fpr_vfp.vfp_regs[j++] = + pcb->pcb_fpregs.fp_reg[i].u64[1]; #endif } @@ -226,7 +232,7 @@ netbsd32_process_write_fpregs(struct lwp { struct proc * const p = l->l_proc; struct pcb * const pcb = lwp_getpcb(l); - int i; + int i, j; if ((p->p_flag & PK_32) == 0) return EINVAL; @@ -237,17 +243,18 @@ netbsd32_process_write_fpregs(struct lwp pcb->pcb_fpregs.fpsr = fpregs->fpr_vfp.vfp_fpscr & FPSR_BITS; pcb->pcb_fpregs.fpcr = fpregs->fpr_vfp.vfp_fpscr & FPCR_BITS; - CTASSERT(__arraycount(fpregs->fpr_vfp.vfp_regs) == - __arraycount(pcb->pcb_fpregs.fp_reg) + 1); - for (i = 0; i < __arraycount(pcb->pcb_fpregs.fp_reg); i++) { + for (i = j = 0; i < 16; i++) { #ifdef __AARCH64EB__ - pcb->pcb_fpregs.fp_reg[i].u64[0] = 0; pcb->pcb_fpregs.fp_reg[i].u64[1] = + fpregs->fpr_vfp.vfp_regs[j++]; + pcb->pcb_fpregs.fp_reg[i].u64[0] = + fpregs->fpr_vfp.vfp_regs[j++]; #else - pcb->pcb_fpregs.fp_reg[i].u64[1] = 0; pcb->pcb_fpregs.fp_reg[i].u64[0] = + fpregs->fpr_vfp.vfp_regs[j++]; + pcb->pcb_fpregs.fp_reg[i].u64[1] = + fpregs->fpr_vfp.vfp_regs[j++]; #endif - fpregs->fpr_vfp.vfp_regs[i]; } return 0; @@ -458,18 +465,21 @@ cpu_getmcontext32(struct lwp *l, mcontex /* fpu context */ if (fpu_used_p(l)) { const struct pcb * const pcb = lwp_getpcb(l); - int i; + int i, j; fpu_save(l); - CTASSERT(__arraycount(mcp->__vfpregs.__vfp_fstmx) == - __arraycount(pcb->pcb_fpregs.fp_reg)); - for (i = 0; i < __arraycount(pcb->pcb_fpregs.fp_reg); i++) { - mcp->__vfpregs.__vfp_fstmx[i] = + for (i = j = 0; i < 16; i++) { #ifdef __AARCH64EB__ + mcp->__vfpregs.__vfp_fstmx[j++] = pcb->pcb_fpregs.fp_reg[i].u64[1]; + mcp->__vfpregs.__vfp_fstmx[j++] = + pcb->pcb_fpregs.fp_reg[i].u64[0]; #else + mcp->__vfpregs.__vfp_fstmx[j++] = pcb->pcb_fpregs.fp_reg[i].u64[0]; + mcp->__vfpregs.__vfp_fstmx[j++] = + pcb->pcb_fpregs.fp_reg[i].u64[1]; #endif } @@ -491,7 +501,7 @@ cpu_setmcontext32(struct lwp *l, const m struct trapframe * const tf = l->l_md.md_utf; const __greg32_t * const gr = mcp->__gregs; struct proc * const p = l->l_proc; - int error, i; + int error, i, j; if (flags & _UC_CPU) { error = cpu_mcontext32_validate(l, mcp); @@ -521,17 +531,18 @@ cpu_setmcontext32(struct lwp *l, const m struct pcb * const pcb = lwp_getpcb(l); fpu_discard(l, true); - CTASSERT(__arraycount(mcp->__vfpregs.__vfp_fstmx) == - __arraycount(pcb->pcb_fpregs.fp_reg)); - for (i = 0; i < __arraycount(pcb->pcb_fpregs.fp_reg); i++) { + for (i = j = 0; i < 16; i++) { #ifdef __AARCH64EB__ - pcb->pcb_fpregs.fp_reg[i].u64[0] = 0; pcb->pcb_fpregs.fp_reg[i].u64[1] = + mcp->__vfpregs.__vfp_fstmx[j++]; + pcb->pcb_fpregs.fp_reg[i].u64[0]
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 05:26:09 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Define a macro, VM_MDPAGE_PVS(), for fetching the first pv entry for a page. To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.91 -r1.92 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.285 src/sys/arch/alpha/alpha/pmap.c:1.286 --- src/sys/arch/alpha/alpha/pmap.c:1.285 Sun May 30 04:04:26 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sun May 30 05:26:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.285 2021/05/30 04:04:26 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.286 2021/05/30 05:26:09 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.285 2021/05/30 04:04:26 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.286 2021/05/30 05:26:09 thorpej Exp $"); #include #include @@ -1823,7 +1823,6 @@ pmap_remove(pmap_t pmap, vaddr_t sva, va void pmap_page_protect(struct vm_page *pg, vm_prot_t prot) { - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); pv_entry_t pv, nextpv; pt_entry_t opte; kmutex_t *lock; @@ -1851,7 +1850,7 @@ pmap_page_protect(struct vm_page *pg, vm PMAP_HEAD_TO_MAP_LOCK(); lock = pmap_pvh_lock(pg); mutex_enter(lock); - for (pv = md->pvh_list; pv != NULL; pv = pv->pv_next) { + for (pv = VM_MDPAGE_PVS(pg); pv != NULL; pv = pv->pv_next) { PMAP_LOCK(pv->pv_pmap); opte = atomic_load_relaxed(pv->pv_pte); if (opte & (PG_KWE | PG_UWE)) { @@ -1876,7 +1875,7 @@ pmap_page_protect(struct vm_page *pg, vm PMAP_HEAD_TO_MAP_LOCK(); lock = pmap_pvh_lock(pg); mutex_enter(lock); - for (pv = md->pvh_list; pv != NULL; pv = nextpv) { + for (pv = VM_MDPAGE_PVS(pg); pv != NULL; pv = nextpv) { pt_entry_t pte_bits; pmap_t pmap; vaddr_t va; @@ -3007,7 +3006,6 @@ static void pmap_changebit(struct vm_page *pg, pt_entry_t set, pt_entry_t mask, struct pmap_tlb_context * const tlbctx) { - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); pv_entry_t pv; pt_entry_t *pte, npte, opte; @@ -3020,7 +3018,7 @@ pmap_changebit(struct vm_page *pg, pt_en /* * Loop over all current mappings setting/clearing as apropos. */ - for (pv = md->pvh_list; pv != NULL; pv = pv->pv_next) { + for (pv = VM_MDPAGE_PVS(pg); pv != NULL; pv = pv->pv_next) { PMAP_LOCK(pv->pv_pmap); pte = pv->pv_pte; @@ -3176,7 +3174,7 @@ pmap_pv_dump(paddr_t pa) mutex_enter(lock); printf("pa 0x%lx (attrs = 0x%x):\n", pa, md->pvh_attrs); - for (pv = md->pvh_list; pv != NULL; pv = pv->pv_next) + for (pv = VM_MDPAGE_PVS(pg); pv != NULL; pv = pv->pv_next) printf(" pmap %p, va 0x%lx\n", pv->pv_pmap, pv->pv_va); printf("\n"); @@ -3264,7 +3262,7 @@ pmap_pv_enter(pmap_t pmap, struct vm_pag /* * Make sure the entry doesn't already exist. */ - for (pv = md->pvh_list; pv != NULL; pv = pv->pv_next) { + for (pv = VM_MDPAGE_PVS(pg); pv != NULL; pv = pv->pv_next) { if (pmap == pv->pv_pmap && va == pv->pv_va) { printf("pmap = %p, va = 0x%lx\n", pmap, va); panic("pmap_pv_enter: already in pv table"); Index: src/sys/arch/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.91 src/sys/arch/alpha/include/pmap.h:1.92 --- src/sys/arch/alpha/include/pmap.h:1.91 Sun May 30 04:04:26 2021 +++ src/sys/arch/alpha/include/pmap.h Sun May 30 05:26:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.91 2021/05/30 04:04:26 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.92 2021/05/30 05:26:09 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -363,6 +363,9 @@ struct vm_page_md { int pvh_attrs;/* page attributes */ }; +#define VM_MDPAGE_PVS(pg) \ + ((pg)->mdpage.pvh_list) + #define VM_MDPAGE_INIT(pg) \ do { \ (pg)->mdpage.pvh_list = NULL; \
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 05:26:09 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Define a macro, VM_MDPAGE_PVS(), for fetching the first pv entry for a page. To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.91 -r1.92 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 04:04:27 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Pages that are in-use as page table pages should never be part of a UVM loan transaction, so use the vm_page::loan_count field as the PT page reference count. To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.90 -r1.91 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 04:04:27 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Pages that are in-use as page table pages should never be part of a UVM loan transaction, so use the vm_page::loan_count field as the PT page reference count. To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.90 -r1.91 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.284 src/sys/arch/alpha/alpha/pmap.c:1.285 --- src/sys/arch/alpha/alpha/pmap.c:1.284 Sun May 30 01:41:45 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sun May 30 04:04:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.284 2021/05/30 01:41:45 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.285 2021/05/30 04:04:26 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.284 2021/05/30 01:41:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.285 2021/05/30 04:04:26 thorpej Exp $"); #include #include @@ -3358,6 +3358,15 @@ pmap_pv_page_free(struct pool *pp, void / misc. functions / /* + * Pages that are in-use as page table pages should never be part + * of a UVM loan, so we'll use that field for our PT page reference + * count. + */ +#define PHYSPAGE_REFCNT(pg) atomic_load_relaxed(&(pg)->loan_count) +#define PHYSPAGE_REFCNT_INC(pg) atomic_inc_uint_nv(&(pg)->loan_count) +#define PHYSPAGE_REFCNT_DEC(pg) atomic_dec_uint_nv(&(pg)->loan_count) + +/* * pmap_physpage_alloc: * * Allocate a single page from the VM system and return the @@ -3376,14 +3385,7 @@ pmap_physpage_alloc(int usage) pg = uvm_pagealloc(NULL, 0, NULL, usage == PGU_L1PT ? UVM_PGA_USERESERVE : UVM_PGA_USERESERVE|UVM_PGA_ZERO); if (pg != NULL) { -#ifdef DEBUG - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); - if (md->pvh_refcnt != 0) { - printf("pmap_physpage_alloc: page 0x%lx has " - "%d references\n", pa, md->pvh_refcnt); - panic("pmap_physpage_alloc"); - } -#endif + KASSERT(PHYSPAGE_REFCNT(pg) == 0); } return pg; } @@ -3401,11 +3403,7 @@ pmap_physpage_free(paddr_t pa) if ((pg = PHYS_TO_VM_PAGE(pa)) == NULL) panic("pmap_physpage_free: bogus physical page address"); -#ifdef DEBUG - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); - if (md->pvh_refcnt != 0) - panic("pmap_physpage_free: page still has references"); -#endif + KASSERT(PHYSPAGE_REFCNT(pg) == 0); uvm_pagefree(pg); } @@ -3419,16 +3417,14 @@ static int pmap_physpage_addref(void *kva) { struct vm_page *pg; - struct vm_page_md *md; paddr_t pa; pa = ALPHA_K0SEG_TO_PHYS(trunc_page((vaddr_t)kva)); pg = PHYS_TO_VM_PAGE(pa); - md = VM_PAGE_TO_MD(pg); - KASSERT((int)md->pvh_refcnt >= 0); + KASSERT(PHYSPAGE_REFCNT(pg) < UINT32_MAX); - return atomic_inc_uint_nv(>pvh_refcnt); + return PHYSPAGE_REFCNT_INC(pg); } /* @@ -3440,16 +3436,14 @@ static int pmap_physpage_delref(void *kva) { struct vm_page *pg; - struct vm_page_md *md; paddr_t pa; pa = ALPHA_K0SEG_TO_PHYS(trunc_page((vaddr_t)kva)); pg = PHYS_TO_VM_PAGE(pa); - md = VM_PAGE_TO_MD(pg); - KASSERT((int)md->pvh_refcnt > 0); + KASSERT(PHYSPAGE_REFCNT(pg) != 0); - return atomic_dec_uint_nv(>pvh_refcnt); + return PHYSPAGE_REFCNT_DEC(pg); } / page table page management / @@ -3685,10 +3679,8 @@ pmap_ptpage_free(pmap_t pmap, pt_entry_t struct vm_page * const pg = PHYS_TO_VM_PAGE(ptpa); KASSERT(pg != NULL); + KASSERT(PHYSPAGE_REFCNT(pg) == 0); #ifdef DEBUG - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); - KDASSERT(md->pvh_refcnt == 0); - pmap_zero_page(ptpa); #endif Index: src/sys/arch/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.90 src/sys/arch/alpha/include/pmap.h:1.91 --- src/sys/arch/alpha/include/pmap.h:1.90 Sun May 30 01:41:45 2021 +++ src/sys/arch/alpha/include/pmap.h Sun May 30 04:04:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.90 2021/05/30 01:41:45 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.91 2021/05/30 04:04:26 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -361,13 +361,12 @@ do { \ struct vm_page_md { struct pv_entry *pvh_list; /* pv_entry list */ int pvh_attrs;/* page attributes */ - unsigned pvh_refcnt; }; #define VM_MDPAGE_INIT(pg) \ do { \ (pg)->mdpage.pvh_list = NULL; \ - (pg)->mdpage.pvh_refcnt = 0; \ + (pg)->mdpage.pvh_attrs = 0; \ } while (/*CONSTCOND*/0) #endif /* _KERNEL */
CVS commit: [LLVM] src/external/apache2/llvm/dist
Module Name:src Committed By: joerg Date: Sun May 30 02:58:42 UTC 2021 Removed Files: src/external/apache2/llvm/dist/clang [LLVM]: .arcconfig src/external/apache2/llvm/dist/clang/docs [LLVM]: AttributeReference.rst DiagnosticsReference.rst src/external/apache2/llvm/dist/clang/include/clang/Basic [LLVM]: BuiltinsLe64.def FixedPoint.h SanitizerBlacklist.h src/external/apache2/llvm/dist/clang/include/clang/Driver [LLVM]: CC1Options.td CLCompatOptions.td src/external/apache2/llvm/dist/clang/include/clang/Serialization [LLVM]: Module.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Core [LLVM]: IssueHash.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Core/PathSensitive [LLVM]: SubEngine.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Frontend [LLVM]: CheckerRegistration.h src/external/apache2/llvm/dist/clang/include/clang/Tooling/Core [LLVM]: Lookup.h src/external/apache2/llvm/dist/clang/lib/AST/Interp [LLVM]: Block.cpp Block.h src/external/apache2/llvm/dist/clang/lib/Basic [LLVM]: FixedPoint.cpp SanitizerBlacklist.cpp src/external/apache2/llvm/dist/clang/lib/Frontend [LLVM]: FrontendTiming.cpp src/external/apache2/llvm/dist/clang/lib/Headers/openmp_wrappers [LLVM]: __clang_openmp_math.h __clang_openmp_math_declares.h src/external/apache2/llvm/dist/clang/lib/Index [LLVM]: SimpleFormatContext.h src/external/apache2/llvm/dist/clang/lib/Serialization [LLVM]: Module.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Checkers [LLVM]: IteratorChecker.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Core [LLVM]: IssueHash.cpp SubEngine.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Frontend [LLVM]: CheckerRegistration.cpp src/external/apache2/llvm/dist/clang/lib/Tooling/Core [LLVM]: Lookup.cpp src/external/apache2/llvm/dist/clang/tools/scan-view/share [LLVM]: FileRadar.scpt GetRadarVersion.scpt src/external/apache2/llvm/dist/clang/utils/TableGen [LLVM]: ClangASTEmitters.h src/external/apache2/llvm/dist/llvm [LLVM]: .arcconfig LLVMBuild.txt src/external/apache2/llvm/dist/llvm/bindings [LLVM]: LLVMBuild.txt src/external/apache2/llvm/dist/llvm/cmake/modules [LLVM]: CheckLinkerFlag.cmake src/external/apache2/llvm/dist/llvm/docs [LLVM]: LLVMBuild.rst LLVMBuild.txt src/external/apache2/llvm/dist/llvm/docs/AMDGPU [LLVM]: gfx9_mad_type_dev.rst src/external/apache2/llvm/dist/llvm/docs/CommandGuide [LLVM]: llvm-build.rst src/external/apache2/llvm/dist/llvm/docs/TableGen [LLVM]: Deficiencies.rst LangIntro.rst LangRef.rst src/external/apache2/llvm/dist/llvm/docs/tutorial [LLVM]: BuildingAJIT5.rst OCamlLangImpl1.rst OCamlLangImpl2.rst OCamlLangImpl3.rst OCamlLangImpl4.rst OCamlLangImpl5.rst OCamlLangImpl6.rst OCamlLangImpl7.rst OCamlLangImpl8.rst src/external/apache2/llvm/dist/llvm/examples [LLVM]: LLVMBuild.txt src/external/apache2/llvm/dist/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5 [LLVM]: CMakeLists.txt KaleidoscopeJIT.h RemoteJITUtils.h toy.cpp src/external/apache2/llvm/dist/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server [LLVM]: CMakeLists.txt server.cpp src/external/apache2/llvm/dist/llvm/examples/LLJITExamples [LLVM]: CMakeLists.txt ExampleModules.h src/external/apache2/llvm/dist/llvm/examples/LLJITExamples/LLJITWithJITLink [LLVM]: CMakeLists.txt LLJITWithJITLink.cpp src/external/apache2/llvm/dist/llvm/examples/LLJITExamples/LLJITWithObjectCache [LLVM]: CMakeLists.txt LLJITWithObjectCache.cpp src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter2 [LLVM]: _tags ast.ml lexer.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter3 [LLVM]: _tags ast.ml codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter4 [LLVM]: _tags ast.ml bindings.c codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter5 [LLVM]: _tags ast.ml bindings.c codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml
CVS commit: [LLVM] src/external/apache2/llvm/dist
Module Name:src Committed By: joerg Date: Sun May 30 02:58:42 UTC 2021 Removed Files: src/external/apache2/llvm/dist/clang [LLVM]: .arcconfig src/external/apache2/llvm/dist/clang/docs [LLVM]: AttributeReference.rst DiagnosticsReference.rst src/external/apache2/llvm/dist/clang/include/clang/Basic [LLVM]: BuiltinsLe64.def FixedPoint.h SanitizerBlacklist.h src/external/apache2/llvm/dist/clang/include/clang/Driver [LLVM]: CC1Options.td CLCompatOptions.td src/external/apache2/llvm/dist/clang/include/clang/Serialization [LLVM]: Module.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Core [LLVM]: IssueHash.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Core/PathSensitive [LLVM]: SubEngine.h src/external/apache2/llvm/dist/clang/include/clang/StaticAnalyzer/Frontend [LLVM]: CheckerRegistration.h src/external/apache2/llvm/dist/clang/include/clang/Tooling/Core [LLVM]: Lookup.h src/external/apache2/llvm/dist/clang/lib/AST/Interp [LLVM]: Block.cpp Block.h src/external/apache2/llvm/dist/clang/lib/Basic [LLVM]: FixedPoint.cpp SanitizerBlacklist.cpp src/external/apache2/llvm/dist/clang/lib/Frontend [LLVM]: FrontendTiming.cpp src/external/apache2/llvm/dist/clang/lib/Headers/openmp_wrappers [LLVM]: __clang_openmp_math.h __clang_openmp_math_declares.h src/external/apache2/llvm/dist/clang/lib/Index [LLVM]: SimpleFormatContext.h src/external/apache2/llvm/dist/clang/lib/Serialization [LLVM]: Module.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Checkers [LLVM]: IteratorChecker.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Core [LLVM]: IssueHash.cpp SubEngine.cpp src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Frontend [LLVM]: CheckerRegistration.cpp src/external/apache2/llvm/dist/clang/lib/Tooling/Core [LLVM]: Lookup.cpp src/external/apache2/llvm/dist/clang/tools/scan-view/share [LLVM]: FileRadar.scpt GetRadarVersion.scpt src/external/apache2/llvm/dist/clang/utils/TableGen [LLVM]: ClangASTEmitters.h src/external/apache2/llvm/dist/llvm [LLVM]: .arcconfig LLVMBuild.txt src/external/apache2/llvm/dist/llvm/bindings [LLVM]: LLVMBuild.txt src/external/apache2/llvm/dist/llvm/cmake/modules [LLVM]: CheckLinkerFlag.cmake src/external/apache2/llvm/dist/llvm/docs [LLVM]: LLVMBuild.rst LLVMBuild.txt src/external/apache2/llvm/dist/llvm/docs/AMDGPU [LLVM]: gfx9_mad_type_dev.rst src/external/apache2/llvm/dist/llvm/docs/CommandGuide [LLVM]: llvm-build.rst src/external/apache2/llvm/dist/llvm/docs/TableGen [LLVM]: Deficiencies.rst LangIntro.rst LangRef.rst src/external/apache2/llvm/dist/llvm/docs/tutorial [LLVM]: BuildingAJIT5.rst OCamlLangImpl1.rst OCamlLangImpl2.rst OCamlLangImpl3.rst OCamlLangImpl4.rst OCamlLangImpl5.rst OCamlLangImpl6.rst OCamlLangImpl7.rst OCamlLangImpl8.rst src/external/apache2/llvm/dist/llvm/examples [LLVM]: LLVMBuild.txt src/external/apache2/llvm/dist/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5 [LLVM]: CMakeLists.txt KaleidoscopeJIT.h RemoteJITUtils.h toy.cpp src/external/apache2/llvm/dist/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server [LLVM]: CMakeLists.txt server.cpp src/external/apache2/llvm/dist/llvm/examples/LLJITExamples [LLVM]: CMakeLists.txt ExampleModules.h src/external/apache2/llvm/dist/llvm/examples/LLJITExamples/LLJITWithJITLink [LLVM]: CMakeLists.txt LLJITWithJITLink.cpp src/external/apache2/llvm/dist/llvm/examples/LLJITExamples/LLJITWithObjectCache [LLVM]: CMakeLists.txt LLJITWithObjectCache.cpp src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter2 [LLVM]: _tags ast.ml lexer.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter3 [LLVM]: _tags ast.ml codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter4 [LLVM]: _tags ast.ml bindings.c codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml src/external/apache2/llvm/dist/llvm/examples/OCaml-Kaleidoscope/Chapter5 [LLVM]: _tags ast.ml bindings.c codegen.ml lexer.ml myocamlbuild.ml parser.ml token.ml toplevel.ml toy.ml
CVS commit: src/doc
Module Name:src Committed By: pgoyette Date: Sun May 30 02:37:42 UTC 2021 Modified Files: src/doc: TODO.modules Log Message: Note that compat_60 modules on i386 and amd64 once again include the microcode-update functionality. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/doc/TODO.modules Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: pgoyette Date: Sun May 30 02:37:42 UTC 2021 Modified Files: src/doc: TODO.modules Log Message: Note that compat_60 modules on i386 and amd64 once again include the microcode-update functionality. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/doc/TODO.modules 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.modules diff -u src/doc/TODO.modules:1.22 src/doc/TODO.modules:1.23 --- src/doc/TODO.modules:1.22 Sun Jul 5 02:04:25 2020 +++ src/doc/TODO.modules Sun May 30 02:37:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: TODO.modules,v 1.22 2020/07/05 02:04:25 pgoyette Exp $ */ +/* $NetBSD: TODO.modules,v 1.23 2021/05/30 02:37:42 pgoyette Exp $ */ Some notes on the limitations of our current (as of 7.99.35) module subsystem. This list was triggered by an Email exchange between @@ -239,3 +239,5 @@ christos and pgoyette. This is likely to be fixed by Chuck Silvers on 2020-07-04 which removed the differences between the xen and non-xen module ABIs. +As of 2021-05-28 the cpu-microcode functionality has once again +been enabled for i386 and amd64 compat_60 modules.
CVS commit: src/doc
Module Name:src Committed By: joerg Date: Sun May 30 02:29:24 UTC 2021 Modified Files: src/doc: TODO.clang Log Message: Drop a number of entries that no longer apply. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/doc/TODO.clang 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.clang diff -u src/doc/TODO.clang:1.24 src/doc/TODO.clang:1.25 --- src/doc/TODO.clang:1.24 Sat Feb 6 22:00:59 2021 +++ src/doc/TODO.clang Sun May 30 02:29:24 2021 @@ -1,4 +1,4 @@ -$NetBSD: TODO.clang,v 1.24 2021/02/06 22:00:59 joerg Exp $ +$NetBSD: TODO.clang,v 1.25 2021/05/30 02:29:24 joerg Exp $ Hacks for the clang integration --- @@ -14,21 +14,8 @@ src/external/gpl3/gcc/usr.bin/backend src/external/mit/xorg/lib/pixman uses -fno-integrated-as on ARM for the macro (ab)use. -src/external/libc++/lib -Avoid clang bug on earm with SSP/FORTIFY: -rt_libelftc_dem_gnu3.c:3567:3: warning: '__builtin___memset_chk' -will always overflow destination buffer [-Wbuiltin-memcpy-chk-size] - memset(, 0, FLOAT_EXTENED_BYTES); - src/external/mit/xorg/lib/gallium has atomic alignment issues and uses unknown pragma src/external/mpl/bind/ has atomic alignment issues - -src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h -hack around tls_model("initial_exec") on powerpc - -src/tests/libexec/ld.elf_so/Makefile.inc -use -msecure-plt on powerpc for ifuncs -
CVS commit: src/doc
Module Name:src Committed By: joerg Date: Sun May 30 02:29:24 UTC 2021 Modified Files: src/doc: TODO.clang Log Message: Drop a number of entries that no longer apply. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/doc/TODO.clang 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/include
Module Name:src Committed By: joerg Date: Sun May 30 02:28:59 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Don't use V8 atomic instruction for AA32 mode. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/lock.h diff -u src/sys/arch/arm/include/lock.h:1.38 src/sys/arch/arm/include/lock.h:1.39 --- src/sys/arch/arm/include/lock.h:1.38 Tue Apr 27 06:03:09 2021 +++ src/sys/arch/arm/include/lock.h Sun May 30 02:28:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.38 2021/04/27 06:03:09 skrll Exp $ */ +/* $NetBSD: lock.h,v 1.39 2021/05/30 02:28:59 joerg Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -204,7 +204,7 @@ static __inline void __unused __cpu_simple_unlock(__cpu_simple_lock_t *__alp) { -#if defined(_ARM_ARCH_8) +#if defined(_ARM_ARCH_8) && defined(__LP64__) if (sizeof(*__alp) == 1) { __asm __volatile("stlrb\t%w0, [%1]" :: "r"(__SIMPLELOCK_UNLOCKED), "r"(__alp) : "memory");
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: joerg Date: Sun May 30 02:28:59 UTC 2021 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Don't use V8 atomic instruction for AA32 mode. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/bootp/common
Module Name:src Committed By: joerg Date: Sun May 30 02:28:35 UTC 2021 Modified Files: src/usr.sbin/bootp/common: Makefile Log Message: address-of-packed-member warning is no longer a problem here. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/bootp/common/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/bootp/common
Module Name:src Committed By: joerg Date: Sun May 30 02:28:35 UTC 2021 Modified Files: src/usr.sbin/bootp/common: Makefile Log Message: address-of-packed-member warning is no longer a problem here. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/bootp/common/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/bootp/common/Makefile diff -u src/usr.sbin/bootp/common/Makefile:1.9 src/usr.sbin/bootp/common/Makefile:1.10 --- src/usr.sbin/bootp/common/Makefile:1.9 Sun Sep 6 07:20:31 2020 +++ src/usr.sbin/bootp/common/Makefile Sun May 30 02:28:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2020/09/06 07:20:31 mrg Exp $ +# $NetBSD: Makefile,v 1.10 2021/05/30 02:28:35 joerg Exp $ LIBISPRIVATE= yes @@ -7,7 +7,6 @@ SRCS= dovend.c dumptab.c getif.c hash.c report.c tzone.c CPPFLAGS+= -DETC_ETHERS -DSYSLOG -DDEBUG -CWARNFLAGS.clang+= -Wno-error=address-of-packed-member CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER} .include
CVS commit: src/tests/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Sun May 30 02:26:51 UTC 2021 Modified Files: src/tests/libexec/ld.elf_so: Makefile Makefile.inc Log Message: Drop explicit -msecure-plt, it's the default for both clang and gcc. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/libexec/ld.elf_so/Makefile cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/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/tests/libexec/ld.elf_so/Makefile diff -u src/tests/libexec/ld.elf_so/Makefile:1.11 src/tests/libexec/ld.elf_so/Makefile:1.12 --- src/tests/libexec/ld.elf_so/Makefile:1.11 Tue Sep 22 01:09:32 2020 +++ src/tests/libexec/ld.elf_so/Makefile Sun May 30 02:26:51 2021 @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2020/09/22 01:09:32 kamil Exp $ +# $NetBSD: Makefile,v 1.12 2021/05/30 02:26:51 joerg Exp $ # NOMAN= # defined -.include "Makefile.inc" .include .if ${MKPIC} != "no" Index: src/tests/libexec/ld.elf_so/Makefile.inc diff -u src/tests/libexec/ld.elf_so/Makefile.inc:1.2 src/tests/libexec/ld.elf_so/Makefile.inc:1.3 --- src/tests/libexec/ld.elf_so/Makefile.inc:1.2 Tue May 14 19:07:07 2019 +++ src/tests/libexec/ld.elf_so/Makefile.inc Sun May 30 02:26:51 2021 @@ -1,5 +1 @@ .include "../Makefile.inc" - -.if ${MACHINE_ARCH} == "powerpc" -CFLAGS += -msecure-plt -.endif
CVS commit: src/tests/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Sun May 30 02:26:51 UTC 2021 Modified Files: src/tests/libexec/ld.elf_so: Makefile Makefile.inc Log Message: Drop explicit -msecure-plt, it's the default for both clang and gcc. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/libexec/ld.elf_so/Makefile cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Sun May 30 02:26:08 UTC 2021 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: Don't use the return address hack with clang. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/libexec/ld.elf_so/rtld.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/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.207 src/libexec/ld.elf_so/rtld.c:1.208 --- src/libexec/ld.elf_so/rtld.c:1.207 Tue Sep 22 00:41:27 2020 +++ src/libexec/ld.elf_so/rtld.c Sun May 30 02:26:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $ */ +/* $NetBSD: rtld.c,v 1.208 2021/05/30 02:26:08 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.208 2021/05/30 02:26:08 joerg Exp $"); #endif /* not lint */ #include @@ -1118,7 +1118,7 @@ _rtld_objmain_sym(const char *name) return NULL; } -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) static __noinline void * hackish_return_address(void) { @@ -1284,7 +1284,7 @@ dlsym(void *handle, const char *name) dbg(("dlsym of %s in %p", name, handle)); -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) retaddr = hackish_return_address(); #else retaddr = __builtin_return_address(0); @@ -1309,7 +1309,7 @@ dlvsym(void *handle, const char *name, c ver_entry.flags = 0; ventry = _entry; } -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) retaddr = hackish_return_address(); #else retaddr = __builtin_return_address(0); @@ -1407,7 +1407,7 @@ dlinfo(void *handle, int req, void *v) _rtld_shared_enter(); if (handle == RTLD_SELF) { -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__clang__) retaddr = hackish_return_address(); #else retaddr = __builtin_return_address(0);
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Sun May 30 02:26:08 UTC 2021 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: Don't use the return address hack with clang. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gmon
Module Name:src Committed By: joerg Date: Sun May 30 02:24:05 UTC 2021 Modified Files: src/lib/libc/gmon: Makefile.inc Log Message: Don't warn about frame pointer use for clang either. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gmon/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gmon
Module Name:src Committed By: joerg Date: Sun May 30 02:24:05 UTC 2021 Modified Files: src/lib/libc/gmon: Makefile.inc Log Message: Don't warn about frame pointer use for clang either. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gmon/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/lib/libc/gmon/Makefile.inc diff -u src/lib/libc/gmon/Makefile.inc:1.14 src/lib/libc/gmon/Makefile.inc:1.15 --- src/lib/libc/gmon/Makefile.inc:1.14 Sun Jan 6 18:14:10 2019 +++ src/lib/libc/gmon/Makefile.inc Sun May 30 02:24:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2019/01/06 18:14:10 christos Exp $ +# $NetBSD: Makefile.inc,v 1.15 2021/05/30 02:24:05 joerg Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 # gmon sources @@ -23,6 +23,7 @@ COPTS.mcount.c+=${${ACTIVE_CXX} == "gcc" # The usage of __builtin_frame_address(1) should be OK. COPTS.mcount.c+=${${ACTIVE_CXX} == "gcc":? -Wno-error=frame-address :} .endif +COPTS.mcount.c+=${${ACTIVE_CC} == "clang":? -Wno-error=frame-address :} # mcount and gmon cannot be compiled with profiling
CVS commit: src/external/gpl3/gdb/lib/libgdb
Module Name:src Committed By: joerg Date: Sun May 30 02:23:25 UTC 2021 Modified Files: src/external/gpl3/gdb/lib/libgdb: Makefile Log Message: Always use C++17 string_view, the emulation is just broken. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/gpl3/gdb/lib/libgdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gdb/lib/libgdb
Module Name:src Committed By: joerg Date: Sun May 30 02:23:25 UTC 2021 Modified Files: src/external/gpl3/gdb/lib/libgdb: Makefile Log Message: Always use C++17 string_view, the emulation is just broken. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/external/gpl3/gdb/lib/libgdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/lib/libgdb/Makefile diff -u src/external/gpl3/gdb/lib/libgdb/Makefile:1.29 src/external/gpl3/gdb/lib/libgdb/Makefile:1.30 --- src/external/gpl3/gdb/lib/libgdb/Makefile:1.29 Sun Dec 6 04:08:53 2020 +++ src/external/gpl3/gdb/lib/libgdb/Makefile Sun May 30 02:23:25 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2020/12/06 04:08:53 christos Exp $ +# $NetBSD: Makefile,v 1.30 2021/05/30 02:23:25 joerg Exp $ NOCTF= HOSTPROG_CXX= 1 @@ -47,7 +47,7 @@ CWARNFLAGS.clang+= -Wno-switch CWARNFLAGS.clang+= -Wno-deprecated HOST_CC:= ${HOST_CXX} CC:= ${CXX} -CFLAGS:= ${CXXFLAGS} -std=gnu++11 -Wno-error=stack-protector +CFLAGS:= ${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector .PATH: ${DIST}/gdb ${DIST}/gdb/arch ${DIST}/gdb/mi ${DIST}/gdb/cli \ ${DIST}/gdb/tui ${DIST}/gdb/python ${DIST}/gdb/common ${DIST}/gdb/target \
CVS commit: src/external/mit/xorg/server/drivers/xf86-video-pnozz
Module Name:src Committed By: joerg Date: Sun May 30 02:22:19 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-pnozz: Makefile Log Message: Ignore pointer sign cast issues with clang. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/xorg/server/drivers/xf86-video-pnozz
Module Name:src Committed By: joerg Date: Sun May 30 02:22:19 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-pnozz: Makefile Log Message: Ignore pointer sign cast issues with clang. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile:1.2 src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile:1.3 --- src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile:1.2 Thu May 27 04:53:44 2021 +++ src/external/mit/xorg/server/drivers/xf86-video-pnozz/Makefile Sun May 30 02:22:19 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2021/05/27 04:53:44 jdc Exp $ +# $NetBSD: Makefile,v 1.3 2021/05/30 02:22:19 joerg Exp $ DRIVER= xf86-video-pnozz DRIVER_NAME= pnozz_drv @@ -14,3 +14,4 @@ MAN= pnozz.4 # XXX COPTS.pnozz_accel.c+= ${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :} COPTS.pnozz_accel.c+= ${${ACTIVE_CC} == "clang":? -Wno-error=incompatible-pointer-types-discards-qualifiers :} +COPTS.pnozz_cursor.c+= ${${ACTIVE_CC} == "clang":? -Wno-error=pointer-sign :}
CVS commit: src/external/mit/xorg/lib/libXaw
Module Name:src Committed By: joerg Date: Sun May 30 02:20:09 UTC 2021 Modified Files: src/external/mit/xorg/lib/libXaw: Makefile Makefile.common Log Message: Ignore pointer cast warnings for clang, too. Use -Wno-format more selectively. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/mit/xorg/lib/libXaw/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/libXaw/Makefile.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/libXaw/Makefile diff -u src/external/mit/xorg/lib/libXaw/Makefile:1.16 src/external/mit/xorg/lib/libXaw/Makefile:1.17 --- src/external/mit/xorg/lib/libXaw/Makefile:1.16 Mon Apr 26 21:53:53 2021 +++ src/external/mit/xorg/lib/libXaw/Makefile Sun May 30 02:20:09 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2021/04/26 21:53:53 mrg Exp $ +# $NetBSD: Makefile,v 1.17 2021/05/30 02:20:09 joerg Exp $ .include @@ -66,5 +66,3 @@ X11EXTRAMANTRANSFORMS+= \ .include .include - -CWARNFLAGS.clang+= -Wno-format Index: src/external/mit/xorg/lib/libXaw/Makefile.common diff -u src/external/mit/xorg/lib/libXaw/Makefile.common:1.2 src/external/mit/xorg/lib/libXaw/Makefile.common:1.3 --- src/external/mit/xorg/lib/libXaw/Makefile.common:1.2 Tue May 4 17:47:05 2021 +++ src/external/mit/xorg/lib/libXaw/Makefile.common Sun May 30 02:20:09 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.2 2021/05/04 17:47:05 rillig Exp $ +# $NetBSD: Makefile.common,v 1.3 2021/05/30 02:20:09 joerg Exp $ CPPFLAGS+= -DHAVE_WCHAR_H \ -DHAVE_WCTYPE_H \ @@ -17,5 +17,8 @@ LIBDPLIBS=\ Xext ${.CURDIR}/../libXext \ X11 ${.CURDIR}/../libX11/dynamic +COPTS.Converters.c+= ${${ACTIVE_CC} == "clang":? -Wno-format :} COPTS.Pixmap.c+= ${${ACTIVE_CC} == "gcc":? -Wno-discarded-qualifiers :} +COPTS.Pixmap.c+= ${${ACTIVE_CC} == "clang":? -Wno-incompatible-pointer-types-discards-qualifiers :} COPTS.TextAction.c+= ${${ACTIVE_CC} == "gcc":? -Wno-discarded-qualifiers :} +COPTS.TextAction.c+= ${${ACTIVE_CC} == "clang":? -Wno-incompatible-pointer-types-discards-qualifiers :}
CVS commit: src/external/mit/xorg/lib/libXaw
Module Name:src Committed By: joerg Date: Sun May 30 02:20:09 UTC 2021 Modified Files: src/external/mit/xorg/lib/libXaw: Makefile Makefile.common Log Message: Ignore pointer cast warnings for clang, too. Use -Wno-format more selectively. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/mit/xorg/lib/libXaw/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/libXaw/Makefile.common 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: joerg Date: Sun May 30 01:57:00 UTC 2021 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: ad.aarch64 ad.arm ad.mips ad.powerpc md.amd64 md.i386 mi src/etc/mtree: NetBSD.dist.base src/external/apache2/llvm: Makefile Makefile.inc link.mk src/external/apache2/llvm/autoconf: configure run-autoconf src/external/apache2/llvm/autoconf/autoconf: aclocal.m4 configure.ac src/external/apache2/llvm/autoconf/include/clang/Config: config.h.in src/external/apache2/llvm/autoconf/include/llvm/Config: config.h.in llvm-config.h.in src/external/apache2/llvm/bin: Makefile src/external/apache2/llvm/bin/bugpoint: Makefile src/external/apache2/llvm/bin/clang: Makefile src/external/apache2/llvm/bin/clang-rename: Makefile src/external/apache2/llvm/bin/clang-tblgen: Makefile src/external/apache2/llvm/bin/llc: Makefile src/external/apache2/llvm/bin/lli: Makefile src/external/apache2/llvm/bin/llvm-ar: Makefile src/external/apache2/llvm/bin/llvm-as: Makefile src/external/apache2/llvm/bin/llvm-cov: Makefile src/external/apache2/llvm/bin/llvm-cxxdump: Makefile src/external/apache2/llvm/bin/llvm-diff: Makefile src/external/apache2/llvm/bin/llvm-dis: Makefile src/external/apache2/llvm/bin/llvm-dwarfdump: Makefile src/external/apache2/llvm/bin/llvm-dwp: Makefile src/external/apache2/llvm/bin/llvm-extract: Makefile src/external/apache2/llvm/bin/llvm-link: Makefile src/external/apache2/llvm/bin/llvm-mc: Makefile src/external/apache2/llvm/bin/llvm-nm: Makefile src/external/apache2/llvm/bin/llvm-objcopy: Makefile src/external/apache2/llvm/bin/llvm-objdump: Makefile src/external/apache2/llvm/bin/llvm-profdata: Makefile src/external/apache2/llvm/bin/llvm-readobj: Makefile src/external/apache2/llvm/bin/llvm-size: Makefile src/external/apache2/llvm/bin/llvm-symbolizer: Makefile src/external/apache2/llvm/bin/llvm-xray: Makefile src/external/apache2/llvm/bin/opt: Makefile src/external/apache2/llvm/bin/sancov: Makefile src/external/apache2/llvm/bin/sanstats: Makefile src/external/apache2/llvm/bin/tblgen: Makefile src/external/apache2/llvm/config/clang/Config: config.h src/external/apache2/llvm/config/llvm/Config: config.h.in llvm-config.h.in src/external/apache2/llvm/include: Makefile src/external/apache2/llvm/lib: Makefile src/external/apache2/llvm/lib/libLLVMAArch64CodeGen: Makefile src/external/apache2/llvm/lib/libLLVMAMDGPUCodeGen: Makefile src/external/apache2/llvm/lib/libLLVMAMDGPUUtils: Makefile src/external/apache2/llvm/lib/libLLVMARMCodeGen: Makefile src/external/apache2/llvm/lib/libLLVMAnalysis: Makefile src/external/apache2/llvm/lib/libLLVMAsmPrinter: Makefile src/external/apache2/llvm/lib/libLLVMBinaryFormat: Makefile src/external/apache2/llvm/lib/libLLVMCodeGen: Makefile src/external/apache2/llvm/lib/libLLVMDebugInfoDWARF: Makefile src/external/apache2/llvm/lib/libLLVMDebugInfoGSYM: Makefile src/external/apache2/llvm/lib/libLLVMDebugInfoPDB: Makefile src/external/apache2/llvm/lib/libLLVMDebugInfoPDBDIA: Makefile src/external/apache2/llvm/lib/libLLVMDebugInfoPDBNative: Makefile src/external/apache2/llvm/lib/libLLVMDemangle: Makefile src/external/apache2/llvm/lib/libLLVMExecutionEngineJITLink: Makefile src/external/apache2/llvm/lib/libLLVMGlobalISel: Makefile src/external/apache2/llvm/lib/libLLVMIR: Makefile src/external/apache2/llvm/lib/libLLVMInstCombine: Makefile src/external/apache2/llvm/lib/libLLVMInstrumentation: Makefile src/external/apache2/llvm/lib/libLLVMMC: Makefile src/external/apache2/llvm/lib/libLLVMMCA: Makefile src/external/apache2/llvm/lib/libLLVMMCParser: Makefile src/external/apache2/llvm/lib/libLLVMObject: Makefile src/external/apache2/llvm/lib/libLLVMObjectYAML: Makefile src/external/apache2/llvm/lib/libLLVMOrc: Makefile src/external/apache2/llvm/lib/libLLVMPasses: Makefile src/external/apache2/llvm/lib/libLLVMPowerPCCodeGen: Makefile src/external/apache2/llvm/lib/libLLVMPowerPCMCTargetDesc: Makefile src/external/apache2/llvm/lib/libLLVMRemarks: Makefile src/external/apache2/llvm/lib/libLLVMScalarOpts: Makefile src/external/apache2/llvm/lib/libLLVMSupport: Makefile src/external/apache2/llvm/lib/libLLVMTableGen: Makefile src/external/apache2/llvm/lib/libLLVMTextAPI: Makefile src/external/apache2/llvm/lib/libLLVMTransformsUtils: Makefile src/external/apache2/llvm/lib/libLLVMVectorize: Makefile
CVS commit: xsrc/external/mit/MesaLib/dist/src
Module Name:xsrc Committed By: joerg Date: Sun May 30 01:53:31 UTC 2021 Modified Files: xsrc/external/mit/MesaLib/dist/src/amd/common: ac_llvm_helper.cpp xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm: lp_bld_format_srgb.c lp_bld_init.c lp_bld_misc.cpp Log Message: Support LLVM 13, mostly from upstream. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c cvs rdiff -u -r1.1.1.4 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/MesaLib/dist/src
Module Name:xsrc Committed By: joerg Date: Sun May 30 01:53:31 UTC 2021 Modified Files: xsrc/external/mit/MesaLib/dist/src/amd/common: ac_llvm_helper.cpp xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm: lp_bld_format_srgb.c lp_bld_init.c lp_bld_misc.cpp Log Message: Support LLVM 13, mostly from upstream. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c cvs rdiff -u -r1.1.1.4 -r1.2 \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c \ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp diff -u xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp:1.2 --- xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp:1.1.1.2 Tue Sep 24 16:31:46 2019 +++ xsrc/external/mit/MesaLib/dist/src/amd/common/ac_llvm_helper.cpp Sun May 30 01:53:30 2021 @@ -34,6 +34,7 @@ #include "ac_llvm_build.h" #include +#include #include #include #include @@ -129,9 +130,15 @@ struct ac_compiler_passes *ac_create_llv llvm::TargetMachine *TM = reinterpret_cast(tm); +#if HAVE_LLVM < 0x900 if (TM->addPassesToEmitFile(p->passmgr, p->ostream, nullptr, llvm::TargetMachine::CGFT_ObjectFile)) { +#else + if (TM->addPassesToEmitFile(p->passmgr, p->ostream, +nullptr, +llvm::CGFT_ObjectFile)) { +#endif fprintf(stderr, "amd: TargetMachine can't emit a file of this type!\n"); delete p; return NULL; @@ -214,6 +221,9 @@ LLVMValueRef ac_build_atomic_rmw(struct unsigned SSID = llvm::unwrap(ctx->context)->getOrInsertSyncScopeID(sync_scope); return llvm::wrap(llvm::unwrap(ctx->builder)->CreateAtomicRMW( binop, llvm::unwrap(ptr), llvm::unwrap(val), +#if LLVM_VERSION_MAJOR >= 13 + llvm::MaybeAlign(0), +#endif llvm::AtomicOrdering::SequentiallyConsistent, SSID)); } @@ -223,6 +233,9 @@ LLVMValueRef ac_build_atomic_cmp_xchg(st unsigned SSID = llvm::unwrap(ctx->context)->getOrInsertSyncScopeID(sync_scope); return llvm::wrap(llvm::unwrap(ctx->builder)->CreateAtomicCmpXchg( llvm::unwrap(ptr), llvm::unwrap(cmp), llvm::unwrap(val), +#if LLVM_VERSION_MAJOR >= 13 + llvm::MaybeAlign(0), +#endif llvm::AtomicOrdering::SequentiallyConsistent, llvm::AtomicOrdering::SequentiallyConsistent, SSID)); } Index: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c diff -u xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:1.2 --- xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c:1.1.1.2 Sun Mar 10 03:42:46 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c Sun May 30 01:53:30 2021 @@ -66,7 +66,7 @@ * @author Roland Scheidegger */ - +#include #include "util/u_debug.h" #include "lp_bld_type.h" Index: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c diff -u xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c:1.2 --- xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c:1.1.1.4 Tue Sep 24 16:54:21 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_init.c Sun May 30 01:53:30 2021 @@ -167,7 +167,9 @@ create_pass_manager(struct gallivm_state */ LLVMAddReassociatePass(gallivm->passmgr); LLVMAddPromoteMemoryToRegisterPass(gallivm->passmgr); +#if HAVE_LLVM < 0xd00 LLVMAddConstantPropagationPass(gallivm->passmgr); +#endif LLVMAddInstructionCombiningPass(gallivm->passmgr); LLVMAddGVNPass(gallivm->passmgr); } Index: xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp diff -u xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:1.2 --- xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:1.1.1.4 Tue Sep 24 16:54:24 2019 +++ xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp Sun May 30 01:53:30 2021 @@ -72,7 +72,7 @@ #include -#if HAVE_LLVM >= 0x0305 +#if HAVE_LLVM >= 0x0305 && HAVE_LLVM < 0xa00 #include #endif #include
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 01:41:45 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Track the PT pages allocated to a pmap in the pmap itself. To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.89 -r1.90 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 01:41:45 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Track the PT pages allocated to a pmap in the pmap itself. To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.89 -r1.90 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.283 src/sys/arch/alpha/alpha/pmap.c:1.284 --- src/sys/arch/alpha/alpha/pmap.c:1.283 Sun May 30 01:24:19 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sun May 30 01:41:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.283 2021/05/30 01:24:19 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.284 2021/05/30 01:41:45 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.283 2021/05/30 01:24:19 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.284 2021/05/30 01:41:45 thorpej Exp $"); #include #include @@ -1081,22 +1081,6 @@ pmap_tlb_shootdown_ipi(struct cpu_info * } #endif /* MULTIPROCESSOR */ -static void -pmap_tlb_physpage_free(paddr_t const ptpa, -struct pmap_tlb_context * const tlbctx) -{ - struct vm_page * const pg = PHYS_TO_VM_PAGE(ptpa); - - KASSERT(pg != NULL); - -#ifdef DEBUG - struct vm_page_md * const md = VM_PAGE_TO_MD(pg); - KDASSERT(md->pvh_refcnt == 0); -#endif - - LIST_INSERT_HEAD(>t_freeptq, pg, pageq.list); -} - static __inline void pmap_tlb_ptpage_drain(struct pmap_tlb_context * const tlbctx) { @@ -1116,8 +1100,9 @@ static void pmap_changebit(struct vm_pag /* * PT page management functions. */ -static int pmap_ptpage_alloc(pt_entry_t *, int); -static void pmap_ptpage_free(pt_entry_t *, struct pmap_tlb_context *); +static int pmap_ptpage_alloc(pmap_t, pt_entry_t *, int); +static void pmap_ptpage_free(pmap_t, pt_entry_t *, + struct pmap_tlb_context *); static void pmap_l3pt_delref(pmap_t, vaddr_t, pt_entry_t *, struct pmap_tlb_context *); static void pmap_l2pt_delref(pmap_t, pt_entry_t *, pt_entry_t *, @@ -1398,6 +1383,7 @@ pmap_bootstrap(paddr_t ptaddr, u_int max * generation. */ memset(pmap_kernel(), 0, sizeof(struct pmap)); + LIST_INIT(_kernel()->pm_ptpages); atomic_store_relaxed(_kernel()->pm_count, 1); /* Kernel pmap does not have per-CPU info. */ TAILQ_INSERT_TAIL(_all_pmaps, pmap_kernel(), pm_list); @@ -1581,6 +1567,7 @@ pmap_create(void) pmap = pool_cache_get(_pmap_cache, PR_WAITOK); memset(pmap, 0, sizeof(*pmap)); + LIST_INIT(>pm_ptpages); atomic_store_relaxed(>pm_count, 1); @@ -2105,7 +2092,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd l1pte = pmap_l1pte(lev1map, va); if (pmap_pte_v(l1pte) == 0) { pmap_physpage_addref(l1pte); - error = pmap_ptpage_alloc(l1pte, PGU_L2PT); + error = pmap_ptpage_alloc(pmap, l1pte, PGU_L2PT); if (error) { pmap_l1pt_delref(pmap, l1pte); if (flags & PMAP_CANFAIL) @@ -2129,7 +2116,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd l2pte = pmap_l2pte(lev1map, va, l1pte); if (pmap_pte_v(l2pte) == 0) { pmap_physpage_addref(l2pte); - error = pmap_ptpage_alloc(l2pte, PGU_L3PT); + error = pmap_ptpage_alloc(pmap, l2pte, PGU_L3PT); if (error) { /* unlocks pmap */ pmap_enter_l2pt_delref(pmap, l1pte, l2pte); @@ -3652,7 +3639,7 @@ pmap_l1pt_free(struct pool *pp, void *v) * Note: the pmap must already be locked. */ static int -pmap_ptpage_alloc(pt_entry_t * const pte, int const usage) +pmap_ptpage_alloc(pmap_t pmap, pt_entry_t * const pte, int const usage) { /* * Allocate the page table page. @@ -3662,6 +3649,8 @@ pmap_ptpage_alloc(pt_entry_t * const pte return ENOMEM; } + LIST_INSERT_HEAD(>pm_ptpages, pg, pageq.list); + /* * Initialize the referencing PTE. */ @@ -3682,7 +3671,8 @@ pmap_ptpage_alloc(pt_entry_t * const pte * Note: the pmap must already be locked. */ static void -pmap_ptpage_free(pt_entry_t * const pte, struct pmap_tlb_context * const tlbctx) +pmap_ptpage_free(pmap_t pmap, pt_entry_t * const pte, +struct pmap_tlb_context * const tlbctx) { /* @@ -3692,10 +3682,18 @@ pmap_ptpage_free(pt_entry_t * const pte, const paddr_t ptpa = pmap_pte_pa(pte); atomic_store_relaxed(pte, PG_NV); + struct vm_page * const pg = PHYS_TO_VM_PAGE(ptpa); + KASSERT(pg != NULL); + #ifdef DEBUG + struct vm_page_md * const md = VM_PAGE_TO_MD(pg); + KDASSERT(md->pvh_refcnt == 0); + pmap_zero_page(ptpa); #endif - pmap_tlb_physpage_free(ptpa, tlbctx); + + LIST_REMOVE(pg, pageq.list); + LIST_INSERT_HEAD(>t_freeptq, pg, pageq.list); } /* @@ -3735,7 +3733,7 @@ pmap_l3pt_delref(pmap_t pmap, vaddr_t va * be dropped. */ KASSERT(tlbctx != NULL); -
CVS import: src/external/apache2/llvm/dist/libcxx
Module Name:src Committed By: joerg Date: Sun May 30 01:29:21 UTC 2021 Update of /cvsroot/src/external/apache2/llvm/dist/libcxx In directory ivanova.netbsd.org:/tmp/cvs-serv10236 Log Message: Import libc++ 249b40b558955afe5ac2b549edcf2d7f859c8cc9 Status: Vendor Tag: LLVM Release Tags: LLVM-249b40b558955afe5ac2b549edcf2d7f859c8cc9 N src/external/apache2/llvm/dist/libcxx/CREDITS.TXT N src/external/apache2/llvm/dist/libcxx/.clang-format N src/external/apache2/llvm/dist/libcxx/LICENSE.TXT N src/external/apache2/llvm/dist/libcxx/.gitignore N src/external/apache2/llvm/dist/libcxx/TODO.TXT N src/external/apache2/llvm/dist/libcxx/appveyor-reqs-install.cmd N src/external/apache2/llvm/dist/libcxx/CMakeLists.txt N src/external/apache2/llvm/dist/libcxx/appveyor.yml N src/external/apache2/llvm/dist/libcxx/src/typeinfo.cpp N src/external/apache2/llvm/dist/libcxx/src/format.cpp N src/external/apache2/llvm/dist/libcxx/src/atomic.cpp N src/external/apache2/llvm/dist/libcxx/src/random_shuffle.cpp N src/external/apache2/llvm/dist/libcxx/src/vector.cpp N src/external/apache2/llvm/dist/libcxx/src/thread.cpp N src/external/apache2/llvm/dist/libcxx/src/mutex.cpp N src/external/apache2/llvm/dist/libcxx/src/regex.cpp N src/external/apache2/llvm/dist/libcxx/src/condition_variable.cpp N src/external/apache2/llvm/dist/libcxx/src/shared_mutex.cpp N src/external/apache2/llvm/dist/libcxx/src/string.cpp N src/external/apache2/llvm/dist/libcxx/src/ios.cpp N src/external/apache2/llvm/dist/libcxx/src/chrono.cpp N src/external/apache2/llvm/dist/libcxx/src/exception.cpp N src/external/apache2/llvm/dist/libcxx/src/algorithm.cpp N src/external/apache2/llvm/dist/libcxx/src/bind.cpp N src/external/apache2/llvm/dist/libcxx/src/valarray.cpp N src/external/apache2/llvm/dist/libcxx/src/any.cpp N src/external/apache2/llvm/dist/libcxx/src/iostream.cpp N src/external/apache2/llvm/dist/libcxx/src/optional.cpp N src/external/apache2/llvm/dist/libcxx/src/CMakeLists.txt N src/external/apache2/llvm/dist/libcxx/src/strstream.cpp N src/external/apache2/llvm/dist/libcxx/src/utility.cpp N src/external/apache2/llvm/dist/libcxx/src/functional.cpp N src/external/apache2/llvm/dist/libcxx/src/stdexcept.cpp N src/external/apache2/llvm/dist/libcxx/src/system_error.cpp N src/external/apache2/llvm/dist/libcxx/src/hash.cpp N src/external/apache2/llvm/dist/libcxx/src/condition_variable_destructor.cpp N src/external/apache2/llvm/dist/libcxx/src/debug.cpp N src/external/apache2/llvm/dist/libcxx/src/new.cpp N src/external/apache2/llvm/dist/libcxx/src/memory.cpp N src/external/apache2/llvm/dist/libcxx/src/mutex_destructor.cpp N src/external/apache2/llvm/dist/libcxx/src/charconv.cpp N src/external/apache2/llvm/dist/libcxx/src/future.cpp N src/external/apache2/llvm/dist/libcxx/src/locale.cpp N src/external/apache2/llvm/dist/libcxx/src/variant.cpp N src/external/apache2/llvm/dist/libcxx/src/random.cpp N src/external/apache2/llvm/dist/libcxx/src/ios.instantiations.cpp N src/external/apache2/llvm/dist/libcxx/src/barrier.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/operations.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/filesystem_common.h N src/external/apache2/llvm/dist/libcxx/src/filesystem/posix_compat.h N src/external/apache2/llvm/dist/libcxx/src/filesystem/directory_iterator.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/int128_builtins.cpp N src/external/apache2/llvm/dist/libcxx/src/include/atomic_support.h N src/external/apache2/llvm/dist/libcxx/src/include/refstring.h N src/external/apache2/llvm/dist/libcxx/src/include/apple_availability.h N src/external/apache2/llvm/dist/libcxx/src/include/config_elast.h N src/external/apache2/llvm/dist/libcxx/src/include/sso_allocator.h N src/external/apache2/llvm/dist/libcxx/src/experimental/memory_resource.cpp N src/external/apache2/llvm/dist/libcxx/src/support/ibm/xlocale_zos.cpp N src/external/apache2/llvm/dist/libcxx/src/support/solaris/mbsnrtowcs.inc N src/external/apache2/llvm/dist/libcxx/src/support/solaris/xlocale.cpp N src/external/apache2/llvm/dist/libcxx/src/support/solaris/wcsnrtombs.inc N src/external/apache2/llvm/dist/libcxx/src/support/solaris/README N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/stdexcept_default.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_fallback.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_glibcxx.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_msvc.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/new_handler_fallback.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_libcxxabi.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_libcxxrt.ipp N
CVS import: src/external/apache2/llvm/dist/libcxx
Module Name:src Committed By: joerg Date: Sun May 30 01:29:21 UTC 2021 Update of /cvsroot/src/external/apache2/llvm/dist/libcxx In directory ivanova.netbsd.org:/tmp/cvs-serv10236 Log Message: Import libc++ 249b40b558955afe5ac2b549edcf2d7f859c8cc9 Status: Vendor Tag: LLVM Release Tags: LLVM-249b40b558955afe5ac2b549edcf2d7f859c8cc9 N src/external/apache2/llvm/dist/libcxx/CREDITS.TXT N src/external/apache2/llvm/dist/libcxx/.clang-format N src/external/apache2/llvm/dist/libcxx/LICENSE.TXT N src/external/apache2/llvm/dist/libcxx/.gitignore N src/external/apache2/llvm/dist/libcxx/TODO.TXT N src/external/apache2/llvm/dist/libcxx/appveyor-reqs-install.cmd N src/external/apache2/llvm/dist/libcxx/CMakeLists.txt N src/external/apache2/llvm/dist/libcxx/appveyor.yml N src/external/apache2/llvm/dist/libcxx/src/typeinfo.cpp N src/external/apache2/llvm/dist/libcxx/src/format.cpp N src/external/apache2/llvm/dist/libcxx/src/atomic.cpp N src/external/apache2/llvm/dist/libcxx/src/random_shuffle.cpp N src/external/apache2/llvm/dist/libcxx/src/vector.cpp N src/external/apache2/llvm/dist/libcxx/src/thread.cpp N src/external/apache2/llvm/dist/libcxx/src/mutex.cpp N src/external/apache2/llvm/dist/libcxx/src/regex.cpp N src/external/apache2/llvm/dist/libcxx/src/condition_variable.cpp N src/external/apache2/llvm/dist/libcxx/src/shared_mutex.cpp N src/external/apache2/llvm/dist/libcxx/src/string.cpp N src/external/apache2/llvm/dist/libcxx/src/ios.cpp N src/external/apache2/llvm/dist/libcxx/src/chrono.cpp N src/external/apache2/llvm/dist/libcxx/src/exception.cpp N src/external/apache2/llvm/dist/libcxx/src/algorithm.cpp N src/external/apache2/llvm/dist/libcxx/src/bind.cpp N src/external/apache2/llvm/dist/libcxx/src/valarray.cpp N src/external/apache2/llvm/dist/libcxx/src/any.cpp N src/external/apache2/llvm/dist/libcxx/src/iostream.cpp N src/external/apache2/llvm/dist/libcxx/src/optional.cpp N src/external/apache2/llvm/dist/libcxx/src/CMakeLists.txt N src/external/apache2/llvm/dist/libcxx/src/strstream.cpp N src/external/apache2/llvm/dist/libcxx/src/utility.cpp N src/external/apache2/llvm/dist/libcxx/src/functional.cpp N src/external/apache2/llvm/dist/libcxx/src/stdexcept.cpp N src/external/apache2/llvm/dist/libcxx/src/system_error.cpp N src/external/apache2/llvm/dist/libcxx/src/hash.cpp N src/external/apache2/llvm/dist/libcxx/src/condition_variable_destructor.cpp N src/external/apache2/llvm/dist/libcxx/src/debug.cpp N src/external/apache2/llvm/dist/libcxx/src/new.cpp N src/external/apache2/llvm/dist/libcxx/src/memory.cpp N src/external/apache2/llvm/dist/libcxx/src/mutex_destructor.cpp N src/external/apache2/llvm/dist/libcxx/src/charconv.cpp N src/external/apache2/llvm/dist/libcxx/src/future.cpp N src/external/apache2/llvm/dist/libcxx/src/locale.cpp N src/external/apache2/llvm/dist/libcxx/src/variant.cpp N src/external/apache2/llvm/dist/libcxx/src/random.cpp N src/external/apache2/llvm/dist/libcxx/src/ios.instantiations.cpp N src/external/apache2/llvm/dist/libcxx/src/barrier.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/operations.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/filesystem_common.h N src/external/apache2/llvm/dist/libcxx/src/filesystem/posix_compat.h N src/external/apache2/llvm/dist/libcxx/src/filesystem/directory_iterator.cpp N src/external/apache2/llvm/dist/libcxx/src/filesystem/int128_builtins.cpp N src/external/apache2/llvm/dist/libcxx/src/include/atomic_support.h N src/external/apache2/llvm/dist/libcxx/src/include/refstring.h N src/external/apache2/llvm/dist/libcxx/src/include/apple_availability.h N src/external/apache2/llvm/dist/libcxx/src/include/config_elast.h N src/external/apache2/llvm/dist/libcxx/src/include/sso_allocator.h N src/external/apache2/llvm/dist/libcxx/src/experimental/memory_resource.cpp N src/external/apache2/llvm/dist/libcxx/src/support/ibm/xlocale_zos.cpp N src/external/apache2/llvm/dist/libcxx/src/support/solaris/mbsnrtowcs.inc N src/external/apache2/llvm/dist/libcxx/src/support/solaris/xlocale.cpp N src/external/apache2/llvm/dist/libcxx/src/support/solaris/wcsnrtombs.inc N src/external/apache2/llvm/dist/libcxx/src/support/solaris/README N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/stdexcept_default.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_fallback.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_glibcxx.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_pointer_msvc.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/new_handler_fallback.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_libcxxabi.ipp N src/external/apache2/llvm/dist/libcxx/src/support/runtime/exception_libcxxrt.ipp N
CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 01:24:19 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c Log Message: Change pmap_physpage_alloc() to return the vm_page * so that the callers have access to it. To generate a diff of this commit: cvs rdiff -u -r1.282 -r1.283 src/sys/arch/alpha/alpha/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 01:24:19 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c Log Message: Change pmap_physpage_alloc() to return the vm_page * so that the callers have access to it. To generate a diff of this commit: cvs rdiff -u -r1.282 -r1.283 src/sys/arch/alpha/alpha/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.282 src/sys/arch/alpha/alpha/pmap.c:1.283 --- src/sys/arch/alpha/alpha/pmap.c:1.282 Sun May 30 00:34:27 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sun May 30 01:24:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.282 2021/05/30 00:34:27 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.283 2021/05/30 01:24:19 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.282 2021/05/30 00:34:27 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.283 2021/05/30 01:24:19 thorpej Exp $"); #include #include @@ -1162,7 +1162,7 @@ static u_int pmap_asn_alloc(pmap_t, stru /* * Misc. functions. */ -static bool pmap_physpage_alloc(int, paddr_t *); +static struct vm_page *pmap_physpage_alloc(int); static void pmap_physpage_free(paddr_t); static int pmap_physpage_addref(void *); static int pmap_physpage_delref(void *); @@ -3349,11 +3349,11 @@ pmap_pv_remove(pmap_t pmap, struct vm_pa static void * pmap_pv_page_alloc(struct pool *pp, int flags) { - paddr_t pg; - - if (pmap_physpage_alloc(PGU_PVENT, )) - return ((void *)ALPHA_PHYS_TO_K0SEG(pg)); - return (NULL); + struct vm_page * const pg = pmap_physpage_alloc(PGU_PVENT); + if (__predict_false(pg == NULL)) { + return NULL; + } + return (void *)ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(pg)); } /* @@ -3376,11 +3376,10 @@ pmap_pv_page_free(struct pool *pp, void * Allocate a single page from the VM system and return the * physical address for that page. */ -static bool -pmap_physpage_alloc(int usage, paddr_t *pap) +static struct vm_page * +pmap_physpage_alloc(int usage) { struct vm_page *pg; - paddr_t pa; /* * Don't ask for a zero'd page in the L1PT case -- we will @@ -3390,7 +3389,6 @@ pmap_physpage_alloc(int usage, paddr_t * pg = uvm_pagealloc(NULL, 0, NULL, usage == PGU_L1PT ? UVM_PGA_USERESERVE : UVM_PGA_USERESERVE|UVM_PGA_ZERO); if (pg != NULL) { - pa = VM_PAGE_TO_PHYS(pg); #ifdef DEBUG struct vm_page_md * const md = VM_PAGE_TO_MD(pg); if (md->pvh_refcnt != 0) { @@ -3399,10 +3397,8 @@ pmap_physpage_alloc(int usage, paddr_t * panic("pmap_physpage_alloc"); } #endif - *pap = pa; - return (true); } - return (false); + return pg; } /* @@ -3485,7 +3481,12 @@ pmap_kptpage_alloc(paddr_t *pap) return true; } - return pmap_physpage_alloc(PGU_NORMAL, pap); + struct vm_page * const pg = pmap_physpage_alloc(PGU_NORMAL); + if (__predict_true(pg != NULL)) { + *pap = VM_PAGE_TO_PHYS(pg); + return true; + } + return false; } /* @@ -3620,15 +3621,14 @@ pmap_l1pt_ctor(void *arg, void *object, static void * pmap_l1pt_alloc(struct pool *pp, int flags) { - paddr_t ptpa; - /* * Attempt to allocate a free page. */ - if (pmap_physpage_alloc(PGU_L1PT, ) == false) - return (NULL); - - return ((void *) ALPHA_PHYS_TO_K0SEG(ptpa)); + struct vm_page * const pg = pmap_physpage_alloc(PGU_L1PT); + if (__predict_false(pg == NULL)) { + return NULL; + } + return (void *)ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(pg)); } /* @@ -3654,18 +3654,18 @@ pmap_l1pt_free(struct pool *pp, void *v) static int pmap_ptpage_alloc(pt_entry_t * const pte, int const usage) { - paddr_t ptpa; - /* * Allocate the page table page. */ - if (pmap_physpage_alloc(usage, ) == false) - return (ENOMEM); + struct vm_page * const pg = pmap_physpage_alloc(usage); + if (__predict_false(pg == NULL)) { + return ENOMEM; + } /* * Initialize the referencing PTE. */ - const pt_entry_t npte = ((ptpa >> PGSHIFT) << PG_SHIFT) | + const pt_entry_t npte = ((VM_PAGE_TO_PHYS(pg) >> PGSHIFT) << PG_SHIFT) | PG_V | PG_KRE | PG_KWE | PG_WIRED; atomic_store_relaxed(pte, npte);
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 00:34:27 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Define a pmap_pagelist LIST_HEAD and use it where we used ad hoc LIST_HEADs of vm_page structures. Define and use a generic routine to free such a list back to UVM. In pmap_remove_internal(), KASSERT that no PT pages are queued up to be freed when removing mappings from the kernel pmap. To generate a diff of this commit: cvs rdiff -u -r1.281 -r1.282 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.88 -r1.89 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sun May 30 00:34:27 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Define a pmap_pagelist LIST_HEAD and use it where we used ad hoc LIST_HEADs of vm_page structures. Define and use a generic routine to free such a list back to UVM. In pmap_remove_internal(), KASSERT that no PT pages are queued up to be freed when removing mappings from the kernel pmap. To generate a diff of this commit: cvs rdiff -u -r1.281 -r1.282 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.88 -r1.89 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.281 src/sys/arch/alpha/alpha/pmap.c:1.282 --- src/sys/arch/alpha/alpha/pmap.c:1.281 Sat May 29 23:27:22 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sun May 30 00:34:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.281 2021/05/29 23:27:22 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.282 2021/05/30 00:34:27 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.281 2021/05/29 23:27:22 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.282 2021/05/30 00:34:27 thorpej Exp $"); #include #include @@ -432,6 +432,21 @@ pmap_activation_lock(pmap_t const pmap) #endif /* MULTIPROCESSOR */ /* + * Generic routine for freeing pages on a pmap_pagelist back to + * the system. + */ +static void +pmap_pagelist_free(struct pmap_pagelist * const list) +{ + struct vm_page *pg; + + while ((pg = LIST_FIRST(list)) != NULL) { + LIST_REMOVE(pg, pageq.list); + uvm_pagefree(pg); + } +} + +/* * TLB management. * * TLB invalidations need to be performed on local and remote CPUs @@ -526,7 +541,7 @@ pmap_activation_lock(pmap_t const pmap) struct pmap_tlb_context { uintptr_t t_addrdata[TLB_CTX_MAXVA]; pmap_t t_pmap; - LIST_HEAD(, vm_page) t_freeptq; + struct pmap_pagelist t_freeptq; }; static struct { @@ -1082,15 +1097,10 @@ pmap_tlb_physpage_free(paddr_t const ptp LIST_INSERT_HEAD(>t_freeptq, pg, pageq.list); } -static void +static __inline void pmap_tlb_ptpage_drain(struct pmap_tlb_context * const tlbctx) { - struct vm_page *pg; - - while ((pg = LIST_FIRST(>t_freeptq)) != NULL) { - LIST_REMOVE(pg, pageq.list); - uvm_pagefree(pg); - } + pmap_pagelist_free(>t_freeptq); } /* @@ -1720,7 +1730,8 @@ pmap_remove_internal(pmap_t pmap, vaddr_ PMAP_MAP_TO_HEAD_UNLOCK(); PMAP_UNLOCK(pmap); pmap_tlb_shootnow(tlbctx); - pmap_tlb_ptpage_drain(tlbctx); + /* kernel PT pages are never freed. */ + KASSERT(LIST_EMPTY(>t_freeptq)); TLB_COUNT(reason_remove_kernel); return; Index: src/sys/arch/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.88 src/sys/arch/alpha/include/pmap.h:1.89 --- src/sys/arch/alpha/include/pmap.h:1.88 Sat May 29 23:27:22 2021 +++ src/sys/arch/alpha/include/pmap.h Sun May 30 00:34:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.88 2021/05/29 23:27:22 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.89 2021/05/30 00:34:27 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -131,6 +131,9 @@ * allocate any ASN info for the kernel pmap at all. * arrays which hold enough for ALPHA_MAXPROCS. */ + +LIST_HEAD(pmap_pagelist, vm_page); + struct pmap_percpu { unsigned int pmc_asn; /* address space number */ unsigned int pmc_pad0;
CVS commit: src/external/bsd/libevent/dist/test
Module Name:src Committed By: joerg Date: Sun May 30 00:19:09 UTC 2021 Modified Files: src/external/bsd/libevent/dist/test: regress_ssl.c Log Message: Cast to enums via uintptr_t to avoid compiler warnings. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/test/regress_ssl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/libevent/dist/test
Module Name:src Committed By: joerg Date: Sun May 30 00:19:09 UTC 2021 Modified Files: src/external/bsd/libevent/dist/test: regress_ssl.c Log Message: Cast to enums via uintptr_t to avoid compiler warnings. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/test/regress_ssl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libevent/dist/test/regress_ssl.c diff -u src/external/bsd/libevent/dist/test/regress_ssl.c:1.5 src/external/bsd/libevent/dist/test/regress_ssl.c:1.6 --- src/external/bsd/libevent/dist/test/regress_ssl.c:1.5 Wed Apr 7 03:36:48 2021 +++ src/external/bsd/libevent/dist/test/regress_ssl.c Sun May 30 00:19:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: regress_ssl.c,v 1.5 2021/04/07 03:36:48 christos Exp $ */ +/* $NetBSD: regress_ssl.c,v 1.6 2021/05/30 00:19:08 joerg Exp $ */ /* * Copyright (c) 2009-2012 Niels Provos and Nick Mathewson @@ -891,7 +891,7 @@ regress_bufferevent_openssl_wm(void *arg struct sockaddr_in sin; struct sockaddr_storage ss; enum regress_openssl_type type = - (enum regress_openssl_type)data->setup_data; + (enum regress_openssl_type)(uintptr_t)data->setup_data; int bev_flags = BEV_OPT_CLOSE_ON_FREE; ev_socklen_t slen; SSL *ssl;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: joerg Date: Sun May 30 00:17:20 UTC 2021 Modified Files: src/sys/dev/pci: if_cas.c Log Message: Unindent code to match the logical structure, ignoring the commented out if. This code should be rewritten to use BUS_DMA_WAITOK, but that's a project of its own. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_cas.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: joerg Date: Sun May 30 00:17:20 UTC 2021 Modified Files: src/sys/dev/pci: if_cas.c Log Message: Unindent code to match the logical structure, ignoring the commented out if. This code should be rewritten to use BUS_DMA_WAITOK, but that's a project of its own. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_cas.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_cas.c diff -u src/sys/dev/pci/if_cas.c:1.45 src/sys/dev/pci/if_cas.c:1.46 --- src/sys/dev/pci/if_cas.c:1.45 Sat May 8 00:27:02 2021 +++ src/sys/dev/pci/if_cas.c Sun May 30 00:17:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cas.c,v 1.45 2021/05/08 00:27:02 thorpej Exp $ */ +/* $NetBSD: if_cas.c,v 1.46 2021/05/30 00:17:20 joerg Exp $ */ /* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */ /* @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.45 2021/05/08 00:27:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.46 2021/05/30 00:17:20 joerg Exp $"); #ifndef _MODULE #include "opt_inet.h" @@ -783,8 +783,8 @@ cas_detach(device_t self, int flags) /* XXX need to check that bus_dmamem_alloc suceeded if (sc->sc_rxsoft[i].rxs_dmaseg != NULL) */ -bus_dmamem_free(sc->sc_dmatag, -&(sc->sc_rxsoft[i].rxs_dmaseg), 1); + bus_dmamem_free(sc->sc_dmatag, + &(sc->sc_rxsoft[i].rxs_dmaseg), 1); } bus_dmamap_unload(sc->sc_dmatag, sc->sc_cddmamap); /*FALLTHROUGH*/
CVS commit: src/external/bsd/libc++/dist/libcxxrt/src
Module Name:src Committed By: joerg Date: Sun May 30 00:12:31 UTC 2021 Modified Files: src/external/bsd/libc++/dist/libcxxrt/src: exception.cc libelftc_dem_gnu3.c unwind-itanium.h Log Message: Merge 47661d00cd4d6cd728ae31b0bb29a49a6c06272a To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libc++/dist/libcxxrt/src/exception.cc \ src/external/bsd/libc++/dist/libcxxrt/src/libelftc_dem_gnu3.c \ src/external/bsd/libc++/dist/libcxxrt/src/unwind-itanium.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/libc++/dist/libcxxrt/src
Module Name:src Committed By: joerg Date: Sun May 30 00:12:31 UTC 2021 Modified Files: src/external/bsd/libc++/dist/libcxxrt/src: exception.cc libelftc_dem_gnu3.c unwind-itanium.h Log Message: Merge 47661d00cd4d6cd728ae31b0bb29a49a6c06272a To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/libc++/dist/libcxxrt/src/exception.cc \ src/external/bsd/libc++/dist/libcxxrt/src/libelftc_dem_gnu3.c \ src/external/bsd/libc++/dist/libcxxrt/src/unwind-itanium.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libc++/dist/libcxxrt/src/exception.cc diff -u src/external/bsd/libc++/dist/libcxxrt/src/exception.cc:1.2 src/external/bsd/libc++/dist/libcxxrt/src/exception.cc:1.3 --- src/external/bsd/libc++/dist/libcxxrt/src/exception.cc:1.2 Fri Jun 26 00:50:39 2015 +++ src/external/bsd/libc++/dist/libcxxrt/src/exception.cc Sun May 30 00:12:31 2021 @@ -304,13 +304,17 @@ static pthread_key_t eh_key; static void exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_exception(static_cast(ex)); + // Exception layout: + // [__cxa_exception [_Unwind_Exception]] [exception object] + // + // __cxa_free_exception expects a pointer to the exception object + __cxa_free_exception(static_cast(ex + 1)); } static void dependent_exception_cleanup(_Unwind_Reason_Code reason, struct _Unwind_Exception *ex) { - __cxa_free_dependent_exception(static_cast(ex)); + __cxa_free_dependent_exception(static_cast(ex + 1)); } /** @@ -340,7 +344,8 @@ static void thread_cleanup(void* thread_ if (info->foreign_exception_state != __cxa_thread_info::none) { _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(info->globals.caughtExceptions); - e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); + if (e->exception_cleanup) +e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } else { @@ -516,7 +521,7 @@ static void emergency_malloc_free(char * break; } } - assert(buffer > 0 && + assert(buffer >= 0 && "Trying to free something that is not an emergency buffer!"); // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will @@ -556,7 +561,7 @@ static void free_exception(char *e) { // If this allocation is within the address range of the emergency buffer, // don't call free() because it was not allocated with malloc() - if ((e > emergency_buffer) && + if ((e >= emergency_buffer) && (e < (emergency_buffer + sizeof(emergency_buffer { emergency_malloc_free(e); @@ -854,6 +859,13 @@ extern "C" void __cxa_rethrow() assert(ex->handlerCount > 0 && "Rethrowing uncaught exception!"); + // `globals->uncaughtExceptions` was decremented by `__cxa_begin_catch`. + // It's normally incremented by `throw_exception`, but this path invokes + // `_Unwind_Resume_or_Rethrow` directly to rethrow the exception. + // This path is only reachable if we're rethrowing a C++ exception - + // foreign exceptions don't adjust any of this state. + globals->uncaughtExceptions++; + // ex->handlerCount will be decremented in __cxa_end_catch in enclosing // catch block @@ -1199,11 +1211,13 @@ extern "C" void *__cxa_begin_catch(void // we see is a foreign exception then we won't have called it yet. __cxa_thread_info *ti = thread_info(); __cxa_eh_globals *globals = >globals; - globals->uncaughtExceptions--; _Unwind_Exception *exceptionObject = static_cast<_Unwind_Exception*>(e); if (isCXXException(exceptionObject->exception_class)) { + // Only exceptions thrown with a C++ exception throwing function will + // increment this, so don't decrement it here. + globals->uncaughtExceptions--; __cxa_exception *ex = exceptionFromPointer(exceptionObject); if (ex->handlerCount == 0) @@ -1280,12 +1294,13 @@ extern "C" void __cxa_end_catch() if (ti->foreign_exception_state != __cxa_thread_info::none) { - globals->caughtExceptions = 0; if (ti->foreign_exception_state != __cxa_thread_info::rethrown) { _Unwind_Exception *e = reinterpret_cast<_Unwind_Exception*>(ti->globals.caughtExceptions); - e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); + if (e->exception_cleanup) +e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); } + globals->caughtExceptions = 0; ti->foreign_exception_state = __cxa_thread_info::none; return; } @@ -1339,6 +1354,14 @@ extern "C" std::type_info *__cxa_current } /** + * Cleanup, ensures that `__cxa_end_catch` is called to balance an explicit + * `__cxa_begin_catch` call. + */ +static void end_catch(char *) +{ + __cxa_end_catch(); +} +/** * ABI function, called when an exception specification is violated. * * This function does not return. @@
CVS import: src/external/bsd/libc++/dist/libcxxrt
Module Name:src Committed By: joerg Date: Sun May 30 00:08:20 UTC 2021 Update of /cvsroot/src/external/bsd/libc++/dist/libcxxrt In directory ivanova.netbsd.org:/tmp/cvs-serv13048 Log Message: Import libcxxrt 47661d00cd4d6cd728ae31b0bb29a49a6c06272a The repository moved to https://github.com/libcxxrt/libcxxrt in the mean time, but keep it on the same branch as before. This primarily brings C++14 support. Status: Vendor Tag: PATHSCALE Release Tags: libcxxrt-47661d00cd4d6cd728ae31b0bb29a49a6c06272a U src/external/bsd/libc++/dist/libcxxrt/README U src/external/bsd/libc++/dist/libcxxrt/LICENSE U src/external/bsd/libc++/dist/libcxxrt/COPYRIGHT U src/external/bsd/libc++/dist/libcxxrt/AUTHORS N src/external/bsd/libc++/dist/libcxxrt/test/test_foreign_exceptions.cc N src/external/bsd/libc++/dist/libcxxrt/test/test_demangle.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_typeinfo.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_guard.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_exception.cc U src/external/bsd/libc++/dist/libcxxrt/test/test.h U src/external/bsd/libc++/dist/libcxxrt/test/test.cc U src/external/bsd/libc++/dist/libcxxrt/test/run_test.sh U src/external/bsd/libc++/dist/libcxxrt/src/unwind.h C src/external/bsd/libc++/dist/libcxxrt/src/unwind-itanium.h U src/external/bsd/libc++/dist/libcxxrt/src/unwind-arm.h U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.h U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.cc U src/external/bsd/libc++/dist/libcxxrt/src/terminate.cc U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.h U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.cc U src/external/bsd/libc++/dist/libcxxrt/src/memory.cc C src/external/bsd/libc++/dist/libcxxrt/src/libelftc_dem_gnu3.c U src/external/bsd/libc++/dist/libcxxrt/src/guard.cc C src/external/bsd/libc++/dist/libcxxrt/src/exception.cc U src/external/bsd/libc++/dist/libcxxrt/src/dynamic_cast.cc U src/external/bsd/libc++/dist/libcxxrt/src/dwarf_eh.h U src/external/bsd/libc++/dist/libcxxrt/src/cxxabi.h U src/external/bsd/libc++/dist/libcxxrt/src/cxa_finalize.c U src/external/bsd/libc++/dist/libcxxrt/src/cxa_atexit.c U src/external/bsd/libc++/dist/libcxxrt/src/auxhelper.cc U src/external/bsd/libc++/dist/libcxxrt/src/atomic.h U src/external/bsd/libc++/dist/libcxxrt/src/abi_namespace.h 3 conflicts created by this import. Use the following command to help the merge: cvs checkout -jPATHSCALE:yesterday -jPATHSCALE src/external/bsd/libc++/dist/libcxxrt
CVS import: src/external/bsd/libc++/dist/libcxxrt
Module Name:src Committed By: joerg Date: Sun May 30 00:08:20 UTC 2021 Update of /cvsroot/src/external/bsd/libc++/dist/libcxxrt In directory ivanova.netbsd.org:/tmp/cvs-serv13048 Log Message: Import libcxxrt 47661d00cd4d6cd728ae31b0bb29a49a6c06272a The repository moved to https://github.com/libcxxrt/libcxxrt in the mean time, but keep it on the same branch as before. This primarily brings C++14 support. Status: Vendor Tag: PATHSCALE Release Tags: libcxxrt-47661d00cd4d6cd728ae31b0bb29a49a6c06272a U src/external/bsd/libc++/dist/libcxxrt/README U src/external/bsd/libc++/dist/libcxxrt/LICENSE U src/external/bsd/libc++/dist/libcxxrt/COPYRIGHT U src/external/bsd/libc++/dist/libcxxrt/AUTHORS N src/external/bsd/libc++/dist/libcxxrt/test/test_foreign_exceptions.cc N src/external/bsd/libc++/dist/libcxxrt/test/test_demangle.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_typeinfo.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_guard.cc U src/external/bsd/libc++/dist/libcxxrt/test/test_exception.cc U src/external/bsd/libc++/dist/libcxxrt/test/test.h U src/external/bsd/libc++/dist/libcxxrt/test/test.cc U src/external/bsd/libc++/dist/libcxxrt/test/run_test.sh U src/external/bsd/libc++/dist/libcxxrt/src/unwind.h C src/external/bsd/libc++/dist/libcxxrt/src/unwind-itanium.h U src/external/bsd/libc++/dist/libcxxrt/src/unwind-arm.h U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.h U src/external/bsd/libc++/dist/libcxxrt/src/typeinfo.cc U src/external/bsd/libc++/dist/libcxxrt/src/terminate.cc U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.h U src/external/bsd/libc++/dist/libcxxrt/src/stdexcept.cc U src/external/bsd/libc++/dist/libcxxrt/src/memory.cc C src/external/bsd/libc++/dist/libcxxrt/src/libelftc_dem_gnu3.c U src/external/bsd/libc++/dist/libcxxrt/src/guard.cc C src/external/bsd/libc++/dist/libcxxrt/src/exception.cc U src/external/bsd/libc++/dist/libcxxrt/src/dynamic_cast.cc U src/external/bsd/libc++/dist/libcxxrt/src/dwarf_eh.h U src/external/bsd/libc++/dist/libcxxrt/src/cxxabi.h U src/external/bsd/libc++/dist/libcxxrt/src/cxa_finalize.c U src/external/bsd/libc++/dist/libcxxrt/src/cxa_atexit.c U src/external/bsd/libc++/dist/libcxxrt/src/auxhelper.cc U src/external/bsd/libc++/dist/libcxxrt/src/atomic.h U src/external/bsd/libc++/dist/libcxxrt/src/abi_namespace.h 3 conflicts created by this import. Use the following command to help the merge: cvs checkout -jPATHSCALE:yesterday -jPATHSCALE src/external/bsd/libc++/dist/libcxxrt
CVS commit: src/distrib/miniroot
Module Name:src Committed By: tsutsui Date: Sat May 29 23:46:14 UTC 2021 Modified Files: src/distrib/miniroot: install.sub Log Message: Handle recent ifconfig(8) outputs in the miniroot installation script. - Remove netmask slash notation for IP addresses, which has been changed between NetBSD 7.x and 8.0: http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ifconfig/af_inet.c#rev1.24 - Ignore inet6 entries, which miniroot scripts don't support Should be pulled up to netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/distrib/miniroot/install.sub Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/miniroot/install.sub diff -u src/distrib/miniroot/install.sub:1.59 src/distrib/miniroot/install.sub:1.60 --- src/distrib/miniroot/install.sub:1.59 Sat Dec 12 05:23:21 2020 +++ src/distrib/miniroot/install.sub Sat May 29 23:46:14 2021 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: install.sub,v 1.59 2020/12/12 05:23:21 tsutsui Exp $ +# $NetBSD: install.sub,v 1.60 2021/05/29 23:46:14 tsutsui Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -403,8 +403,9 @@ configure_ifs() { fi set -- $(ifconfig $_interface_name | sed -n ' - /^[ ]*inet/{ + /^[ ]*inet /{ s/inet// + s,/[0-9]*,, s/--> [0-9.][0-9.]*// s/netmask// s/broadcast//
CVS commit: src/distrib/miniroot
Module Name:src Committed By: tsutsui Date: Sat May 29 23:46:14 UTC 2021 Modified Files: src/distrib/miniroot: install.sub Log Message: Handle recent ifconfig(8) outputs in the miniroot installation script. - Remove netmask slash notation for IP addresses, which has been changed between NetBSD 7.x and 8.0: http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ifconfig/af_inet.c#rev1.24 - Ignore inet6 entries, which miniroot scripts don't support Should be pulled up to netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/distrib/miniroot/install.sub Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 23:27:22 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c vm_machdep.c src/sys/arch/alpha/include: pmap.h Log Message: Move the pointer to the pmap's lev1map out of the shared pmap structure and into each CPU's pmap_percpu area. This pointer is constant for the life of the pmap, and moving it gives us an additional 8 bytes in the shared pmap structure. Because the kernel pmap does not have per-CPU data, all places where we need the kernel pmap's lev1map now just reference kernel_lev1map directly. To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.117 -r1.118 src/sys/arch/alpha/alpha/vm_machdep.c cvs rdiff -u -r1.87 -r1.88 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.280 src/sys/arch/alpha/alpha/pmap.c:1.281 --- src/sys/arch/alpha/alpha/pmap.c:1.280 Sat May 29 22:14:09 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sat May 29 23:27:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.280 2021/05/29 22:14:09 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.281 2021/05/29 23:27:22 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.280 2021/05/29 22:14:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.281 2021/05/29 23:27:22 thorpej Exp $"); #include #include @@ -1173,19 +1173,19 @@ static bool vtophys_internal(vaddr_t, pa ({ \ pt_entry_t *l1pte_, *l2pte_; \ \ - l1pte_ = pmap_l1pte(pmap_kernel(), va);\ + l1pte_ = pmap_l1pte(kernel_lev1map, va); \ if (pmap_pte_v(l1pte_) == 0) { \ printf("kernel level 1 PTE not valid, va 0x%lx " \ "(line %d)\n", (va), __LINE__); \ panic("PMAP_KERNEL_PTE");\ }\ - l2pte_ = pmap_l2pte(pmap_kernel(), va, l1pte_); \ + l2pte_ = pmap_l2pte(kernel_lev1map, va, l1pte_); \ if (pmap_pte_v(l2pte_) == 0) { \ printf("kernel level 2 PTE not valid, va 0x%lx " \ "(line %d)\n", (va), __LINE__); \ panic("PMAP_KERNEL_PTE");\ }\ - pmap_l3pte(pmap_kernel(), va, l2pte_);\ + pmap_l3pte(kernel_lev1map, va, l2pte_);\ }) #else #define PMAP_KERNEL_PTE(va) ([VPT_INDEX((va))]) @@ -1388,9 +1388,8 @@ pmap_bootstrap(paddr_t ptaddr, u_int max * generation. */ memset(pmap_kernel(), 0, sizeof(struct pmap)); - pmap_kernel()->pm_lev1map = kernel_lev1map; atomic_store_relaxed(_kernel()->pm_count, 1); - /* Kernel pmap does not have ASN info. */ + /* Kernel pmap does not have per-CPU info. */ TAILQ_INSERT_TAIL(_all_pmaps, pmap_kernel(), pm_list); /* @@ -1562,6 +1561,7 @@ pmap_t pmap_create(void) { pmap_t pmap; + pt_entry_t *lev1map; int i; #ifdef DEBUG @@ -1574,24 +1574,29 @@ pmap_create(void) atomic_store_relaxed(>pm_count, 1); + try_again: + rw_enter(_growkernel_lock, RW_READER); + + lev1map = pool_cache_get(_l1pt_cache, PR_NOWAIT); + if (__predict_false(lev1map == NULL)) { + rw_exit(_growkernel_lock); + (void) kpause("pmap_create", false, hz >> 2, NULL); + goto try_again; + } + /* * There are only kernel mappings at this point; give the pmap * the kernel ASN. This will be initialized to correct values * when the pmap is activated. + * + * We stash a pointer to the pmap's lev1map in each CPU's + * private data. It remains constant for the life of the + * pmap, and gives us more room in the shared pmap structure. */ for (i = 0; i < pmap_ncpuids; i++) { pmap->pm_percpu[i].pmc_asn = PMAP_ASN_KERNEL; pmap->pm_percpu[i].pmc_asngen = PMAP_ASNGEN_INVALID; - } - - try_again: - rw_enter(_growkernel_lock, RW_READER); - - pmap->pm_lev1map = pool_cache_get(_l1pt_cache, PR_NOWAIT); - if (__predict_false(pmap->pm_lev1map == NULL)) { - rw_exit(_growkernel_lock); - (void) kpause("pmap_create", false, hz >> 2, NULL); - goto try_again; + pmap->pm_percpu[i].pmc_lev1map = lev1map; } mutex_enter(_all_pmaps_lock); @@ -1623,6 +1628,9 @@ pmap_destroy(pmap_t pmap) if (atomic_dec_uint_nv(>pm_count) > 0) return; + pt_entry_t *lev1map = pmap_lev1map(pmap); + int i; + rw_enter(_growkernel_lock, RW_READER); /* @@ -1632,8 +1640,12 @@ pmap_destroy(pmap_t pmap) TAILQ_REMOVE(_all_pmaps, pmap, pm_list); mutex_exit(_all_pmaps_lock); - pool_cache_put(_l1pt_cache, pmap->pm_lev1map); - pmap->pm_lev1map = (pt_entry_t *)0xdeadbeefUL; + pool_cache_put(_l1pt_cache, lev1map); +#ifdef DIAGNOSTIC + for (i = 0; i < pmap_ncpuids; i++) { + pmap->pm_percpu[i].pmc_lev1map = (pt_entry_t *)0xdeadbeefUL; + } +#endif /* DIAGNOSTIC */ rw_exit(_growkernel_lock); @@ -1714,19 +1726,21 @@ pmap_remove_internal(pmap_t pmap, vaddr_ return; } + pt_entry_t * const
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 23:27:22 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c vm_machdep.c src/sys/arch/alpha/include: pmap.h Log Message: Move the pointer to the pmap's lev1map out of the shared pmap structure and into each CPU's pmap_percpu area. This pointer is constant for the life of the pmap, and moving it gives us an additional 8 bytes in the shared pmap structure. Because the kernel pmap does not have per-CPU data, all places where we need the kernel pmap's lev1map now just reference kernel_lev1map directly. To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.117 -r1.118 src/sys/arch/alpha/alpha/vm_machdep.c cvs rdiff -u -r1.87 -r1.88 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 22:52:35 UTC 2021 Modified Files: src/sys/arch/hp300/conf: INSTALL Log Message: Reduce diffs from GENERIC for maintainability. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/hp300/conf/INSTALL 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/hp300/conf/INSTALL diff -u src/sys/arch/hp300/conf/INSTALL:1.68 src/sys/arch/hp300/conf/INSTALL:1.69 --- src/sys/arch/hp300/conf/INSTALL:1.68 Sat May 29 21:08:44 2021 +++ src/sys/arch/hp300/conf/INSTALL Sat May 29 22:52:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.68 2021/05/29 21:08:44 tsutsui Exp $ +# $NetBSD: INSTALL,v 1.69 2021/05/29 22:52:35 tsutsui Exp $ # # INSTALL machine description file # @@ -9,17 +9,18 @@ include "arch/hp300/conf/std.hp300" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -# optimise for smaller kernels -makeoptions COPTS="-Os -fno-unwind-tables" +# Optimize for space. +makeoptions COPTS="-Os -fno-unwind-tables" + +maxusers 8 # estimated number of users + +# Special options for smaller kernels #options NVNODE=50 #options NBUF=16 #options BUFPAGES=16 options BUFCACHE=5 options NFS_V2_ONLY options NFS_DEFAULT_NIOTHREADS=1 -options USERCONF # userconf(4) support -options PIPE_SOCKETPAIR # smaller, but slower pipe(2) -#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Support for various CPU types options HP320 @@ -38,42 +39,77 @@ options HP400 options HP425 options HP433 options FPSP # floating point interface for 68040 - -# Need to set locally -maxusers 8 +#options FPU_EMULATE # software fpu emulation for MC68030 # Standard system options +#options KTRACE # system call tracing support +#options INSECURE # disable kernel security level +options USERCONF # userconf(4) support +options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel +#options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT +#options NTP # NTP phase/frequency locked loop +#options SYSVMSG # System V-style message queues +#options SYSVSEM # System V-style semaphores +#options SYSVSHM # System V-style shared memory + +#options MODULAR # new style module(7) framework +#options MODULAR_DEFAULT_AUTOLOAD + +# Alternate buffer queue strategies for better responsiveness under high +# disk I/O load. +#options BUFQ_READPRIO +#options BUFQ_PRIOCSCAN + +# Debugging options +#options DIAGNOSTIC # Extra kernel sanity checks +#options DEBUG # Enable misc. kernel debugging code +#options DDB # Kernel Dynamic Debugger +#options DDB_HISTORY_SIZE=512 # Enable history editing in DDB +#options KGDB # remote debugger +#makeoptions DEBUG="-g" # netbsd.gdb with full debugging symbols + +# Compatibility options #include "conf/compat_netbsd09.config" options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. -#options SYSVSHM # System V-style shared memory -#options SYSVSEM # System V-style semaphores -#options SEMMNI=10 # number of semaphore identifiers -#options SEMMNS=60 # number of semaphores in system -#options SEMUME=10 # max number of undo entries per process -#options SEMMNU=30 # number of undo structures in system -#options SYSVMSG # System V-style message queues -#options KTRACE # system call tracing support -#options SCSIVERBOSE # Verbose SCSI errors + +# Binary compatibility. +#options COMPAT_AOUT_M68K # NetBSD/m68k a.out binary compatibility +#options COMPAT_M68K4K # NetBSD/m68k4k binary compatibility +#options COMPAT_SUNOS # SunOS4 m68k binary compatibility +#options COMPAT_LINUX # Linux/m68k binary compatibility +#options COMPAT_OSSAUDIO # Linux/m68k binary compatibility # Filesystems -file-system FFS # fast filesystem file-system CD9660 # CD-ROM ISO-9660 filesystem -file-system NFS # Network filesystem client -#file-system UNION # Union filesystem (req. for FDESC) -#file-system KERNFS # kernel data-structure filesystem +#file-system EXT2FS # second extended file system (linux) #file-system FDESC # user file descriptor filesystem -#file-system PROCFS # /proc filesystem +file-system FFS # fast filesystem +#file-system KERNFS # kernel data-structure filesystem +#file-system LFS # log-structured file system file-system MFS # Memory-based filesystem +file-system NFS # Network filesystem client +#file-system NULLFS # loopback file system +#file-system OVERLAY # overlay file system +#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) +#file-system PROCFS # /proc filesystem +#file-system UMAPFS # NULLFS + uid and gid remapping +#file-system UNION # Union filesystem (req. for FDESC) +#file-system CODA # Coda File System; also needs vcoda (below) #file-system PTYFS # /dev/pts/N support +#file-system TMPFS # Efficient
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 22:52:35 UTC 2021 Modified Files: src/sys/arch/hp300/conf: INSTALL Log Message: Reduce diffs from GENERIC for maintainability. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/hp300/conf/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/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 22:50:18 UTC 2021 Modified Files: src/sys/arch/hp300/conf: GENERIC Log Message: Reorder entries and reorganize comments for maintainability. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/sys/arch/hp300/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 22:50:18 UTC 2021 Modified Files: src/sys/arch/hp300/conf: GENERIC Log Message: Reorder entries and reorganize comments for maintainability. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/sys/arch/hp300/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp300/conf/GENERIC diff -u src/sys/arch/hp300/conf/GENERIC:1.207 src/sys/arch/hp300/conf/GENERIC:1.208 --- src/sys/arch/hp300/conf/GENERIC:1.207 Thu Jan 21 06:51:54 2021 +++ src/sys/arch/hp300/conf/GENERIC Sat May 29 22:50:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.207 2021/01/21 06:51:54 nia Exp $ +# $NetBSD: GENERIC,v 1.208 2021/05/29 22:50:18 tsutsui Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/hp300/conf/std.hp300" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.207 $" +#ident "GENERIC-$Revision: 1.208 $" makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for @@ -57,9 +57,9 @@ options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel #options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT options NTP # NTP phase/frequency locked loop -options SYSVSHM # System V-style shared memory options SYSVMSG # System V-style message queues options SYSVSEM # System V-style semaphores +options SYSVSHM # System V-style shared memory options MODULAR # new style module(7) framework options MODULAR_DEFAULT_AUTOLOAD @@ -159,7 +159,8 @@ options USELEDS # make the lights twin options DIOVERBOSE # recognize "unknown" DIO devices # workstation console options -options WSEMUL_VT100# VT100 / VT220 emulation +options WSEMUL_VT100 # VT100 / VT220 emulation +#options WSDISPLAY_DEFAULTSCREENS=1 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling options WSDISPLAY_COMPAT_RAWKBD options WS_KERNEL_FG=WSCOL_GREEN @@ -180,6 +181,12 @@ intio0 at mainbus0 # internal i/o spac dio0 at mainbus0 # DIO/DIO-II bus sgc0 at mainbus0 # SGC bus +# Real-time clock (not optional) +rtc* at intio? + +# DMA controller +dma* at intio? + # Human Interface Loop devices hil0 at intio? # HIL controller hilkbd* at hil? # keyboards @@ -188,10 +195,8 @@ hilms* at hil? # mice, buttons and ta wsmouse* at hilms? mux 0 hilid* at hil? # ID module -rtc* at intio? # real-time clock (not optional) -dma* at intio? # DMA controller -frodo* at intio? # Frodo utility chip found on 382, 4xx -nhpib* at intio? # slow internal HP-IB +# Frodo utility chip found on 382, 4xx's +frodo* at intio? # 8250-like serial ports found on Frodo ASIC dnkbd0 at frodo? offset 0x0 # Domain keyboard flavor @@ -202,32 +207,40 @@ com* at frodo? offset ? # tty flavor # mc146818-like real time clock found on 425e mcclock0 at frodo? offset 0x80 -dvbox* at intio? # Davinci framebuffer +# Davinci framebuffer +dvbox* at intio? dvbox* at dio? scode ? wsdisplay* at dvbox? -gbox* at intio? # Gatorbox framebuffer +# Gatorbox framebuffer +gbox* at intio? gbox* at dio? scode ? wsdisplay* at gbox? -hyper* at dio? scode ? # Hyperion framebuffer +# Hyperion framebuffer +hyper* at dio? scode ? wsdisplay* at hyper? -rbox* at intio? # Renaissance framebuffer +# Renaissance framebuffer +rbox* at intio? rbox* at dio? scode ? wsdisplay* at rbox? -topcat* at intio? # Topcat/catseye framebuffers +# Topcat/catseye framebuffers +topcat* at intio? topcat* at dio? scode ? wsdisplay* at topcat? -tvrx* at dio? scode ? # TurboVRX framebuffer +# TurboVRX framebuffer +tvrx* at dio? scode ? wsdisplay* at tvrx? -gendiofb* at dio? scode ? # dumb framebuffer support for 362/382 +# dumb framebuffer support for 362/382 +gendiofb* at dio? scode ? wsdisplay* at gendiofb? -sti* at sgc? slot ? # SGC EVRX framebuffers +# STI framebuffers +sti* at sgc? slot ? wsdisplay* at sti? com0 at dio0 scode 9 # DCA serial interfaces @@ -237,10 +250,12 @@ dcm* at dio? scode ? flags 0xe # DCM 4- le* at dio? scode ? # LANCE ethernet interfaces -nhpib0 at dio? scode 7 # slow internal HP-IB +# HP-IB devices +nhpib* at intio? # internal HP-IB +nhpib0 at dio? scode 7 # 98624A HP-IB nhpib* at dio? scode ? -fhpib* at dio? scode ? # `fast' HP-IB +fhpib* at dio? scode ? # 98625A/98625B HP-IB hpibbus0 at nhpib0 hpibbus* at nhpib? @@ -251,6 +266,7 @@ ct* at hpibbus? slave ? punit ? # HP-IB mt* at hpibbus? slave ? punit ? # HP-IB 9-track tape ppi0 at hpibbus0 slave 5 punit 0 # HP-IB plotter +# SCSI devices spc* at dio? scode ? # HP 98265A SCSI scsibus* at spc? @@ -296,10 +312,10 @@ pseudo-device agr # IEEE 802.3ad link
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 22:14:09 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Rather than tracking "needs I-sync on return to userspace" in a bitmap, track it with a separate field in the pmap_percpu. Not only does this reduce cache line contention ever so slightly, it also frees up a field in the shared portion of the pmap structure. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.86 -r1.87 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 22:14:09 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Rather than tracking "needs I-sync on return to userspace" in a bitmap, track it with a separate field in the pmap_percpu. Not only does this reduce cache line contention ever so slightly, it also frees up a field in the shared portion of the pmap structure. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.86 -r1.87 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.279 src/sys/arch/alpha/alpha/pmap.c:1.280 --- src/sys/arch/alpha/alpha/pmap.c:1.279 Sat May 29 21:54:50 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sat May 29 22:14:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.279 2021/05/29 21:54:50 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.280 2021/05/29 22:14:09 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.279 2021/05/29 21:54:50 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.280 2021/05/29 22:14:09 thorpej Exp $"); #include #include @@ -862,8 +862,6 @@ pmap_tlb_invalidate(const struct pmap_tl pmap_t const pmap = tlbctx->t_pmap; KASSERT(pmap != NULL); - const u_long cpu_mask = 1UL << ci->ci_cpuid; - if (__predict_false(pmap != ci->ci_pmap)) { TLB_COUNT(invalidate_user_not_current); @@ -875,6 +873,8 @@ pmap_tlb_invalidate(const struct pmap_tl return; } + const u_long cpu_mask = 1UL << ci->ci_cpuid; + /* * We cannot directly invalidate the TLB in this case, * so force allocation of a new ASN when the pmap becomes @@ -890,14 +890,14 @@ pmap_tlb_invalidate(const struct pmap_tl * of accounting for internal consistency. */ if (TLB_CTX_FLAGS(tlbctx) & TLB_CTX_F_IMB) { - atomic_or_ulong(>pm_needisync, cpu_mask); + pmap->pm_percpu[ci->ci_cpuid].pmc_needisync = 1; } return; } if (TLB_CTX_FLAGS(tlbctx) & TLB_CTX_F_IMB) { TLB_COUNT(invalidate_user_lazy_imb); - atomic_or_ulong(>pm_needisync, cpu_mask); + pmap->pm_percpu[ci->ci_cpuid].pmc_needisync = 1; } if (count == TLB_CTX_ALLVA) { @@ -3882,7 +3882,7 @@ pmap_asn_alloc(pmap_t const pmap, struct * We have a new ASN, so we can skip any pending I-stream sync * on the way back out to user space. */ - atomic_and_ulong(>pm_needisync, ~(1UL << ci->ci_cpuid)); + pmc->pmc_needisync = 0; #ifdef DEBUG if (pmapdebug & PDB_ASN) Index: src/sys/arch/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.86 src/sys/arch/alpha/include/pmap.h:1.87 --- src/sys/arch/alpha/include/pmap.h:1.86 Sat May 29 21:54:51 2021 +++ src/sys/arch/alpha/include/pmap.h Sat May 29 22:14:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.86 2021/05/29 21:54:51 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.87 2021/05/29 22:14:09 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -135,17 +135,19 @@ struct pmap_percpu { unsigned int pmc_asn; /* address space number */ unsigned int pmc_pad0; unsigned long pmc_asngen; /* ASN generation number */ - unsigned long pmc_padN[(COHERENCY_UNIT / 8) - 2]; + unsigned int pmc_needisync; /* CPU needes isync */ + unsigned int pmc_pad1; + unsigned long pmc_padN[(COHERENCY_UNIT / 8) - 3]; }; struct pmap { /* pmaps are aligned to COHERENCY_UNIT boundaries */ /* pmaps are locked by hashed mutexes */ pt_entry_t *pm_lev1map; /* [ 0] level 1 map */ unsigned long pm_cpus; /* [ 8] CPUs using pmap */ - unsigned long pm_needisync; /* [16] CPUs needing isync */ + unsigned long __pm_spare0; /* [16] spare field */ struct pmap_statistics pm_stats; /* [32] statistics */ unsigned int pm_count; /* [40] reference count */ - unsigned int __pm_spare; /* [44] spare field */ + unsigned int __pm_spare1; /* [44] spare field */ TAILQ_ENTRY(pmap) pm_list; /* [48] list of all pmaps */ /* -- COHERENCY_UNIT boundary -- */ struct pmap_percpu pm_percpu[]; /* [64] per-CPU data */ @@ -326,10 +328,10 @@ pmap_l3pte(pmap_t pmap, vaddr_t v, pt_en */ #define PMAP_USERRET(pmap) \ do { \ - u_long cpu_mask = (1UL << cpu_number()); \ + const unsigned long cpu_id = cpu_number(); \ \ - if ((pmap)->pm_needisync & cpu_mask) {\ - atomic_and_ulong(&(pmap)->pm_needisync, ~cpu_mask); \ + if ((pmap)->pm_percpu[cpu_id].pmc_needisync) { \ + (pmap)->pm_percpu[cpu_id].pmc_needisync = 0; \ alpha_pal_imb(); \ }\ } while (0)
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 21:54:51 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Rename pmap_asn_info to pmap_percpu, and pmap::pm_asni to pmap::pm_percpu. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.279 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.85 -r1.86 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/pmap.c diff -u src/sys/arch/alpha/alpha/pmap.c:1.278 src/sys/arch/alpha/alpha/pmap.c:1.279 --- src/sys/arch/alpha/alpha/pmap.c:1.278 Mon May 24 03:43:24 2021 +++ src/sys/arch/alpha/alpha/pmap.c Sat May 29 21:54:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.278 2021/05/24 03:43:24 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.279 2021/05/29 21:54:50 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020 @@ -135,7 +135,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.278 2021/05/24 03:43:24 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.279 2021/05/29 21:54:50 thorpej Exp $"); #include #include @@ -265,9 +265,9 @@ static struct pool_cache pmap_pmap_cache static struct pool_cache pmap_l1pt_cache __read_mostly; static struct pool_cache pmap_pv_cache __read_mostly; -CTASSERT(offsetof(struct pmap, pm_asni[0]) == COHERENCY_UNIT); +CTASSERT(offsetof(struct pmap, pm_percpu[0]) == COHERENCY_UNIT); CTASSERT(PMAP_SIZEOF(ALPHA_MAXPROCS) < ALPHA_PGBYTES); -CTASSERT(sizeof(struct pmap_asn_info) == COHERENCY_UNIT); +CTASSERT(sizeof(struct pmap_percpu) == COHERENCY_UNIT); /* * Address Space Numbers. @@ -880,7 +880,7 @@ pmap_tlb_invalidate(const struct pmap_tl * so force allocation of a new ASN when the pmap becomes * active again. */ - pmap->pm_asni[ci->ci_cpuid].pma_asngen = PMAP_ASNGEN_INVALID; + pmap->pm_percpu[ci->ci_cpuid].pmc_asngen = PMAP_ASNGEN_INVALID; atomic_and_ulong(>pm_cpus, ~cpu_mask); /* @@ -1580,8 +1580,8 @@ pmap_create(void) * when the pmap is activated. */ for (i = 0; i < pmap_ncpuids; i++) { - pmap->pm_asni[i].pma_asn = PMAP_ASN_KERNEL; - pmap->pm_asni[i].pma_asngen = PMAP_ASNGEN_INVALID; + pmap->pm_percpu[i].pmc_asn = PMAP_ASN_KERNEL; + pmap->pm_percpu[i].pmc_asngen = PMAP_ASNGEN_INVALID; } try_again: @@ -3814,7 +3814,7 @@ pmap_asn_alloc(pmap_t const pmap, struct if (pmap_max_asn == 0) return 0; - struct pmap_asn_info * const pma = >pm_asni[ci->ci_cpuid]; + struct pmap_percpu * const pmc = >pm_percpu[ci->ci_cpuid]; /* * Hopefully, we can continue using the one we have... @@ -3824,14 +3824,14 @@ pmap_asn_alloc(pmap_t const pmap, struct * the generation counter at 1, but initialize pmaps with * 0; this forces the first ASN allocation to occur. */ - if (pma->pma_asngen == ci->ci_asn_gen) { + if (pmc->pmc_asngen == ci->ci_asn_gen) { #ifdef DEBUG if (pmapdebug & PDB_ASN) printf("pmap_asn_alloc: same generation, keeping %u\n", - pma->pma_asn); + pmc->pmc_asn); #endif TLB_COUNT(asn_reuse); - return pma->pma_asn; + return pmc->pmc_asn; } /* @@ -3874,8 +3874,8 @@ pmap_asn_alloc(pmap_t const pmap, struct /* * Assign the new ASN and validate the generation number. */ - pma->pma_asn = ci->ci_next_asn++; - pma->pma_asngen = ci->ci_asn_gen; + pmc->pmc_asn = ci->ci_next_asn++; + pmc->pmc_asngen = ci->ci_asn_gen; TLB_COUNT(asn_assign); /* @@ -3887,7 +3887,7 @@ pmap_asn_alloc(pmap_t const pmap, struct #ifdef DEBUG if (pmapdebug & PDB_ASN) printf("pmap_asn_alloc: assigning %u to pmap %p\n", - pma->pma_asn, pmap); + pmc->pmc_asn, pmap); #endif - return pma->pma_asn; + return pmc->pmc_asn; } Index: src/sys/arch/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.85 src/sys/arch/alpha/include/pmap.h:1.86 --- src/sys/arch/alpha/include/pmap.h:1.85 Mon May 24 03:43:24 2021 +++ src/sys/arch/alpha/include/pmap.h Sat May 29 21:54:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.85 2021/05/24 03:43:24 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.86 2021/05/29 21:54:51 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -131,11 +131,11 @@ * allocate any ASN info for the kernel pmap at all. * arrays which hold enough for ALPHA_MAXPROCS. */ -struct pmap_asn_info { - unsigned int pma_asn; /* address space number */ - unsigned int pma_pad0; - unsigned long pma_asngen; /* ASN generation number */ - unsigned long pma_padN[(COHERENCY_UNIT / 8) - 2]; +struct pmap_percpu { + unsigned int pmc_asn; /* address space number */ + unsigned int pmc_pad0; + unsigned long pmc_asngen; /* ASN generation number */ + unsigned long pmc_padN[(COHERENCY_UNIT / 8) - 2]; }; struct pmap { /* pmaps are aligned to COHERENCY_UNIT boundaries */ @@
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 21:54:51 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: pmap.c src/sys/arch/alpha/include: pmap.h Log Message: Rename pmap_asn_info to pmap_percpu, and pmap::pm_asni to pmap::pm_percpu. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.279 src/sys/arch/alpha/alpha/pmap.c cvs rdiff -u -r1.85 -r1.86 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 21:08:44 UTC 2021 Modified Files: src/sys/arch/hp300/conf: INSTALL Log Message: Reduce maxusers to 8 as GENERIC. Should be pulled up to netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/hp300/conf/INSTALL 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/hp300/conf/INSTALL diff -u src/sys/arch/hp300/conf/INSTALL:1.67 src/sys/arch/hp300/conf/INSTALL:1.68 --- src/sys/arch/hp300/conf/INSTALL:1.67 Sat May 29 21:06:20 2021 +++ src/sys/arch/hp300/conf/INSTALL Sat May 29 21:08:44 2021 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.67 2021/05/29 21:06:20 tsutsui Exp $ +# $NetBSD: INSTALL,v 1.68 2021/05/29 21:08:44 tsutsui Exp $ # # INSTALL machine description file # @@ -40,7 +40,7 @@ options HP433 options FPSP # floating point interface for 68040 # Need to set locally -maxusers 32 +maxusers 8 # Standard system options #include "conf/compat_netbsd09.config"
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 21:08:44 UTC 2021 Modified Files: src/sys/arch/hp300/conf: INSTALL Log Message: Reduce maxusers to 8 as GENERIC. Should be pulled up to netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/hp300/conf/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/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 21:06:20 UTC 2021 Modified Files: src/sys/arch/hp300/conf: INSTALL Log Message: Add missed 'nhpib at intio' for internal HP-IB. Found on testing HPDisk. Also fix comments for HP-IB devices. Should be pulled up to netbsd-8 and netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/hp300/conf/INSTALL 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/hp300/conf/INSTALL diff -u src/sys/arch/hp300/conf/INSTALL:1.66 src/sys/arch/hp300/conf/INSTALL:1.67 --- src/sys/arch/hp300/conf/INSTALL:1.66 Sat Dec 12 05:48:55 2020 +++ src/sys/arch/hp300/conf/INSTALL Sat May 29 21:06:20 2021 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.66 2020/12/12 05:48:55 tsutsui Exp $ +# $NetBSD: INSTALL,v 1.67 2021/05/29 21:06:20 tsutsui Exp $ # # INSTALL machine description file # @@ -183,10 +183,11 @@ dcm* at dio? scode ? flags 0xe # DCM 4- le* at dio? scode ? # LANCE ethernet interfaces -nhpib0 at dio? scode 7 # slow internal HP-IB +nhpib* at intio? # internal HP-IB +nhpib0 at dio? scode 7 # 98624A HP-IB nhpib* at dio? scode ? -fhpib* at dio? scode ? # `fast' HP-IB +fhpib* at dio? scode ? # 98625A/98625B HP-IB hpibbus0 at nhpib0 hpibbus* at nhpib?
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 29 21:06:20 UTC 2021 Modified Files: src/sys/arch/hp300/conf: INSTALL Log Message: Add missed 'nhpib at intio' for internal HP-IB. Found on testing HPDisk. Also fix comments for HP-IB devices. Should be pulled up to netbsd-8 and netbsd-9. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/hp300/conf/INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 19:03:08 UTC 2021 Modified Files: src/distrib/notes/alpha: contents Log Message: Document netbsd-GENERIC.QEMU.gz To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/distrib/notes/alpha/contents Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/alpha/contents diff -u src/distrib/notes/alpha/contents:1.24 src/distrib/notes/alpha/contents:1.25 --- src/distrib/notes/alpha/contents:1.24 Tue Sep 22 02:53:52 2020 +++ src/distrib/notes/alpha/contents Sat May 29 19:03:08 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: contents,v 1.24 2020/09/22 02:53:52 snj Exp $ +.\" $NetBSD: contents,v 1.25 2021/05/29 19:03:08 thorpej Exp $ .\" .\" Copyright (c) 1999-2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -62,6 +62,14 @@ A gzipped .Nx kernel containing code for everything supported in this release. . +. It Pa netbsd-GENERIC.QEMU.gz +. +A gzipped +.Nx +kernel, identical to netbsd-GENERIC, except that it contains a static +copy of the kernel symbol table for convenience when running under Qemu, +which loads the kernel directly but does not load the kernel symbols. +. . tag) \" binary/kernel/ . . It Pa sets/
CVS commit: src/distrib/notes/alpha
Module Name:src Committed By: thorpej Date: Sat May 29 19:03:08 UTC 2021 Modified Files: src/distrib/notes/alpha: contents Log Message: Document netbsd-GENERIC.QEMU.gz To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/distrib/notes/alpha/contents Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/etc.alpha
Module Name:src Committed By: thorpej Date: Sat May 29 18:48:46 UTC 2021 Modified Files: src/etc/etc.alpha: Makefile.inc Log Message: Provide a binary/kernel/netbsd-GENERIC.QEMU.gz in the Alpha release hierarchy. This is identical to netbsd-GENERIC, except it has been dbsym'd so that the kernel symbols are available when running under Qemu (which loads the kernel directly, but does not load the symbol table). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/etc/etc.alpha/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/etc.alpha
Module Name:src Committed By: thorpej Date: Sat May 29 18:48:46 UTC 2021 Modified Files: src/etc/etc.alpha: Makefile.inc Log Message: Provide a binary/kernel/netbsd-GENERIC.QEMU.gz in the Alpha release hierarchy. This is identical to netbsd-GENERIC, except it has been dbsym'd so that the kernel symbols are available when running under Qemu (which loads the kernel directly, but does not load the symbol table). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/etc/etc.alpha/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.alpha/Makefile.inc diff -u src/etc/etc.alpha/Makefile.inc:1.10 src/etc/etc.alpha/Makefile.inc:1.11 --- src/etc/etc.alpha/Makefile.inc:1.10 Sat Sep 19 03:29:57 2020 +++ src/etc/etc.alpha/Makefile.inc Sat May 29 18:48:45 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.10 2020/09/19 03:29:57 thorpej Exp $ +# $NetBSD: Makefile.inc,v 1.11 2021/05/29 18:48:45 thorpej Exp $ # # etc.alpha/Makefile.inc -- alpha-specific etc Makefile targets # @@ -8,6 +8,7 @@ KERNEL_SETS= GENERIC +EXTRA_KERNELS+= GENERIC.QEMU BUILD_KERNELS+= INSTALL INSTALLATION_DIRS+= installation/floppy \
CVS commit: src/sbin/disklabel
Module Name:src Committed By: christos Date: Sat May 29 17:41:51 UTC 2021 Modified Files: src/sbin/disklabel: main.c Log Message: first check, then copy To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sbin/disklabel/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/disklabel/main.c diff -u src/sbin/disklabel/main.c:1.55 src/sbin/disklabel/main.c:1.56 --- src/sbin/disklabel/main.c:1.55 Mon Sep 28 22:58:52 2020 +++ src/sbin/disklabel/main.c Sat May 29 13:41:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.55 2020/09/29 02:58:52 msaitoh Exp $ */ +/* $NetBSD: main.c,v 1.56 2021/05/29 17:41:51 christos Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19 static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95"; /* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */ #else -__RCSID("$NetBSD: main.c,v 1.55 2020/09/29 02:58:52 msaitoh Exp $"); +__RCSID("$NetBSD: main.c,v 1.56 2021/05/29 17:41:51 christos Exp $"); #endif #endif /* not lint */ @@ -1238,9 +1238,9 @@ find_label(int f, u_int sector) if (i == LABEL_OFFSET) continue; disk_lp = (void *)(bootarea + offset); - memcpy(, disk_lp, sizeof(tlp)); if ((char *)(disk_lp + 1) > bootarea + bootarea_len) break; + memcpy(, disk_lp, sizeof(tlp)); if (tlp.d_magic2 != tlp.d_magic) continue; if (read_all && (tlp.d_magic == DISKMAGIC_DELETED ||
CVS commit: src/sbin/disklabel
Module Name:src Committed By: christos Date: Sat May 29 17:41:51 UTC 2021 Modified Files: src/sbin/disklabel: main.c Log Message: first check, then copy To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sbin/disklabel/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/fsdb
Module Name:src Committed By: christos Date: Sat May 29 16:51:25 UTC 2021 Modified Files: src/sbin/fsdb: fsdb.8 fsdb.c fsdbutil.c Log Message: Add birthtime support and make time 64 bit. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sbin/fsdb/fsdb.8 cvs rdiff -u -r1.51 -r1.52 src/sbin/fsdb/fsdb.c cvs rdiff -u -r1.22 -r1.23 src/sbin/fsdb/fsdbutil.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsdb/fsdb.8 diff -u src/sbin/fsdb/fsdb.8:1.26 src/sbin/fsdb/fsdb.8:1.27 --- src/sbin/fsdb/fsdb.8:1.26 Sat Aug 5 16:25:41 2017 +++ src/sbin/fsdb/fsdb.8 Sat May 29 12:51:25 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: fsdb.8,v 1.26 2017/08/05 20:25:41 wiz Exp $ +.\" $NetBSD: fsdb.8,v 1.27 2021/05/29 16:51:25 christos Exp $ .\" .\" Copyright (c) 1996, 2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 3, 2017 +.Dd May 29, 2021 .Dt FSDB 8 .Os .Sh NAME @@ -207,7 +207,8 @@ Change the generation number of the curr .It Cm mtime Ar time .It Cm ctime Ar time .It Cm atime Ar time -Change the modification, change, or access time (respectively) on the +.It Cm birthtime Ar time +Change the modification, change, access time, or birthtime (respectively) on the current inode to .Ar time . .Ar Time @@ -219,9 +220,11 @@ is an optional nanosecond specification. If no nanoseconds are specified, the .Va mtimensec , .Va ctimensec , +.Va atimensec , or -.Va atimensec +.Va birthtimensec field will be set to zero. +The birthtime field is only available on ufs2 filesystems. .Pp .It Cm quit , Cm q , Cm exit , Aq Em EOF Exit the program. Index: src/sbin/fsdb/fsdb.c diff -u src/sbin/fsdb/fsdb.c:1.51 src/sbin/fsdb/fsdb.c:1.52 --- src/sbin/fsdb/fsdb.c:1.51 Sun Apr 5 11:25:40 2020 +++ src/sbin/fsdb/fsdb.c Sat May 29 12:51:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fsdb.c,v 1.51 2020/04/05 15:25:40 joerg Exp $ */ +/* $NetBSD: fsdb.c,v 1.52 2021/05/29 16:51:25 christos Exp $ */ /*- * Copyright (c) 1996, 2017 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fsdb.c,v 1.51 2020/04/05 15:25:40 joerg Exp $"); +__RCSID("$NetBSD: fsdb.c,v 1.52 2021/05/29 16:51:25 christos Exp $"); #endif /* not lint */ #include @@ -137,7 +137,7 @@ static int scannames(struct inodesc *); static int dolookup(char *); static int chinumfunc(struct inodesc *); static int chnamefunc(struct inodesc *); -static int dotime(char *, int32_t *, int32_t *); +static int dotime(char *, int64_t *, int32_t *); static void print_blks32(int32_t *buf, int size, uint64_t *blknum, struct wrinfo *wrp); static void print_blks64(int64_t *buf, int size, uint64_t *blknum, struct wrinfo *wrp); static void print_indirblks32(uint32_t blk, int ind_level, @@ -242,6 +242,7 @@ CMDFUNC(back); /* pop back to last ino CMDFUNC(chmtime); /* Change mtime */ CMDFUNC(chctime); /* Change ctime */ CMDFUNC(chatime); /* Change atime */ +CMDFUNC(chbirthtime); /* Change birthtime */ CMDFUNC(chinum); /* Change inode # of dirent */ CMDFUNC(chname); /* Change dirname of dirent */ @@ -278,6 +279,8 @@ static struct cmdtable cmds[] = { {"mtime", "Change mtime of current inode to MTIME", 2, 2, chmtime}, {"ctime", "Change ctime of current inode to CTIME", 2, 2, chctime}, {"atime", "Change atime of current inode to ATIME", 2, 2, chatime}, + {"birthtime", "Change atime of current inode to BIRTHTIME", 2, 2, + chbirthtime}, {"quit", "Exit", 1, 1, quit}, {"q", "Exit", 1, 1, quit}, {"exit", "Exit", 1, 1, quit}, @@ -1357,11 +1360,11 @@ CMDFUNC(chgroup) } static int -dotime(char *name, int32_t *rsec, int32_t *rnsec) +dotime(char *name, int64_t *rsec, int32_t *rnsec) { char *p, *val; struct tm t; - int32_t sec; + int64_t sec; int32_t nsec; p = strchr(name, '.'); if (p) { @@ -1405,14 +1408,15 @@ badformat: warnx("date/time out of range"); return 1; } - *rsec = iswap32(sec); + *rsec = iswap64(sec); *rnsec = iswap32(nsec); return 0; } CMDFUNC(chmtime) { - int32_t rsec, nsec; + int64_t rsec; + int32_t nsec; if (dotime(argv[1], , )) return 1; @@ -1425,7 +1429,8 @@ CMDFUNC(chmtime) CMDFUNC(chatime) { - int32_t rsec, nsec; + int64_t rsec; + int32_t nsec; if (dotime(argv[1], , )) return 1; @@ -1438,7 +1443,8 @@ CMDFUNC(chatime) CMDFUNC(chctime) { - int32_t rsec, nsec; + int64_t rsec; + int32_t nsec; if (dotime(argv[1], , )) return 1; @@ -1448,3 +1454,22 @@ CMDFUNC(chctime) printactive(); return 0; } + +CMDFUNC(chbirthtime) +{ + int64_t rsec; + int32_t nsec; + + if (!is_ufs2) { + warnx("birthtime can only be set in ufs2"); + return 1; + } + + if (dotime(argv[1], , )) + return 1; + curinode->dp2.di_birthtime = rsec; + curinode->dp2.di_birthnsec = nsec; + inodirty(); + printactive(); +
CVS commit: src/sbin/fsdb
Module Name:src Committed By: christos Date: Sat May 29 16:51:25 UTC 2021 Modified Files: src/sbin/fsdb: fsdb.8 fsdb.c fsdbutil.c Log Message: Add birthtime support and make time 64 bit. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sbin/fsdb/fsdb.8 cvs rdiff -u -r1.51 -r1.52 src/sbin/fsdb/fsdb.c cvs rdiff -u -r1.22 -r1.23 src/sbin/fsdb/fsdbutil.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:57 UTC 2021 Modified Files: src/sys/dev/acpi: thinkpad_acpi.c src/sys/sys: power.h Log Message: Add some more Thinkpad hotkeys. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/acpi/thinkpad_acpi.c cvs rdiff -u -r1.21 -r1.22 src/sys/sys/power.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/thinkpad_acpi.c diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.51 src/sys/dev/acpi/thinkpad_acpi.c:1.52 --- src/sys/dev/acpi/thinkpad_acpi.c:1.51 Sat May 29 16:49:49 2021 +++ src/sys/dev/acpi/thinkpad_acpi.c Sat May 29 16:49:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: thinkpad_acpi.c,v 1.51 2021/05/29 16:49:49 riastradh Exp $ */ +/* $NetBSD: thinkpad_acpi.c,v 1.52 2021/05/29 16:49:57 riastradh Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.51 2021/05/29 16:49:49 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.52 2021/05/29 16:49:57 riastradh Exp $"); #include #include @@ -76,7 +76,11 @@ typedef struct thinkpad_softc { #define TP_PSW_VOLUME_UP 17 #define TP_PSW_VOLUME_DOWN 18 #define TP_PSW_VOLUME_MUTE 19 -#define TP_PSW_LAST 20 +#define TP_PSW_STAR_BUTTON 20 +#define TP_PSW_SCISSORS_BUTTON 21 +#define TP_PSW_BLUETOOTH_BUTTON 22 +#define TP_PSW_KEYBOARD_BUTTON 23 +#define TP_PSW_LAST 24 struct sysmon_pswitch sc_smpsw[TP_PSW_LAST]; bool sc_smpsw_valid; @@ -108,6 +112,10 @@ typedef struct thinkpad_softc { #define THINKPAD_NOTIFY_VolumeDown 0x016 /* XXX: Not seen on T61 */ #define THINKPAD_NOTIFY_VolumeMute 0x017 /* XXX: Not seen on T61 */ #define THINKPAD_NOTIFY_ThinkVantage 0x018 +#define THINKPAD_NOTIFY_Star 0x311 +#define THINKPAD_NOTIFY_Scissors 0x312 +#define THINKPAD_NOTIFY_Bluetooth 0x314 +#define THINKPAD_NOTIFY_Keyboard 0x315 #define THINKPAD_CMOS_BRIGHTNESS_UP 0x04 #define THINKPAD_CMOS_BRIGHTNESS_DOWN 0x05 @@ -295,6 +303,10 @@ thinkpad_attach(device_t parent, device_ psw[TP_PSW_VOLUME_UP].smpsw_name = PSWITCH_HK_VOLUME_UP; psw[TP_PSW_VOLUME_DOWN].smpsw_name = PSWITCH_HK_VOLUME_DOWN; psw[TP_PSW_VOLUME_MUTE].smpsw_name = PSWITCH_HK_VOLUME_MUTE; + psw[TP_PSW_STAR_BUTTON].smpsw_name = PSWITCH_HK_STAR_BUTTON; + psw[TP_PSW_SCISSORS_BUTTON].smpsw_name = PSWITCH_HK_SCISSORS_BUTTON; + psw[TP_PSW_BLUETOOTH_BUTTON].smpsw_name = PSWITCH_HK_BLUETOOTH_BUTTON; + psw[TP_PSW_KEYBOARD_BUTTON].smpsw_name = PSWITCH_HK_KEYBOARD_BUTTON; #endif /* THINKPAD_NORMAL_HOTKEYS */ for (i = 0; i < TP_PSW_LAST; i++) { @@ -426,6 +438,15 @@ thinkpad_get_hotkeys(void *opaque) PSWITCH_EVENT_PRESSED); #endif break; + case THINKPAD_NOTIFY_Bluetooth: + thinkpad_bluetooth_toggle(sc); +#ifndef THINKPAD_NORMAL_HOTKEYS + if (sc->sc_smpsw_valid == false) +break; + sysmon_pswitch_event(>sc_smpsw[TP_PSW_BLUETOOTH_BUTTON], + PSWITCH_EVENT_PRESSED); +#endif + break; case THINKPAD_NOTIFY_wWANSwitch: thinkpad_wwan_toggle(sc); #ifndef THINKPAD_NORMAL_HOTKEYS @@ -543,6 +564,24 @@ thinkpad_get_hotkeys(void *opaque) sysmon_pswitch_event(>sc_smpsw[TP_PSW_VOLUME_MUTE], PSWITCH_EVENT_PRESSED); break; + case THINKPAD_NOTIFY_Star: + if (sc->sc_smpsw_valid == false) +break; + sysmon_pswitch_event(>sc_smpsw[TP_PSW_STAR_BUTTON], + PSWITCH_EVENT_PRESSED); + break; + case THINKPAD_NOTIFY_Scissors: + if (sc->sc_smpsw_valid == false) +break; + sysmon_pswitch_event(>sc_smpsw[TP_PSW_SCISSORS_BUTTON], + PSWITCH_EVENT_PRESSED); + break; + case THINKPAD_NOTIFY_Keyboard: + if (sc->sc_smpsw_valid == false) +break; + sysmon_pswitch_event(>sc_smpsw[TP_PSW_KEYBOARD_BUTTON], + PSWITCH_EVENT_PRESSED); + break; #else case THINKPAD_NOTIFY_FnF1: case THINKPAD_NOTIFY_PointerSwitch: @@ -552,6 +591,9 @@ thinkpad_get_hotkeys(void *opaque) case THINKPAD_NOTIFY_VolumeUp: case THINKPAD_NOTIFY_VolumeDown: case THINKPAD_NOTIFY_VolumeMute: + case THINKPAD_NOTIFY_Star: + case THINKPAD_NOTIFY_Scissors: + case THINKPAD_NOTIFY_Keyboard: /* XXXJDM we should deliver hotkeys as keycodes */ break; #endif /* THINKPAD_NORMAL_HOTKEYS */ Index: src/sys/sys/power.h diff -u src/sys/sys/power.h:1.21 src/sys/sys/power.h:1.22 --- src/sys/sys/power.h:1.21 Wed Aug 1 20:09:34 2018 +++ src/sys/sys/power.h Sat May 29 16:49:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: power.h,v 1.21 2018/08/01 20:09:34 kre Exp $ */ +/* $NetBSD: power.h,v 1.22 2021/05/29 16:49:57 riastradh Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -114,6 +114,10 @@ #define PSWITCH_HK_VOLUME_UP "volume-up" #define PSWITCH_HK_VOLUME_DOWN "volume-down" #define PSWITCH_HK_VOLUME_MUTE "volume-mute" +#define PSWITCH_HK_STAR_BUTTON "star-button" +#define PSWITCH_HK_SCISSORS_BUTTON "scissors-button" +#define
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:57 UTC 2021 Modified Files: src/sys/dev/acpi: thinkpad_acpi.c src/sys/sys: power.h Log Message: Add some more Thinkpad hotkeys. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/acpi/thinkpad_acpi.c cvs rdiff -u -r1.21 -r1.22 src/sys/sys/power.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:49 UTC 2021 Modified Files: src/sys/dev/acpi: thinkpad_acpi.c Log Message: thinkpad(4): Add dtrace probe for hotkey events. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/dev/acpi/thinkpad_acpi.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/acpi
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:49 UTC 2021 Modified Files: src/sys/dev/acpi: thinkpad_acpi.c Log Message: thinkpad(4): Add dtrace probe for hotkey events. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/dev/acpi/thinkpad_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/thinkpad_acpi.c diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.50 src/sys/dev/acpi/thinkpad_acpi.c:1.51 --- src/sys/dev/acpi/thinkpad_acpi.c:1.50 Sat May 29 16:49:39 2021 +++ src/sys/dev/acpi/thinkpad_acpi.c Sat May 29 16:49:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: thinkpad_acpi.c,v 1.50 2021/05/29 16:49:39 riastradh Exp $ */ +/* $NetBSD: thinkpad_acpi.c,v 1.51 2021/05/29 16:49:49 riastradh Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,11 +27,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.50 2021/05/29 16:49:39 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.51 2021/05/29 16:49:49 riastradh Exp $"); #include #include #include +#include #include #include @@ -363,6 +364,10 @@ thinkpad_notify_handler(ACPI_HANDLE hdl, (void)AcpiOsExecute(OSL_NOTIFY_HANDLER, thinkpad_get_hotkeys, sc); } +SDT_PROBE_DEFINE2(sdt, thinkpad, hotkey, MHKP, +"struct thinkpad_softc *"/*sc*/, +"ACPI_INTEGER"/*val*/); + static void thinkpad_get_hotkeys(void *opaque) { @@ -379,6 +384,7 @@ thinkpad_get_hotkeys(void *opaque) AcpiFormatException(rv)); return; } + SDT_PROBE2(sdt, thinkpad, hotkey, MHKP, sc, val); if (val == 0) return;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:39 UTC 2021 Modified Files: src/sys/dev/acpi: thinkpad_acpi.c Log Message: thinkpad(4): Attach at LEN0268 with v2 Thinkpad hotkeys too. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/dev/acpi/thinkpad_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/thinkpad_acpi.c diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.49 src/sys/dev/acpi/thinkpad_acpi.c:1.50 --- src/sys/dev/acpi/thinkpad_acpi.c:1.49 Fri Jan 29 15:49:55 2021 +++ src/sys/dev/acpi/thinkpad_acpi.c Sat May 29 16:49:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: thinkpad_acpi.c,v 1.49 2021/01/29 15:49:55 thorpej Exp $ */ +/* $NetBSD: thinkpad_acpi.c,v 1.50 2021/05/29 16:49:39 riastradh Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.49 2021/01/29 15:49:55 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.50 2021/05/29 16:49:39 riastradh Exp $"); #include #include @@ -111,7 +111,8 @@ typedef struct thinkpad_softc { #define THINKPAD_CMOS_BRIGHTNESS_UP 0x04 #define THINKPAD_CMOS_BRIGHTNESS_DOWN 0x05 -#define THINKPAD_HKEY_VERSION 0x0100 +#define THINKPAD_HKEY_VERSION_1 0x0100 +#define THINKPAD_HKEY_VERSION_2 0x0200 #define THINKPAD_DISPLAY_LCD 0x01 #define THINKPAD_DISPLAY_CRT 0x02 @@ -164,6 +165,7 @@ CFATTACH_DECL3_NEW(thinkpad, sizeof(thin static const struct device_compatible_entry compat_data[] = { { .compat = "IBM0068" }, { .compat = "LEN0068" }, + { .compat = "LEN0268" }, DEVICE_COMPAT_EOL }; @@ -178,13 +180,18 @@ thinkpad_match(device_t parent, cfdata_t if (ret == 0) return 0; - /* We only support hotkey version 0x0100 */ + /* We only support hotkey versions 0x0100 and 0x0200 */ if (ACPI_FAILURE(acpi_eval_integer(aa->aa_node->ad_handle, "MHKV", ))) return 0; - if (ver != THINKPAD_HKEY_VERSION) + switch (ver) { + case THINKPAD_HKEY_VERSION_1: + case THINKPAD_HKEY_VERSION_2: + break; + default: return 0; + } /* Cool, looks like we're good to go */ return ret;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:39 UTC 2021 Modified Files: src/sys/dev/acpi: thinkpad_acpi.c Log Message: thinkpad(4): Attach at LEN0268 with v2 Thinkpad hotkeys too. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/dev/acpi/thinkpad_acpi.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/usb
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:30 UTC 2021 Modified Files: src/sys/dev/usb: xhci.c Log Message: xhci(4): Wait USB_RESUME_WAIT ms, not 20 ms. Better to use the named constant, and although the spec says 20 ms is enough, apparently for some devices it's not. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/dev/usb/xhci.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/usb
Module Name:src Committed By: riastradh Date: Sat May 29 16:49:30 UTC 2021 Modified Files: src/sys/dev/usb: xhci.c Log Message: xhci(4): Wait USB_RESUME_WAIT ms, not 20 ms. Better to use the named constant, and although the spec says 20 ms is enough, apparently for some devices it's not. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/dev/usb/xhci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.142 src/sys/dev/usb/xhci.c:1.143 --- src/sys/dev/usb/xhci.c:1.142 Thu May 27 11:09:15 2021 +++ src/sys/dev/usb/xhci.c Sat May 29 16:49:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.142 2021/05/27 11:09:15 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.142 2021/05/27 11:09:15 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.143 2021/05/29 16:49:30 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1027,7 +1027,7 @@ xhci_resume(device_t self, const pmf_qua v |= XHCI_PS_LWS; v |= XHCI_PS_PLS_SET(XHCI_PS_PLS_SETRESUME); xhci_op_write_4(sc, port, v); -usb_delay_ms(>sc_bus, 20); +usb_delay_ms(>sc_bus, USB_RESUME_WAIT); } else { KASSERT(sc->sc_bus.ub_revision > USBREV_2_0); }
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Sat May 29 12:25:08 UTC 2021 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch mac68k to Xorg server 1.20. Only available driver is wsfb(4) both for 1.10 and 1.20, and there is no reason to stay with 1.10. XXX 1.20 works fine on WSFB* kernels with genfb(4), whereas both 1.10 and 1.20 fail for GENERIC* kernels with macfb(4) as some mandatory ioctl's are missing. It would be better to make genfb(4) default before netbsd-10 is branched. To generate a diff of this commit: cvs rdiff -u -r1.1254 -r1.1255 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Sat May 29 12:25:08 UTC 2021 Modified Files: src/share/mk: bsd.own.mk Log Message: Switch mac68k to Xorg server 1.20. Only available driver is wsfb(4) both for 1.10 and 1.20, and there is no reason to stay with 1.10. XXX 1.20 works fine on WSFB* kernels with genfb(4), whereas both 1.10 and 1.20 fail for GENERIC* kernels with macfb(4) as some mandatory ioctl's are missing. It would be better to make genfb(4) default before netbsd-10 is branched. To generate a diff of this commit: cvs rdiff -u -r1.1254 -r1.1255 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1254 src/share/mk/bsd.own.mk:1.1255 --- src/share/mk/bsd.own.mk:1.1254 Thu May 27 21:02:56 2021 +++ src/share/mk/bsd.own.mk Sat May 29 12:25:08 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1254 2021/05/27 21:02:56 christos Exp $ +# $NetBSD: bsd.own.mk,v 1.1255 2021/05/29 12:25:08 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1581,7 +1581,6 @@ X11SRCDIR.${_proto}proto?= ${X11SRCDIRM .if \ ${MACHINE} == "alpha" || \ ${MACHINE} == "amiga" || \ -${MACHINE} == "mac68k" || \ ${MACHINE} == "netwinder" || \ ${MACHINE} == "sgimips" || \ ${MACHINE} == "vax"
CVS commit: src/external/mit/xorg/server/drivers/xf86-input-keyboard
Module Name:src Committed By: rin Date: Sat May 29 12:15:32 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers/xf86-input-keyboard: Makefile Log Message: Make wskbd(4) default for mac68k; no other protocol is available. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.16 src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.17 --- src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile:1.16 Mon Dec 31 11:58:43 2018 +++ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile Sat May 29 12:15:32 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2018/12/31 11:58:43 mrg Exp $ +# $NetBSD: Makefile,v 1.17 2021/05/29 12:15:32 rin Exp $ DRIVER= xf86-input-keyboard DRIVER_NAME= kbd_drv @@ -16,7 +16,7 @@ CPPFLAGS+= -DPCVT_SUPPORT .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE} == "sparc" || \ ${MACHINE} == "sparc64" || ${MACHINE} == "sgimips" || \ ${MACHINE} == "shark" || ${MACHINE} == "vax" || \ -${MACHINE} == "evbarm" +${MACHINE} == "evbarm" || ${MACHINE} == "mac68k" CPPFLAGS+= -DDEFAULT_TO_WSKBD .endif
CVS commit: src/external/mit/xorg/server/drivers/xf86-input-keyboard
Module Name:src Committed By: rin Date: Sat May 29 12:15:32 UTC 2021 Modified Files: src/external/mit/xorg/server/drivers/xf86-input-keyboard: Makefile Log Message: Make wskbd(4) default for mac68k; no other protocol is available. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/external/mit/xorg/server/drivers/xf86-input-keyboard/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/conf
Module Name:src Committed By: simonb Date: Sat May 29 12:03:34 UTC 2021 Modified Files: src/sys/conf: files Log Message: Put the MSGBUFSIZE option in opt_param.h so that changes of its setting in kernel config files will be picked up automatically without needing a "make clean". Added to opt_param.h since ports define their default MSGBUFSIZE settings in their (or equivalent). To generate a diff of this commit: cvs rdiff -u -r1.1284 -r1.1285 src/sys/conf/files Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/conf
Module Name:src Committed By: simonb Date: Sat May 29 12:03:34 UTC 2021 Modified Files: src/sys/conf: files Log Message: Put the MSGBUFSIZE option in opt_param.h so that changes of its setting in kernel config files will be picked up automatically without needing a "make clean". Added to opt_param.h since ports define their default MSGBUFSIZE settings in their (or equivalent). To generate a diff of this commit: cvs rdiff -u -r1.1284 -r1.1285 src/sys/conf/files Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1284 src/sys/conf/files:1.1285 --- src/sys/conf/files:1.1284 Wed May 19 03:44:46 2021 +++ src/sys/conf/files Sat May 29 12:03:34 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1284 2021/05/19 03:44:46 yamaguchi Exp $ +# $NetBSD: files,v 1.1285 2021/05/29 12:03:34 simonb Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -18,6 +18,7 @@ devclass bus # (note, these are case-sensitive) # defparam opt_param.h MAXUSERS +defparam opt_param.h MSGBUFSIZE defflagINSECURE defflagKTRACE defflagMBUFTRACE
CVS commit: src/sys/arch/mips
Module Name:src Committed By: simonb Date: Sat May 29 12:35:27 UTC 2021 Modified Files: src/sys/arch/mips/include: cpuregs.h src/sys/arch/mips/mips: fp.S locore.S mips_emul.c mips_fpu.c mips_fputrap.c Log Message: Update the FPU register names and bit definitions to something somewhat modern (MIPS32/MIPS64) and convert to __BIT/__BITS. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/mips/include/cpuregs.h cvs rdiff -u -r1.57 -r1.58 src/sys/arch/mips/mips/fp.S cvs rdiff -u -r1.227 -r1.228 src/sys/arch/mips/mips/locore.S cvs rdiff -u -r1.29 -r1.30 src/sys/arch/mips/mips/mips_emul.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/mips/mips_fpu.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/mips/mips_fputrap.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/include/cpuregs.h diff -u src/sys/arch/mips/include/cpuregs.h:1.110 src/sys/arch/mips/include/cpuregs.h:1.111 --- src/sys/arch/mips/include/cpuregs.h:1.110 Wed Mar 17 11:05:37 2021 +++ src/sys/arch/mips/include/cpuregs.h Sat May 29 12:35:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuregs.h,v 1.110 2021/03/17 11:05:37 simonb Exp $ */ +/* $NetBSD: cpuregs.h,v 1.111 2021/05/29 12:35:27 simonb Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -704,40 +704,41 @@ /* * The floating point version and status registers. */ -#define MIPS_FPU_ID $0 -#define MIPS_FPU_CSR $31 +#define MIPS_FIR $0 /* FP Implementation and Revision Register */ +#define MIPS_FCSR $31 /* FP Control/Status Register */ /* * The floating point coprocessor status register bits. */ -#define MIPS_FPU_ROUNDING_BITS 0x0003 -#define MIPS_FPU_ROUND_RN 0x -#define MIPS_FPU_ROUND_RZ 0x0001 -#define MIPS_FPU_ROUND_RP 0x0002 -#define MIPS_FPU_ROUND_RM 0x0003 -#define MIPS_FPU_STICKY_BITS 0x007c -#define MIPS_FPU_STICKY_INEXACT 0x0004 -#define MIPS_FPU_STICKY_UNDERFLOW 0x0008 -#define MIPS_FPU_STICKY_OVERFLOW 0x0010 -#define MIPS_FPU_STICKY_DIV0 0x0020 -#define MIPS_FPU_STICKY_INVALID 0x0040 -#define MIPS_FPU_ENABLE_BITS 0x0f80 -#define MIPS_FPU_ENABLE_INEXACT 0x0080 -#define MIPS_FPU_ENABLE_UNDERFLOW 0x0100 -#define MIPS_FPU_ENABLE_OVERFLOW 0x0200 -#define MIPS_FPU_ENABLE_DIV0 0x0400 -#define MIPS_FPU_ENABLE_INVALID 0x0800 -#define MIPS_FPU_EXCEPTION_BITS 0x0003f000 -#define MIPS_FPU_EXCEPTION_INEXACT 0x1000 -#define MIPS_FPU_EXCEPTION_UNDERFLOW 0x2000 -#define MIPS_FPU_EXCEPTION_OVERFLOW 0x4000 -#define MIPS_FPU_EXCEPTION_DIV0 0x8000 -#define MIPS_FPU_EXCEPTION_INVALID 0x0001 -#define MIPS_FPU_EXCEPTION_UNIMPL 0x0002 -#define MIPS_FPU_COND_BIT 0x0080 -#define MIPS_FPU_FLUSH_BIT 0x0100 /* r4k, MBZ on r3k */ -#define MIPS1_FPC_MBZ_BITS 0xff7c -#define MIPS3_FPC_MBZ_BITS 0xfe7c +#define MIPS_FCSR_RM __BITS(1,0) +#define MIPS_FCSR_RM_RN 0 /* round to nearest */ +#define MIPS_FCSR_RM_RZ 1 /* round toward zerO */ +#define MIPS_FCSR_RM_RP 2 /* round towards +infinity */ +#define MIPS_FCSR_RM_RM 3 /* round towards -infinity */ +#define MIPS_FCSR_FLAGS __BITS(6,2) +#define MIPS_FCSR_FLAGS_I __BIT(2) /* inexact */ +#define MIPS_FCSR_FLAGS_U __BIT(3) /* underflow */ +#define MIPS_FCSR_FLAGS_O __BIT(4) /* overflow */ +#define MIPS_FCSR_FLAGS_Z __BIT(5) /* divide by zero */ +#define MIPS_FCSR_FLAGS_V __BIT(6) /* invalid operation */ +#define MIPS_FCSR_ENABLES __BITS(11,7) +#define MIPS_FCSR_ENABLES_I __BIT(7) /* inexact */ +#define MIPS_FCSR_ENABLES_U __BIT(8) /* underflow */ +#define MIPS_FCSR_ENABLES_O __BIT(9) /* overflow */ +#define MIPS_FCSR_ENABLES_Z __BIT(10) /* divide by zero */ +#define MIPS_FCSR_ENABLES_V __BIT(11) /* invalid operation */ +#define MIPS_FCSR_CAUSE __BITS(17,12) +#define MIPS_FCSR_CAUSE_I __BIT(12) /* inexact */ +#define MIPS_FCSR_CAUSE_U __BIT(13) /* underflow */ +#define MIPS_FCSR_CAUSE_O __BIT(14) /* overflow */ +#define MIPS_FCSR_CAUSE_Z __BIT(15) /* divide by zero */ +#define MIPS_FCSR_CAUSE_V __BIT(16) /* invalid operation */ +#define MIPS_FCSR_CAUSE_E __BIT(17) /* unimplemented operation */ +#define MIPS_FCSR_NAN_2008 __BIT(18) +#define MIPS_FCSR_ABS_2008 __BIT(19) +#define MIPS_FCSR_FCC0 __BIT(23) +#define MIPS_FCSR_FCC (MIPS_FPU_COND_BIT | __BITS(31,25)) +#define MIPS_FCSR_FS __BIT(24) /* r4k+ */ /* Index: src/sys/arch/mips/mips/fp.S diff -u src/sys/arch/mips/mips/fp.S:1.57 src/sys/arch/mips/mips/fp.S:1.58 --- src/sys/arch/mips/mips/fp.S:1.57 Mon May 24 07:27:39 2021 +++ src/sys/arch/mips/mips/fp.S Sat May 29 12:35:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fp.S,v 1.57 2021/05/24 07:27:39 simonb Exp $ */ +/* $NetBSD: fp.S,v 1.58 2021/05/29 12:35:27 simonb Exp $ */ /* * Copyright (c) 1992, 1993 @@ -143,10 +143,10 @@ NESTED(mips_emul_fp, CALLFRAME_SIZ, ra) PTR_L a3,
CVS commit: src/sys/arch/mips
Module Name:src Committed By: simonb Date: Sat May 29 12:35:27 UTC 2021 Modified Files: src/sys/arch/mips/include: cpuregs.h src/sys/arch/mips/mips: fp.S locore.S mips_emul.c mips_fpu.c mips_fputrap.c Log Message: Update the FPU register names and bit definitions to something somewhat modern (MIPS32/MIPS64) and convert to __BIT/__BITS. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/mips/include/cpuregs.h cvs rdiff -u -r1.57 -r1.58 src/sys/arch/mips/mips/fp.S cvs rdiff -u -r1.227 -r1.228 src/sys/arch/mips/mips/locore.S cvs rdiff -u -r1.29 -r1.30 src/sys/arch/mips/mips/mips_emul.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/mips/mips/mips_fpu.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/mips/mips_fputrap.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: maya Date: Sat May 29 13:08:08 UTC 2021 Modified Files: src: README.md Log Message: use libera.chat-hosted kiwiirc To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/README.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/README.md diff -u src/README.md:1.7 src/README.md:1.8 --- src/README.md:1.7 Wed May 26 22:26:16 2021 +++ src/README.md Sat May 29 13:08:08 2021 @@ -35,7 +35,7 @@ Troubleshooting - Send bugs and patches [via web form](https://www.NetBSD.org/cgi-bin/sendpr.cgi?gndb=netbsd). - Subscribe to the [mailing lists](https://www.NetBSD.org/mailinglists/). The [netbsd-users](https://www.NetBSD.org/mailinglists/#netbsd-users) list is a good choice for many problems; watch [current-users](https://www.NetBSD.org/mailinglists/#current-users) if you follow the bleeding edge of NetBSD-current. -- Join the community IRC channel [#netbsd @ libera.chat](https://kiwiirc.com/nextclient/irc.libera.chat/netbsd). +- Join the community IRC channel [#netbsd @ libera.chat](https://web.libera.chat/#netbsd). Latest sources --
CVS commit: src
Module Name:src Committed By: maya Date: Sat May 29 13:08:08 UTC 2021 Modified Files: src: README.md Log Message: use libera.chat-hosted kiwiirc To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/README.md Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: riastradh Date: Sat May 29 10:48:23 UTC 2021 Modified Files: src/sys/dev/ic: nvme.c Log Message: nvme(4): Move disestablishment of admin q interrupt to nvme_detach. Nothing re-established this after suspend/resume, so attempting suspend/resume/suspend would crash, and presumably we would miss interrupts after resume. This keeps the establish/disestablish more symmetric in attach/detach. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/dev/ic/nvme.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/ic
Module Name:src Committed By: riastradh Date: Sat May 29 10:48:23 UTC 2021 Modified Files: src/sys/dev/ic: nvme.c Log Message: nvme(4): Move disestablishment of admin q interrupt to nvme_detach. Nothing re-established this after suspend/resume, so attempting suspend/resume/suspend would crash, and presumably we would miss interrupts after resume. This keeps the establish/disestablish more symmetric in attach/detach. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/dev/ic/nvme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/nvme.c diff -u src/sys/dev/ic/nvme.c:1.56 src/sys/dev/ic/nvme.c:1.57 --- src/sys/dev/ic/nvme.c:1.56 Sat May 29 08:46:38 2021 +++ src/sys/dev/ic/nvme.c Sat May 29 10:48:23 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nvme.c,v 1.56 2021/05/29 08:46:38 riastradh Exp $ */ +/* $NetBSD: nvme.c,v 1.57 2021/05/29 10:48:23 riastradh Exp $ */ /* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.56 2021/05/29 08:46:38 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.57 2021/05/29 10:48:23 riastradh Exp $"); #include #include @@ -558,6 +558,7 @@ nvme_detach(struct nvme_softc *sc, int f return error; /* from now on we are committed to detach, following will never fail */ + sc->sc_intr_disestablish(sc, NVME_ADMIN_Q); for (i = 0; i < sc->sc_nq; i++) nvme_q_free(sc, sc->sc_q[i]); kmem_free(sc->sc_q, sizeof(*sc->sc_q) * sc->sc_nq); @@ -628,7 +629,7 @@ disable: return error; } -int +static int nvme_shutdown(struct nvme_softc *sc) { uint32_t cc, csts; @@ -645,7 +646,6 @@ nvme_shutdown(struct nvme_softc *sc) disabled = true; } } - sc->sc_intr_disestablish(sc, NVME_ADMIN_Q); if (disabled) goto disable;
CVS commit: src/sys/arch/atari/stand/keymaps
Module Name:src Committed By: tsutsui Date: Sat May 29 09:50:04 UTC 2021 Modified Files: src/sys/arch/atari/stand/keymaps: Makefile.inc src/sys/arch/atari/stand/keymaps/de: de-kbdmap.c src/sys/arch/atari/stand/keymaps/fr: fr-kbdmap.c src/sys/arch/atari/stand/keymaps/uk: uk-kbdmap.c src/sys/arch/atari/stand/keymaps/us: us-kbdmap.c Log Message: Appease compiler warnings derived from ancient HOST files. PR/56187 Also fix misc styles and formats per KNF. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/keymaps/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/fr/fr-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/uk/uk-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/us/us-kbdmap.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/atari/stand/keymaps/Makefile.inc diff -u src/sys/arch/atari/stand/keymaps/Makefile.inc:1.7 src/sys/arch/atari/stand/keymaps/Makefile.inc:1.8 --- src/sys/arch/atari/stand/keymaps/Makefile.inc:1.7 Sat May 4 21:56:50 2002 +++ src/sys/arch/atari/stand/keymaps/Makefile.inc Sat May 29 09:50:04 2021 @@ -1,4 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.7 2002/05/04 21:56:50 bjh21 Exp $ +# $NetBSD: Makefile.inc,v 1.8 2021/05/29 09:50:04 tsutsui Exp $ + +.include + +#HOST_CFLAGS+= -Wall -Werror realall: ${MAP} Index: src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c diff -u src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:1.3 src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:1.4 --- src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:1.3 Wed Mar 18 10:22:25 2009 +++ src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c Sat May 29 09:50:04 2021 @@ -1,172 +1,179 @@ -/* $NetBSD: de-kbdmap.c,v 1.3 2009/03/18 10:22:25 cegger Exp $ */ +/* $NetBSD: de-kbdmap.c,v 1.4 2021/05/29 09:50:04 tsutsui Exp $ */ /* * Contributed by Thomas Gerner */ +#if !defined(_KERNEL) +#include +#include +#endif + #include "../../../dev/kbdmap.h" /* mode shortcuts: */ #define S KBD_MODE_STRING -#define C KBD_MODE_CAPS -#define K KBD_MODE_KPAD +#define C KBD_MODE_CAPS +#define K KBD_MODE_KPAD struct kbdmap kbdmap; struct kbdmap ascii_kbdmap = { /* normal map */ { -/* 0x00 */ 0, 0, 0, ESC, 0, '1', 0, '2', -/* 0x04 */ 0, '3', 0, '4', 0, '5', 0, '6', -/* 0x08 */ 0, '7', 0, '8', 0, '9', 0, '0', -/* 0x0c */ C, 0xDF, 0, '\'', 0, '\b', 0, '\t', -/* 0x10 */ C, 'q', C, 'w', C, 'e', C, 'r', -/* 0x14 */ C, 't', C, 'z', C, 'u', C, 'i', -/* 0x18 */ C, 'o', C, 'p', C, 0xFC, 0, '+', -/* 0x1c */ 0, '\r', 0, 0, C, 'a', C, 's', -/* 0x20 */ C, 'd', C, 'f', C, 'g', C, 'h', -/* 0x24 */ C, 'j', C, 'k', C, 'l', C, 0xF6, -/* 0x28 */ C, 0xE4, 0, '#', 0, 0, 0, '~', -/* 0x2c */ C, 'y', C, 'x', C, 'c', C, 'v', -/* 0x30 */ C, 'b', C, 'n', C, 'm', 0, ',', -/* 0x34 */ 0, '.', 0, '-', 0, 0, 0, 0, -/* 0x38 */ 0, 0, 0, ' ', 0, 0, S, 0x10, -/* 0x3c */ S, 0x15, S, 0x1A, S, 0x1F, S, 0x24, -/* 0x40 */ S, 0x29, S, 0x2E, S, 0x33, S, 0x38, -/* 0x44 */ S, 0x3D, 0, 0, 0, 0, 0, 0, -/* 0x48 */ S, 0x00, 0, 0, 0, '-', S, 0x0C, -/* 0x4c */ 0, 0, S, 0x08, 0, '+', 0, 0, -/* 0x50 */ S, 0x04, 0, 0, 0, 0, 0, DEL, -/* 0x54 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x5c */ 0, 0, 0, 0, 0, 0, 0, 0, +/* 0x00 */ { 0, 0 }, { 0, ESC }, { 0, '1' }, { 0, '2' }, +/* 0x04 */ { 0, '3' }, { 0, '4' }, { 0, '5' }, { 0, '6' }, +/* 0x08 */ { 0, '7' }, { 0, '8' }, { 0, '9' }, { 0, '0' }, +/* 0x0C */ { C, 0xDF }, { 0, '\'' }, { 0, '\b' }, { 0, '\t' }, +/* 0x10 */ { C, 'q' }, { C, 'w' }, { C, 'e' }, { C, 'r' }, +/* 0x14 */ { C, 't' }, { C, 'z' }, { C, 'u' }, { C, 'i' }, +/* 0x18 */ { C, 'o' }, { C, 'p' }, { C, 0xFC }, { 0, '+' }, +/* 0x1C */ { 0, '\r' }, { 0, 0 }, { C, 'a' }, { C, 's' }, +/* 0x20 */ { C, 'd' }, { C, 'f' }, { C, 'g' }, { C, 'h' }, +/* 0x24 */ { C, 'j' }, { C, 'k' }, { C, 'l' }, { C, 0xF6 }, +/* 0x28 */ { C, 0xE4 }, { 0, '#' }, { 0, 0 }, { 0, '~' }, +/* 0x2C */ { C, 'y' }, { C, 'x' }, { C, 'c' }, { C, 'v' }, +/* 0x30 */ { C, 'b' }, { C, 'n' }, { C, 'm' }, { 0, ',' }, +/* 0x34 */ { 0, '.' }, { 0, '-' }, { 0, 0 }, { 0, 0 }, +/* 0x38 */ { 0, 0 }, { 0, ' ' }, { 0, 0 }, { S, 0x10 }, +/* 0x3C */ { S, 0x15 }, { S, 0x1A }, { S, 0x1F }, { S, 0x24 }, +/* 0x40 */ { S, 0x29 }, { S, 0x2E }, { S, 0x33 }, { S, 0x38 }, +/* 0x44 */ { S, 0x3D }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x48 */ { S, 0x00 }, { 0, 0 }, { 0, '-' }, { S, 0x0C }, +/* 0x4C */ { 0, 0 }, { S, 0x08 }, { 0, '+' }, { 0, 0 }, +/* 0x50 */ { S, 0x04 }, { 0, 0 }, { 0, 0 }, { 0, DEL }, +/* 0x54 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x58 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x5C */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, /* 0x60 */ -/* 0x60 */ 0, '<', 0, 0, 0, 0, 0, '(', -/* 0x64 */ 0, ')', 0, '/', 0, '*',
CVS commit: src/sys/arch/atari/stand/keymaps
Module Name:src Committed By: tsutsui Date: Sat May 29 09:50:04 UTC 2021 Modified Files: src/sys/arch/atari/stand/keymaps: Makefile.inc src/sys/arch/atari/stand/keymaps/de: de-kbdmap.c src/sys/arch/atari/stand/keymaps/fr: fr-kbdmap.c src/sys/arch/atari/stand/keymaps/uk: uk-kbdmap.c src/sys/arch/atari/stand/keymaps/us: us-kbdmap.c Log Message: Appease compiler warnings derived from ancient HOST files. PR/56187 Also fix misc styles and formats per KNF. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/keymaps/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/fr/fr-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/uk/uk-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/us/us-kbdmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: riastradh Date: Sat May 29 09:47:28 UTC 2021 Modified Files: src/sys/arch/x86/pci: dwiic_pci.c Log Message: dwiic(4): Attribute output correctly and relegate to debug-level. Tidy up a little while here. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/pci/dwiic_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: riastradh Date: Sat May 29 09:47:28 UTC 2021 Modified Files: src/sys/arch/x86/pci: dwiic_pci.c Log Message: dwiic(4): Attribute output correctly and relegate to debug-level. Tidy up a little while here. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x86/pci/dwiic_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/dwiic_pci.c diff -u src/sys/arch/x86/pci/dwiic_pci.c:1.4 src/sys/arch/x86/pci/dwiic_pci.c:1.5 --- src/sys/arch/x86/pci/dwiic_pci.c:1.4 Sat Apr 24 23:36:51 2021 +++ src/sys/arch/x86/pci/dwiic_pci.c Sat May 29 09:47:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dwiic_pci.c,v 1.4 2021/04/24 23:36:51 thorpej Exp $ */ +/* $NetBSD: dwiic_pci.c,v 1.5 2021/05/29 09:47:28 riastradh Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwiic_pci.c,v 1.4 2021/04/24 23:36:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwiic_pci.c,v 1.5 2021/05/29 09:47:28 riastradh Exp $"); #include #include @@ -68,9 +68,8 @@ struct pci_dwiic_softc { static uint32_t lpss_read(struct pci_dwiic_softc *sc, int offset) { - u_int32_t b = bus_space_read_4(sc->sc_dwiic.sc_iot, sc->sc_dwiic.sc_ioh, - offset); - return b; + return bus_space_read_4(sc->sc_dwiic.sc_iot, sc->sc_dwiic.sc_ioh, + offset); } static void @@ -169,7 +168,7 @@ pci_dwiic_attach(device_t parent, device pa->pa_bus, pa->pa_device, pa->pa_function); if (sc->sc_acpinode) { - sc->sc_dwiic.sc_iba.iba_child_devices = + sc->sc_dwiic.sc_iba.iba_child_devices = acpi_enter_i2c_devs(NULL, sc->sc_acpinode); } else { aprint_verbose_dev(self, "no matching ACPI node\n"); @@ -188,13 +187,18 @@ out: static bool dwiic_pci_power(struct dwiic_softc *dwsc, bool power) { - struct pci_dwiic_softc *sc = (void *)dwsc; - pcireg_t pmreg; - - printf("status 0x%x\n", pci_conf_read(sc->sc_pc, sc->sc_ptag, PCI_COMMAND_STATUS_REG)); - printf("reset 0x%x\n", lpss_read(sc, LPSS_RESET)); - printf("rlo 0x%x\n", lpss_read(sc, LPSS_REMAP_LO)); - printf("rho 0x%x\n", lpss_read(sc, LPSS_REMAP_HI)); + struct pci_dwiic_softc *sc = container_of(dwsc, struct pci_dwiic_softc, + sc_dwiic); + pcireg_t pmreg, csr; + uint32_t reset, rlo, rhi; + + csr = pci_conf_read(sc->sc_pc, sc->sc_ptag, PCI_COMMAND_STATUS_REG); + reset = lpss_read(sc, LPSS_RESET); + rlo = lpss_read(sc, LPSS_REMAP_LO); + rhi = lpss_read(sc, LPSS_REMAP_HI); + aprint_debug_dev(dwsc->sc_dev, + "status 0x%x reset 0x%x rlo 0x%x rhi 0x%x\n", + csr, reset, rlo, rhi); if (!power) lpss_write(sc, LPSS_CLKGATE, LPSS_CLKGATE_CTRL_OFF); @@ -205,7 +209,7 @@ dwiic_pci_power(struct dwiic_softc *dwsc pci_conf_write(sc->sc_pc, sc->sc_ptag, pmreg + PCI_PMCSR, power ? PCI_PMCSR_STATE_D0 : PCI_PMCSR_STATE_D3); DELAY(1); /* 10 milliseconds */ - DPRINTF((" -> 0x%x\n", + DPRINTF((" -> 0x%x\n", pci_conf_read(sc->sc_pc, sc->sc_ptag, pmreg + PCI_PMCSR))); } if (power) {
CVS commit: src/usr.bin/aiomixer
Module Name:src Committed By: nia Date: Sat May 29 09:11:41 UTC 2021 Modified Files: src/usr.bin/aiomixer: draw.c Log Message: aiomixer: remove workaround for libcurses bug To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/aiomixer/draw.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/aiomixer/draw.c diff -u src/usr.bin/aiomixer/draw.c:1.6 src/usr.bin/aiomixer/draw.c:1.7 --- src/usr.bin/aiomixer/draw.c:1.6 Sat May 8 14:49:13 2021 +++ src/usr.bin/aiomixer/draw.c Sat May 29 09:11:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: draw.c,v 1.6 2021/05/08 14:49:13 nia Exp $ */ +/* $NetBSD: draw.c,v 1.7 2021/05/29 09:11:41 nia Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. * All rights reserved. @@ -364,13 +364,7 @@ create_widgets(struct aiomixer *aio) control->widget_y = class->height; class->height += control->height; } -#ifdef notyet - /* - * NetBSD curses wresize() bounds the pad to the height of - * the screen even though it's already taller. Probably a bug. - */ wresize(class->widgetpad, class->height, getmaxx(stdscr)); -#endif } aio->last_max_x = getmaxx(stdscr);
CVS commit: src/usr.bin/aiomixer
Module Name:src Committed By: nia Date: Sat May 29 09:11:41 UTC 2021 Modified Files: src/usr.bin/aiomixer: draw.c Log Message: aiomixer: remove workaround for libcurses bug To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/aiomixer/draw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libcurses
Module Name:src Committed By: nia Date: Sat May 29 09:11:14 UTC 2021 Modified Files: src/lib/libcurses: resize.c Log Message: wresize: don't bound pads to the size of the screen allows avoiding a workaround in aiomixer, ok blymn uwe To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/lib/libcurses/resize.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/resize.c diff -u src/lib/libcurses/resize.c:1.30 src/lib/libcurses/resize.c:1.31 --- src/lib/libcurses/resize.c:1.30 Fri Nov 2 04:17:39 2018 +++ src/lib/libcurses/resize.c Sat May 29 09:11:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: resize.c,v 1.30 2018/11/02 04:17:39 blymn Exp $ */ +/* $NetBSD: resize.c,v 1.31 2021/05/29 09:11:14 nia Exp $ */ /* * Copyright (c) 2001 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)resize.c blymn 2001/08/26"; #else -__RCSID("$NetBSD: resize.c,v 1.30 2018/11/02 04:17:39 blymn Exp $"); +__RCSID("$NetBSD: resize.c,v 1.31 2021/05/29 09:11:14 nia Exp $"); #endif #endif/* not lint */ @@ -62,7 +62,25 @@ wresize(WINDOW *win, int req_nlines, int __CTRACE(__CTRACE_WINDOW, "wresize: (%p, %d, %d)\n", win, nlines, ncols); #endif - if (win->orig == NULL) { + if (win->orig != NULL) { + /* subwins must fit inside the parent - check this */ + if (win->begy > win->orig->begy + win->orig->maxy) + win->begy = win->orig->begy + win->orig->maxy - 1; + if (win->begy + nlines > win->orig->begy + win->orig->maxy) + nlines = 0; + if (nlines <= 0) + nlines += win->orig->begy + win->orig->maxy - win->begy; + if (nlines < 1) + nlines = 1; + if (win->begx > win->orig->begx + win->orig->maxx) + win->begx = win->orig->begx + win->orig->maxx - 1; + if (win->begx + ncols > win->orig->begx + win->orig->maxx) + ncols = 0; + if (ncols <= 0) + ncols += win->orig->begx + win->orig->maxx - win->begx; + if (ncols < 1) + ncols = 1; + } else if (!(win->flags & __ISPAD)) { /* bound "our" windows by the screen size */ if (win == curscr || win == __virtscr || win == stdscr) { if (nlines > LINES) @@ -91,24 +109,6 @@ wresize(WINDOW *win, int req_nlines, int if (ncols < 1) ncols = 1; } - } else { - /* subwins must fit inside the parent - check this */ - if (win->begy > win->orig->begy + win->orig->maxy) - win->begy = win->orig->begy + win->orig->maxy - 1; - if (win->begy + nlines > win->orig->begy + win->orig->maxy) - nlines = 0; - if (nlines <= 0) - nlines += win->orig->begy + win->orig->maxy - win->begy; - if (nlines < 1) - nlines = 1; - if (win->begx > win->orig->begx + win->orig->maxx) - win->begx = win->orig->begx + win->orig->maxx - 1; - if (win->begx + ncols > win->orig->begx + win->orig->maxx) - ncols = 0; - if (ncols <= 0) - ncols += win->orig->begx + win->orig->maxx - win->begx; - if (ncols < 1) - ncols = 1; } if ((__resizewin(win, nlines, ncols)) == ERR)