CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Wed May 5 03:54:16 UTC 2021 Modified Files: src/sys/arch/alpha/alpha: cpu.c Log Message: Decorate cpu_info_list with __read_mostly; it's never modified once all the CPUs are attached. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/arch/alpha/alpha/cpu.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/cpu.c diff -u src/sys/arch/alpha/alpha/cpu.c:1.103 src/sys/arch/alpha/alpha/cpu.c:1.104 --- src/sys/arch/alpha/alpha/cpu.c:1.103 Thu Oct 15 01:00:01 2020 +++ src/sys/arch/alpha/alpha/cpu.c Wed May 5 03:54:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.103 2020/10/15 01:00:01 thorpej Exp $ */ +/* $NetBSD: cpu.c,v 1.104 2021/05/05 03:54:16 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2020 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.103 2020/10/15 01:00:01 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.104 2021/05/05 03:54:16 thorpej Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -84,7 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10 struct cpu_info cpu_info_primary __cacheline_aligned = { .ci_curlwp = }; -struct cpu_info *cpu_info_list = _info_primary; +struct cpu_info *cpu_info_list __read_mostly = _info_primary; #if defined(MULTIPROCESSOR) /*
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Wed May 5 02:15:18 UTC 2021 Modified Files: src/sys/arch/alpha/pci: apecs_dma.c cia_dma.c dwlpx_dma.c irongate_dma.c lca_dma.c mcpcia_dma.c pci_bwx_bus_io_chipdep.c pci_bwx_bus_mem_chipdep.c pci_swiz_bus_io_chipdep.c pci_swiz_bus_mem_chipdep.c tsp_dma.c ttwoga_dma.c src/sys/arch/alpha/tc: tc_bus_mem.c Log Message: Moar static. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/alpha/pci/apecs_dma.c \ src/sys/arch/alpha/pci/mcpcia_dma.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/alpha/pci/cia_dma.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/alpha/pci/dwlpx_dma.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/alpha/pci/irongate_dma.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/alpha/pci/lca_dma.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c cvs rdiff -u -r1.42 -r1.43 src/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c cvs rdiff -u -r1.47 -r1.48 src/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/pci/tsp_dma.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/pci/ttwoga_dma.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/tc/tc_bus_mem.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/pci/apecs_dma.c diff -u src/sys/arch/alpha/pci/apecs_dma.c:1.23 src/sys/arch/alpha/pci/apecs_dma.c:1.24 --- src/sys/arch/alpha/pci/apecs_dma.c:1.23 Sun Oct 11 00:33:31 2020 +++ src/sys/arch/alpha/pci/apecs_dma.c Wed May 5 02:15:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: apecs_dma.c,v 1.23 2020/10/11 00:33:31 thorpej Exp $ */ +/* $NetBSD: apecs_dma.c,v 1.24 2021/05/05 02:15:18 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: apecs_dma.c,v 1.23 2020/10/11 00:33:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apecs_dma.c,v 1.24 2021/05/05 02:15:18 thorpej Exp $"); #include #include @@ -48,21 +48,21 @@ __KERNEL_RCSID(0, "$NetBSD: apecs_dma.c, #include #include -bus_dma_tag_t apecs_dma_get_tag(bus_dma_tag_t, alpha_bus_t); +static bus_dma_tag_t apecs_dma_get_tag(bus_dma_tag_t, alpha_bus_t); -int apecs_bus_dmamap_load_sgmap(bus_dma_tag_t, bus_dmamap_t, void *, - bus_size_t, struct proc *, int); +static int apecs_bus_dmamap_load_sgmap(bus_dma_tag_t, bus_dmamap_t, void *, + bus_size_t, struct proc *, int); -int apecs_bus_dmamap_load_mbuf_sgmap(bus_dma_tag_t, bus_dmamap_t, - struct mbuf *, int); +static int apecs_bus_dmamap_load_mbuf_sgmap(bus_dma_tag_t, bus_dmamap_t, + struct mbuf *, int); -int apecs_bus_dmamap_load_uio_sgmap(bus_dma_tag_t, bus_dmamap_t, - struct uio *, int); +static int apecs_bus_dmamap_load_uio_sgmap(bus_dma_tag_t, bus_dmamap_t, + struct uio *, int); -int apecs_bus_dmamap_load_raw_sgmap(bus_dma_tag_t, bus_dmamap_t, - bus_dma_segment_t *, int, bus_size_t, int); +static int apecs_bus_dmamap_load_raw_sgmap(bus_dma_tag_t, bus_dmamap_t, + bus_dma_segment_t *, int, bus_size_t, int); -void apecs_bus_dmamap_unload_sgmap(bus_dma_tag_t, bus_dmamap_t); +static void apecs_bus_dmamap_unload_sgmap(bus_dma_tag_t, bus_dmamap_t); /* * Direct-mapped window: 1G at 1G @@ -187,7 +187,7 @@ apecs_dma_init(struct apecs_config *acp) * Return the bus dma tag to be used for the specified bus type. * INTERNAL USE ONLY! */ -bus_dma_tag_t +static bus_dma_tag_t apecs_dma_get_tag(bus_dma_tag_t t, alpha_bus_t bustype) { struct apecs_config *acp = t->_cookie; @@ -218,7 +218,7 @@ apecs_dma_get_tag(bus_dma_tag_t t, alpha /* * Load an APECS SGMAP-mapped DMA map with a linear buffer. */ -int +static int apecs_bus_dmamap_load_sgmap(bus_dma_tag_t t, bus_dmamap_t map, void *buf, bus_size_t buflen, struct proc *p, int flags) { int error; @@ -234,7 +234,7 @@ apecs_bus_dmamap_load_sgmap(bus_dma_tag_ /* * Load an APECS SGMAP-mapped DMA map with an mbuf chain. */ -int +static int apecs_bus_dmamap_load_mbuf_sgmap(bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m, int flags) { int error; @@ -249,7 +249,7 @@ apecs_bus_dmamap_load_mbuf_sgmap(bus_dma /* * Load an APECS SGMAP-mapped DMA map with a uio. */ -int +static int apecs_bus_dmamap_load_uio_sgmap(bus_dma_tag_t t, bus_dmamap_t map, struct uio *uio, int flags) { int error; @@ -264,7 +264,7 @@ apecs_bus_dmamap_load_uio_sgmap(bus_dma_ /* * Load an APECS SGMAP-mapped DMA map with raw memory. */ -int +static int apecs_bus_dmamap_load_raw_sgmap(bus_dma_tag_t t, bus_dmamap_t map, bus_dma_segment_t *segs, int nsegs, bus_size_t size, int flags) { int error; @@ -280,7 +280,7 @@ apecs_bus_dmamap_load_raw_sgmap(bus_dma_ /* * Unload an APECS DMA map. */ -void +static void apecs_bus_dmamap_unload_sgmap(bus_dma_tag_t t,
CVS commit: src/sys/arch/alpha/conf
Module Name:src Committed By: thorpej Date: Wed May 5 01:35:35 UTC 2021 Modified Files: src/sys/arch/alpha/conf: Makefile.alpha Added Files: src/sys/arch/alpha/conf: kern.ldscript Log Message: Add a linker script for the kernel. The main difference vs the standard built-in for "ld -N" is to actually process the .data.cacheline_aligned and .data.read_mostly sections correctly. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/arch/alpha/conf/Makefile.alpha cvs rdiff -u -r0 -r1.1 src/sys/arch/alpha/conf/kern.ldscript 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/conf/Makefile.alpha diff -u src/sys/arch/alpha/conf/Makefile.alpha:1.85 src/sys/arch/alpha/conf/Makefile.alpha:1.86 --- src/sys/arch/alpha/conf/Makefile.alpha:1.85 Sat Sep 22 12:24:01 2018 +++ src/sys/arch/alpha/conf/Makefile.alpha Wed May 5 01:35:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.alpha,v 1.85 2018/09/22 12:24:01 rin Exp $ +# $NetBSD: Makefile.alpha,v 1.86 2021/05/05 01:35:35 thorpej Exp $ # Makefile for NetBSD # @@ -61,9 +61,9 @@ lock_stubs.o: assym.h ## ## (5) link settings ## -LINKFORMAT= -N TEXTADDR?= fca0 ENTRYPOINT= __transfer +KERNLDSCRIPT?= ${ALPHA}/conf/kern.ldscript EXTRA_LINKFLAGS= -G 4 STRIPFLAGS= -g -X Added files: Index: src/sys/arch/alpha/conf/kern.ldscript diff -u /dev/null src/sys/arch/alpha/conf/kern.ldscript:1.1 --- /dev/null Wed May 5 01:35:35 2021 +++ src/sys/arch/alpha/conf/kern.ldscript Wed May 5 01:35:35 2021 @@ -0,0 +1,86 @@ +/* $NetBSD: kern.ldscript,v 1.1 2021/05/05 01:35:35 thorpej Exp $ */ + +/* + * Linker script for the NetBSD/alpha kernel. + * + * This largely behaves the same as the standard elf64-alpha linker + * script for "ld -N"; the kernel is loaded into K0SEG, so there is + * no reason to page-align the .data segment. + */ + +#include "assym.h" /* for COHERENCY_UNIT */ + +OUTPUT_FORMAT("elf64-alpha", "elf64-alpha", + "elf64-alpha") +OUTPUT_ARCH(alpha) +SECTIONS +{ + .text : + { + *(.text) + *(.text.*) + *(.stub) + } =0x47ff041f + _etext = . ; + PROVIDE (etext = .); + + .rodata : + { + *(.rodata .rodata.*) + } + + .data : + { + *(.data) + + . = ALIGN(COHERENCY_UNIT); + *(.data.cacheline_aligned) + + . = ALIGN(COHERENCY_UNIT); + *(.data.read_mostly) + + . = ALIGN(COHERENCY_UNIT); + *(.data.*) + } + + /* + * Small-data located along side GOT and small-bss for + * GP-relative addressing. + */ + + .got : + { + *(.got) + } + + .sdata : + { + *(.sdata .sdata.*) + } + _edata = . ; + PROVIDE (edata = .) ; + + . = .; + __bss_start = .; + .sbss : + { + *(.sbss .sbss.*) + *(.scommon) + } + + .bss : + { + *(.bss .bss.*) + *(COMMON) + } + + /* End of the kernel image */ + __kernel_end = . ; + _end = . ; + PROVIDE (end = .) ; + + .note.netbsd.ident : + { + KEEP(*(.note.netbsd.ident)); + } +}
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: khorben Date: Tue May 4 21:13:38 UTC 2021 Modified Files: src/sys/arch/amd64/stand/prekern: prng.c Log Message: prekern: add warnings upon problems collecting entropy As submitted on port-amd64@ (part 3/3) Tested on NetBSD/amd64. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amd64/stand/prekern/prng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/stand/prekern/prng.c diff -u src/sys/arch/amd64/stand/prekern/prng.c:1.4 src/sys/arch/amd64/stand/prekern/prng.c:1.5 --- src/sys/arch/amd64/stand/prekern/prng.c:1.4 Tue May 4 21:10:25 2021 +++ src/sys/arch/amd64/stand/prekern/prng.c Tue May 4 21:13:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: prng.c,v 1.4 2021/05/04 21:10:25 khorben Exp $ */ +/* $NetBSD: prng.c,v 1.5 2021/05/04 21:13:38 khorben Exp $ */ /* * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. @@ -84,6 +84,7 @@ prng_get_entropy_file(SHA512_CTX *ctx) uint8_t digest[SHA1_DIGEST_LENGTH]; rndsave_t *rndsave; SHA1_CTX sig; + size_t count = 0; biml = (struct btinfo_modulelist *)prng_lookup_bootinfo(BTINFO_MODULELIST); @@ -117,7 +118,10 @@ prng_get_entropy_file(SHA512_CTX *ctx) } SHA512_Update(ctx, rndsave->data, sizeof(rndsave->data)); + count++; } + if (count == 0) + print_state(STATE_WARNING, "No entropy file could be loaded"); } /* @@ -168,6 +172,8 @@ prng_init(void) cpuid(0x01, 0x00, descs); has_rdrand = (descs[2] & CPUID2_RDRAND) != 0; } + if (!has_rdseed && !has_rdrand) + print_state(STATE_WARNING, "No CPU entropy feature detected"); SHA512_Init(); prng_get_entropy_file();
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: khorben Date: Tue May 4 21:10:25 UTC 2021 Modified Files: src/sys/arch/amd64/stand/prekern: prng.c Log Message: prekern: do not choke on bad entropy files As submitted on port-amd64@ (part 2/3) Tested on NetBSD/amd64. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/stand/prekern/prng.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/stand/prekern/prng.c diff -u src/sys/arch/amd64/stand/prekern/prng.c:1.3 src/sys/arch/amd64/stand/prekern/prng.c:1.4 --- src/sys/arch/amd64/stand/prekern/prng.c:1.3 Thu May 21 08:20:25 2020 +++ src/sys/arch/amd64/stand/prekern/prng.c Tue May 4 21:10:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: prng.c,v 1.3 2020/05/21 08:20:25 maxv Exp $ */ +/* $NetBSD: prng.c,v 1.4 2021/05/04 21:10:25 khorben Exp $ */ /* * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. @@ -98,7 +98,9 @@ prng_get_entropy_file(SHA512_CTX *ctx) continue; } if (bi->len != sizeof(rndsave_t)) { - fatal("rndsave_t size mismatch"); + print_state(STATE_WARNING, + "size mismatch in entropy file"); + continue; } rndsave = (rndsave_t *)(vaddr_t)bi->base; @@ -109,7 +111,9 @@ prng_get_entropy_file(SHA512_CTX *ctx) SHA1Update(, rndsave->data, sizeof(rndsave->data)); SHA1Final(digest, ); if (memcmp(digest, rndsave->digest, sizeof(digest))) { - fatal("bad SHA1 checksum"); + print_state(STATE_WARNING, + "bad SHA1 checksum in entropy file"); + continue; } SHA512_Update(ctx, rndsave->data, sizeof(rndsave->data));
CVS commit: src/sys/arch/amd64/stand/prekern
Module Name:src Committed By: khorben Date: Tue May 4 21:09:16 UTC 2021 Modified Files: src/sys/arch/amd64/stand/prekern: console.c elf.c mm.c prekern.c prekern.h Log Message: prekern: add support for warning messages As submitted on port-amd64@ (part 1/3) Tested on NetBSD/amd64. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/stand/prekern/console.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/stand/prekern/elf.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/stand/prekern/mm.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/stand/prekern/prekern.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/stand/prekern/prekern.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/stand/prekern/console.c diff -u src/sys/arch/amd64/stand/prekern/console.c:1.6 src/sys/arch/amd64/stand/prekern/console.c:1.7 --- src/sys/arch/amd64/stand/prekern/console.c:1.6 Sat May 23 08:25:32 2020 +++ src/sys/arch/amd64/stand/prekern/console.c Tue May 4 21:09:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: console.c,v 1.6 2020/05/23 08:25:32 maxv Exp $ */ +/* $NetBSD: console.c,v 1.7 2021/05/04 21:09:16 khorben Exp $ */ /* * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. @@ -100,13 +100,24 @@ void print(char *buf) print_ext(WHITE_ON_BLACK, buf); } -void print_state(bool ok, char *buf) +void print_state(state_t state, char *buf) { print("["); - if (ok) - print_ext(GREEN_ON_BLACK, "+"); - else - print_ext(RED_ON_BLACK, "!"); + switch (state) + { + case STATE_NORMAL: + print_ext(GREEN_ON_BLACK, "+"); + break; + case STATE_ERROR: + print_ext(RED_ON_BLACK, "!"); + break; + case STATE_WARNING: + print_ext(YELLOW_ON_BLACK, "*"); + break; + default: + print_ext(WHITE_ON_BLACK, "?"); + break; + } print("] "); print(buf); print("\n"); Index: src/sys/arch/amd64/stand/prekern/elf.c diff -u src/sys/arch/amd64/stand/prekern/elf.c:1.21 src/sys/arch/amd64/stand/prekern/elf.c:1.22 --- src/sys/arch/amd64/stand/prekern/elf.c:1.21 Thu May 7 17:58:26 2020 +++ src/sys/arch/amd64/stand/prekern/elf.c Tue May 4 21:09:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: elf.c,v 1.21 2020/05/07 17:58:26 maxv Exp $ */ +/* $NetBSD: elf.c,v 1.22 2021/05/04 21:09:16 khorben Exp $ */ /* * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. @@ -426,7 +426,7 @@ elf_kernel_reloc(void) Elf_Sym *sym; size_t i, j; - print_state(true, "ELF info created"); + print_state(STATE_NORMAL, "ELF info created"); /* * Update all symbol values with the appropriate offset. @@ -447,7 +447,7 @@ elf_kernel_reloc(void) } } - print_state(true, "Symbol values updated"); + print_state(STATE_NORMAL, "Symbol values updated"); /* * Perform relocations without addend if there are any. @@ -482,7 +482,7 @@ elf_kernel_reloc(void) } } - print_state(true, "REL relocations applied"); + print_state(STATE_NORMAL, "REL relocations applied"); /* * Perform relocations with addend if there are any. @@ -517,7 +517,7 @@ elf_kernel_reloc(void) } } - print_state(true, "RELA relocations applied"); + print_state(STATE_NORMAL, "RELA relocations applied"); /* * Get the entry point. @@ -527,7 +527,7 @@ elf_kernel_reloc(void) fatal("elf_kernel_reloc: entry point not found"); } - print_state(true, "Entry point found"); + print_state(STATE_NORMAL, "Entry point found"); return ent; } Index: src/sys/arch/amd64/stand/prekern/mm.c diff -u src/sys/arch/amd64/stand/prekern/mm.c:1.27 src/sys/arch/amd64/stand/prekern/mm.c:1.28 --- src/sys/arch/amd64/stand/prekern/mm.c:1.27 Thu May 7 17:58:26 2020 +++ src/sys/arch/amd64/stand/prekern/mm.c Tue May 4 21:09:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mm.c,v 1.27 2020/05/07 17:58:26 maxv Exp $ */ +/* $NetBSD: mm.c,v 1.28 2021/05/04 21:09:16 khorben Exp $ */ /* * Copyright (c) 2017-2020 The NetBSD Foundation, Inc. All rights reserved. @@ -148,7 +148,7 @@ mm_bootspace_mprotect(void) mm_mprotect(bootspace.segs[i].va, bootspace.segs[i].sz, prot); } - print_state(true, "Segments protection updated"); + print_state(STATE_NORMAL, "Segments protection updated"); } static size_t @@ -493,9 +493,9 @@ mm_map_kernel(void) { memset(, 0, sizeof(bootspace)); mm_map_head(); - print_state(true, "Head region mapped"); + print_state(STATE_NORMAL, "Head region mapped"); elf_map_sections(); - print_state(true, "Segments mapped"); + print_state(STATE_NORMAL, "Segments mapped"); mm_map_boot(); - print_state(true, "Boot region mapped"); + print_state(STATE_NORMAL, "Boot region mapped"); } Index: src/sys/arch/amd64/stand/prekern/prekern.c diff -u src/sys/arch/amd64/stand/prekern/prekern.c:1.13 src/sys/arch/amd64/stand/prekern/prekern.c:1.14 --- src/sys/arch/amd64/stand/prekern/prekern.c:1.13 Sat May 23 08:25:32 2020 +++ src/sys/arch/amd64/stand/prekern/prekern.c Tue May 4
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue May 4 19:57:57 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: msg_118.c msg_118.exp Log Message: tests/lint: make test for message 118 platform-independent To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_118.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_118.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_118.c diff -u src/tests/usr.bin/xlint/lint1/msg_118.c:1.4 src/tests/usr.bin/xlint/lint1/msg_118.c:1.5 --- src/tests/usr.bin/xlint/lint1/msg_118.c:1.4 Tue Apr 6 21:59:58 2021 +++ src/tests/usr.bin/xlint/lint1/msg_118.c Tue May 4 19:57:56 2021 @@ -1,18 +1,39 @@ -/* $NetBSD: msg_118.c,v 1.4 2021/04/06 21:59:58 rillig Exp $ */ +/* $NetBSD: msg_118.c,v 1.5 2021/05/04 19:57:56 rillig Exp $ */ # 3 "msg_118.c" /* Test for message: semantics of '%s' change in ANSI C; use explicit cast [118] */ -/* lint1-flags: -hsw */ +/* lint1-flags: -hw */ int -int_shl_uint(int i, unsigned int u) +int_shl_uint(int left, unsigned int right) { - return i << u; + return left << right; } -unsigned -uint_shl_ulong(unsigned a, unsigned long ul) +int +int_shr_uint(int left, unsigned int right) +{ + /* expect+1: semantics of '>>' change in ANSI C */ + return left >> right; +} + +int +int_shl_int(int left, int right) { - return a << ul; /* expect: 118 */ + return left << right; } + +/* + * The behavior of typeok_shl can only be triggered on 64-bit platforms, or + * in C99 mode, and the above tests require C90 mode. + * + * On 32-bit platforms both operands of the '<<' operator are first promoted + * individually, and since C90 does not know 'long long', the maximum + * bit-size for an integer type is 32 bits. + * + * Because of this difference there is no test for that case since as of + * 2021-05-04, all lint1 tests must be independent of the target platform and + * there is no way to toggle individual tests depending on the properties of + * the target platform. + */ Index: src/tests/usr.bin/xlint/lint1/msg_118.exp diff -u src/tests/usr.bin/xlint/lint1/msg_118.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_118.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_118.exp:1.2 Sun Feb 28 01:22:02 2021 +++ src/tests/usr.bin/xlint/lint1/msg_118.exp Tue May 4 19:57:56 2021 @@ -1 +1 @@ -msg_118.c(17): warning: semantics of '<<' change in ANSI C; use explicit cast [118] +msg_118.c(18): warning: semantics of '>>' change in ANSI C; use explicit cast [118]
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Tue May 4 19:07:19 UTC 2021 Modified Files: src/sys/stand/efiboot: Makefile.efiboot Log Message: Set VERSIONMACHINE to ${MACHINE} instead of evbarm (oops) To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/stand/efiboot/Makefile.efiboot Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/stand/efiboot/Makefile.efiboot diff -u src/sys/stand/efiboot/Makefile.efiboot:1.19 src/sys/stand/efiboot/Makefile.efiboot:1.20 --- src/sys/stand/efiboot/Makefile.efiboot:1.19 Sun Oct 11 14:03:33 2020 +++ src/sys/stand/efiboot/Makefile.efiboot Tue May 4 19:07:19 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.efiboot,v 1.19 2020/10/11 14:03:33 jmcneill Exp $ +# $NetBSD: Makefile.efiboot,v 1.20 2021/05/04 19:07:19 jmcneill Exp $ S= ${.CURDIR}/../../.. @@ -137,7 +137,7 @@ cleanlibdir: LIBLIST= ${LIBGNUEFI} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBSA} -VERSIONMACHINE=evbarm +VERSIONMACHINE=${MACHINE} .include "${S}/conf/newvers_stand.mk" CLEANFILES+= ${PROG}.so ${PROG}.tmp
CVS commit: src/share/man/man4
Module Name:src Committed By: christos Date: Tue May 4 17:51:55 UTC 2021 Modified Files: src/share/man/man4: envsys.4 Log Message: Fix code example (from RVP) To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/share/man/man4/envsys.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/envsys.4 diff -u src/share/man/man4/envsys.4:1.54 src/share/man/man4/envsys.4:1.55 --- src/share/man/man4/envsys.4:1.54 Fri May 10 01:59:47 2019 +++ src/share/man/man4/envsys.4 Tue May 4 13:51:55 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: envsys.4,v 1.54 2019/05/10 05:59:47 cnst Exp $ +.\" $NetBSD: envsys.4,v 1.55 2021/05/04 17:51:55 christos Exp $ .\" .\" Copyright (c) 2007 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 January 10, 2013 +.Dd May 4, 2021 .Dt ENVSYS 4 .Os .Sh NAME @@ -411,7 +411,7 @@ main(void) if (!prop_dictionary_set(global_dict, "aibs0", array)) err(EINVAL, "prop_dictionary_set global"); - obj = prop_string_create_cstring_nocopy("sensor0"); + obj = prop_string_create_nocopy("sensor0"); if (obj == NULL || !prop_dictionary_set(sensor_dict, "index", obj)) err(EINVAL, "sensor index"); @@ -429,7 +429,7 @@ main(void) if (!prop_array_add(array, sensor_dict)) err(EINVAL, "prop_array_add"); - if ((fd = open(_DEV_SYSMON, O_RDWR)) == \-1) + if ((fd = open(_PATH_SYSMON, O_RDWR)) == \-1) err(EXIT_FAILURE, "open"); /* we are done, send the dictionary */ @@ -437,6 +437,7 @@ main(void) fd, ENVSYS_SETDICTIONARY); prop_object_release(array); + prop_object_release(sensor_dict); prop_object_release(global_dict); (void)close(fd); return error;
CVS commit: src/share/man/man4
Module Name:src Committed By: christos Date: Tue May 4 17:47:51 UTC 2021 Modified Files: src/share/man/man4: gpio.4 Log Message: Fix incorrect structure name (Rocky Hotas) To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/share/man/man4/gpio.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/gpio.4 diff -u src/share/man/man4/gpio.4:1.35 src/share/man/man4/gpio.4:1.36 --- src/share/man/man4/gpio.4:1.35 Thu Feb 13 17:48:11 2020 +++ src/share/man/man4/gpio.4 Tue May 4 13:47:51 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpio.4,v 1.35 2020/02/13 22:48:11 sevan Exp $ +.\" $NetBSD: gpio.4,v 1.36 2021/05/04 17:47:51 christos Exp $ .\" $OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd February 13, 2020 +.Dd May 4, 2021 .Dt GPIO 4 .Os .Sh NAME @@ -85,7 +85,7 @@ struct gpio_info { .Pp .It Dv GPIOREAD ( struct gpio_req ) Returns the input pin value in the -.Fa gpio_pin_op +.Fa gpio_req structure: .Bd -literal #define GPIOMAXNAME 64
CVS commit: src/external/mit/xorg/lib/libXaw
Module Name:src Committed By: rillig Date: Tue May 4 17:47:05 UTC 2021 Modified Files: src/external/mit/xorg/lib/libXaw: Makefile.common Log Message: libXaw: fix Clang build --- Pixmap.pico --- error: unknown warning option '-Wno-discarded-qualifiers'; did you mean '-Wno-ignored-qualifiers'? [-Werror,-Wunknown-warning-option] To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 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.common diff -u src/external/mit/xorg/lib/libXaw/Makefile.common:1.1 src/external/mit/xorg/lib/libXaw/Makefile.common:1.2 --- src/external/mit/xorg/lib/libXaw/Makefile.common:1.1 Mon Apr 26 21:53:53 2021 +++ src/external/mit/xorg/lib/libXaw/Makefile.common Tue May 4 17:47:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.1 2021/04/26 21:53:53 mrg Exp $ +# $NetBSD: Makefile.common,v 1.2 2021/05/04 17:47:05 rillig Exp $ CPPFLAGS+= -DHAVE_WCHAR_H \ -DHAVE_WCTYPE_H \ @@ -17,5 +17,5 @@ LIBDPLIBS=\ Xext ${.CURDIR}/../libXext \ X11 ${.CURDIR}/../libX11/dynamic -COPTS.Pixmap.c+= -Wno-discarded-qualifiers -COPTS.TextAction.c+= -Wno-discarded-qualifiers +COPTS.Pixmap.c+= ${${ACTIVE_CC} == "gcc":? -Wno-discarded-qualifiers :} +COPTS.TextAction.c+= ${${ACTIVE_CC} == "gcc":? -Wno-discarded-qualifiers :}
CVS commit: src/external/bsd/compiler_rt/lib/clang/lib/netbsd
Module Name:src Committed By: rillig Date: Tue May 4 17:23:54 UTC 2021 Modified Files: src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan_cxx-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan_cxx-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/tsan-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/tsan_cxx-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/ubsan_minimal-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/ubsan_standalone-m64: Makefile src/external/bsd/compiler_rt/lib/clang/lib/netbsd/ubsan_standalone_cxx-m64: Makefile Log Message: compiler_rt: build .a.syms files as part of dependall The previous target 'all' is a top-level target intended to be specified by the user. During the regular build, 'dependall' is used instead of 'all'. The target 'realall' is common to those two. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan_cxx-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan_cxx-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/tsan-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/tsan_cxx-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/ubsan_minimal-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/ubsan_standalone-m64/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/ubsan_standalone_cxx-m64/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/bsd/compiler_rt/lib/clang/lib/netbsd/asan-m64/Makefile diff -u src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan-m64/Makefile:1.5 src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan-m64/Makefile:1.6 --- src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan-m64/Makefile:1.5 Fri Apr 30 22:48:37 2021 +++ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan-m64/Makefile Tue May 4 17:23:53 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2021/04/30 22:48:37 rillig Exp $ +# $NetBSD: Makefile,v 1.6 2021/05/04 17:23:53 rillig Exp $ NOSANITIZER=# defined @@ -57,7 +57,7 @@ COPTS+= -fPIC SYMS= libclang_rt.asan-x86_64.a.syms SYMS_EXTRA= ${TOPDIR}/lib/asan/asan.syms.extra -all: ${SYMS} +realall: ${SYMS} CLEANFILES+= ${SYMS} FILES= ${SYMS} Index: src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan_cxx-m64/Makefile diff -u src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan_cxx-m64/Makefile:1.5 src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan_cxx-m64/Makefile:1.6 --- src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan_cxx-m64/Makefile:1.5 Fri Apr 30 22:48:37 2021 +++ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/asan_cxx-m64/Makefile Tue May 4 17:23:53 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2021/04/30 22:48:37 rillig Exp $ +# $NetBSD: Makefile,v 1.6 2021/05/04 17:23:53 rillig Exp $ NOSANITIZER=# defined @@ -40,7 +40,7 @@ COPTS+= -fPIC SYMS= libclang_rt.asan_cxx-x86_64.a.syms SYMS_EXTRA= ${TOPDIR}/lib/asan/asan.syms.extra # Overlooked in upstream compiler-rt (8.0) ? -all: ${SYMS} +realall: ${SYMS} CLEANFILES+= ${SYMS} FILES= ${SYMS} Index: src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan-m64/Makefile diff -u src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan-m64/Makefile:1.5 src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan-m64/Makefile:1.6 --- src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan-m64/Makefile:1.5 Fri Apr 30 22:48:37 2021 +++ src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan-m64/Makefile Tue May 4 17:23:54 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2021/04/30 22:48:37 rillig Exp $ +# $NetBSD: Makefile,v 1.6 2021/05/04 17:23:54 rillig Exp $ NOSANITIZER=# defined @@ -52,7 +52,7 @@ COPTS+= -fPIC SYMS= libclang_rt.msan-x86_64.a.syms SYMS_EXTRA= ${TOPDIR}/lib/msan/msan.syms.extra -all: ${SYMS} +realall: ${SYMS} CLEANFILES+= ${SYMS} FILES= ${SYMS} Index: src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan_cxx-m64/Makefile diff -u src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan_cxx-m64/Makefile:1.5 src/external/bsd/compiler_rt/lib/clang/lib/netbsd/msan_cxx-m64/Makefile:1.6 ---
CVS commit: src/external/mpl/bind/dist/lib/isc/include/isc
Module Name:src Committed By: rillig Date: Tue May 4 13:40:35 UTC 2021 Modified Files: src/external/mpl/bind/dist/lib/isc/include/isc: radix.h Log Message: bind: remove unnecessary CONSTCOND Lint does not need this anymore, since 2021-01-31. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/mpl/bind/dist/lib/isc/include/isc/radix.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/mpl/bind/dist/lib/isc/include/isc/radix.h diff -u src/external/mpl/bind/dist/lib/isc/include/isc/radix.h:1.6 src/external/mpl/bind/dist/lib/isc/include/isc/radix.h:1.7 --- src/external/mpl/bind/dist/lib/isc/include/isc/radix.h:1.6 Mon Apr 5 11:29:49 2021 +++ src/external/mpl/bind/dist/lib/isc/include/isc/radix.h Tue May 4 13:40:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: radix.h,v 1.6 2021/04/05 11:29:49 rillig Exp $ */ +/* $NetBSD: radix.h,v 1.7 2021/05/04 13:40:34 rillig Exp $ */ /* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") @@ -219,6 +219,6 @@ isc_radix_process(isc_radix_tree_t *radi }\ }\ }\ - while (/*CONSTCOND*/0) + while (0) #endif /* _RADIX_H */
CVS commit: src/external/mpl/bind/include/isc
Module Name:src Committed By: rillig Date: Tue May 4 13:16:06 UTC 2021 Modified Files: src/external/mpl/bind/include/isc: stdatomic.h Log Message: bind: fix Clang build I had already fixed this on 2021-03-27, but the fix was accidentally reverted on 2021-04-29 when updating to bind 9.16.15. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/include/isc/stdatomic.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/mpl/bind/include/isc/stdatomic.h diff -u src/external/mpl/bind/include/isc/stdatomic.h:1.6 src/external/mpl/bind/include/isc/stdatomic.h:1.7 --- src/external/mpl/bind/include/isc/stdatomic.h:1.6 Thu Apr 29 17:26:14 2021 +++ src/external/mpl/bind/include/isc/stdatomic.h Tue May 4 13:16:06 2021 @@ -142,7 +142,7 @@ typedef uintmax_t atomic_uintmax_t; __c11_atomic_compare_exchange_weak_explicit(obj, expected, desired, \ succ, fail) #define atomic_exchange_explicit(obj, desired, order) \ - __c11_atomic_exchange_explicit(obj, expected, order) + __c11_atomic_exchange_explicit(obj, desired, order) #elif defined(__GNUC_ATOMICS) /* __atomic builtins */ #define atomic_init(obj, desired) (*obj = desired) #define atomic_load_explicit(obj, order) __atomic_load_n(obj, order)
CVS commit: src/sys/uvm/pmap
Module Name:src Committed By: skrll Date: Tue May 4 09:05:34 UTC 2021 Modified Files: src/sys/uvm/pmap: pmap_tlb.c Log Message: Always expose pmap_tlb_update_addr now that all current PMAP_HWPAGEWALKERs (arm) users provide the required functions. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/uvm/pmap/pmap_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/pmap/pmap_tlb.c diff -u src/sys/uvm/pmap/pmap_tlb.c:1.43 src/sys/uvm/pmap/pmap_tlb.c:1.44 --- src/sys/uvm/pmap/pmap_tlb.c:1.43 Sat May 1 14:00:57 2021 +++ src/sys/uvm/pmap/pmap_tlb.c Tue May 4 09:05:34 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.43 2021/05/01 14:00:57 skrll Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.44 2021/05/04 09:05:34 skrll Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.43 2021/05/01 14:00:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.44 2021/05/04 09:05:34 skrll Exp $"); /* * Manages address spaces in a TLB. @@ -733,7 +733,6 @@ pmap_tlb_shootdown_bystanders(pmap_t pm) } #endif /* MULTIPROCESSOR && PMAP_TLB_NEED_SHOOTDOWN */ -#ifndef PMAP_HWPAGEWALKER int pmap_tlb_update_addr(pmap_t pm, vaddr_t va, pt_entry_t pte, u_int flags) { @@ -773,7 +772,6 @@ pmap_tlb_update_addr(pmap_t pm, vaddr_t return rv; } -#endif /* !PMAP_HWPAGEWALKER */ void pmap_tlb_invalidate_addr(pmap_t pm, vaddr_t va)
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: skrll Date: Tue May 4 09:02:21 UTC 2021 Modified Files: src/sys/arch/arm/include/arm32: pmap.h Log Message: Provide pte_{value,valid_p} To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/sys/arch/arm/include/arm32/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/arm/include/arm32/pmap.h diff -u src/sys/arch/arm/include/arm32/pmap.h:1.169 src/sys/arch/arm/include/arm32/pmap.h:1.170 --- src/sys/arch/arm/include/arm32/pmap.h:1.169 Fri Oct 30 18:54:36 2020 +++ src/sys/arch/arm/include/arm32/pmap.h Tue May 4 09:02:21 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.169 2020/10/30 18:54:36 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.170 2021/05/04 09:02:21 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -627,6 +627,20 @@ l2pte_reset(pt_entry_t *ptep) #define pmap_pte_v(pte) l2pte_valid_p(*(pte)) #define pmap_pte_pa(pte) l2pte_pa(*(pte)) +static inline uint32_t +pte_value(pt_entry_t pte) +{ + return pte; +} + +static inline bool +pte_valid_p(pt_entry_t pte) +{ + + return l2pte_valid_p(pte); +} + + /* Size of the kernel part of the L1 page table */ #define KERNEL_PD_SIZE \ (L1_TABLE_SIZE - (KERNEL_BASE >> L1_S_SHIFT) * sizeof(pd_entry_t))