CVS commit: src/sys/dev/bluetooth
Module Name:src Committed By: nat Date: Fri Aug 11 00:58:37 UTC 2017 Modified Files: src/sys/dev/bluetooth: bth5.c Log Message: Ensure the XMIT flag is cleared before calling bth5_start. This avoids a panic due to a diagnostic assertion. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/bluetooth/bth5.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/bluetooth/bth5.c diff -u src/sys/dev/bluetooth/bth5.c:1.1 src/sys/dev/bluetooth/bth5.c:1.2 --- src/sys/dev/bluetooth/bth5.c:1.1 Thu Aug 10 13:22:19 2017 +++ src/sys/dev/bluetooth/bth5.c Fri Aug 11 00:58:37 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bth5.c,v 1.1 2017/08/10 13:22:19 nat Exp $ */ +/* $NetBSD: bth5.c,v 1.2 2017/08/11 00:58:37 nat Exp $ */ /* * Copyright (c) 2017 Nathanial Sloss* All rights reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.1 2017/08/10 13:22:19 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.2 2017/08/11 00:58:37 nat Exp $"); #include #include @@ -963,6 +963,7 @@ bth5_mux_transmit(struct bth5_softc *sc) hdrp->flags |= BTH5_FLAGS_PROTOCOL_REL; /* Reliable */ goto transmit; } + sc->sc_flags &= ~BTH5_XMIT; bth5_start(sc); if (sc->sc_mux_send_ack == true) { m = bth5_create_ackpkt();
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Fri Aug 11 00:00:25 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: RPI Log Message: attach audio at audiobus (for pad) To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/evbarm/conf/RPI Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/RPI diff -u src/sys/arch/evbarm/conf/RPI:1.75 src/sys/arch/evbarm/conf/RPI:1.76 --- src/sys/arch/evbarm/conf/RPI:1.75 Thu Aug 10 13:48:19 2017 +++ src/sys/arch/evbarm/conf/RPI Fri Aug 11 00:00:25 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: RPI,v 1.75 2017/08/10 13:48:19 nat Exp $ +# $NetBSD: RPI,v 1.76 2017/08/11 00:00:25 jmcneill Exp $ # # RPi -- Raspberry Pi # @@ -66,7 +66,7 @@ vchiq0 at obio? # AUDS vcaudio0 at vchiq0 -audio0 at vcaudio0 +audio* at audiobus? spkr* at audio? # PC speaker (synthesized)
CVS commit: src/bin/rmdir
Module Name:src Committed By: ginsbach Date: Thu Aug 10 22:52:13 UTC 2017 Modified Files: src/bin/rmdir: rmdir.c Log Message: PR/48182: Fix rmdir -p handling of top-level (root) directory. XXX: pullup-8 XXX: pullup-7 XXX: pullup-6 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/bin/rmdir/rmdir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/rmdir/rmdir.c diff -u src/bin/rmdir/rmdir.c:1.26 src/bin/rmdir/rmdir.c:1.27 --- src/bin/rmdir/rmdir.c:1.26 Mon Aug 29 14:49:38 2011 +++ src/bin/rmdir/rmdir.c Thu Aug 10 22:52:13 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rmdir.c,v 1.26 2011/08/29 14:49:38 joerg Exp $ */ +/* $NetBSD: rmdir.c,v 1.27 2017/08/10 22:52:13 ginsbach Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)rmdir.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: rmdir.c,v 1.26 2011/08/29 14:49:38 joerg Exp $"); +__RCSID("$NetBSD: rmdir.c,v 1.27 2017/08/10 22:52:13 ginsbach Exp $"); #endif #endif /* not lint */ @@ -103,6 +103,10 @@ rm_path(char *path) /* Ignore trailing '/' on deleted name */ continue; + if (*path == 0) + /* At top level (root) directory */ + break; + if (rmdir(path) < 0) { warn("%s", path); return (1);
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Thu Aug 10 21:07:48 UTC 2017 Modified Files: src/usr.bin/make: meta.c Log Message: Avoid full path meta file names for subdir of .OBJDIR To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/usr.bin/make/meta.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/make/meta.c diff -u src/usr.bin/make/meta.c:1.68 src/usr.bin/make/meta.c:1.69 --- src/usr.bin/make/meta.c:1.68 Sun Jul 9 04:54:00 2017 +++ src/usr.bin/make/meta.c Thu Aug 10 21:07:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.68 2017/07/09 04:54:00 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.69 2017/08/10 21:07:48 sjg Exp $ */ /* * Implement 'meta' mode. @@ -246,6 +246,8 @@ meta_name(struct GNode *gn, char *mname, char *rp; char *cp; char *tp; +char *dtp; +size_t ldname; /* * Weed out relative paths from the target file name. @@ -282,10 +284,15 @@ meta_name(struct GNode *gn, char *mname, } /* on some systems dirname may modify its arg */ tp = bmake_strdup(tname); -if (strcmp(dname, dirname(tp)) == 0) +dtp = dirname(tp); +if (strcmp(dname, dtp) == 0) snprintf(mname, mnamelen, "%s.meta", tname); else { - snprintf(mname, mnamelen, "%s/%s.meta", dname, tname); + ldname = strlen(dname); + if (strncmp(dname, dtp, ldname) == 0 && dtp[ldname] == '/') + snprintf(mname, mnamelen, "%s/%s.meta", dname, [ldname+1]); + else + snprintf(mname, mnamelen, "%s/%s.meta", dname, tname); /* * Replace path separators in the file name after the
CVS commit: src/usr.sbin/btattach
Module Name:src Committed By: jmcneill Date: Thu Aug 10 20:43:12 UTC 2017 Modified Files: src/usr.sbin/btattach: Makefile init_bcm43xx.c Added Files: src/usr.sbin/btattach: firmload.c firmload.h Log Message: Derive the firmware name from the device's local name instead of hard-coding BCM4340A1. Search hw.firmware.path for the firmware image instead of loading it from the current directory. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/btattach/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/btattach/firmload.c \ src/usr.sbin/btattach/firmload.h cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/btattach/init_bcm43xx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btattach/Makefile diff -u src/usr.sbin/btattach/Makefile:1.3 src/usr.sbin/btattach/Makefile:1.4 --- src/usr.sbin/btattach/Makefile:1.3 Thu Aug 10 13:34:29 2017 +++ src/usr.sbin/btattach/Makefile Thu Aug 10 20:43:12 2017 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.3 2017/08/10 13:34:29 nat Exp $ +# $NetBSD: Makefile,v 1.4 2017/08/10 20:43:12 jmcneill Exp $ PROG= btattach MAN= btattach.8 -SRCS= btattach.c init_bcm2035.c init_bgb2xx.c init_csr.c init_digi.c \ - init_ericsson.c init_st.c init_stlc2500.c init_swave.c init_unistone.c \ - init_bcm43xx.c +SRCS= btattach.c firmload.c init_bcm2035.c init_bcm43xx.c init_bgb2xx.c \ + init_csr.c init_digi.c init_ericsson.c init_st.c init_stlc2500.c \ + init_swave.c init_unistone.c DPADD+= ${LIBBLUETOOTH} ${LIBUTIL} LDADD+= -lbluetooth -lutil Index: src/usr.sbin/btattach/init_bcm43xx.c diff -u src/usr.sbin/btattach/init_bcm43xx.c:1.2 src/usr.sbin/btattach/init_bcm43xx.c:1.3 --- src/usr.sbin/btattach/init_bcm43xx.c:1.2 Thu Aug 10 18:45:20 2017 +++ src/usr.sbin/btattach/init_bcm43xx.c Thu Aug 10 20:43:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: init_bcm43xx.c,v 1.2 2017/08/10 18:45:20 jakllsch Exp $ */ +/* $NetBSD: init_bcm43xx.c,v 1.3 2017/08/10 20:43:12 jmcneill Exp $ */ /*- * Copyright (c) 2017 Iain Hibbert @@ -34,7 +34,9 @@ */ #include -__RCSID("$NetBSD: init_bcm43xx.c,v 1.2 2017/08/10 18:45:20 jakllsch Exp $"); +__RCSID("$NetBSD: init_bcm43xx.c,v 1.3 2017/08/10 20:43:12 jmcneill Exp $"); + +#include #include #include @@ -46,6 +48,7 @@ __RCSID("$NetBSD: init_bcm43xx.c,v 1.2 2 #include #include "btattach.h" +#include "firmload.h" #define HCI_CMD_BCM43XX_SET_UART_BAUD_RATE \ HCI_OPCODE(HCI_OGF_VENDOR, 0x018) @@ -56,25 +59,57 @@ __RCSID("$NetBSD: init_bcm43xx.c,v 1.2 2 #define HCI_CMD_43XXFWDN \ HCI_OPCODE(HCI_OGF_VENDOR, 0x02e) +#define HCI_CMD_GET_LOCAL_NAME 0x0c14 + +static int +bcm43xx_get_local_name(int fd, char *name, size_t namelen) +{ + char buf[256]; + size_t len; + + memset(buf, 0, sizeof(buf)); + + uart_send_cmd(fd, HCI_CMD_GET_LOCAL_NAME, NULL, 0); + len = uart_recv_cc(fd, HCI_CMD_GET_LOCAL_NAME, buf, sizeof(buf)); + if (len == 0) + return EIO; + + strlcpy(name, [1], MIN(len - 1, namelen)); + + if (strlen(name) == 0) + return EIO; + + return 0; +} + void init_bcm43xx(int fd, unsigned int speed) { uint8_t rate[6]; uint8_t fw_buf[1024]; - char fw[] = "./BCM43430A1.hcd"; int fwfd, fw_len; uint8_t resp[7]; uint16_t fw_cmd; + char local_name[256]; + char fw[260]; memset(rate, 0, sizeof(rate)); + memset(local_name, 0, sizeof(local_name)); uart_send_cmd(fd, HCI_CMD_RESET, NULL, 0); uart_recv_cc(fd, HCI_CMD_RESET, , sizeof(resp)); /* assume it succeeded? */ - fwfd = open(fw, O_RDONLY); + if (bcm43xx_get_local_name(fd, local_name, sizeof(local_name)) != 0) { + fprintf(stderr, "Couldn't read local name\n"); + return; + } + snprintf(fw, sizeof(fw), "%s.hcd", local_name); + + fwfd = firmware_open("bcm43xx", fw); if (fwfd < 0) { - fprintf(stderr, "Unable to open firmware: %s\n", fw); + fprintf(stderr, "Unable to open firmware bcm43xx/%s: %s\n", + fw, strerror(errno)); return; } Added files: Index: src/usr.sbin/btattach/firmload.c diff -u /dev/null src/usr.sbin/btattach/firmload.c:1.1 --- /dev/null Thu Aug 10 20:43:12 2017 +++ src/usr.sbin/btattach/firmload.c Thu Aug 10 20:43:12 2017 @@ -0,0 +1,84 @@ +/* $NetBSD: firmload.c,v 1.1 2017/08/10 20:43:12 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES,
CVS commit: src
Module Name:src Committed By: jakllsch Date: Thu Aug 10 19:42:53 UTC 2017 Modified Files: src/etc/mtree: NetBSD.dist.base src/external/broadcom/bcm43xx: Makefile Log Message: Fix up bcm43xx bluetooth firmware addition. Including mtree directory addition, and using the correct spelling of the license file name. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.1 -r1.2 src/external/broadcom/bcm43xx/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.161 src/etc/mtree/NetBSD.dist.base:1.162 --- src/etc/mtree/NetBSD.dist.base:1.161 Tue Aug 1 20:07:43 2017 +++ src/etc/mtree/NetBSD.dist.base Thu Aug 10 19:42:53 2017 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.161 2017/08/01 20:07:43 joerg Exp $ +# $NetBSD: NetBSD.dist.base,v 1.162 2017/08/10 19:42:53 jakllsch Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -269,6 +269,7 @@ ./usr/libdata/debug/usr/mdec ./usr/libdata/debug/usr/sbin ./usr/libdata/firmware +./usr/libdata/firmware/bcm43xx ./usr/libdata/ldscripts ./usr/libdata/lint ./usr/libexec Index: src/external/broadcom/bcm43xx/Makefile diff -u src/external/broadcom/bcm43xx/Makefile:1.1 src/external/broadcom/bcm43xx/Makefile:1.2 --- src/external/broadcom/bcm43xx/Makefile:1.1 Thu Aug 10 15:15:48 2017 +++ src/external/broadcom/bcm43xx/Makefile Thu Aug 10 19:42:53 2017 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2017/08/10 15:15:48 nat Exp $ +# $NetBSD: Makefile,v 1.2 2017/08/10 19:42:53 jakllsch Exp $ NOMAN= # define -FILES= LICENSE.broadcom_bcm43xx BCM43430A1.hcd +FILES= LICENCE.broadcom_bcm43xx BCM43430A1.hcd FILESDIR= /usr/libdata/firmware/bcm43xx
CVS commit: src/tests/lib/libc/locale
Module Name:src Committed By: perseant Date: Thu Aug 10 19:08:43 UTC 2017 Modified Files: src/tests/lib/libc/locale: t_btowc.c Log Message: Separate the C/POSIX locale test from the rest; make it more thorough and more correct. This fixes a problem reported by martin@ when the test is compiled with -funsigned-char. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/locale/t_btowc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/locale/t_btowc.c diff -u src/tests/lib/libc/locale/t_btowc.c:1.2 src/tests/lib/libc/locale/t_btowc.c:1.3 --- src/tests/lib/libc/locale/t_btowc.c:1.2 Wed Jul 12 17:32:51 2017 +++ src/tests/lib/libc/locale/t_btowc.c Thu Aug 10 19:08:43 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_btowc.c,v 1.2 2017/07/12 17:32:51 perseant Exp $ */ +/* $NetBSD: t_btowc.c,v 1.3 2017/08/10 19:08:43 perseant Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2017\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_btowc.c,v 1.2 2017/07/12 17:32:51 perseant Exp $"); +__RCSID("$NetBSD: t_btowc.c,v 1.3 2017/08/10 19:08:43 perseant Exp $"); #include #include @@ -52,13 +52,6 @@ struct test { const wchar_t willegal[8]; /* ISO-10646 that do not map into charset */ } tests[] = { { - "C", - "\377", - "ABC123@\t", - { 'A', 'B', 'C', '1', '2', '3', '@', '\t' }, - { 0x0430, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0} - }, - { "en_US.UTF-8", "\200", "ABC123@\t", @@ -193,9 +186,39 @@ ATF_TC_BODY(stdc_iso_10646, tc) #endif /* ! __STDC_ISO_10646__ */ } +ATF_TC(btowc_posix); +ATF_TC_HEAD(btowc_posix, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks btowc(3) and wctob(3) for POSIX locale"); +} +ATF_TC_BODY(btowc_posix, tc) +{ + const char *cp; + unsigned char c; + char *str; + const wchar_t *wcp; + int i; + + ATF_REQUIRE_STREQ(setlocale(LC_ALL, "POSIX"), "POSIX"); + + /* btowc(EOF) -> WEOF */ + ATF_REQUIRE_EQ(btowc(EOF), WEOF); + + /* wctob(WEOF) -> EOF */ + ATF_REQUIRE_EQ(wctob(WEOF), EOF); + + /* All characters from 0 to 255, inclusive, map + onto their unsigned char equivalent */ + for (i = 0; i <= 255; i++) { + ATF_REQUIRE_EQ(btowc(i), (wchar_t)(unsigned char)(i)); + ATF_REQUIRE_EQ((unsigned char)wctob(i), (wchar_t)i); + } +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, btowc); + ATF_TP_ADD_TC(tp, btowc_posix); ATF_TP_ADD_TC(tp, stdc_iso_10646); return atf_no_error();
CVS commit: src
Module Name:src Committed By: joerg Date: Thu Aug 10 19:03:27 UTC 2017 Modified Files: src/libexec/ld.elf_so: reloc.c rtld.c rtld.h src/libexec/ld.elf_so/arch/aarch64: mdreloc.c src/libexec/ld.elf_so/arch/alpha: alpha_reloc.c src/libexec/ld.elf_so/arch/arm: mdreloc.c src/libexec/ld.elf_so/arch/hppa: hppa_reloc.c src/libexec/ld.elf_so/arch/i386: mdreloc.c src/libexec/ld.elf_so/arch/m68k: mdreloc.c src/libexec/ld.elf_so/arch/mips: mips_reloc.c src/libexec/ld.elf_so/arch/or1k: mdreloc.c src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c src/libexec/ld.elf_so/arch/riscv: mdreloc.c src/libexec/ld.elf_so/arch/sh3: mdreloc.c src/libexec/ld.elf_so/arch/sparc: mdreloc.c src/libexec/ld.elf_so/arch/sparc64: mdreloc.c src/libexec/ld.elf_so/arch/vax: mdreloc.c src/libexec/ld.elf_so/arch/x86_64: mdreloc.c src/sys/arch/arm/include: elf_machdep.h src/sys/arch/powerpc/include: elf_machdep.h src/sys/sys: cdefs_elf.h src/tests/libexec/ld.elf_so: t_ifunc.c src/tests/libexec/ld.elf_so/helper_ifunc_dso: h_helper_ifunc.c Log Message: Add IRELATIVE support for ARM, X86 and PowerPC. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/libexec/ld.elf_so/reloc.c cvs rdiff -u -r1.185 -r1.186 src/libexec/ld.elf_so/rtld.c cvs rdiff -u -r1.129 -r1.130 src/libexec/ld.elf_so/rtld.h cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c cvs rdiff -u -r1.42 -r1.43 src/libexec/ld.elf_so/arch/alpha/alpha_reloc.c cvs rdiff -u -r1.41 -r1.42 src/libexec/ld.elf_so/arch/arm/mdreloc.c cvs rdiff -u -r1.44 -r1.45 src/libexec/ld.elf_so/arch/hppa/hppa_reloc.c cvs rdiff -u -r1.38 -r1.39 src/libexec/ld.elf_so/arch/i386/mdreloc.c cvs rdiff -u -r1.32 -r1.33 src/libexec/ld.elf_so/arch/m68k/mdreloc.c cvs rdiff -u -r1.68 -r1.69 src/libexec/ld.elf_so/arch/mips/mips_reloc.c cvs rdiff -u -r1.2 -r1.3 src/libexec/ld.elf_so/arch/or1k/mdreloc.c cvs rdiff -u -r1.54 -r1.55 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/arch/riscv/mdreloc.c cvs rdiff -u -r1.34 -r1.35 src/libexec/ld.elf_so/arch/sh3/mdreloc.c cvs rdiff -u -r1.50 -r1.51 src/libexec/ld.elf_so/arch/sparc/mdreloc.c cvs rdiff -u -r1.63 -r1.64 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c cvs rdiff -u -r1.33 -r1.34 src/libexec/ld.elf_so/arch/vax/mdreloc.c cvs rdiff -u -r1.44 -r1.45 src/libexec/ld.elf_so/arch/x86_64/mdreloc.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/elf_machdep.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/include/elf_machdep.h cvs rdiff -u -r1.52 -r1.53 src/sys/sys/cdefs_elf.h cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/t_ifunc.c cvs rdiff -u -r1.4 -r1.5 \ src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.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/reloc.c diff -u src/libexec/ld.elf_so/reloc.c:1.110 src/libexec/ld.elf_so/reloc.c:1.111 --- src/libexec/ld.elf_so/reloc.c:1.110 Thu Apr 27 08:37:15 2017 +++ src/libexec/ld.elf_so/reloc.c Thu Aug 10 19:03:25 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: reloc.c,v 1.110 2017/04/27 08:37:15 uwe Exp $ */ +/* $NetBSD: reloc.c,v 1.111 2017/08/10 19:03:25 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: reloc.c,v 1.110 2017/04/27 08:37:15 uwe Exp $"); +__RCSID("$NetBSD: reloc.c,v 1.111 2017/08/10 19:03:25 joerg Exp $"); #endif /* not lint */ #include @@ -261,9 +261,18 @@ _rtld_resolve_ifunc(const Obj_Entry *obj Elf_Addr target; _rtld_shared_exit(); - target = _rtld_call_function_addr(obj, + target = _rtld_resolve_ifunc2(obj, (Elf_Addr)obj->relocbase + def->st_value); _rtld_shared_enter(); + return target; +} + +Elf_Addr +_rtld_resolve_ifunc2(const Obj_Entry *obj, Elf_Addr addr) +{ + Elf_Addr target; + + target = _rtld_call_function_addr(obj, addr); return target; } Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.185 src/libexec/ld.elf_so/rtld.c:1.186 --- src/libexec/ld.elf_so/rtld.c:1.185 Tue Jul 11 15:21:35 2017 +++ src/libexec/ld.elf_so/rtld.c Thu Aug 10 19:03:25 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.185 2017/07/11 15:21:35 joerg Exp $ */ +/* $NetBSD: rtld.c,v 1.186 2017/08/10 19:03:25 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.185 2017/07/11 15:21:35 joerg Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.186 2017/08/10 19:03:25 joerg Exp $"); #endif /* not lint */ #include @@ -273,7 +273,20 @@ restart: SIMPLEQ_INIT(); _rtld_initlist_tsort(, 0); - /* First pass: objects marked with DF_1_INITFIRST. */ + /* First pass: objects with IRELATIVE relocations. */ + SIMPLEQ_FOREACH(elm, , link) { + Obj_Entry * const obj = elm->obj; + if
CVS commit: src/usr.sbin/btattach
Module Name:src Committed By: jakllsch Date: Thu Aug 10 18:45:20 UTC 2017 Modified Files: src/usr.sbin/btattach: init_bcm43xx.c Log Message: remove currently-unused variables that trip up the build To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/btattach/init_bcm43xx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btattach/init_bcm43xx.c diff -u src/usr.sbin/btattach/init_bcm43xx.c:1.1 src/usr.sbin/btattach/init_bcm43xx.c:1.2 --- src/usr.sbin/btattach/init_bcm43xx.c:1.1 Thu Aug 10 13:34:29 2017 +++ src/usr.sbin/btattach/init_bcm43xx.c Thu Aug 10 18:45:20 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: init_bcm43xx.c,v 1.1 2017/08/10 13:34:29 nat Exp $ */ +/* $NetBSD: init_bcm43xx.c,v 1.2 2017/08/10 18:45:20 jakllsch Exp $ */ /*- * Copyright (c) 2017 Iain Hibbert @@ -34,7 +34,7 @@ */ #include -__RCSID("$NetBSD: init_bcm43xx.c,v 1.1 2017/08/10 13:34:29 nat Exp $"); +__RCSID("$NetBSD: init_bcm43xx.c,v 1.2 2017/08/10 18:45:20 jakllsch Exp $"); #include #include @@ -62,9 +62,8 @@ init_bcm43xx(int fd, unsigned int speed) uint8_t rate[6]; uint8_t fw_buf[1024]; char fw[] = "./BCM43430A1.hcd"; - int nr, fwfd, fw_len; + int fwfd, fw_len; uint8_t resp[7]; - uint8_t name[20]; uint16_t fw_cmd; memset(rate, 0, sizeof(rate));
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jakllsch Date: Thu Aug 10 18:11:48 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: GENERIC.common Log Message: enable 'options NTP' To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/GENERIC.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GENERIC.common diff -u src/sys/arch/evbarm/conf/GENERIC.common:1.19 src/sys/arch/evbarm/conf/GENERIC.common:1.20 --- src/sys/arch/evbarm/conf/GENERIC.common:1.19 Sat Jul 29 18:08:57 2017 +++ src/sys/arch/evbarm/conf/GENERIC.common Thu Aug 10 18:11:47 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC.common,v 1.19 2017/07/29 18:08:57 maxv Exp $ +# $NetBSD: GENERIC.common,v 1.20 2017/08/10 18:11:47 jakllsch Exp $ # # GENERIC evbarm kernel config (template) # @@ -11,7 +11,7 @@ maxusers 32 # Standard system options options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT -#options NTP # NTP phase/frequency locked loop +options NTP # NTP phase/frequency locked loop # CPU options options PMAPCOUNTERS
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Thu Aug 10 17:33:32 UTC 2017 Modified Files: src/sys/arch/amd64/conf: XEN3_DOM0 XEN3_DOMU src/sys/arch/i386/conf: GENERIC_TINY NET4501 XEN3_DOM0 XEN3_DOMU Log Message: Pff, I forgot to revert my change in these files. I committed only the GENERIC files, and the message was: Revert my changes, and re-enable COMPAT_NOMID, COMPAT_09 and COMPAT_43. Several compat options happen to be dependent on the compat_43_* functions, the availability of which is (wrongfully) controlled with COMPAT_43. Same for COMPAT_09. To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.76 -r1.77 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.153 -r1.154 src/sys/arch/i386/conf/GENERIC_TINY cvs rdiff -u -r1.96 -r1.97 src/sys/arch/i386/conf/NET4501 cvs rdiff -u -r1.119 -r1.120 src/sys/arch/i386/conf/XEN3_DOM0 cvs rdiff -u -r1.83 -r1.84 src/sys/arch/i386/conf/XEN3_DOMU 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/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.137 src/sys/arch/amd64/conf/XEN3_DOM0:1.138 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.137 Fri Jul 28 16:10:28 2017 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Thu Aug 10 17:33:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.137 2017/07/28 16:10:28 maxv Exp $ +# $NetBSD: XEN3_DOM0,v 1.138 2017/08/10 17:33:32 maxv Exp $ include "arch/amd64/conf/std.xen" @@ -62,7 +62,7 @@ makeoptions COPTS="-O2 -fno-omit-frame-p options DDB_COMMANDONENTER="trace;show registers" # Compatibility options -#options COMPAT_43 # 4.3BSD binary compatibility. +options COMPAT_43 # 4.3BSD binary compatibility. options COMPAT_15 # NetBSD 1.5, options COMPAT_16 # NetBSD 1.6, options COMPAT_20 # NetBSD 2.0, Index: src/sys/arch/amd64/conf/XEN3_DOMU diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.76 src/sys/arch/amd64/conf/XEN3_DOMU:1.77 --- src/sys/arch/amd64/conf/XEN3_DOMU:1.76 Fri Jul 28 16:10:28 2017 +++ src/sys/arch/amd64/conf/XEN3_DOMU Thu Aug 10 17:33:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.76 2017/07/28 16:10:28 maxv Exp $ +# $NetBSD: XEN3_DOMU,v 1.77 2017/08/10 17:33:32 maxv Exp $ include "arch/amd64/conf/std.xen" @@ -54,7 +54,7 @@ makeoptions COPTS="-O2 -fno-omit-frame-p options DDB_COMMANDONENTER="trace;show registers" # Compatibility options -#options COMPAT_43 # 4.3BSD binary compatibility. +options COMPAT_43 # 4.3BSD binary compatibility. options COMPAT_15 # NetBSD 1.5, options COMPAT_16 # NetBSD 1.6, options COMPAT_20 # NetBSD 2.0, Index: src/sys/arch/i386/conf/GENERIC_TINY diff -u src/sys/arch/i386/conf/GENERIC_TINY:1.153 src/sys/arch/i386/conf/GENERIC_TINY:1.154 --- src/sys/arch/i386/conf/GENERIC_TINY:1.153 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/conf/GENERIC_TINY Thu Aug 10 17:33:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC_TINY,v 1.153 2017/08/09 18:45:30 maxv Exp $ +# $NetBSD: GENERIC_TINY,v 1.154 2017/08/10 17:33:32 maxv Exp $ # # GENERIC_TINY -- suitable default for 4M machines # No EISA, PCI, or SCSI. @@ -72,7 +72,7 @@ options COMPAT_40 # NetBSD 4.0, options COMPAT_50 # NetBSD 5.0, options COMPAT_60 # NetBSD 6.0, and options COMPAT_70 # NetBSD 7.0 binary compatibility. -#options COMPAT_43 # 4.3BSD, 386BSD, and BSDI +options COMPAT_43 # 4.3BSD, 386BSD, and BSDI #options COMPAT_386BSD_MBRPART # recognize old partition ID #options COMPAT_LINUX # binary compatibility with Linux Index: src/sys/arch/i386/conf/NET4501 diff -u src/sys/arch/i386/conf/NET4501:1.96 src/sys/arch/i386/conf/NET4501:1.97 --- src/sys/arch/i386/conf/NET4501:1.96 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/conf/NET4501 Thu Aug 10 17:33:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: NET4501,v 1.96 2017/08/09 18:45:30 maxv Exp $ +# $NetBSD: NET4501,v 1.97 2017/08/10 17:33:32 maxv Exp $ # # NET4501 -- kernel configuration for a Soekris Engineering net4501 # single-board computer. @@ -10,7 +10,7 @@ include "arch/i386/conf/std.i386" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "NET4501-$Revision: 1.96 $" +#ident "NET4501-$Revision: 1.97 $" maxusers 32 # estimated number of users @@ -77,8 +77,8 @@ options DDB_HISTORY_SIZE=512 # enable h #makeoptions DEBUG="-g" # compile full symbol table # Compatibility options -#options COMPAT_NOMID # NetBSD 0.8, 386BSD, and BSDI -#options COMPAT_09 # NetBSD 0.9, +options COMPAT_NOMID # NetBSD 0.8, 386BSD, and BSDI +options COMPAT_09 # NetBSD 0.9, options COMPAT_10 # NetBSD 1.0, options COMPAT_11 # NetBSD 1.1, options COMPAT_12 # NetBSD 1.2 (and 386BSD and BSDI), @@ -92,7 +92,7 @@ options COMPAT_40 # NetBSD 4.0, options COMPAT_50 # NetBSD 5.0, options COMPAT_60 # NetBSD 6.0, and options COMPAT_70 # NetBSD 7.0 binary compatibility. -#options COMPAT_43 # 4.3BSD, 386BSD, and BSDI compatibility. +options COMPAT_43
CVS commit: src
Module Name:src Committed By: nat Date: Thu Aug 10 15:31:49 UTC 2017 Modified Files: src/distrib/sets/lists/base: mi src/external: Makefile Log Message: Add bcm43xx bluetooth controller firmware to the lists and update relevant makefiles. To generate a diff of this commit: cvs rdiff -u -r1.1159 -r1.1160 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.18 -r1.19 src/external/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1159 src/distrib/sets/lists/base/mi:1.1160 --- src/distrib/sets/lists/base/mi:1.1159 Tue Aug 1 20:07:43 2017 +++ src/distrib/sets/lists/base/mi Thu Aug 10 15:31:49 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1159 2017/08/01 20:07:43 joerg Exp $ +# $NetBSD: mi,v 1.1160 2017/08/10 15:31:49 nat Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -1289,6 +1289,9 @@ ./usr/libdata/debug/usr/mdec base-sys-usr ./usr/libdata/debug/usr/sbin base-sys-usr ./usr/libdata/firmwarebase-firmware-usr +./usr/libdata/firmware/bcm43xx base-firmware-usr +./usr/libdata/firmware/bcm43xx/BCM43430A1.hcd base-firmware-usr +./usr/libdata/firmware/bcm43xx/LICENCE.broadcom_bcm43xx base-firmware-usr ./usr/libdata/firmware/radeon base-obsolete obsolete ./usr/libdata/firmware/radeon/ARUBA_me.bin base-obsolete obsolete ./usr/libdata/firmware/radeon/ARUBA_pfp.bin base-obsolete obsolete Index: src/external/Makefile diff -u src/external/Makefile:1.18 src/external/Makefile:1.19 --- src/external/Makefile:1.18 Thu Jun 14 04:14:36 2012 +++ src/external/Makefile Thu Aug 10 15:31:49 2017 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.18 2012/06/14 04:14:36 riz Exp $ +# $NetBSD: Makefile,v 1.19 2017/08/10 15:31:49 nat Exp $ -SUBDIR+= apache2 atheros bsd cddl gpl2 gpl3 historical intel-fw-eula +SUBDIR+= apache2 atheros broadcom bsd cddl gpl2 gpl3 historical intel-fw-eula SUBDIR+= intel-fw-public ibm-public mit public-domain realtek .include
CVS commit: src/external/broadcom
Module Name:src Committed By: nat Date: Thu Aug 10 15:15:48 UTC 2017 Added Files: src/external/broadcom: Makefile Makefile.inc src/external/broadcom/bcm43xx: BCM43430A1.hcd LICENCE.broadcom_bcm43xx Makefile Log Message: Add firmware and license for bcm43430 bluetooth uart interface. This firmware is used by the Raspberry Pi 3 on-board bluetooth controller. For additional licensing information, see: https://github.com/raspberrypi/linux/issues/1325#issuecomment-195560582 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/broadcom/Makefile \ src/external/broadcom/Makefile.inc cvs rdiff -u -r0 -r1.1 src/external/broadcom/bcm43xx/BCM43430A1.hcd \ src/external/broadcom/bcm43xx/LICENCE.broadcom_bcm43xx \ src/external/broadcom/bcm43xx/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/broadcom/Makefile diff -u /dev/null src/external/broadcom/Makefile:1.1 --- /dev/null Thu Aug 10 15:15:48 2017 +++ src/external/broadcom/Makefile Thu Aug 10 15:15:48 2017 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2017/08/10 15:15:48 nat Exp $ + +SUBDIR+= bcm43xx + +.include Index: src/external/broadcom/Makefile.inc diff -u /dev/null src/external/broadcom/Makefile.inc:1.1 --- /dev/null Thu Aug 10 15:15:48 2017 +++ src/external/broadcom/Makefile.inc Thu Aug 10 15:15:48 2017 @@ -0,0 +1,9 @@ +# $NetBSD: Makefile.inc,v 1.1 2017/08/10 15:15:48 nat Exp $ + +FILESOWN= ${FIRMWAREOWN} +FILESGRP= ${FIRMWAREGRP} +FILESMODE= ${FIRMWAREMODE} + +includes: +clean: +cleandir: Index: src/external/broadcom/bcm43xx/BCM43430A1.hcd Binary files are different Index: src/external/broadcom/bcm43xx/LICENCE.broadcom_bcm43xx diff -u /dev/null src/external/broadcom/bcm43xx/LICENCE.broadcom_bcm43xx:1.1 --- /dev/null Thu Aug 10 15:15:48 2017 +++ src/external/broadcom/bcm43xx/LICENCE.broadcom_bcm43xx Thu Aug 10 15:15:48 2017 @@ -0,0 +1,65 @@ +SOFTWARE LICENSE AGREEMENT + +The accompanying software in binary code form ("Software"), is licensed to you, +or, if you are accepting on behalf of an entity, the entity and its affiliates +exercising rights hereunder ("Licensee") subject to the terms of this software +license agreement ("Agreement"), unless Licensee and Broadcom Corporation +("Broadcom") execute a separate written software license agreement governing +use of the Software. ANY USE, REPRODUCTION, OR DISTRIBUTION OF THE SOFTWARE +CONSTITUTES LICENSEES ACCEPTANCE OF THIS AGREEMENT. + +1. License. Subject to the terms and conditions of this Agreement, +Broadcom hereby grants to Licensee a limited, non-exclusive, non-transferable, +royalty-free license: (i) to use and integrate the Software with any other +software; and (ii) to reproduce and distribute the Software complete, +unmodified, and as provided by Broadcom, solely for use with Broadcom +proprietary integrated circuit product(s) sold by Broadcom with which the +Software was designed to be used, or their successors. + +2. Restrictions. Licensee shall distribute Software with a copy of this +Agreement. Licensee shall not remove, efface or obscure any copyright or +trademark notices from the Software. Reproductions of the Broadcom copyright +notice shall be included with each copy of the Software, except where such +Software is embedded in a manner not readily accessible to the end user. +Licensee shall not: (i) use, license, sell or otherwise distribute the Software +except as provided in this Agreement; (ii) attempt to modify in any way, +reverse engineer, decompile or disassemble any portion of the Software; or +(iii) use the Software or other material in violation of any applicable law or +regulation, including but not limited to any regulatory agency. This Agreement +shall automatically terminate upon Licensees failure to comply with any of the +terms of this Agreement. In such event, Licensee will destroy all copies of the +Software and its component parts. + +3. Ownership. The Software is licensed and not sold. Title to and +ownership of the Software, including all intellectual property rights thereto, +and any portion thereof remain with Broadcom or its licensors. Licensee hereby +covenants that it will not assert any claim that the Software created by or for +Broadcom infringe any intellectual property right owned or controlled by +Licensee. + +4. Disclaimer. THE SOFTWARE IS OFFERED "AS IS," AND BROADCOM PROVIDES AND +GRANTS AND LICENSEE RECEIVES NO SUPPORT AND NO WARRANTIES OF ANY KIND, EXPRESS +OR IMPLIED, BY STATUTE, COMMUNICATION OR CONDUCT WITH LICENSEE, OR OTHERWISE. +BROADCOM SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A SPECIFIC PURPOSE, OR NONINFRINGEMENT CONCERNING THE SOFTWARE OR +ANY UPGRADES TO OR DOCUMENTATION FOR THE SOFTWARE. WITHOUT LIMITATION OF THE +ABOVE, BROADCOM GRANTS NO WARRANTY THAT THE SOFTWARE IS ERROR-FREE OR WILL +OPERATE WITHOUT INTERRUPTION,
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: maxv Date: Thu Aug 10 14:13:45 UTC 2017 Modified Files: src/sys/arch/i386/i386: locore.S Log Message: Switch to the temporary stack right away when booted via multiboot. GRUB happens to give a correct stack, but it is not guaranteed by the spec. This temporary stack will be reset later, which is fine. Fixes PR/50245. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/arch/i386/i386/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/locore.S diff -u src/sys/arch/i386/i386/locore.S:1.149 src/sys/arch/i386/i386/locore.S:1.150 --- src/sys/arch/i386/i386/locore.S:1.149 Sat Jul 29 12:34:34 2017 +++ src/sys/arch/i386/i386/locore.S Thu Aug 10 14:13:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.149 2017/07/29 12:34:34 maxv Exp $ */ +/* $NetBSD: locore.S,v 1.150 2017/08/10 14:13:45 maxv Exp $ */ /* * Copyright-o-rama! @@ -128,7 +128,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.149 2017/07/29 12:34:34 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.150 2017/08/10 14:13:45 maxv Exp $"); #include "opt_copy_symtab.h" #include "opt_ddb.h" @@ -342,11 +342,13 @@ _C_LABEL(Multiboot_Header): jne 1f /* - * Indeed, a multiboot-compliant boot loader executed us. We copy - * the received Multiboot information structure into kernel's data - * space to process it later -- after we are relocated. It will - * be safer to run complex C code than doing it at this point. + * Indeed, a multiboot-compliant boot loader executed us. We switch + * to the temporary stack, and copy the received Multiboot information + * structure into kernel's data space to process it later -- after we + * are relocated. It will be safer to run complex C code than doing it + * at this point. */ + movl $_RELOC(tmpstk),%esp pushl %ebx /* Address of Multiboot information */ call _C_LABEL(multiboot_pre_reloc) addl $4,%esp
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: nat Date: Thu Aug 10 13:48:20 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: RPI Log Message: Add bluetooth serial uart devices. RPI3 on-board bluetooth controller works with the bthfive pseudo-device. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/evbarm/conf/RPI Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/RPI diff -u src/sys/arch/evbarm/conf/RPI:1.74 src/sys/arch/evbarm/conf/RPI:1.75 --- src/sys/arch/evbarm/conf/RPI:1.74 Sun Jul 30 23:48:32 2017 +++ src/sys/arch/evbarm/conf/RPI Thu Aug 10 13:48:19 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: RPI,v 1.74 2017/07/30 23:48:32 jmcneill Exp $ +# $NetBSD: RPI,v 1.75 2017/08/10 13:48:19 nat Exp $ # # RPi -- Raspberry Pi # @@ -219,3 +219,8 @@ pseudo-device wsfont # local configuration cinclude "arch/evbarm/conf/RPI.local" + +# Bluetooth serial UART devices +pseudo-device btuart +pseudo-device bcsp +pseudo-device bthfive
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: nat Date: Thu Aug 10 13:40:04 UTC 2017 Modified Files: src/distrib/sets/lists/comp: mi Log Message: Update lists for btuart h5 protocol includes. To generate a diff of this commit: cvs rdiff -u -r1.2142 -r1.2143 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2142 src/distrib/sets/lists/comp/mi:1.2143 --- src/distrib/sets/lists/comp/mi:1.2142 Tue Aug 1 20:07:43 2017 +++ src/distrib/sets/lists/comp/mi Thu Aug 10 13:40:04 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2142 2017/08/01 20:07:43 joerg Exp $ +# $NetBSD: mi,v 1.2143 2017/08/10 13:40:04 nat Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -384,6 +384,7 @@ ./usr/include/dev/bluetooth comp-c-include ./usr/include/dev/bluetooth/bcsp.h comp-c-include ./usr/include/dev/bluetooth/btdev.h comp-c-include +./usr/include/dev/bluetooth/bth5.h comp-c-include ./usr/include/dev/bluetooth/bthidev.h comp-c-include ./usr/include/dev/bluetooth/bthset.h comp-obsolete obsolete ./usr/include/dev/bluetooth/btsco.h comp-c-include
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: maxv Date: Thu Aug 10 13:39:08 UTC 2017 Modified Files: src/distrib/sets/lists/comp: md.amd64 Log Message: Should be comp-obsolete. To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 src/distrib/sets/lists/comp/md.amd64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/md.amd64 diff -u src/distrib/sets/lists/comp/md.amd64:1.249 src/distrib/sets/lists/comp/md.amd64:1.250 --- src/distrib/sets/lists/comp/md.amd64:1.249 Wed Aug 9 18:58:51 2017 +++ src/distrib/sets/lists/comp/md.amd64 Thu Aug 10 13:39:08 2017 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.249 2017/08/09 18:58:51 maxv Exp $ +# $NetBSD: md.amd64,v 1.250 2017/08/10 13:39:08 maxv Exp $ ./usr/include/amd64comp-c-include ./usr/include/amd64/ansi.h comp-c-include @@ -13,7 +13,7 @@ ./usr/include/amd64/cdefs.h comp-c-include ./usr/include/amd64/cpu.h comp-c-include ./usr/include/amd64/cpu_rng.h comp-c-include -./usr/include/amd64/cpufunc.h comp-c-obsolete obsolete +./usr/include/amd64/cpufunc.h comp-obsolete obsolete ./usr/include/amd64/disklabel.h comp-c-include ./usr/include/amd64/elf_machdep.h comp-c-include ./usr/include/amd64/endian.h comp-c-include @@ -476,7 +476,7 @@ ./usr/include/i386/cdefs.h comp-c-include ./usr/include/i386/cpu.h comp-c-include ./usr/include/i386/cpu_rng.h comp-c-include -./usr/include/i386/cpufunc.h comp-c-obsolete obsolete +./usr/include/i386/cpufunc.h comp-obsolete obsolete ./usr/include/i386/cputypes.h comp-c-include ./usr/include/i386/disklabel.h comp-c-include ./usr/include/i386/elf_machdep.h comp-c-include
CVS commit: src/usr.sbin/btattach
Module Name:src Committed By: nat Date: Thu Aug 10 13:34:29 UTC 2017 Modified Files: src/usr.sbin/btattach: Makefile btattach.c btattach.h Added Files: src/usr.sbin/btattach: init_bcm43xx.c Log Message: Add support for bcm 43xx devices using the btuart h5 protocol. Currently It will only load 1 firmware image for rpi3. To use change to the directory containing the firmware BCM4340A1.hcd. Then issue: btattach -FPi 115200 bcm43xx /dev/ttydevice 921600. Then you can use the bluetooth device btfive0. This enables the embedded bluetooth controller on rpi3. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/btattach/Makefile cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/btattach/btattach.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/btattach/btattach.h cvs rdiff -u -r0 -r1.1 src/usr.sbin/btattach/init_bcm43xx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/btattach/Makefile diff -u src/usr.sbin/btattach/Makefile:1.2 src/usr.sbin/btattach/Makefile:1.3 --- src/usr.sbin/btattach/Makefile:1.2 Sun Dec 6 12:55:46 2009 +++ src/usr.sbin/btattach/Makefile Thu Aug 10 13:34:29 2017 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2009/12/06 12:55:46 kiyohara Exp $ +# $NetBSD: Makefile,v 1.3 2017/08/10 13:34:29 nat Exp $ PROG= btattach MAN= btattach.8 SRCS= btattach.c init_bcm2035.c init_bgb2xx.c init_csr.c init_digi.c \ - init_ericsson.c init_st.c init_stlc2500.c init_swave.c init_unistone.c + init_ericsson.c init_st.c init_stlc2500.c init_swave.c init_unistone.c \ + init_bcm43xx.c DPADD+= ${LIBBLUETOOTH} ${LIBUTIL} LDADD+= -lbluetooth -lutil Index: src/usr.sbin/btattach/btattach.c diff -u src/usr.sbin/btattach/btattach.c:1.13 src/usr.sbin/btattach/btattach.c:1.14 --- src/usr.sbin/btattach/btattach.c:1.13 Tue Jun 16 23:04:14 2015 +++ src/usr.sbin/btattach/btattach.c Thu Aug 10 13:34:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: btattach.c,v 1.13 2015/06/16 23:04:14 christos Exp $ */ +/* $NetBSD: btattach.c,v 1.14 2017/08/10 13:34:29 nat Exp $ */ /*- * Copyright (c) 2008 Iain Hibbert @@ -27,7 +27,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008 Iain Hibbert. All rights reserved."); -__RCSID("$NetBSD: btattach.c,v 1.13 2015/06/16 23:04:14 christos Exp $"); +__RCSID("$NetBSD: btattach.c,v 1.14 2017/08/10 13:34:29 nat Exp $"); #include #include @@ -62,6 +62,13 @@ static const struct devtype types[] = { .speed = B115200, }, { + .name = "bcm43xx", + .line = "bth5", + .descr = "Broadcom BCM43xx", + .init = _bcm43xx, + .speed = B115200, +}, +{ .name = "bcsp", .line = "bcsp", .descr = "Generic BlueCore Serial Protocol", Index: src/usr.sbin/btattach/btattach.h diff -u src/usr.sbin/btattach/btattach.h:1.3 src/usr.sbin/btattach/btattach.h:1.4 --- src/usr.sbin/btattach/btattach.h:1.3 Sun Dec 6 12:55:46 2009 +++ src/usr.sbin/btattach/btattach.h Thu Aug 10 13:34:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: btattach.h,v 1.3 2009/12/06 12:55:46 kiyohara Exp $ */ +/* $NetBSD: btattach.h,v 1.4 2017/08/10 13:34:29 nat Exp $ */ /*- * Copyright (c) 2008 Iain Hibbert @@ -40,6 +40,7 @@ struct devtype { }; devinit_t init_bcm2035; +devinit_t init_bcm43xx; devinit_t init_bgb2xx; devinit_t init_csr; devinit_t init_digi; Added files: Index: src/usr.sbin/btattach/init_bcm43xx.c diff -u /dev/null src/usr.sbin/btattach/init_bcm43xx.c:1.1 --- /dev/null Thu Aug 10 13:34:29 2017 +++ src/usr.sbin/btattach/init_bcm43xx.c Thu Aug 10 13:34:29 2017 @@ -0,0 +1,110 @@ +/* $NetBSD: init_bcm43xx.c,v 1.1 2017/08/10 13:34:29 nat Exp $ */ + +/*- + * Copyright (c) 2017 Iain Hibbert + * All rights reserved. + * + * Copyright (c) 2008 Iain Hibbert + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE,
CVS commit: src/sys/dev/ic
Module Name:src Committed By: nat Date: Thu Aug 10 13:25:49 UTC 2017 Modified Files: src/sys/dev/ic: com.c Log Message: Report AUXUART fifo size on rpi3 to 1 byte. This prevents bluetooth errors using the h5 protocol. To generate a diff of this commit: cvs rdiff -u -r1.341 -r1.342 src/sys/dev/ic/com.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/com.c diff -u src/sys/dev/ic/com.c:1.341 src/sys/dev/ic/com.c:1.342 --- src/sys/dev/ic/com.c:1.341 Mon Jul 31 23:53:25 2017 +++ src/sys/dev/ic/com.c Thu Aug 10 13:25:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.341 2017/07/31 23:53:25 jmcneill Exp $ */ +/* $NetBSD: com.c,v 1.342 2017/08/10 13:25:49 nat Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.341 2017/07/31 23:53:25 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.342 2017/08/10 13:25:49 nat Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -477,7 +477,7 @@ com_attach_subr(struct com_softc *sc) goto fifodelay; case COM_TYPE_BCMAUXUART: - sc->sc_fifolen = 8; + sc->sc_fifolen = 1; fifo_msg = "BCM AUX UART, working fifo"; SET(sc->sc_hwflags, COM_HW_FIFO); CSR_WRITE_1(regsp, COM_REG_FIFO,
CVS commit: src/sys/dev/bluetooth
Module Name:src Committed By: nat Date: Thu Aug 10 13:22:19 UTC 2017 Modified Files: src/sys/dev/bluetooth: Makefile bluetoothdevices.config files.bluetooth Added Files: src/sys/dev/bluetooth: bth5.c bth5.h Log Message: Add support for btuart h5 3-wire protocol. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/bluetooth/Makefile cvs rdiff -u -r1.1 -r1.2 src/sys/dev/bluetooth/bluetoothdevices.config cvs rdiff -u -r0 -r1.1 src/sys/dev/bluetooth/bth5.c \ src/sys/dev/bluetooth/bth5.h cvs rdiff -u -r1.14 -r1.15 src/sys/dev/bluetooth/files.bluetooth 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/bluetooth/Makefile diff -u src/sys/dev/bluetooth/Makefile:1.6 src/sys/dev/bluetooth/Makefile:1.7 --- src/sys/dev/bluetooth/Makefile:1.6 Tue Apr 15 11:17:48 2008 +++ src/sys/dev/bluetooth/Makefile Thu Aug 10 13:22:19 2017 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.6 2008/04/15 11:17:48 plunky Exp $ +# $NetBSD: Makefile,v 1.7 2017/08/10 13:22:19 nat Exp $ INCSDIR= /usr/include/dev/bluetooth -INCS= bcsp.h btdev.h bthidev.h btsco.h +INCS= bcsp.h btdev.h bth5.h bthidev.h btsco.h .include Index: src/sys/dev/bluetooth/bluetoothdevices.config diff -u src/sys/dev/bluetooth/bluetoothdevices.config:1.1 src/sys/dev/bluetooth/bluetoothdevices.config:1.2 --- src/sys/dev/bluetooth/bluetoothdevices.config:1.1 Wed Jul 20 22:42:59 2011 +++ src/sys/dev/bluetooth/bluetoothdevices.config Thu Aug 10 13:22:19 2017 @@ -1,4 +1,4 @@ -# $NetBSD: bluetoothdevices.config,v 1.1 2011/07/20 22:42:59 jakllsch Exp $ +# $NetBSD: bluetoothdevices.config,v 1.2 2017/08/10 13:22:19 nat Exp $ # # Bluetooth devices for config(5) file inclusion. @@ -44,3 +44,4 @@ btsco* at bthub? # Bluetooth pseudo devices pseudo-device bcsp # BlueCore Serial Protocol pseudo-device btuart # Bluetooth HCI UART (H4) +pseudo-device bthfive # Bluetooth HCI UART (H5) Index: src/sys/dev/bluetooth/files.bluetooth diff -u src/sys/dev/bluetooth/files.bluetooth:1.14 src/sys/dev/bluetooth/files.bluetooth:1.15 --- src/sys/dev/bluetooth/files.bluetooth:1.14 Sat May 22 18:56:01 2010 +++ src/sys/dev/bluetooth/files.bluetooth Thu Aug 10 13:22:19 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.bluetooth,v 1.14 2010/05/22 18:56:01 plunky Exp $ +# $NetBSD: files.bluetooth,v 1.15 2017/08/10 13:22:19 nat Exp $ # # Config file for machine independent Bluetooth devices @@ -44,3 +44,7 @@ file dev/bluetooth/btuart.c btuart # BlueCore Serial Protocol defpseudodev bcsp: btbus, bluetooth file dev/bluetooth/bcsp.c bcsp + +# Bluetooth HCI UART (H5) +defpseudodev bthfive: btbus, bluetooth +file dev/bluetooth/bth5.c bthfive Added files: Index: src/sys/dev/bluetooth/bth5.c diff -u /dev/null src/sys/dev/bluetooth/bth5.c:1.1 --- /dev/null Thu Aug 10 13:22:19 2017 +++ src/sys/dev/bluetooth/bth5.c Thu Aug 10 13:22:19 2017 @@ -0,0 +1,1830 @@ +/* $NetBSD: bth5.c,v 1.1 2017/08/10 13:22:19 nat Exp $ */ +/* + * Copyright (c) 2017 Nathanial Sloss+ * All rights reserved. + * + * Copyright (c) 2007 KIYOHARA Takashi + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: bth5.c,v 1.1 2017/08/10 13:22:19 nat Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "ioconf.h" + +#ifdef BTH5_DEBUG +#ifdef DPRINTF +#undef DPRINTF +#endif +#ifdef DPRINTFN +#undef DPRINTFN +#endif + +#define DPRINTF(x) printf x +#define DPRINTFN(n, x) do { if (bth5_debug > (n)) printf x;
CVS commit: src/sys/arch/x86/acpi
Module Name:src Committed By: maxv Date: Thu Aug 10 13:13:03 UTC 2017 Modified Files: src/sys/arch/x86/acpi: acpi_wakeup.c Log Message: Save and restore xcr0 when doing ACPI sleeps. Should fix PR/49174. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/x86/acpi/acpi_wakeup.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/acpi/acpi_wakeup.c diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.45 src/sys/arch/x86/acpi/acpi_wakeup.c:1.46 --- src/sys/arch/x86/acpi/acpi_wakeup.c:1.45 Thu Oct 20 16:05:04 2016 +++ src/sys/arch/x86/acpi/acpi_wakeup.c Thu Aug 10 13:13:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_wakeup.c,v 1.45 2016/10/20 16:05:04 maxv Exp $ */ +/* $NetBSD: acpi_wakeup.c,v 1.46 2017/08/10 13:13:03 maxv Exp $ */ /*- * Copyright (c) 2002, 2011 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.45 2016/10/20 16:05:04 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.46 2017/08/10 13:13:03 maxv Exp $"); #include #include @@ -250,6 +250,7 @@ acpi_md_sleep_enter(int state) void acpi_cpu_sleep(struct cpu_info *ci) { + uint64_t xcr0 = 0; int s; KASSERT(!CPU_IS_PRIMARY(ci)); @@ -259,12 +260,21 @@ acpi_cpu_sleep(struct cpu_info *ci) fpusave_cpu(true); x86_disable_intr(); + /* + * XXX also need to save the PMCs, the dbregs, and probably a few + * MSRs too. + */ + if (rcr4() & CR4_OSXSAVE) + xcr0 = rdxcr(0); + if (acpi_md_sleep_prepare(-1)) goto out; /* Execute Wakeup */ cpu_init_msrs(ci, false); fpuinit(ci); + if (rcr4() & CR4_OSXSAVE) + wrxcr(0, xcr0); #if NLAPIC > 0 lapic_enable(); @@ -285,6 +295,7 @@ out: int acpi_md_sleep(int state) { + uint64_t xcr0 = 0; int s, ret = 0; #ifdef MULTIPROCESSOR struct cpu_info *ci; @@ -315,12 +326,21 @@ acpi_md_sleep(int state) } #endif + /* + * XXX also need to save the PMCs, the dbregs, and probably a few + * MSRs too. + */ + if (rcr4() & CR4_OSXSAVE) + xcr0 = rdxcr(0); + if (acpi_md_sleep_prepare(state)) goto out; /* Execute Wakeup */ cpu_init_msrs(_info_primary, false); fpuinit(_info_primary); + if (rcr4() & CR4_OSXSAVE) + wrxcr(0, xcr0); i8259_reinit(); #if NLAPIC > 0 lapic_enable();
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: maxv Date: Thu Aug 10 12:51:22 UTC 2017 Modified Files: src/sys/arch/ia64/ia64: genassym.cf Log Message: Don't include opt_compat_freebsd.h. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/ia64/ia64/genassym.cf 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/ia64/ia64/genassym.cf diff -u src/sys/arch/ia64/ia64/genassym.cf:1.12 src/sys/arch/ia64/ia64/genassym.cf:1.13 --- src/sys/arch/ia64/ia64/genassym.cf:1.12 Tue Aug 1 14:23:42 2017 +++ src/sys/arch/ia64/ia64/genassym.cf Thu Aug 10 12:51:22 2017 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.12 2017/08/01 14:23:42 maxv Exp $ +# $NetBSD: genassym.cf,v 1.13 2017/08/10 12:51:22 maxv Exp $ # # Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -64,7 +64,6 @@ # if defined(_KERNEL_OPT) -include "opt_compat_freebsd.h" include "opt_compat_linux.h" include "opt_multiprocessor.h" endif
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Thu Aug 10 12:49:11 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S src/sys/arch/i386/i386: compat_16_machdep.c machdep.c Log Message: Don't include opt_compat_ibcs2.h. No idea what it was doing in amd64, since it never got implemented there. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/sys/arch/amd64/amd64/locore.S cvs rdiff -u -r1.27 -r1.28 src/sys/arch/i386/i386/compat_16_machdep.c cvs rdiff -u -r1.787 -r1.788 src/sys/arch/i386/i386/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/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.125 src/sys/arch/amd64/amd64/locore.S:1.126 --- src/sys/arch/amd64/amd64/locore.S:1.125 Tue Aug 8 17:00:42 2017 +++ src/sys/arch/amd64/amd64/locore.S Thu Aug 10 12:49:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.125 2017/08/08 17:00:42 maxv Exp $ */ +/* $NetBSD: locore.S,v 1.126 2017/08/10 12:49:11 maxv Exp $ */ /* * Copyright-o-rama! @@ -158,7 +158,6 @@ #include "opt_compat_netbsd.h" #include "opt_compat_netbsd32.h" -#include "opt_compat_ibcs2.h" #include "opt_xen.h" #include "assym.h" Index: src/sys/arch/i386/i386/compat_16_machdep.c diff -u src/sys/arch/i386/i386/compat_16_machdep.c:1.27 src/sys/arch/i386/i386/compat_16_machdep.c:1.28 --- src/sys/arch/i386/i386/compat_16_machdep.c:1.27 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/i386/compat_16_machdep.c Thu Aug 10 12:49:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_16_machdep.c,v 1.27 2017/08/09 18:45:30 maxv Exp $ */ +/* $NetBSD: compat_16_machdep.c,v 1.28 2017/08/10 12:49:11 maxv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -30,12 +30,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.27 2017/08/09 18:45:30 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.28 2017/08/10 12:49:11 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_vm86.h" #include "opt_compat_netbsd.h" -#include "opt_compat_ibcs2.h" #endif #include Index: src/sys/arch/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.787 src/sys/arch/i386/i386/machdep.c:1.788 --- src/sys/arch/i386/i386/machdep.c:1.787 Sat Jul 29 11:54:14 2017 +++ src/sys/arch/i386/i386/machdep.c Thu Aug 10 12:49:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.787 2017/07/29 11:54:14 maxv Exp $ */ +/* $NetBSD: machdep.c,v 1.788 2017/08/10 12:49:11 maxv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009 @@ -67,10 +67,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.787 2017/07/29 11:54:14 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.788 2017/08/10 12:49:11 maxv Exp $"); #include "opt_beep.h" -#include "opt_compat_ibcs2.h" #include "opt_compat_freebsd.h" #include "opt_compat_netbsd.h" #include "opt_cpureset_delay.h"
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: maxv Date: Thu Aug 10 12:46:31 UTC 2017 Modified Files: src/sys/arch/x86/include: cpu_extended_state.h Log Message: Remove the svr4/ibcs2 fpu flags. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/include/cpu_extended_state.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/x86/include/cpu_extended_state.h diff -u src/sys/arch/x86/include/cpu_extended_state.h:1.10 src/sys/arch/x86/include/cpu_extended_state.h:1.11 --- src/sys/arch/x86/include/cpu_extended_state.h:1.10 Thu Aug 18 13:00:54 2016 +++ src/sys/arch/x86/include/cpu_extended_state.h Thu Aug 10 12:46:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_extended_state.h,v 1.10 2016/08/18 13:00:54 maxv Exp $ */ +/* $NetBSD: cpu_extended_state.h,v 1.11 2017/08/10 12:46:31 maxv Exp $ */ #ifndef _X86_CPU_EXTENDED_STATE_H_ #define _X86_CPU_EXTENDED_STATE_H_ @@ -225,12 +225,8 @@ union savefpu { #define __NetBSD_COMPAT_NPXCW__ 0x127f /* FreeBSD leaves some exceptions unmasked as well. */ #define __FreeBSD_NPXCW__ 0x1272 -/* iBCS2 goes a bit further and leaves the underflow exception unmasked. */ -#define __iBCS2_NPXCW__ 0x0262 /* Linux just uses the default control word. */ #define __Linux_NPXCW__ __INITIAL_NPXCW__ -/* SVR4 uses the same control word as iBCS2. */ -#define __SVR4_NPXCW__ 0x0262 /* * The default MXCSR value at reset is 0x1f80, IA-32 Instruction
CVS commit: src/doc
Module Name:src Committed By: ozaki-r Date: Thu Aug 10 09:26:55 UTC 2017 Modified Files: src/doc: TODO.smpnet Log Message: Write known issues on scalability To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/doc/TODO.smpnet Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.smpnet diff -u src/doc/TODO.smpnet:1.12 src/doc/TODO.smpnet:1.13 --- src/doc/TODO.smpnet:1.12 Thu Aug 10 09:08:54 2017 +++ src/doc/TODO.smpnet Thu Aug 10 09:26:55 2017 @@ -1,4 +1,4 @@ -$NetBSD: TODO.smpnet,v 1.12 2017/08/10 09:08:54 ozaki-r Exp $ +$NetBSD: TODO.smpnet,v 1.13 2017/08/10 09:26:55 ozaki-r Exp $ MP-safe components == @@ -145,3 +145,11 @@ bpf#bd_dcount and bpf#bd_ccount) are als scalability the statistic counters should be per-CPU and we should stop using atomic operations for them however we have to remain the counters and atomic operations. + +Scalability +--- + + - Per-CPU rtcaches (used in say IP forwarding) aren't scalable on multiple + flows per CPU + - ipsec(4) isn't scalable on the number of SA/SP; the cost of a look-up + is O(n)
CVS commit: src/doc
Module Name:src Committed By: ozaki-r Date: Thu Aug 10 09:08:54 UTC 2017 Modified Files: src/doc: TODO.smpnet Log Message: Update ipsec(4), opencrypto(9) and vlan(4) are now MP-safe. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/doc/TODO.smpnet Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.smpnet diff -u src/doc/TODO.smpnet:1.11 src/doc/TODO.smpnet:1.12 --- src/doc/TODO.smpnet:1.11 Thu Mar 30 06:50:53 2017 +++ src/doc/TODO.smpnet Thu Aug 10 09:08:54 2017 @@ -1,4 +1,4 @@ -$NetBSD: TODO.smpnet,v 1.11 2017/03/30 06:50:53 ozaki-r Exp $ +$NetBSD: TODO.smpnet,v 1.12 2017/08/10 09:08:54 ozaki-r Exp $ MP-safe components == @@ -22,10 +22,13 @@ MP-safe components - pppoe(4) - if_spppsubr.c - tun(4) + - vlan(4) - Packet filters - npf(7) - Others - bpf(4) + - ipsec(4) + - opencrypto(9) - pfil(9) Non MP-safe components and kernel options @@ -65,7 +68,6 @@ Non MP-safe components and kernel option - strip(4) - if_srt - tap(4) - - vlan(4) - Packet filters - ipf(4) - pf(4) @@ -75,11 +77,9 @@ Non MP-safe components and kernel option - Bluetooth (sys/netbt/) - altq(4) - CIFS (sys/netsmb/) - - ipsec(4) - ISDN (sys/netisbn/) - kttcp(4) - NFS - - opencrypto(9) Know issues ===
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Thu Aug 10 07:15:09 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: prune redundant line To generate a diff of this commit: cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.38 src/doc/CHANGES-8.0:1.1.2.39 --- src/doc/CHANGES-8.0:1.1.2.38 Wed Aug 9 13:03:38 2017 +++ src/doc/CHANGES-8.0 Thu Aug 10 07:15:09 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.38 2017/08/09 13:03:38 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.39 2017/08/10 07:15:09 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -5022,7 +5022,6 @@ sys/dev/pcmcia/aic_pcmcia.c 1.44 sys/opencrypto/crypto.c1.92-1.100 sys/opencrypto/cryptodev.h 1.38-1.39 sys/opencrypto/ocryptodev.c 1.9-1.11 -sys/opencrypto/ocryptodev.c 1.9 sys/opencrypto/xform.c1.29 sys/opencrypto/xform.h1.20
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Thu Aug 10 07:04:19 UTC 2017 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1467 To generate a diff of this commit: cvs rdiff -u -r1.1.2.102 -r1.1.2.103 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.102 src/doc/CHANGES-6.0.7:1.1.2.103 --- src/doc/CHANGES-6.0.7:1.1.2.102 Tue Aug 8 11:58:43 2017 +++ src/doc/CHANGES-6.0.7 Thu Aug 10 07:04:19 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.102 2017/08/08 11:58:43 martin Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.103 2017/08/10 07:04:19 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -12317,3 +12317,41 @@ sys/arch/amd64/amd64/trap.c: 1.95-1.96 and treating it as a syscall. [maxv, ticket #1464] +doc/3RDPARTY patch +distrib/sets/lists/base/mi patch +share/zoneinfo/Makefilepatch +share/zoneinfo/NEWSpatch +share/zoneinfo/africapatch +share/zoneinfo/antarctica patch +share/zoneinfo/asiapatch +share/zoneinfo/australasia patch +share/zoneinfo/backwardpatch +share/zoneinfo/backzonepatch +share/zoneinfo/etceterapatch +share/zoneinfo/europepatch +share/zoneinfo/factorypatch +share/zoneinfo/iso3166.tab patch +share/zoneinfo/leap-seconds.list patch +share/zoneinfo/leapseconds patch +share/zoneinfo/leapseconds.awk patch +share/zoneinfo/northamerica patch +share/zoneinfo/solar87delete +share/zoneinfo/solar88delete +share/zoneinfo/solar89delete +share/zoneinfo/southamerica patch +share/zoneinfo/yearistype.sh patch +share/zoneinfo/zone.tabpatch +share/zoneinfo/zone1970.tab patch +share/zoneinfo/CONTRIBUTING patch +share/zoneinfo/LICENSEpatch +share/zoneinfo/READMEpatch +share/zoneinfo/TZDATA_VERSION patch +share/zoneinfo/Theorypatch +share/zoneinfo/checklinks.awk patch +share/zoneinfo/checktab.awk patch +share/zoneinfo/versionpatch +share/zoneinfo/zoneinfo2tdf.pl patch + + Update tzdata to 2017b. + [mrg, ticket #1467] +j
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Thu Aug 10 06:48:24 UTC 2017 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1467 To generate a diff of this commit: cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.100 src/doc/CHANGES-6.1.6:1.1.2.101 --- src/doc/CHANGES-6.1.6:1.1.2.100 Tue Aug 8 11:59:59 2017 +++ src/doc/CHANGES-6.1.6 Thu Aug 10 06:48:23 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.100 2017/08/08 11:59:59 martin Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.101 2017/08/10 06:48:23 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -4036,8 +4036,8 @@ doc/3RDPARTY external/bsd/libevent/dist/buffer.c patch Fix CVE-2014-6272. - [spz, ticket #1243] - + [spz, ticket #1243] + sys/dev/usb/usbdi.c1.163 (via patch) Clip xfer->actlen also in the !DIAGNOSTIC case. @@ -6746,7 +6746,7 @@ sys/kern/kern_exit.c1.246, 1.247 sys/kern/kern_synch.c1.309 Various fixes related to proc's SSTOP state, related to wait(2) - in the parent, + in the parent, Fixes PR kern/50298, kern/50318 kern/50300, kern/50308 and kern/50330 [pgoyette, ticket #1333] @@ -7501,7 +7501,7 @@ libexec/httpd/tilde-luzah-bozo.c o fixed few memory leaks o bunch of minor tweaks o removed -r support - o smarter redirects + o smarter redirects o fix redirection handling o support transport stream (.ts) and video object (.vob) files o directory listings show correct file sizes for large files @@ -12009,3 +12009,28 @@ sys/arch/amd64/amd64/trap.c: 1.95-1.96 and treating it as a syscall. [maxv, ticket #1464] +distrib/sets/lists/base/mi patch +doc/3RDPARTY patch +share/zoneinfo/Makefilepatch +share/zoneinfo/NEWSpatch +share/zoneinfo/africa share/zoneinfo/antarctica patch +share/zoneinfo/asia share/zoneinfo/australasia patch +share/zoneinfo/backward share/zoneinfo/backzone patch +share/zoneinfo/etcetera share/zoneinfo/europe patch +share/zoneinfo/factory share/zoneinfo/iso3166.tab patch +share/zoneinfo/leap-seconds.list share/zoneinfo/leapseconds patch +share/zoneinfo/leapseconds.awk share/zoneinfo/northamerica patch +share/zoneinfo/southamerica share/zoneinfo/yearistype.sh patch +share/zoneinfo/zone.tab share/zoneinfo/zone1970.tab patch +share/zoneinfo/CONTRIBUTING share/zoneinfo/LICENSE patch +share/zoneinfo/README share/zoneinfo/TZDATA_VERSION patch +share/zoneinfo/Theory share/zoneinfo/checklinks.awk patch +share/zoneinfo/checktab.awk share/zoneinfo/version patch +share/zoneinfo/zoneinfo2tdf.pl patch +share/zoneinfo/solar87 delete +hare/zoneinfo/solar88 delete +share/zoneinfo/solar89 delete + + Update tzdata to 2017b. + [mrg, ticket #1467] +
CVS commit: [netbsd-6-1] src/distrib/sets/lists/base
Module Name:src Committed By: snj Date: Thu Aug 10 06:44:10 UTC 2017 Modified Files: src/distrib/sets/lists/base [netbsd-6-1]: mi Log Message: Apply patch (requested by mrg in ticket #1467): Update tzdata to 2017b. To generate a diff of this commit: cvs rdiff -u -r1.984.2.15.2.5 -r1.984.2.15.2.6 src/distrib/sets/lists/base/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.984.2.15.2.5 src/distrib/sets/lists/base/mi:1.984.2.15.2.6 --- src/distrib/sets/lists/base/mi:1.984.2.15.2.5 Thu Aug 10 06:35:05 2017 +++ src/distrib/sets/lists/base/mi Thu Aug 10 06:44:10 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.984.2.15.2.5 2017/08/10 06:35:05 snj Exp $ +# $NetBSD: mi,v 1.984.2.15.2.6 2017/08/10 06:44:10 snj Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -4585,9 +4585,9 @@ ./usr/share/zoneinfo/Asia/Qyzylorda base-sys-share share ./usr/share/zoneinfo/Asia/Rangoon base-sys-share share ./usr/share/zoneinfo/Asia/Riyadh base-sys-share share -./usr/share/zoneinfo/Asia/Riyadh87 base-sys-share share -./usr/share/zoneinfo/Asia/Riyadh88 base-sys-share share -./usr/share/zoneinfo/Asia/Riyadh89 base-sys-share share +./usr/share/zoneinfo/Asia/Riyadh87 base-obsolete obsolete +./usr/share/zoneinfo/Asia/Riyadh88 base-obsolete obsolete +./usr/share/zoneinfo/Asia/Riyadh89 base-obsolete obsolete ./usr/share/zoneinfo/Asia/Saigon base-sys-share share ./usr/share/zoneinfo/Asia/Sakhalin base-sys-share share ./usr/share/zoneinfo/Asia/Samarkand base-sys-share share @@ -4854,9 +4854,9 @@ ./usr/share/zoneinfo/Mexico/BajaSur base-sys-share share ./usr/share/zoneinfo/Mexico/General base-sys-share share ./usr/share/zoneinfo/Mideast base-sys-share -./usr/share/zoneinfo/Mideast/Riyadh87 base-sys-share share -./usr/share/zoneinfo/Mideast/Riyadh88 base-sys-share share -./usr/share/zoneinfo/Mideast/Riyadh89 base-sys-share share +./usr/share/zoneinfo/Mideast/Riyadh87 base-obsolete obsolete +./usr/share/zoneinfo/Mideast/Riyadh88 base-obsolete obsolete +./usr/share/zoneinfo/Mideast/Riyadh89 base-obsolete obsolete ./usr/share/zoneinfo/Moscow base-obsolete obsolete ./usr/share/zoneinfo/NZbase-sys-share share ./usr/share/zoneinfo/NZ-CHAT base-sys-share share
CVS commit: src/sys/netipsec
Module Name:src Committed By: ozaki-r Date: Thu Aug 10 06:33:51 UTC 2017 Modified Files: src/sys/netipsec: xform_ah.c xform_esp.c xform_ipcomp.c Log Message: Use pool_cache(9) instead of pool(9) for tdb_crypto objects The change improves network throughput especially on multi-core systems. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/netipsec/xform_ah.c cvs rdiff -u -r1.70 -r1.71 src/sys/netipsec/xform_esp.c cvs rdiff -u -r1.51 -r1.52 src/sys/netipsec/xform_ipcomp.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/netipsec/xform_ah.c diff -u src/sys/netipsec/xform_ah.c:1.72 src/sys/netipsec/xform_ah.c:1.73 --- src/sys/netipsec/xform_ah.c:1.72 Wed Aug 9 09:48:11 2017 +++ src/sys/netipsec/xform_ah.c Thu Aug 10 06:33:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ah.c,v 1.72 2017/08/09 09:48:11 ozaki-r Exp $ */ +/* $NetBSD: xform_ah.c,v 1.73 2017/08/10 06:33:51 ozaki-r Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ /* @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.72 2017/08/09 09:48:11 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.73 2017/08/10 06:33:51 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -123,7 +123,7 @@ static int ah_output_cb(struct cryptop * const uint8_t ah_stats[256] = { SADB_AALG_STATS_INIT }; -static struct pool ah_tdb_crypto_pool; +static pool_cache_t ah_tdb_crypto_pool_cache; static size_t ah_pool_item_size; /* @@ -702,7 +702,7 @@ ah_input(struct mbuf *m, struct secasvar KASSERTMSG(size <= ah_pool_item_size, "size=%zu > ah_pool_item_size=%zu\n", size, ah_pool_item_size); - tc = pool_get(_tdb_crypto_pool, PR_NOWAIT); + tc = pool_cache_get(ah_tdb_crypto_pool_cache, PR_NOWAIT); if (tc == NULL) { DPRINTF(("%s: failed to allocate tdb_crypto\n", __func__)); stat = AH_STAT_CRYPTO; @@ -775,7 +775,7 @@ ah_input(struct mbuf *m, struct secasvar bad: if (tc != NULL) - pool_put(_tdb_crypto_pool, tc); + pool_cache_put(ah_tdb_crypto_pool_cache, tc); if (crp != NULL) crypto_freereq(crp); if (m != NULL) @@ -909,7 +909,7 @@ ah_input_cb(struct cryptop *crp) /* Copyback the saved (uncooked) network headers. */ m_copyback(m, 0, skip, ptr); - pool_put(_tdb_crypto_pool, tc); + pool_cache_put(ah_tdb_crypto_pool_cache, tc); tc = NULL; /* @@ -957,7 +957,7 @@ bad: if (m != NULL) m_freem(m); if (tc != NULL) - pool_put(_tdb_crypto_pool, tc); + pool_cache_put(ah_tdb_crypto_pool_cache, tc); if (crp != NULL) crypto_freereq(crp); return error; @@ -1117,7 +1117,7 @@ ah_output( crda->crd_klen = _KEYBITS(sav->key_auth); /* Allocate IPsec-specific opaque crypto info. */ - tc = pool_get(_tdb_crypto_pool, PR_NOWAIT); + tc = pool_cache_get(ah_tdb_crypto_pool_cache, PR_NOWAIT); if (tc == NULL) { crypto_freereq(crp); DPRINTF(("%s: failed to allocate tdb_crypto\n", __func__)); @@ -1151,7 +1151,7 @@ ah_output( skip, ahx->type, 1); if (error != 0) { m = NULL; /* mbuf was free'd by ah_massage_headers. */ - pool_put(_tdb_crypto_pool, tc); + pool_cache_put(ah_tdb_crypto_pool_cache, tc); crypto_freereq(crp); goto bad; } @@ -1165,7 +1165,7 @@ ah_output( if (__predict_false(isr->sp->state == IPSEC_SPSTATE_DEAD || sav->state == SADB_SASTATE_DEAD)) { pserialize_read_exit(s); - pool_put(_tdb_crypto_pool, tc); + pool_cache_put(ah_tdb_crypto_pool_cache, tc); crypto_freereq(crp); AH_STATINC(AH_STAT_NOTDB); error = ENOENT; @@ -1269,7 +1269,7 @@ ah_output_cb(struct cryptop *crp) m_copyback(m, 0, skip, ptr); /* No longer needed. */ - pool_put(_tdb_crypto_pool, tc); + pool_cache_put(ah_tdb_crypto_pool_cache, tc); crypto_freereq(crp); #ifdef IPSEC_DEBUG @@ -1299,7 +1299,7 @@ bad: IPSEC_RELEASE_GLOBAL_LOCKS(); if (m) m_freem(m); - pool_put(_tdb_crypto_pool, tc); + pool_cache_put(ah_tdb_crypto_pool_cache, tc); crypto_freereq(crp); return error; } @@ -1350,8 +1350,9 @@ ah_attach(void) ah_pool_item_size = sizeof(struct tdb_crypto) + sizeof(struct ip) + MAX_IPOPTLEN + sizeof(struct ah) + sizeof(uint32_t) + ah_max_authsize; - pool_init(_tdb_crypto_pool, ah_pool_item_size, - 0, 0, 0, "ah_tdb_crypto", NULL, IPL_SOFTNET); + ah_tdb_crypto_pool_cache = pool_cache_init(ah_pool_item_size, + coherency_unit, 0, 0, "ah_tdb_crypto", NULL, IPL_SOFTNET, + NULL, NULL, NULL); xform_register(_xformsw); } Index: src/sys/netipsec/xform_esp.c diff -u src/sys/netipsec/xform_esp.c:1.70 src/sys/netipsec/xform_esp.c:1.71 --- src/sys/netipsec/xform_esp.c:1.70 Wed Aug 9 09:48:11 2017 +++ src/sys/netipsec/xform_esp.c Thu Aug 10 06:33:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_esp.c,v 1.70 2017/08/09 09:48:11 ozaki-r Exp $ */ +/* $NetBSD: xform_esp.c,v 1.71 2017/08/10
CVS commit: src/sys/netipsec
Module Name:src Committed By: ozaki-r Date: Thu Aug 10 06:11:24 UTC 2017 Modified Files: src/sys/netipsec: ipsec.c ipsec.h ipsec_output.c Log Message: Add per-CPU rtcache to ipsec_reinject_ipstack It reduces route lookups and also reduces rtcache lock contentions when NET_MPSAFE is enabled. To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/netipsec/ipsec.c cvs rdiff -u -r1.58 -r1.59 src/sys/netipsec/ipsec.h cvs rdiff -u -r1.59 -r1.60 src/sys/netipsec/ipsec_output.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/netipsec/ipsec.c diff -u src/sys/netipsec/ipsec.c:1.117 src/sys/netipsec/ipsec.c:1.118 --- src/sys/netipsec/ipsec.c:1.117 Mon Aug 7 03:18:32 2017 +++ src/sys/netipsec/ipsec.c Thu Aug 10 06:11:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.c,v 1.117 2017/08/07 03:18:32 ozaki-r Exp $ */ +/* $NetBSD: ipsec.c,v 1.118 2017/08/10 06:11:24 ozaki-r Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.117 2017/08/07 03:18:32 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.118 2017/08/10 06:11:24 ozaki-r Exp $"); /* * IPsec controller part. @@ -2387,6 +2387,8 @@ void ipsec_attach(void) { + ipsec_output_init(); + ipsecstat_percpu = percpu_alloc(sizeof(uint64_t) * IPSEC_NSTATS); sysctl_net_inet_ipsec_setup(NULL); Index: src/sys/netipsec/ipsec.h diff -u src/sys/netipsec/ipsec.h:1.58 src/sys/netipsec/ipsec.h:1.59 --- src/sys/netipsec/ipsec.h:1.58 Wed Aug 2 01:28:03 2017 +++ src/sys/netipsec/ipsec.h Thu Aug 10 06:11:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec.h,v 1.58 2017/08/02 01:28:03 ozaki-r Exp $ */ +/* $NetBSD: ipsec.h,v 1.59 2017/08/10 06:11:24 ozaki-r Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $ */ /* $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $ */ @@ -334,6 +334,7 @@ void ipsec_dumpmbuf (struct mbuf *); void *esp4_ctlinput(int, const struct sockaddr *, void *); void *ah4_ctlinput(int, const struct sockaddr *, void *); +void ipsec_output_init(void); struct m_tag; void ipsec4_common_input(struct mbuf *m, ...); int ipsec4_common_input_cb(struct mbuf *, struct secasvar *, Index: src/sys/netipsec/ipsec_output.c diff -u src/sys/netipsec/ipsec_output.c:1.59 src/sys/netipsec/ipsec_output.c:1.60 --- src/sys/netipsec/ipsec_output.c:1.59 Thu Aug 10 06:08:59 2017 +++ src/sys/netipsec/ipsec_output.c Thu Aug 10 06:11:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_output.c,v 1.59 2017/08/10 06:08:59 ozaki-r Exp $ */ +/* $NetBSD: ipsec_output.c,v 1.60 2017/08/10 06:11:24 ozaki-r Exp $ */ /*- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.59 2017/08/10 06:08:59 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.60 2017/08/10 06:11:24 ozaki-r Exp $"); /* * IPsec output processing. @@ -86,6 +86,7 @@ __KERNEL_RCSID(0, "$NetBSD: ipsec_output #include /* ovbcopy() in ipsec6_encapsulate() */ +static percpu_t *ipsec_rtcache_percpu __cacheline_aligned; /* * Add a IPSEC_OUT_DONE tag to mark that we have finished the ipsec processing @@ -112,16 +113,18 @@ static int ipsec_reinject_ipstack(struct mbuf *m, int af) { int rv = -1; + struct route *ro; KASSERT(af == AF_INET || af == AF_INET6); #ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); #endif + ro = percpu_getref(ipsec_rtcache_percpu); switch (af) { #ifdef INET case AF_INET: - rv = ip_output(m, NULL, NULL, IP_RAWOUTPUT|IP_NOIPNEWID, + rv = ip_output(m, NULL, ro, IP_RAWOUTPUT|IP_NOIPNEWID, NULL, NULL); break; #endif @@ -131,10 +134,11 @@ ipsec_reinject_ipstack(struct mbuf *m, i * We don't need massage, IPv6 header fields are always in * net endian. */ - rv = ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL); + rv = ip6_output(m, NULL, ro, 0, NULL, NULL, NULL); break; #endif } + percpu_putref(ipsec_rtcache_percpu); #ifndef NET_MPSAFE KERNEL_UNLOCK_ONE(NULL); #endif @@ -795,3 +799,10 @@ bad: return error; } #endif /*INET6*/ + +void +ipsec_output_init(void) +{ + + ipsec_rtcache_percpu = percpu_alloc(sizeof(struct route)); +}
CVS commit: src/sys/netipsec
Module Name:src Committed By: ozaki-r Date: Thu Aug 10 06:09:00 UTC 2017 Modified Files: src/sys/netipsec: ipsec_output.c Log Message: Simplify ipsec_reinject_ipstack (NFC) To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/netipsec/ipsec_output.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/netipsec/ipsec_output.c diff -u src/sys/netipsec/ipsec_output.c:1.58 src/sys/netipsec/ipsec_output.c:1.59 --- src/sys/netipsec/ipsec_output.c:1.58 Thu Aug 3 06:32:51 2017 +++ src/sys/netipsec/ipsec_output.c Thu Aug 10 06:08:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_output.c,v 1.58 2017/08/03 06:32:51 ozaki-r Exp $ */ +/* $NetBSD: ipsec_output.c,v 1.59 2017/08/10 06:08:59 ozaki-r Exp $ */ /*- * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.58 2017/08/03 06:32:51 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_output.c,v 1.59 2017/08/10 06:08:59 ozaki-r Exp $"); /* * IPsec output processing. @@ -111,43 +111,35 @@ ipsec_register_done(struct mbuf *m, int static int ipsec_reinject_ipstack(struct mbuf *m, int af) { -#if defined(INET) || defined(INET6) - int rv; -#endif + int rv = -1; + + KASSERT(af == AF_INET || af == AF_INET6); +#ifndef NET_MPSAFE + KERNEL_LOCK(1, NULL); +#endif switch (af) { #ifdef INET case AF_INET: -#ifndef NET_MPSAFE - KERNEL_LOCK(1, NULL); -#endif rv = ip_output(m, NULL, NULL, IP_RAWOUTPUT|IP_NOIPNEWID, NULL, NULL); -#ifndef NET_MPSAFE - KERNEL_UNLOCK_ONE(NULL); + break; #endif - return rv; - -#endif /* INET */ #ifdef INET6 case AF_INET6: /* * We don't need massage, IPv6 header fields are always in * net endian. */ -#ifndef NET_MPSAFE - KERNEL_LOCK(1, NULL); -#endif rv = ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL); -#ifndef NET_MPSAFE - KERNEL_UNLOCK_ONE(NULL); + break; #endif - return rv; -#endif /* INET6 */ } +#ifndef NET_MPSAFE + KERNEL_UNLOCK_ONE(NULL); +#endif - panic("ipsec_reinject_ipstack : iunknown protocol family %u\n", af); - return -1; /* NOTREACHED */ + return rv; } int
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Thu Aug 10 06:05:00 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1467 To generate a diff of this commit: cvs rdiff -u -r1.1.2.294 -r1.1.2.295 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.294 src/doc/CHANGES-6.2:1.1.2.295 --- src/doc/CHANGES-6.2:1.1.2.294 Tue Aug 8 12:01:20 2017 +++ src/doc/CHANGES-6.2 Thu Aug 10 06:05:00 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.294 2017/08/08 12:01:20 martin Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.295 2017/08/10 06:05:00 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -18047,3 +18047,38 @@ sys/arch/amd64/amd64/trap.c: 1.95-1.96 and treating it as a syscall. [maxv, ticket #1464] +distrib/sets/lists/base/mi patch +doc/3RDPARTYpatch +share/zoneinfo/CONTRIBUTING patch +share/zoneinfo/LICENSE patch +share/zoneinfo/Makefile patch +share/zoneinfo/NEWS patch +share/zoneinfo/README patch +share/zoneinfo/TZDATA_VERSION patch +share/zoneinfo/Theory patch +share/zoneinfo/africa patch +share/zoneinfo/antarctica patch +share/zoneinfo/asia patch +share/zoneinfo/australasia patch +share/zoneinfo/backward patch +share/zoneinfo/backzone patch +share/zoneinfo/checklinks.awk patch +share/zoneinfo/checktab.awk patch +share/zoneinfo/etcetera patch +share/zoneinfo/europe patch +share/zoneinfo/factory patch +share/zoneinfo/iso3166.tab patch +share/zoneinfo/leap-seconds.list patch +share/zoneinfo/leapseconds patch +share/zoneinfo/leapseconds.awk patch +share/zoneinfo/northamerica patch +share/zoneinfo/southamerica patch +share/zoneinfo/version patch +share/zoneinfo/yearistype.sh patch +share/zoneinfo/zone.tab patch +share/zoneinfo/zoneinfo2tdf.pl patch +share/zoneinfo/zone1970.tab patch + + Update tzdata to 2017b. + [mrg, ticket #1467] +