CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Sep 24 05:26:06 UTC 2021 Modified Files: src/sys/net: files.net Log Message: Fix build failure for i386 INSTALL_XEN3PAE_DOMU, sorry. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/net/files.net Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Sep 24 05:26:06 UTC 2021 Modified Files: src/sys/net: files.net Log Message: Fix build failure for i386 INSTALL_XEN3PAE_DOMU, sorry. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/net/files.net Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/files.net diff -u src/sys/net/files.net:1.31 src/sys/net/files.net:1.32 --- src/sys/net/files.net:1.31 Mon May 17 04:07:43 2021 +++ src/sys/net/files.net Fri Sep 24 05:26:06 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.net,v 1.31 2021/05/17 04:07:43 yamaguchi Exp $ +# $NetBSD: files.net,v 1.32 2021/09/24 05:26:06 knakahara Exp $ # XXX CLEANUP define net @@ -49,7 +49,7 @@ file net/rss_config.c net file net/rtbl.c net file net/rtsock.c net file net/slcompress.c sl | ppp | (irip & irip_vj) -file net/toeplitz.c toeplitz +file net/toeplitz.c toeplitz | net file net/zlib.c (ppp & ppp_deflate) | swcrypto | vnd_compression file netinet/accf_data.c accf_data file netinet/accf_http.c accf_http
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Sep 24 04:11:02 UTC 2021 Modified Files: src/sys/net: rss_config.c rss_config.h Log Message: Add RSS toeplitz hash functions which calculate from mbuf. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/net/rss_config.c cvs rdiff -u -r1.1 -r1.2 src/sys/net/rss_config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/rss_config.c diff -u src/sys/net/rss_config.c:1.2 src/sys/net/rss_config.c:1.3 --- src/sys/net/rss_config.c:1.2 Wed Nov 20 08:17:01 2019 +++ src/sys/net/rss_config.c Fri Sep 24 04:11:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rss_config.c,v 1.2 2019/11/20 08:17:01 knakahara Exp $ */ +/* $NetBSD: rss_config.c,v 1.3 2021/09/24 04:11:02 knakahara Exp $ */ /* * Copyright (c) 2018 Internet Initiative Japan Inc. @@ -27,13 +27,21 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rss_config.c,v 1.2 2019/11/20 08:17:01 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rss_config.c,v 1.3 2021/09/24 04:11:02 knakahara Exp $"); #include #include #include +#include #include +#include + +#include +#include +#include +#include +#include /* * Same as FreeBSD. @@ -75,3 +83,201 @@ rss_getkey(uint8_t *key) memcpy(key, rss_default_key, sizeof(rss_default_key)); } + +/* + * Calculate rss hash value from IPv4 mbuf. + * This function should be called before ip_input(). + */ +uint32_t +rss_toeplitz_hash_from_mbuf_ipv4(const struct mbuf *m, u_int flag) +{ + struct ip *ip; + int hlen; + uint8_t key[RSS_KEYSIZE]; + + KASSERT((m->m_flags & M_PKTHDR) != 0); + KASSERT(m->m_len >= sizeof (struct ip)); + + ip = mtod(m, struct ip *); + KASSERT(ip->ip_v == IPVERSION); + + hlen = ip->ip_hl << 2; + if (hlen < sizeof(struct ip)) + return 0; + + rss_getkey(key); + + switch (ip->ip_p) { + case IPPROTO_TCP: + { + if ((flag & RSS_TOEPLITZ_USE_TCP_PORT) != 0) { + if (m->m_len >= hlen + sizeof(struct tcphdr)) { +struct tcphdr *th; + +th = (struct tcphdr *)(mtod(m, char *) + hlen); +return toeplitz_vhash(key, sizeof(key), +/* ip_src and ip_dst in struct ip must be sequential */ +>ip_src, sizeof(ip->ip_src) * 2, +/* th_sport and th_dport in tcphdr must be sequential */ +>th_sport, sizeof(th->th_sport) * 2, +NULL); + } else if (m->m_pkthdr.len >= hlen + sizeof(struct tcphdr)) { +uint16_t ports[2]; + +/* ditto */ +m_copydata(__UNCONST(m), hlen + offsetof(struct tcphdr, th_sport), +sizeof(ports), ports); +return toeplitz_vhash(key, sizeof(key), +>ip_src, sizeof(ip->ip_src) * 2, +ports, sizeof(ports), +NULL); + } + } + /* + * Treat as raw packet. + */ + return toeplitz_vhash(key, sizeof(key), + /* ditto */ + >ip_src, sizeof(ip->ip_src) * 2, + NULL); + } + case IPPROTO_UDP: + { + if ((flag & RSS_TOEPLITZ_USE_UDP_PORT) != 0) { + if (m->m_len >= hlen + sizeof(struct udphdr)) { +struct udphdr *uh; + +uh = (struct udphdr *)(mtod(m, char *) + hlen); +return toeplitz_vhash(key, sizeof(key), +/* ip_src and ip_dst in struct ip must sequential */ +>ip_src, sizeof(ip->ip_src) * 2, +/* uh_sport and uh_dport in udphdr must be sequential */ +>uh_sport, sizeof(uh->uh_sport) * 2, +NULL); + } else if (m->m_pkthdr.len >= hlen + sizeof(struct udphdr)) { +uint16_t ports[2]; + +/* ditto */ +m_copydata(__UNCONST(m), hlen + offsetof(struct udphdr, uh_sport), +sizeof(ports), ports); +return toeplitz_vhash(key, sizeof(key), +>ip_src, sizeof(ip->ip_src) * 2, +ports, sizeof(ports), +NULL); + } + } + /* + * Treat as raw packet. + */ + return toeplitz_vhash(key, sizeof(key), + /* ditto */ + >ip_src, sizeof(ip->ip_src) * 2, + NULL); + } + /* + * Other protocols are treated as raw packets to apply RPS. + */ + default: + return toeplitz_vhash(key, sizeof(key), + /* ditto */ + >ip_src, sizeof(ip->ip_src) * 2, + NULL); + } +} + +/* + * Calculate rss hash value from IPv6 mbuf. + * This function should be called before ip6_input(). + */ +uint32_t +rss_toeplitz_hash_from_mbuf_ipv6(const struct mbuf *m, u_int flag) +{ + struct ip6_hdr *ip6; + int hlen; + uint8_t key[RSS_KEYSIZE]; + + KASSERT((m->m_flags & M_PKTHDR) != 0); + KASSERT(m->m_len >= sizeof (struct ip6_hdr)); + + ip6 = mtod(m, struct ip6_hdr *); + KASSERT((ip6->ip6_vfc & IPV6_VERSION_MASK) == IPV6_VERSION); + + hlen = sizeof(struct ip6_hdr); + rss_getkey(key); + + switch (ip6->ip6_nxt) { + case IPPROTO_TCP: + { + if ((flag & RSS_TOEPLITZ_USE_TCP_PORT) != 0) { + if (m->m_len >= hlen + sizeof(struct tcphdr)) { +struct tcphdr *th; + +th = (struct tcphdr *)(mtod(m, char *) + hlen); +return toeplitz_vhash(key, sizeof(key), +/* ip6_src and ip6_dst in ip6_hdr must be sequential */ +>ip6_src,
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Sep 24 04:11:02 UTC 2021 Modified Files: src/sys/net: rss_config.c rss_config.h Log Message: Add RSS toeplitz hash functions which calculate from mbuf. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/net/rss_config.c cvs rdiff -u -r1.1 -r1.2 src/sys/net/rss_config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Sep 24 04:09:32 UTC 2021 Modified Files: src/sys/net: toeplitz.c toeplitz.h Log Message: Import asymmetric toeplitz hash without memcpy implemented by ryo@n.o. This implementation has better performance than memcpy'ed one. (30%-60% improvement in micro benchmark) import from https://github.com/ryo/l2pkt/blob/master/l2pkt/toeplitz_hash.c To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/net/toeplitz.c src/sys/net/toeplitz.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/toeplitz.c diff -u src/sys/net/toeplitz.c:1.2 src/sys/net/toeplitz.c:1.3 --- src/sys/net/toeplitz.c:1.2 Mon Apr 5 06:56:47 2021 +++ src/sys/net/toeplitz.c Fri Sep 24 04:09:32 2021 @@ -202,3 +202,87 @@ stoeplitz_to_key(void *key, size_t klen) k[i + 1] = skey; } } + +/* + * e.g.) + * + * struct in_addr src, dst; + * uint16_t srcport, dstport; + * toeplitz_vhash(rsskey[], sizeof(rsskey), + *, sizeof(src), + *, sizeof(dst), + *, sizeof(srcport), + *, sizeof(dstport), + *NULL); + * + * struct in6_addr src6, dst6; + * toeplitz_vhash(rsskey[], sizeof(rsskey), + *, sizeof(src6), + *, sizeof(dst6), + *NULL); + * + * struct ip *ip; + * struct tcphdr *tcp; + * toeplitz_vhash(rsskey[], sizeof(rsskey), + *>ip_src, sizeof(ip->ip_src), + *>ip_dst, sizeof(ip->ip_dst), + *>th_sport, sizeof(tcp->th_sport), + *>th_dport, sizeof(tcp->th_dport), + *NULL); + * + */ +uint32_t +toeplitz_vhash(const uint8_t *keyp, size_t keylen, ...) +{ + va_list ap; + uint32_t hash, v; + size_t datalen; + uint8_t *datap, key, data; + const uint8_t *keyend; + + keyend = keyp + keylen; + + /* first 32bit is initial vector */ + v = *keyp++; + v <<= 8; + v |= *keyp++; + v <<= 8; + v |= *keyp++; + v <<= 8; + v |= *keyp++; + + hash = 0; + va_start(ap, keylen); + + while ((datap = va_arg(ap, uint8_t *)) != NULL) { + for (datalen = va_arg(ap, size_t); datalen > 0; datalen--) { + /* fetch key and input data by 8bit */ + if (keyp < keyend) +key = *keyp++; + else +key = 0; + data = *datap++; + +#define XOR_AND_FETCH_BIT(x) \ + if (data & __BIT(x)) \ +hash ^= v; \ + v <<= 1; \ + if (key & __BIT(x)) \ +v |= 1; + + XOR_AND_FETCH_BIT(7); + XOR_AND_FETCH_BIT(6); + XOR_AND_FETCH_BIT(5); + XOR_AND_FETCH_BIT(4); + XOR_AND_FETCH_BIT(3); + XOR_AND_FETCH_BIT(2); + XOR_AND_FETCH_BIT(1); + XOR_AND_FETCH_BIT(0); + +#undef XOR_AND_FETCH_BIT + } + } + va_end(ap); + + return hash; +} Index: src/sys/net/toeplitz.h diff -u src/sys/net/toeplitz.h:1.2 src/sys/net/toeplitz.h:1.3 --- src/sys/net/toeplitz.h:1.2 Mon Apr 5 06:53:45 2021 +++ src/sys/net/toeplitz.h Fri Sep 24 04:09:32 2021 @@ -120,4 +120,10 @@ extern const struct stoeplitz_cache *con stoeplitz_hash_ip6port(stoeplitz_cache, (_sa6), (_da6), (_sp), (_dp)) #endif +/* + * system also provided asymmetric toeplitz + */ + +uint32_t toeplitz_vhash(const uint8_t *, size_t, ...); + #endif /* _SYS_NET_TOEPLITZ_H_ */
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Sep 24 04:09:32 UTC 2021 Modified Files: src/sys/net: toeplitz.c toeplitz.h Log Message: Import asymmetric toeplitz hash without memcpy implemented by ryo@n.o. This implementation has better performance than memcpy'ed one. (30%-60% improvement in micro benchmark) import from https://github.com/ryo/l2pkt/blob/master/l2pkt/toeplitz_hash.c To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/net/toeplitz.c src/sys/net/toeplitz.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: manu Date: Fri Sep 24 00:29:46 UTC 2021 Modified Files: src/sys/arch/amd64/conf: XEN3_DOM0 Log Message: Move XEN3_DOM0 as close as possible to GENERIC. Document why some options are disabled Set NO_PCI_MSI_MSIX to work around crashes reported in multiple PR To generate a diff of this commit: cvs rdiff -u -r1.193 -r1.194 src/sys/arch/amd64/conf/XEN3_DOM0 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.193 src/sys/arch/amd64/conf/XEN3_DOM0:1.194 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.193 Tue Jun 29 10:22:34 2021 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Fri Sep 24 00:29:46 2021 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.193 2021/06/29 10:22:34 nia Exp $ +# $NetBSD: XEN3_DOM0,v 1.194 2021/09/24 00:29:46 manu Exp $ # XEN3_DOM0 machine description file # @@ -14,7 +14,7 @@ include "arch/amd64/conf/std.xen" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "XEN3_DOM0-$Revision: 1.193 $" +#ident "XEN3_DOM0-$Revision: 1.194 $" maxusers 32 # estimated number of users @@ -86,14 +86,15 @@ options SYSVSEM # System V-like semaph options SYSVSHM # System V-like memory sharing options MODULAR # new style module(7) framework -#options MODULAR_DEFAULT_AUTOLOAD +options MODULAR_DEFAULT_AUTOLOAD options USERCONF # userconf(4) support #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # CPU features #acpicpu* at cpu? # ACPI CPU (including frequency scaling) -#coretemp* at cpu? # Intel on-die thermal sensor +# needs x86_cpu_idle_halt in cpu.c (!xenpv) +coretemp* at cpu? # Intel on-die thermal sensor est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI) #hyperv0 at cpu0 # Microsoft Hyper-V #odcm0 at cpu0 # On-demand clock modulation @@ -117,16 +118,17 @@ options DIAGNOSTIC # inexpensive kernel # makeoptions COPTS="-O2 -fno-omit-frame-pointer" options DDB # in-kernel debugger -options DDB_COMMANDONENTER="show registers" -options DDB_ONPANIC=1 # see also sysctl(7): `ddb.onpanic' +#options DDB_COMMANDONENTER="bt" # execute command when ddb is entered +#options DDB_ONPANIC=1 # see also sysctl(7): `ddb.onpanic' options DDB_HISTORY_SIZE=512 # enable history editing in DDB #options KGDB # remote debugger #options KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=57600 -#makeoptions DEBUG="-g" # compile full symbol table +makeoptions DEBUG="-g" # compile full symbol table for CTF +options DDB_COMMANDONENTER="trace;show registers" #options SYSCALL_STATS # per syscall counts #options SYSCALL_TIMES # per syscall times #options SYSCALL_TIMES_HASCOUNTER # use 'broken' rdtsc (soekris) -#options KDTRACE_HOOKS # kernel DTrace hooks +options KDTRACE_HOOKS # kernel DTrace hooks # Kernel Undefined Behavior Sanitizer (kUBSan). #options KUBSAN # mandatory @@ -195,19 +197,19 @@ include "conf/filesystems.config" # ffs options QUOTA # legacy UFS quotas options QUOTA2 # new, in-filesystem UFS quotas -#options FFS_EI # FFS Endian Independent support +options FFS_EI # FFS Endian Independent support options WAPBL # File system journaling support # Note that UFS_DIRHASH is suspected of causing kernel memory corruption. # It is not recommended for general use. #options UFS_DIRHASH # UFS Large Directory Hashing - Experimental -#options UFS_ACL # UFS Access Control Lists +options UFS_ACL # UFS Access Control Lists #options FFS_NO_SNAPSHOT # No FFS snapshot support options UFS_EXTATTR # Extended attribute support for UFS1 # ext2fs #options EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and # immutable) behave as system flags. # other -#options DISKLABEL_EI # disklabel Endian Independent support +options DISKLABEL_EI # disklabel Endian Independent support options NFSSERVER # Network File System server # Networking options @@ -252,12 +254,6 @@ options SCSIVERBOSE # human readable SC #options HDAUDIOVERBOSE # verbose HDAUDIO driver messages options NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM -#options NFS_BOOT_BOOTSTATIC -#options NFS_BOOTSTATIC_MYIP="\"169.254.1.2\"" -#options NFS_BOOTSTATIC_GWIP="\"169.254.1.1\"" -#options NFS_BOOTSTATIC_MASK="\"255.255.255.0\"" -#options NFS_BOOTSTATIC_SERVADDR="\"169.254.1.1\"" -#options NFS_BOOTSTATIC_SERVER="\"server:/path/to/root\"" # # wscons options @@ -329,11 +325,7 @@ options MPBIOS_SCANPCI # MPBIOS config #options PCI_BUS_FIXUP # fixup PCI bus numbering #options PCI_ADDR_FIXUP # fixup PCI I/O addresses #options ACPI_ACTIVATE_DEV # If set, activate inactive devices -#options VGA_POST # in-kernel support for VGA POST - -#options ACPICA_PEDANTIC # force strict conformance to the Spec. -#options MPDEBUG # MPBIOS configures PCI roots -#options
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: manu Date: Fri Sep 24 00:29:46 UTC 2021 Modified Files: src/sys/arch/amd64/conf: XEN3_DOM0 Log Message: Move XEN3_DOM0 as close as possible to GENERIC. Document why some options are disabled Set NO_PCI_MSI_MSIX to work around crashes reported in multiple PR To generate a diff of this commit: cvs rdiff -u -r1.193 -r1.194 src/sys/arch/amd64/conf/XEN3_DOM0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Sep 23 22:54:09 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: fix memory leak in error case of the ':?' modifier To generate a diff of this commit: cvs rdiff -u -r1.951 -r1.952 src/usr.bin/make/var.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/var.c diff -u src/usr.bin/make/var.c:1.951 src/usr.bin/make/var.c:1.952 --- src/usr.bin/make/var.c:1.951 Tue Sep 21 23:06:18 2021 +++ src/usr.bin/make/var.c Thu Sep 23 22:54:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.951 2021/09/21 23:06:18 rillig Exp $ */ +/* $NetBSD: var.c,v 1.952 2021/09/23 22:54:09 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -140,7 +140,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.951 2021/09/21 23:06:18 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.952 2021/09/23 22:54:09 rillig Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -3444,6 +3444,8 @@ ApplyModifier_IfElse(const char **pp, Mo if (cond_rc == COND_INVALID) { Error("Bad conditional expression '%s' in '%s?%s:%s'", expr->name, expr->name, then_expr.str, else_expr.str); + FStr_Done(_expr); + FStr_Done(_expr); return AMR_CLEANUP; }
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Thu Sep 23 22:54:09 UTC 2021 Modified Files: src/usr.bin/make: var.c Log Message: make: fix memory leak in error case of the ':?' modifier To generate a diff of this commit: cvs rdiff -u -r1.951 -r1.952 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/doc
Module Name:src Committed By: palle Date: Thu Sep 23 17:51:52 UTC 2021 Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: sun4v: update TODO with current status when running on a T5-based system To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sparc64/doc/TODO 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/sparc64/doc/TODO diff -u src/sys/arch/sparc64/doc/TODO:1.44 src/sys/arch/sparc64/doc/TODO:1.45 --- src/sys/arch/sparc64/doc/TODO:1.44 Mon Jul 5 16:59:54 2021 +++ src/sys/arch/sparc64/doc/TODO Thu Sep 23 17:51:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: TODO,v 1.44 2021/07/05 16:59:54 palle Exp $ */ +/* $NetBSD: TODO,v 1.45 2021/09/23 17:51:52 palle Exp $ */ Things to be done: @@ -13,15 +13,12 @@ sun4u: sun4v: - current status T5 ldom with 2 VCPU and 4GB (primary ldom is Solaris 11.4 SRU30):: - - kernel boots from miniroot.fs via ldom fisk (vdsk) + - kernel boots from miniroot.fs via ldom disk (vdsk) - ldom virtual network interface (vnet) is working (verified by exiting sysinst and issuing a ping command) - - the sysinst tool starts, disk setup is working, - but the process crashes when selecting network installation method. - The %i,%l and %o registers are corrupted, after a call to the libcurses - wrefresh() function. - If the sysinst insallation source is local directory, the sets are properly - unpacked, but the system hangs afterwards when running the makedev script. + - the sysinst tool starts, disk setup is working, network configuration is working, + but after the selected (minimal) sets have been downloaded and installed + the 'sh MAKEDEV all' comand hangs. T2000 ldom with 8 VCPU and 4GB: - crashes in /sbin/init doing an access() call where %o0 is corrupted (zero) S7 ldom with 8 VCPU and 16GB (primary ldom is Solaris 11.4 SRU33):
CVS commit: src/sys/arch/sparc64/doc
Module Name:src Committed By: palle Date: Thu Sep 23 17:51:52 UTC 2021 Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: sun4v: update TODO with current status when running on a T5-based system To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sparc64/doc/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Sep 23 15:43:21 UTC 2021 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.1420 -r1.1421 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1419 -r1.1420 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Sep 23 15:42:29 UTC 2021 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some Intel devices: - Tiger Lake - I225V and I225LM - WiFi 6 AX201 To generate a diff of this commit: cvs rdiff -u -r1.1433 -r1.1434 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1433 src/sys/dev/pci/pcidevs:1.1434 --- src/sys/dev/pci/pcidevs:1.1433 Mon Sep 6 02:43:06 2021 +++ src/sys/dev/pci/pcidevs Thu Sep 23 15:42:29 2021 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1433 2021/09/06 02:43:06 mrg Exp $ +$NetBSD: pcidevs,v 1.1434 2021/09/23 15:42:29 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -4232,6 +4232,8 @@ product INTEL I219_V9 0x15e2 I219-V Eth product INTEL I219_LM5 0x15e3 I219-LM Ethernet Connection product INTEL C3K_X553_SGMII 0x15e4 C3000 X553 1GbE SGMII (10G SKU) product INTEL C3K_X553_SGMII_L 0x15e5 C3000 X553 1GbE SGMII (non-10G SKU) +product INTEL I225_LM 0x15f2 I225 LM Ethernet +product INTEL I225_V 0x15f3 I225 V Ethernet product INTEL I219_LM15 0x15f4 I219-LM Ethernet Connection product INTEL I210_SGMII_WOF 0x15f6 I210 Ethernet (SGMII) product INTEL I219_LM14 0x15f9 I219-LM Ethernet Connection @@ -6009,6 +6011,45 @@ product INTEL C610_SPSR 0x8d7c C61x/X99 product INTEL C610_MS_SMB0 0x8d7d C61x/X99 MS SMbus product INTEL C610_MS_SMB1 0x8d7e C61x/X99 MS SMbus product INTEL C610_MS_SMB2 0x8d7f C61x/X99 MS SMbus +product INTEL TGL_H_PCIE_RC_010 0x9a01 Tiger Lake (H) PCIe RC 010 (x16) +product INTEL TGL_UP4_2C_HOST 0x9a02 Tiger Lake (UP4 2Core) Host +product INTEL TGL_DTT 0x9a03 Tiger Lake Dynamic Tuning Technology +product INTEL TGL_UP3_2C_HOST 0x9a04 Tiger Lake (UP3 2Core) Host +product INTEL TGL_H_PCIE_RC_011 0x9a05 Tiger Lake (H) PCIe RC 011 (x8) +product INTEL TGL_H_PCIE_RC_012 0x9a07 Tiger Lake (H) PCIe RC 012 (x4) +product INTEL TGL_PEG60 0x9a09 Tiger Lake (UPx) Host-PCIe bridge +product INTEL TGL_VMD 0x9a0b Tiger Lake Volume Management Device +product INTEL TGL_CLSRAM 0x9a0d Tiger Lake Crash Log & Telemetry Device +product INTEL TGL_H_PCIE_RC_060 0x9a0f Tiger Lake (H) PCIe RC 060 (x4) +product INTEL TGL_GNA 0x9a11 Tiger Lake Gauss Newton Algorithm Device +product INTEL TGL_UP4_4C_HOST 0x9a12 Tiger Lake (UP4 4Core) Host +product INTEL TGL_UP_XHCI 0x9a13 Tiger Lake (UPx) USB-C Host (xHCI) +product INTEL TGL_UP3_4C_HOST 0x9a14 Tiger Lake (UP3 4Core) Host +product INTEL TGL_XDCI 0x9a15 Tiger Lake USB-C Device (xDCI) +product INTEL TGL_H_XHCI 0x9a17 Tiger Lake (H) USB-C Host (xHCI) +product INTEL TGL_UP_IPU 0x9a19 Tiger Lake (UPx) Image Processing Unit +product INTEL TGL_UP_4C_HOST 0x9a1a Tiger Lake (UP3 H35 refresh 4Core) Host +product INTEL TGL_UP_TBTDMA_0 0x9a1b Tiger Lake (UPx) Thunderbolt DMA 0 +product INTEL TGL_UP_TBTDMA_1 0x9a1d Tiger Lake (UPx) Thunderbolt DMA 1 +product INTEL TGL_H_TBTDMA_0 0x9a1f Tiger Lake (H) Thunderbolt DMA 0 +product INTEL TGL_H_TBTDMA_1 0x9a21 Tiger Lake (H) Thunderbolt DMA 1 +product INTEL TGL_UP_TBT_PCIE_0 0x9a23 Tiger Lake (UPx) Thunderbolt PCIe 0 +product INTEL TGL_UP_TBT_PCIE_1 0x9a25 Tiger Lake (UPx) Thunderbolt PCIe 1 +product INTEL TGL_H_6C_HOST 0x9a26 Tiger Lake (H 6Core) Host +product INTEL TGL_UP_TBT_PCIE_2 0x9a27 Tiger Lake (UPx) Thunderbolt PCIe 2 +product INTEL TGL_UP_TBT_PCIE_3 0x9a29 Tiger Lake (UPx) Thunderbolt PCIe 3 +product INTEL TGL_H_TBT_PCIE_0 0x9a2b Tiger Lake (H) Thunderbolt PCIe 0 +product INTEL TGL_H_TBT_PCIE_1 0x9a2d Tiger Lake (H) Thunderbolt PCIe 1 +product INTEL TGL_H_TBT_PCIE_2 0x9a2f Tiger Lake (H) Thunderbolt PCIe 2 +product INTEL TGL_H_TBT_PCIE_3 0x9a31 Tiger Lake (H) Thunderbolt PCIe 3 +product INTEL TGL_NPK 0x9a33 Tiger Lake NPK +product INTEL TGL_H_8C_HOST 0x9a36 Tiger Lake (H 8Core) Host +product INTEL TGL_H_IPU 0x9a39 Tiger Lake (H) Image Processing Unit +product INTEL TGL_GT2_96_80EU_1 0x9a40 UHD Graphics (GT2, 96/80 EU) +product INTEL TGL_GT2_96_80EU_2 0x9a49 UHD Graphics (GT2, 96/80 EU) +product INTEL TGL_GT2_32EU 0x9a60 UHD Graphics (GT1, 32EU) +product INTEL TGL_GT2_16EU 0x9a68 UHD Graphics (GT1, 16EU) +product INTEL TGL_GT2_48EU 0x9a78 UHD Graphics (GT2, 48EU) product INTEL CMTLK_GTx 0x9b41 UHD Graphics product INTEL CMTLK_U_HOST 0x9b71 Comet Lake U Host Bridge product INTEL CMTLK_GT1_6 0x9ba5 UHD Graphics 610 @@ -6244,6 +6285,7 @@ product INTEL 5HS_LP_I2C_3 0xa0eb 500 Se product INTEL 5HS_LP_XHCI 0xa0ed 500 Series USB 3.2 Gen 2x1 xHCI product INTEL 5HS_LP_XDCI 0xa0ee 500 Series USB 3.2 Gen 1x1 xDCI product INTEL 5HS_LP_SSRAM 0xa0ef 500 Series Shared SRAM +product INTEL AX201 0xa0f0 WiFi 6 AX201 product INTEL 5HS_LP_GSPI_2 0xa0fb 500 Series GSPI 2 product INTEL 5HS_LP_ISH 0xa0fc 500 Series Integrated Sensor Hub product INTEL 5HS_LP_GSPI_3 0xa0fd 500 Series GSPI 3
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Sep 23 15:42:29 UTC 2021 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some Intel devices: - Tiger Lake - I225V and I225LM - WiFi 6 AX201 To generate a diff of this commit: cvs rdiff -u -r1.1433 -r1.1434 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Thu Sep 23 15:19:03 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: core_machdep.c cpu_machdep.c exec_machdep.c netbsd32_machdep.c process_machdep.c sig_machdep.c syscall.c Log Message: use lwp_trapframe() macro. NFC. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/core_machdep.c \ src/sys/arch/aarch64/aarch64/sig_machdep.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/aarch64/cpu_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/exec_machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/process_machdep.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/syscall.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/core_machdep.c diff -u src/sys/arch/aarch64/aarch64/core_machdep.c:1.5 src/sys/arch/aarch64/aarch64/core_machdep.c:1.6 --- src/sys/arch/aarch64/aarch64/core_machdep.c:1.5 Wed Nov 20 19:37:51 2019 +++ src/sys/arch/aarch64/aarch64/core_machdep.c Thu Sep 23 15:19:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: core_machdep.c,v 1.5 2019/11/20 19:37:51 pgoyette Exp $ */ +/* $NetBSD: core_machdep.c,v 1.6 2021/09/23 15:19:03 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: core_machdep.c,v 1.5 2019/11/20 19:37:51 pgoyette Exp $"); +__KERNEL_RCSID(1, "$NetBSD: core_machdep.c,v 1.6 2021/09/23 15:19:03 ryo Exp $"); #include #include @@ -66,7 +66,7 @@ cpu_coredump(struct lwp *l, struct cored return 0; } - md_core.reg = l->l_md.md_utf->tf_regs; + md_core.reg = lwp_trapframe(l)->tf_regs; md_core.reg.r_tpidr = (uint64_t)(uintptr_t)l->l_private; fpu_save(l); Index: src/sys/arch/aarch64/aarch64/sig_machdep.c diff -u src/sys/arch/aarch64/aarch64/sig_machdep.c:1.5 src/sys/arch/aarch64/aarch64/sig_machdep.c:1.6 --- src/sys/arch/aarch64/aarch64/sig_machdep.c:1.5 Fri May 1 17:58:48 2020 +++ src/sys/arch/aarch64/aarch64/sig_machdep.c Thu Sep 23 15:19:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sig_machdep.c,v 1.5 2020/05/01 17:58:48 tnn Exp $ */ +/* $NetBSD: sig_machdep.c,v 1.6 2021/09/23 15:19:03 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sig_machdep.c,v 1.5 2020/05/01 17:58:48 tnn Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sig_machdep.c,v 1.6 2021/09/23 15:19:03 ryo Exp $"); #include #include @@ -47,7 +47,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, c { struct lwp * const l = curlwp; struct proc * const p = l->l_proc; - struct trapframe * const tf = l->l_md.md_utf; + struct trapframe * const tf = lwp_trapframe(l); struct sigaltstack * const ss = >l_sigstk; const struct sigact_sigdesc * const sd = >p_sigacts->sa_sigdesc[ksi->ksi_signo]; Index: src/sys/arch/aarch64/aarch64/cpu_machdep.c diff -u src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.11 src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.12 --- src/sys/arch/aarch64/aarch64/cpu_machdep.c:1.11 Wed Aug 12 13:19:35 2020 +++ src/sys/arch/aarch64/aarch64/cpu_machdep.c Thu Sep 23 15:19:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_machdep.c,v 1.11 2020/08/12 13:19:35 skrll Exp $ */ +/* $NetBSD: cpu_machdep.c,v 1.12 2021/09/23 15:19:03 ryo Exp $ */ /*- * Copyright (c) 2014, 2019 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.11 2020/08/12 13:19:35 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.12 2021/09/23 15:19:03 ryo Exp $"); #include "opt_multiprocessor.h" @@ -181,7 +181,7 @@ CTASSERT(offsetof(struct fpreg, fpsr) == void cpu_getmcontext(struct lwp *l, mcontext_t *mcp, unsigned int *flagsp) { - const struct trapframe * const tf = l->l_md.md_utf; + const struct trapframe * const tf = lwp_trapframe(l); memcpy(mcp->__gregs, >tf_regs, sizeof(mcp->__gregs)); mcp->__gregs[_REG_TPIDR] = (uintptr_t)l->l_private; @@ -202,7 +202,7 @@ cpu_setmcontext(struct lwp *l, const mco struct proc * const p = l->l_proc; if (flags & _UC_CPU) { - struct trapframe * const tf = l->l_md.md_utf; + struct trapframe * const tf = lwp_trapframe(l); int error = cpu_mcontext_validate(l, mcp); if (error) return error; Index: src/sys/arch/aarch64/aarch64/exec_machdep.c diff -u src/sys/arch/aarch64/aarch64/exec_machdep.c:1.9 src/sys/arch/aarch64/aarch64/exec_machdep.c:1.10 --- src/sys/arch/aarch64/aarch64/exec_machdep.c:1.9 Fri Dec 11 18:03:33 2020 +++ src/sys/arch/aarch64/aarch64/exec_machdep.c Thu Sep 23 15:19:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_machdep.c,v 1.9 2020/12/11 18:03:33 skrll Exp $ */ +/* $NetBSD: exec_machdep.c,v 1.10 2021/09/23 15:19:03 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Thu Sep 23 15:19:03 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: core_machdep.c cpu_machdep.c exec_machdep.c netbsd32_machdep.c process_machdep.c sig_machdep.c syscall.c Log Message: use lwp_trapframe() macro. NFC. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/aarch64/aarch64/core_machdep.c \ src/sys/arch/aarch64/aarch64/sig_machdep.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/aarch64/cpu_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/exec_machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/aarch64/netbsd32_machdep.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/process_machdep.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/syscall.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:59:27 UTC 2021 Modified Files: src/lib/libc/sys: timerfd.2 Log Message: Spell the number of nanoseconds as 10^9. Forgotten in previous. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/timerfd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/timerfd.2 diff -u src/lib/libc/sys/timerfd.2:1.3 src/lib/libc/sys/timerfd.2:1.4 --- src/lib/libc/sys/timerfd.2:1.3 Thu Sep 23 13:58:26 2021 +++ src/lib/libc/sys/timerfd.2 Thu Sep 23 13:59:27 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: timerfd.2,v 1.3 2021/09/23 13:58:26 uwe Exp $ +.\" $NetBSD: timerfd.2,v 1.4 2021/09/23 13:59:27 uwe Exp $ .\" .\" Copyright (c) 2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -266,8 +266,8 @@ argument. .It Bq Er EINVAL A nanosecond field in the .Fa tim -argument specified a value less than zero or greater than or equal to -.Dv 10e9 . +argument specified a value less than zero or greater than or equal +to\~10^9. .El .Pp A read from a
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:59:27 UTC 2021 Modified Files: src/lib/libc/sys: timerfd.2 Log Message: Spell the number of nanoseconds as 10^9. Forgotten in previous. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/sys/timerfd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:58:26 UTC 2021 Modified Files: src/lib/libc/sys: timerfd.2 Log Message: Minor markup tweaks. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/sys/timerfd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/timerfd.2 diff -u src/lib/libc/sys/timerfd.2:1.2 src/lib/libc/sys/timerfd.2:1.3 --- src/lib/libc/sys/timerfd.2:1.2 Sun Sep 19 17:10:41 2021 +++ src/lib/libc/sys/timerfd.2 Thu Sep 23 13:58:26 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: timerfd.2,v 1.2 2021/09/19 17:10:41 wiz Exp $ +.\" $NetBSD: timerfd.2,v 1.3 2021/09/23 13:58:26 uwe Exp $ .\" .\" Copyright (c) 2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -30,12 +30,16 @@ .Dd September 17, 2021 .Dt TIMERFD 2 .Os +.\" +.\" .Sh NAME .Nm timerfd , .Nm timerfd_create , .Nm timerfd_gettime , .Nm timerfd_settime .Nd create and interact with a timer descriptor +.\" +.\" .Sh SYNOPSIS .In sys/timerfd.h .Ft int @@ -45,6 +49,8 @@ .Ft int .Fn timerfd_settime "int fd" "int flags" \ "const struct itimerspec *tim" "struct itimerspec *otim" +.\" +.\" .Sh DESCRIPTION .Nm presents an interface to interval timers associated with a file descriptor. @@ -75,7 +81,7 @@ are and .Dv CLOCK_MONOTONIC . The following flags define the behavior of the resulting object: -.Bl -tag -width "TFD_NONBLOCK" +.Bl -tag -width Dv .It Dv TFD_CLOEXEC This is an alias for the .Dv O_CLOEXEC @@ -96,12 +102,10 @@ timer expires, an internal counter is in Reads from an .Nm object return the value of this counter in the caller's buffer as an -unsigned 64-bit integer and reset the counter to -.Dv 0 . +unsigned 64-bit integer and reset the counter to\~0. If the value of the .Nm -object's counter is -.Dv 0 , +object's counter is\~0, then reads will block, unless the .Nm object is set for non-blocking I/O. @@ -123,8 +127,7 @@ see specified in the .Fa tim argument. -If the value is -.Dv 0 , +If the value is\~0, the timer is disarmed. If the argument .Fa otim @@ -173,24 +176,19 @@ system call returns the current settings object in the .Fa tim argument. +.\" +.\" .Sh RETURN VALUES The .Fn timerfd_create -system call returns -.Dv -1 -if an error occurs, otherwise the return value is a descriptor representing the +system call returns\~\-1 if an error occurs, +otherwise the return value is a descriptor representing the .Nm object. .Pp -The -.Fn timerfd_gettime -and -.Fn timerfd_settime -system calls return -.Dv 0 -upon success or -.Dv -1 -if an error occurs. +.Rv -std timerfd_gettime timerfd_settime +.\" +.\" .Sh ERRORS The .Fn timerfd @@ -299,6 +297,8 @@ or The size of the read buffer is less than 8 bytes .Pq the size required to hold an unsigned 64-bit integer . .El +.\" +.\" .Sh SEE ALSO .Xr clock_settime 2 , .Xr close 2 , @@ -311,6 +311,8 @@ The size of the read buffer is less than .Xr timer_create 2 , .Xr timer_gettime 2 , .Xr timer_settime 2 +.\" +.\" .Sh HISTORY The .Nm
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:58:26 UTC 2021 Modified Files: src/lib/libc/sys: timerfd.2 Log Message: Minor markup tweaks. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/sys/timerfd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:49:59 UTC 2021 Modified Files: src/lib/libc/sys: timer_settime.2 Log Message: Spell the number of nanoseconds as 10^9. 10^9 is 1e9 (it's "e" that spells 10 here), not 10e9. The target audience of this man page is not likely to be very fluent in floating point, so avoid significand/exponent spelling and use the spelling that it is familiar with. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/sys/timer_settime.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/timer_settime.2 diff -u src/lib/libc/sys/timer_settime.2:1.9 src/lib/libc/sys/timer_settime.2:1.10 --- src/lib/libc/sys/timer_settime.2:1.9 Tue Nov 6 23:25:44 2012 +++ src/lib/libc/sys/timer_settime.2 Thu Sep 23 13:49:59 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: timer_settime.2,v 1.9 2012/11/06 23:25:44 wiz Exp $ +.\" $NetBSD: timer_settime.2,v 1.10 2021/09/23 13:49:59 uwe Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -160,7 +160,8 @@ function will fail if: .It Bq Er EINVAL A nanosecond field in the .Ar tim -structure specified a value less than zero or greater than or equal to 10e9. +structure specified a value less than zero or greater than or equal +to\~10^9. .El .Sh SEE ALSO .Xr clock_gettime 2 ,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:49:59 UTC 2021 Modified Files: src/lib/libc/sys: timer_settime.2 Log Message: Spell the number of nanoseconds as 10^9. 10^9 is 1e9 (it's "e" that spells 10 here), not 10e9. The target audience of this man page is not likely to be very fluent in floating point, so avoid significand/exponent spelling and use the spelling that it is familiar with. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/sys/timer_settime.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:16:13 UTC 2021 Modified Files: src/lib/libc/sys: eventfd.2 Log Message: Markup fixes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/sys/eventfd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/eventfd.2 diff -u src/lib/libc/sys/eventfd.2:1.1 src/lib/libc/sys/eventfd.2:1.2 --- src/lib/libc/sys/eventfd.2:1.1 Sun Sep 19 15:51:28 2021 +++ src/lib/libc/sys/eventfd.2 Thu Sep 23 13:16:13 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: eventfd.2,v 1.1 2021/09/19 15:51:28 thorpej Exp $ +.\" $NetBSD: eventfd.2,v 1.2 2021/09/23 13:16:13 uwe Exp $ .\" .\" Copyright (c) 2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -30,11 +30,15 @@ .Dd September 17, 2021 .Dt EVENTFD 2 .Os +.\" +.\" .Sh NAME .Nm eventfd , .Nm eventfd_read , .Nm eventfd_write .Nd create and interact with a counting event descriptor +.\" +.\" .Sh SYNOPSIS .In sys/eventfd.h .Ft int @@ -43,6 +47,8 @@ .Fn eventfd_read "int efd" "eventfd_t *valp" .Ft int .Fn eventfd_write "int efd" "eventfd_t val" +.\" +.\" .Sh DESCRIPTION The .Nm @@ -52,10 +58,7 @@ respectively. When the object's value is non-zero, the file descriptor is considered .Dq readable , and when the count is less than the maximum value -.Po -.Dv UINT64_MAX -- 1 -.Pc +.Li UINT64_MAX\^-\^1 it is considered .Dq writable . When an @@ -65,11 +68,11 @@ object is no longer needed, it may be di .Pp All I/O to an .Nm -object is 8 bytes in length, which is the space required to store an +object is 8\~bytes in length, which is the space required to store an unsigned 64-bit integer. -Any read or write with a buffer smaller than 8 bytes will fail with -.Dv EINVAL . -Only the first 8 bytes of the buffer will be used. +Any read or write with a buffer smaller than 8\~bytes will fail with +.Er EINVAL . +Only the first 8\~bytes of the buffer will be used. .Pp The .Fn eventfd @@ -79,7 +82,7 @@ The initial value of the object is speci .Fa val argument. The following flags define the behavior of the resulting object: -.Bl -tag -width "EFD_SEMAPHORE" +.Bl -tag -width Dv .It Dv EFD_CLOEXEC This is an alias for the .Dv O_CLOEXEC @@ -111,24 +114,20 @@ If the .Nm object was created in .Dq semaphore mode , -reads return the value -.Dv 1 -and object's counter is decremented by -.Dv 1 . +reads return the value\~1 +and object's counter is decremented by\~1. .It If the .Nm object was not created in .Dq semaphore mode , reads return the current value of the object's counter -reset the counter to -.Dv 0 . +and reset the counter to\~0. .El .Pp If the value of the .Nm -object's counter is -.Dv 0 , +object's counter is\~0, then reads will block, unless the .Nm object is set for non-blocking I/O. @@ -155,37 +154,32 @@ objects, and are simply wrappers around and .Xr write 2 system calls: -.Bl -tag -width "eventfd_writeXX" -.It Fn eventfd_read +.Bl -tag -width Fn +.It Fn eventfd_read efd valp Reads the unsigned 64-bit integer value of the .Nm object and returns it in .Fa valp . -.It Fn eventfd_write +.It Fn eventfd_write efd val Writes the unsigned 64-bit integer value .Fa val to the .Nm object. .El +.\" +.\" .Sh RETURN VALUES The .Fn eventfd -system call returns -.Dv -1 -if an error occurs, otherwise the return value is a descriptor representing the +system call returns\~\-1 if an error occurs, +otherwise the return value is a descriptor representing the .Nm object. .Pp -The -.Fn eventfd_read -and -.Fn eventfd_write -functions return -.Dv 0 -upon success or -.Dv -1 -if an error occurs. +.Rv -std eventfd_read eventfd_write +.\" +.\" .Sh ERRORS The .Fn eventfd @@ -213,9 +207,7 @@ function fails if: .It Bq Er EAGAIN The value of the .Nm -object is -.Dv 0 -and the +object is\~0 and the .Nm object is set for non-blocking I/O. .El @@ -230,10 +222,7 @@ The resulting value of the object after adding the value .Fa val would exceed the maximum value -.Po -.Dv UINT64_MAX -- 1 -.Pc +.Li UINT64_MAX\^-\^1 and the .Nm object is set for non-blocking I/O. @@ -250,9 +239,11 @@ a read from or write to an object fails if: .Bl -tag -width Er .It Bq Er EINVAL -The size of the buffer is less than 8 bytes +The size of the buffer is less than 8\~bytes .Pq the size required to hold an unsigned 64-bit integer . .El +.\" +.\" .Sh SEE ALSO .Xr close 2 , .Xr kevent 2 , @@ -261,6 +252,8 @@ The size of the buffer is less than 8 by .Xr read 2 , .Xr select 2 , .Xr write 2 +.\" +.\" .Sh HISTORY The .Nm
CVS commit: src/lib/libc/sys
Module Name:src Committed By: uwe Date: Thu Sep 23 13:16:13 UTC 2021 Modified Files: src/lib/libc/sys: eventfd.2 Log Message: Markup fixes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/sys/eventfd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch
> Module Name: src > Committed By: skrll > Date: Thu Sep 23 06:34:00 UTC 2021 > > Modified Files: > src/sys/arch/aarch64/aarch64: cpufunc.c > src/sys/arch/arm/arm32: cpu.c > > Log Message: > Print the cache information in similar formats and arm and aarch64, e.g. : > aarch64 before > [ 1.030] cpu1: L1 48KB/64B*256L*3W PIPT Instruction cache > [ 1.030] cpu1: L1 32KB/64B*256L*2W PIPT Data cache > [ 1.030] cpu1: L2 2048KB/64B*2048L*16W PIPT Unified cache > > aarch64 after > [ 1.030] cpu1: L1 48KB/64B 3-way (256 set) PIPT Instruction cache > [ 1.030] cpu1: L1 32KB/64B 2-way (256 set) PIPT Data cache > [ 1.030] cpu1: L2 2048KB/64B 16-way (2048 set) PIPT Unified cache I prefer "line(s)" as before rather than "set(s)" since the latter implies "N-way set associative cache". --- Izumi Tsutsui
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: wiz Date: Thu Sep 23 12:17:57 UTC 2021 Modified Files: src/lib/libc/stdio: printf.3 Log Message: printf(3): mention snprintb(3) To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/lib/libc/stdio/printf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/printf.3 diff -u src/lib/libc/stdio/printf.3:1.69 src/lib/libc/stdio/printf.3:1.70 --- src/lib/libc/stdio/printf.3:1.69 Tue Feb 16 14:44:25 2021 +++ src/lib/libc/stdio/printf.3 Thu Sep 23 12:17:57 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: printf.3,v 1.69 2021/02/16 14:44:25 riastradh Exp $ +.\" $NetBSD: printf.3,v 1.70 2021/09/23 12:17:57 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -811,6 +811,7 @@ or the return value would be too large t .Xr fmtcheck 3 , .Xr scanf 3 , .Xr setlocale 3 , +.Xr snprintb 3 , .Xr wprintf 3 , .Xr printf 9 .Sh STANDARDS
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: wiz Date: Thu Sep 23 12:17:57 UTC 2021 Modified Files: src/lib/libc/stdio: printf.3 Log Message: printf(3): mention snprintb(3) To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/lib/libc/stdio/printf.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: christos Date: Thu Sep 23 11:28:47 UTC 2021 Modified Files: src/sys/compat/linux/common: linux_misc_notalpha.c Log Message: remove stray char. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 \ src/sys/compat/linux/common/linux_misc_notalpha.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/compat/linux/common/linux_misc_notalpha.c diff -u src/sys/compat/linux/common/linux_misc_notalpha.c:1.112 src/sys/compat/linux/common/linux_misc_notalpha.c:1.113 --- src/sys/compat/linux/common/linux_misc_notalpha.c:1.112 Thu Sep 23 02:56:27 2021 +++ src/sys/compat/linux/common/linux_misc_notalpha.c Thu Sep 23 07:28:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc_notalpha.c,v 1.112 2021/09/23 06:56:27 ryo Exp $ */ +/* $NetBSD: linux_misc_notalpha.c,v 1.113 2021/09/23 11:28:47 christos Exp $ */ /*- * Copyright (c) 1995, 1998, 2008, 2020 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.112 2021/09/23 06:56:27 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.113 2021/09/23 11:28:47 christos Exp $"); /* * Note that we must NOT include "opt_compat_linux32.h" here, @@ -165,7 +165,7 @@ linux_sys_readdir(struct lwp *l, const s } */ int error; struct linux_sys_getdents_args da; -v + SCARG(, fd) = SCARG(uap, fd); SCARG(, dent) = SCARG(uap, dent); SCARG(, count) = 1;
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: christos Date: Thu Sep 23 11:28:47 UTC 2021 Modified Files: src/sys/compat/linux/common: linux_misc_notalpha.c Log Message: remove stray char. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 \ src/sys/compat/linux/common/linux_misc_notalpha.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Sep 23 10:31:23 UTC 2021 Modified Files: src/sys/dev/pci: if_ena.c Log Message: ena: fix packet reordering issue A reorder occures when - memory allocation fails in bus_dmamap_load_mbuf() or - submission queue is full This patch makes ena(4) to - allocate memory in advance (BUS_DMA_ALLOCNOW flag in bus_dmamap_create()) - check if the queue is vacant before pcq_get() Patch from KUSABA Takeshi To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_ena.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_ena.c diff -u src/sys/dev/pci/if_ena.c:1.31 src/sys/dev/pci/if_ena.c:1.32 --- src/sys/dev/pci/if_ena.c:1.31 Thu Sep 16 21:29:41 2021 +++ src/sys/dev/pci/if_ena.c Thu Sep 23 10:31:23 2021 @@ -36,7 +36,7 @@ #if 0 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.31 2021/09/16 21:29:41 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.32 2021/09/23 10:31:23 jmcneill Exp $"); #include #include @@ -721,7 +721,7 @@ ena_setup_tx_resources(struct ena_adapte for (i = 0; i < tx_ring->ring_size; i++) { err = bus_dmamap_create(adapter->sc_dmat, ENA_TSO_MAXSIZE, adapter->max_tx_sgl_size - 1, - ENA_TSO_MAXSIZE, 0, 0, + ENA_TSO_MAXSIZE, 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW, _ring->tx_buffer_info[i].map); if (unlikely(err != 0)) { ena_trace(ENA_ALERT, @@ -915,7 +915,7 @@ ena_setup_rx_resources(struct ena_adapte for (i = 0; i < rx_ring->ring_size; i++) { err = bus_dmamap_create(adapter->sc_dmat, MJUM16BYTES, adapter->max_rx_sgl_size, MJUM16BYTES, - 0, 0, + 0, BUS_DMA_WAITOK | BUS_DMA_ALLOCNOW, &(rx_ring->rx_buffer_info[i].map)); if (err != 0) { ena_trace(ENA_ALERT, @@ -2967,15 +2967,17 @@ ena_start_xmit(struct ena_ring *tx_ring) nsr = IF_STAT_GETREF(adapter->ifp); - while ((mbuf = pcq_get(tx_ring->br)) != NULL) { + for (;;) { + if (unlikely(!ena_com_sq_have_enough_space(io_sq, adapter->max_tx_sgl_size))) + break; + + if ((mbuf = pcq_get(tx_ring->br)) == NULL) + break; + ena_trace(ENA_DBG | ENA_TXPTH, "\ndequeued mbuf %p with flags %#x and" " header csum flags %#jx", mbuf, mbuf->m_flags, (uint64_t)mbuf->m_pkthdr.csum_flags); - if (unlikely(!ena_com_sq_have_enough_space(io_sq, - ENA_TX_CLEANUP_THRESHOLD))) - ena_tx_cleanup(tx_ring); - if (likely((ret = ena_xmit_mbuf(tx_ring, )) == 0)) { if_statinc_ref(nsr, if_opackets); if_statadd_ref(nsr, if_obytes, mbuf->m_pkthdr.len); @@ -2983,16 +2985,7 @@ ena_start_xmit(struct ena_ring *tx_ring) if_statinc_ref(nsr, if_omcasts); } else { if_statinc_ref(nsr, if_oerrors); - /* - * Since mbuf is restructured in ena_xmit_mbuf(), - * we re-put mbuf. - */ - if (ret == ENA_COM_NO_MEM || ret == ENA_COM_NO_SPACE) { -pcq_put(tx_ring->br, mbuf); - } else { -m_freem(mbuf); - } - + m_freem(mbuf); break; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Thu Sep 23 10:31:23 UTC 2021 Modified Files: src/sys/dev/pci: if_ena.c Log Message: ena: fix packet reordering issue A reorder occures when - memory allocation fails in bus_dmamap_load_mbuf() or - submission queue is full This patch makes ena(4) to - allocate memory in advance (BUS_DMA_ALLOCNOW flag in bus_dmamap_create()) - check if the queue is vacant before pcq_get() Patch from KUSABA Takeshi To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/dev/pci/if_ena.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Sep 23 10:13:29 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Tickets #1347 and #1348 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-9.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.3 diff -u src/doc/CHANGES-9.3:1.1.2.30 src/doc/CHANGES-9.3:1.1.2.31 --- src/doc/CHANGES-9.3:1.1.2.30 Wed Sep 15 16:32:30 2021 +++ src/doc/CHANGES-9.3 Thu Sep 23 10:13:28 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.3,v 1.1.2.30 2021/09/15 16:32:30 martin Exp $ +# $NetBSD: CHANGES-9.3,v 1.1.2.31 2021/09/23 10:13:28 martin Exp $ A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3 release: @@ -730,3 +730,14 @@ share/man/man4/ixv.41.8 - Fix typos. [msaitoh, ticket #1346] +bin/mkdir/mkdir.c1.39 + + mkdir(1): PR 56398: fix mode of final component of paths when -m + is used. + [kre, ticket #1347] + +bin/cp/utils.c 1.47 + + cp(1): PR 54564: cp of a fifo yields an empty file. + [skrll, ticket #1348] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Sep 23 10:13:29 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Tickets #1347 and #1348 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-9.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/bin/cp
Module Name:src Committed By: martin Date: Thu Sep 23 10:11:02 UTC 2021 Modified Files: src/bin/cp [netbsd-9]: utils.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1348): bin/cp/utils.c: revision 1.47 PR/54564: Jan Schaumann: cp of a fifo yields an empty file Don't short-circuit 0 sized stat entries if they don't belong to regular files. Also don't try to mmap non-regular files. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.46.2.1 src/bin/cp/utils.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/cp/utils.c diff -u src/bin/cp/utils.c:1.46 src/bin/cp/utils.c:1.46.2.1 --- src/bin/cp/utils.c:1.46 Tue Jul 17 13:04:58 2018 +++ src/bin/cp/utils.c Thu Sep 23 10:11:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: utils.c,v 1.46 2018/07/17 13:04:58 darcy Exp $ */ +/* $NetBSD: utils.c,v 1.46.2.1 2021/09/23 10:11:02 martin Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94"; #else -__RCSID("$NetBSD: utils.c,v 1.46 2018/07/17 13:04:58 darcy Exp $"); +__RCSID("$NetBSD: utils.c,v 1.46.2.1 2021/09/23 10:11:02 martin Exp $"); #endif #endif /* not lint */ @@ -174,87 +174,83 @@ copy_file(FTSENT *entp, int dne) rval = 0; - /* + /* * There's no reason to do anything other than close the file - * now if it's empty, so let's not bother. + * now if it's regular and empty, so let's not bother. */ - if (fs->st_size > 0) { - struct finfo fi; - - fi.from = entp->fts_path; - fi.to = to.p_path; - fi.size = fs->st_size; - - /* - * Mmap and write if less than 8M (the limit is so - * we don't totally trash memory on big files). - * This is really a minor hack, but it wins some CPU back. - */ - bool use_read; + bool need_copy = !S_ISREG(fs->st_mode) || fs->st_size > 0; - use_read = true; - if (fs->st_size <= MMAP_MAX_SIZE) { - size_t fsize = (size_t)fs->st_size; - p = mmap(NULL, fsize, PROT_READ, MAP_FILE|MAP_SHARED, - from_fd, (off_t)0); - if (p != MAP_FAILED) { -size_t remainder; - -use_read = false; - -(void) madvise(p, (size_t)fs->st_size, - MADV_SEQUENTIAL); - -/* - * Write out the data in small chunks to - * avoid locking the output file for a - * long time if the reading the data from - * the source is slow. - */ -remainder = fsize; -do { - ssize_t chunk; - - chunk = (remainder > MMAP_MAX_WRITE) ? - MMAP_MAX_WRITE : remainder; - if (write(to_fd, [fsize - remainder], - chunk) != chunk) { - warn("%s", to.p_path); - rval = 1; - break; - } - remainder -= chunk; - ptotal += chunk; - if (pinfo) - progress(, ptotal); -} while (remainder > 0); + struct finfo fi; -if (munmap(p, fsize) < 0) { - warn("%s", entp->fts_path); - rval = 1; -} - } - } + fi.from = entp->fts_path; + fi.to = to.p_path; + fi.size = fs->st_size; - if (use_read) { - while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) { -wcount = write(to_fd, buf, (size_t)rcount); -if (rcount != wcount || wcount == -1) { + /* + * Mmap and write if less than 8M (the limit is so + * we don't totally trash memory on big files). + * This is really a minor hack, but it wins some CPU back. + */ + if (S_ISREG(fs->st_mode) && fs->st_size && fs->st_size <= MMAP_MAX_SIZE) { + size_t fsize = (size_t)fs->st_size; + p = mmap(NULL, fsize, PROT_READ, MAP_FILE|MAP_SHARED, + from_fd, (off_t)0); + if (p != MAP_FAILED) { + size_t remainder; + + need_copy = false; + + (void) madvise(p, (size_t)fs->st_size, MADV_SEQUENTIAL); + + /* + * Write out the data in small chunks to + * avoid locking the output file for a + * long time if the reading the data from + * the source is slow. + */ + remainder = fsize; + do { +ssize_t chunk; + +chunk = (remainder > MMAP_MAX_WRITE) ? +MMAP_MAX_WRITE : remainder; +if (write(to_fd, [fsize - remainder], +chunk) != chunk) { warn("%s", to.p_path); rval = 1; break; } -ptotal += wcount; +remainder -= chunk; +ptotal += chunk; if (pinfo) progress(, ptotal); - } - if (rcount < 0) { + } while (remainder > 0); + + if (munmap(p, fsize) < 0) { warn("%s", entp->fts_path); rval = 1; } } } + if (need_copy) { + while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) { + wcount = write(to_fd, buf, (size_t)rcount); + if (rcount != wcount || wcount == -1) { +warn("%s", to.p_path); +rval = 1; +break; + } + ptotal += wcount; + if (pinfo) +progress(, ptotal); + } + if (rcount < 0) { + warn("%s", entp->fts_path); + rval = 1; + } + } + if (pflag && (fcpxattr(from_fd, to_fd) != 0)) warn("%s: error copying extended attributes", to.p_path);
CVS commit: [netbsd-9] src/bin/cp
Module Name:src Committed By: martin Date: Thu Sep 23 10:11:02 UTC 2021 Modified Files: src/bin/cp [netbsd-9]: utils.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1348): bin/cp/utils.c: revision 1.47 PR/54564: Jan Schaumann: cp of a fifo yields an empty file Don't short-circuit 0 sized stat entries if they don't belong to regular files. Also don't try to mmap non-regular files. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.46.2.1 src/bin/cp/utils.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/bin/mkdir
Module Name:src Committed By: martin Date: Thu Sep 23 10:09:20 UTC 2021 Modified Files: src/bin/mkdir [netbsd-9]: mkdir.c Log Message: Pull up following revision(s) (requested by kre in ticket #1347): bin/mkdir/mkdir.c: revision 1.39 PR bin/56398 The final component of both a/b/c and a/b/c/ is "c", so that's the one to which the -m arg applies. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.46.1 src/bin/mkdir/mkdir.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/mkdir/mkdir.c diff -u src/bin/mkdir/mkdir.c:1.38 src/bin/mkdir/mkdir.c:1.38.46.1 --- src/bin/mkdir/mkdir.c:1.38 Mon Aug 29 14:45:28 2011 +++ src/bin/mkdir/mkdir.c Thu Sep 23 10:09:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mkdir.c,v 1.38 2011/08/29 14:45:28 joerg Exp $ */ +/* $NetBSD: mkdir.c,v 1.38.46.1 2021/09/23 10:09:20 martin Exp $ */ /* * Copyright (c) 1983, 1992, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94"; #else -__RCSID("$NetBSD: mkdir.c,v 1.38 2011/08/29 14:45:28 joerg Exp $"); +__RCSID("$NetBSD: mkdir.c,v 1.38.46.1 2021/09/23 10:09:20 martin Exp $"); #endif #endif /* not lint */ @@ -162,7 +162,7 @@ mkpath(char *path, mode_t mode, mode_t d slash += strspn(slash, "/"); slash += strcspn(slash, "/"); - done = (*slash == '\0'); + done = (*(slash + strspn(slash, "/")) == '\0'); *slash = '\0'; rv = mkdir(path, done ? mode : dir_mode);
CVS commit: [netbsd-9] src/bin/mkdir
Module Name:src Committed By: martin Date: Thu Sep 23 10:09:20 UTC 2021 Modified Files: src/bin/mkdir [netbsd-9]: mkdir.c Log Message: Pull up following revision(s) (requested by kre in ticket #1347): bin/mkdir/mkdir.c: revision 1.39 PR bin/56398 The final component of both a/b/c and a/b/c/ is "c", so that's the one to which the -m arg applies. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.46.1 src/bin/mkdir/mkdir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Sep 23 10:08:35 UTC 2021 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1697 To generate a diff of this commit: cvs rdiff -u -r1.1.2.102 -r1.1.2.103 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Sep 23 10:08:35 UTC 2021 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1697 To generate a diff of this commit: cvs rdiff -u -r1.1.2.102 -r1.1.2.103 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.102 src/doc/CHANGES-8.3:1.1.2.103 --- src/doc/CHANGES-8.3:1.1.2.102 Wed Sep 15 16:39:19 2021 +++ src/doc/CHANGES-8.3 Thu Sep 23 10:08:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.102 2021/09/15 16:39:19 martin Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.103 2021/09/23 10:08:35 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -2109,3 +2109,10 @@ share/man/man4/ixv.41.8 - KNF. - Fix typos. [msaitoh, ticket #1696] + +bin/mkdir/mkdir.c1.39 + + mkdir(1): PR 56398: fix mode of final component of paths when -m + is used. + [kre, ticket #1697] +
CVS commit: [netbsd-8] src/bin/mkdir
Module Name:src Committed By: martin Date: Thu Sep 23 10:04:53 UTC 2021 Modified Files: src/bin/mkdir [netbsd-8]: mkdir.c Log Message: Pull up following revision(s) (requested by kre in ticket #1697): bin/mkdir/mkdir.c: revision 1.39 PR bin/56398 The final component of both a/b/c and a/b/c/ is "c", so that's the one to which the -m arg applies. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.36.1 src/bin/mkdir/mkdir.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/mkdir/mkdir.c diff -u src/bin/mkdir/mkdir.c:1.38 src/bin/mkdir/mkdir.c:1.38.36.1 --- src/bin/mkdir/mkdir.c:1.38 Mon Aug 29 14:45:28 2011 +++ src/bin/mkdir/mkdir.c Thu Sep 23 10:04:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mkdir.c,v 1.38 2011/08/29 14:45:28 joerg Exp $ */ +/* $NetBSD: mkdir.c,v 1.38.36.1 2021/09/23 10:04:53 martin Exp $ */ /* * Copyright (c) 1983, 1992, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)mkdir.c 8.2 (Berkeley) 1/25/94"; #else -__RCSID("$NetBSD: mkdir.c,v 1.38 2011/08/29 14:45:28 joerg Exp $"); +__RCSID("$NetBSD: mkdir.c,v 1.38.36.1 2021/09/23 10:04:53 martin Exp $"); #endif #endif /* not lint */ @@ -162,7 +162,7 @@ mkpath(char *path, mode_t mode, mode_t d slash += strspn(slash, "/"); slash += strcspn(slash, "/"); - done = (*slash == '\0'); + done = (*(slash + strspn(slash, "/")) == '\0'); *slash = '\0'; rv = mkdir(path, done ? mode : dir_mode);
CVS commit: [netbsd-8] src/bin/mkdir
Module Name:src Committed By: martin Date: Thu Sep 23 10:04:53 UTC 2021 Modified Files: src/bin/mkdir [netbsd-8]: mkdir.c Log Message: Pull up following revision(s) (requested by kre in ticket #1697): bin/mkdir/mkdir.c: revision 1.39 PR bin/56398 The final component of both a/b/c and a/b/c/ is "c", so that's the one to which the -m arg applies. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.36.1 src/bin/mkdir/mkdir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: ryo Date: Thu Sep 23 09:09:34 UTC 2021 Modified Files: src/doc: CHANGES Log Message: Add support COMPAT_LINUX for aarch64 To generate a diff of this commit: cvs rdiff -u -r1.2831 -r1.2832 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: ryo Date: Thu Sep 23 09:09:34 UTC 2021 Modified Files: src/doc: CHANGES Log Message: Add support COMPAT_LINUX for aarch64 To generate a diff of this commit: cvs rdiff -u -r1.2831 -r1.2832 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.2831 src/doc/CHANGES:1.2832 --- src/doc/CHANGES:1.2831 Mon Sep 20 02:23:29 2021 +++ src/doc/CHANGES Thu Sep 23 09:09:34 2021 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2831 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2832 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -425,3 +425,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0: compat_linux: Added eventfd, timerfd, POSIX timers, and preadv() / pwritev() system calls to COMPAT_LINUX and COMPAT_LINXU32. [thorpej 20210919] + aarch64: Add initial COMPAT_LINUX support. [ryo 20210923]
CVS commit: src/share/man/man8
Module Name:src Committed By: ryo Date: Thu Sep 23 09:07:39 UTC 2021 Modified Files: src/share/man/man8: compat_linux.8 Log Message: add aarch64, and sort architecture names by alphabetical order. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/share/man/man8/compat_linux.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man8
Module Name:src Committed By: ryo Date: Thu Sep 23 09:07:39 UTC 2021 Modified Files: src/share/man/man8: compat_linux.8 Log Message: add aarch64, and sort architecture names by alphabetical order. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/share/man/man8/compat_linux.8 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/man8/compat_linux.8 diff -u src/share/man/man8/compat_linux.8:1.42 src/share/man/man8/compat_linux.8:1.43 --- src/share/man/man8/compat_linux.8:1.42 Sun Apr 25 05:52:22 2021 +++ src/share/man/man8/compat_linux.8 Thu Sep 23 09:07:39 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: compat_linux.8,v 1.42 2021/04/25 05:52:22 nia Exp $ +.\" $NetBSD: compat_linux.8,v 1.43 2021/09/23 09:07:39 ryo Exp $ .\" .\" Copyright (c) 1995 Frank van der Linden .\" All rights reserved. @@ -29,7 +29,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 25, 2021 +.Dd September 23, 2021 .Dt COMPAT_LINUX 8 .Os .Sh NAME @@ -38,7 +38,7 @@ .Sh DESCRIPTION .Nx supports running Linux binaries. -This applies to amd64, arm, alpha, i386, m68k, and powerpc systems for now. +This applies to aarch64, alpha, amd64, arm, i386, m68k, and powerpc systems for now. Both the a.out and ELF binary formats are supported. Most programs should work. .Nx
CVS commit: src/sys/kern
Module Name:src Committed By: ryo Date: Thu Sep 23 06:58:47 UTC 2021 Modified Files: src/sys/kern: sys_sig.c Log Message: Since trampoline ABI ver0 is also used in other emulation environments (e.g. linux emulation), checking (emul->e_sigobject != NULL) to determine if it is allowed or not. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/kern/sys_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_sig.c diff -u src/sys/kern/sys_sig.c:1.51 src/sys/kern/sys_sig.c:1.52 --- src/sys/kern/sys_sig.c:1.51 Sat May 23 23:42:43 2020 +++ src/sys/kern/sys_sig.c Thu Sep 23 06:58:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sig.c,v 1.51 2020/05/23 23:42:43 ad Exp $ */ +/* $NetBSD: sys_sig.c,v 1.52 2021/09/23 06:58:47 ryo Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.51 2020/05/23 23:42:43 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_sig.c,v 1.52 2021/09/23 06:58:47 ryo Exp $"); #include "opt_dtrace.h" @@ -410,9 +410,15 @@ sigaction1(struct lwp *l, int signum, co if (nsa != NULL && nsa->sa_handler != SIG_IGN && nsa->sa_handler != SIG_DFL) { if (__predict_false(vers < 2)) { - if (p->p_flag & PK_32) + if (p->p_flag & PK_32) { v0v1valid = true; - else if ((p->p_lflag & PL_SIGCOMPAT) == 0) { + } else if (vers == 0 && + p->p_sigctx.ps_sigcode != NULL) { +/* + * if sigcode is used for this emulation, + * version 0 is allowed. + */ + } else if ((p->p_lflag & PL_SIGCOMPAT) == 0) { kernconfig_lock(); (void)module_autoload("compat_16", MODULE_CLASS_ANY); @@ -439,7 +445,8 @@ sigaction1(struct lwp *l, int signum, co switch (vers) { case 0: /* sigcontext, kernel supplied trampoline. */ - if (tramp != NULL || !v0v1valid) { + if (tramp != NULL || + (p->p_sigctx.ps_sigcode == NULL && !v0v1valid)) { return EINVAL; } break;
CVS commit: src/sys/kern
Module Name:src Committed By: ryo Date: Thu Sep 23 06:58:47 UTC 2021 Modified Files: src/sys/kern: sys_sig.c Log Message: Since trampoline ABI ver0 is also used in other emulation environments (e.g. linux emulation), checking (emul->e_sigobject != NULL) to determine if it is allowed or not. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/kern/sys_sig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: ryo Date: Thu Sep 23 06:56:27 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: syscall.c src/sys/arch/aarch64/conf: files.aarch64 src/sys/arch/evbarm/conf: GENERIC64 src/sys/compat/linux: linux_syscall.h linux_syscallargs.h linux_syscalls.c src/sys/compat/linux/common: linux_break.c linux_errno.h linux_exec.h linux_fcntl.h linux_file.c linux_file64.c linux_ioctl.h linux_ipccall.c linux_ipccall.h linux_llseek.c linux_machdep.h linux_misc.c linux_misc_notalpha.c linux_mmap.h linux_oldmmap.c linux_oldmmap.h linux_oldolduname.c linux_oldolduname.h linux_oldselect.c linux_oldselect.h linux_olduname.c linux_olduname.h linux_pipe.c linux_sem.h linux_sig_notalpha.c linux_sigaction.c linux_siginfo.h linux_signal.c linux_signal.h linux_signo.c linux_socket.c linux_socket.h linux_socketcall.c linux_socketcall.h linux_sysctl.c linux_termios.h linux_types.h Added Files: src/sys/arch/aarch64/aarch64: linux_syscall.c src/sys/compat/linux/arch/aarch64: Makefile files.linux_aarch64 linux_commons.c linux_errno.h linux_exec.h linux_fcntl.h linux_machdep.c linux_machdep.h linux_mmap.h linux_sigarray.c linux_sigcode.S linux_siginfo.h linux_signal.h linux_socket.h linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c linux_systrace_args.c linux_termios.h linux_types.h syscalls.conf syscalls.master Log Message: add support COMPAT_LINUX for aarch64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/aarch64/aarch64/linux_syscall.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/aarch64/aarch64/syscall.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/aarch64/conf/files.aarch64 cvs rdiff -u -r1.185 -r1.186 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.43 -r1.44 src/sys/compat/linux/linux_syscall.h \ src/sys/compat/linux/linux_syscalls.c cvs rdiff -u -r1.42 -r1.43 src/sys/compat/linux/linux_syscallargs.h cvs rdiff -u -r0 -r1.1 src/sys/compat/linux/arch/aarch64/Makefile \ src/sys/compat/linux/arch/aarch64/files.linux_aarch64 \ src/sys/compat/linux/arch/aarch64/linux_commons.c \ src/sys/compat/linux/arch/aarch64/linux_errno.h \ src/sys/compat/linux/arch/aarch64/linux_exec.h \ src/sys/compat/linux/arch/aarch64/linux_fcntl.h \ src/sys/compat/linux/arch/aarch64/linux_machdep.c \ src/sys/compat/linux/arch/aarch64/linux_machdep.h \ src/sys/compat/linux/arch/aarch64/linux_mmap.h \ src/sys/compat/linux/arch/aarch64/linux_sigarray.c \ src/sys/compat/linux/arch/aarch64/linux_sigcode.S \ src/sys/compat/linux/arch/aarch64/linux_siginfo.h \ src/sys/compat/linux/arch/aarch64/linux_signal.h \ src/sys/compat/linux/arch/aarch64/linux_socket.h \ src/sys/compat/linux/arch/aarch64/linux_syscall.h \ src/sys/compat/linux/arch/aarch64/linux_syscallargs.h \ src/sys/compat/linux/arch/aarch64/linux_syscalls.c \ src/sys/compat/linux/arch/aarch64/linux_sysent.c \ src/sys/compat/linux/arch/aarch64/linux_systrace_args.c \ src/sys/compat/linux/arch/aarch64/linux_termios.h \ src/sys/compat/linux/arch/aarch64/linux_types.h \ src/sys/compat/linux/arch/aarch64/syscalls.conf \ src/sys/compat/linux/arch/aarch64/syscalls.master cvs rdiff -u -r1.56 -r1.57 src/sys/compat/linux/common/linux_break.c cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux/common/linux_errno.h cvs rdiff -u -r1.53 -r1.54 src/sys/compat/linux/common/linux_exec.h cvs rdiff -u -r1.18 -r1.19 src/sys/compat/linux/common/linux_fcntl.h cvs rdiff -u -r1.120 -r1.121 src/sys/compat/linux/common/linux_file.c cvs rdiff -u -r1.63 -r1.64 src/sys/compat/linux/common/linux_file64.c cvs rdiff -u -r1.28 -r1.29 src/sys/compat/linux/common/linux_ioctl.h cvs rdiff -u -r1.33 -r1.34 src/sys/compat/linux/common/linux_ipccall.c cvs rdiff -u -r1.16 -r1.17 src/sys/compat/linux/common/linux_ipccall.h \ src/sys/compat/linux/common/linux_siginfo.h cvs rdiff -u -r1.34 -r1.35 src/sys/compat/linux/common/linux_llseek.c cvs rdiff -u -r1.19 -r1.20 src/sys/compat/linux/common/linux_machdep.h cvs rdiff -u -r1.253 -r1.254 src/sys/compat/linux/common/linux_misc.c cvs rdiff -u -r1.111 -r1.112 \ src/sys/compat/linux/common/linux_misc_notalpha.c cvs rdiff -u -r1.21 -r1.22 src/sys/compat/linux/common/linux_mmap.h \ src/sys/compat/linux/common/linux_socketcall.h cvs rdiff -u -r1.72 -r1.73 src/sys/compat/linux/common/linux_oldmmap.c cvs rdiff -u -r1.5 -r1.6 src/sys/compat/linux/common/linux_oldmmap.h cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/common/linux_oldolduname.c \ src/sys/compat/linux/common/linux_olduname.c cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux/common/linux_oldolduname.h cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/common/linux_oldselect.c cvs rdiff -u -r1.3 -r1.4
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Thu Sep 23 06:34:00 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: cpufunc.c src/sys/arch/arm/arm32: cpu.c Log Message: Print the cache information in similar formats and arm and aarch64, e.g. arm before [ 1.000] cpu0: 32KB/64B 2-way L1 PIPT Instruction cache [ 1.000] cpu0: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache [ 1.000] cpu0: 2304KB/64B 16-way write-through L2 PIPT Unified cache arm after [ 1.000] cpu0: L1 32KB/64B 2-way (256 set) PIPT Instruction cache [ 1.000] cpu0: L1 32KB/64B 2-way (256 set) write-back-locking-C PIPT Data cache [ 1.000] cpu0: L2 2304KB/64B 16-way (2304 set) write-through PIPT Unified cache aarch64 before [ 1.030] cpu1: L1 48KB/64B*256L*3W PIPT Instruction cache [ 1.030] cpu1: L1 32KB/64B*256L*2W PIPT Data cache [ 1.030] cpu1: L2 2048KB/64B*2048L*16W PIPT Unified cache aarch64 after [ 1.030] cpu1: L1 48KB/64B 3-way (256 set) PIPT Instruction cache [ 1.030] cpu1: L1 32KB/64B 2-way (256 set) PIPT Data cache [ 1.030] cpu1: L2 2048KB/64B 16-way (2048 set) PIPT Unified cache To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/aarch64/aarch64/cpufunc.c cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/arm32/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/aarch64/aarch64/cpufunc.c diff -u src/sys/arch/aarch64/aarch64/cpufunc.c:1.27 src/sys/arch/aarch64/aarch64/cpufunc.c:1.28 --- src/sys/arch/aarch64/aarch64/cpufunc.c:1.27 Mon Jan 11 17:12:13 2021 +++ src/sys/arch/aarch64/aarch64/cpufunc.c Thu Sep 23 06:34:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.27 2021/01/11 17:12:13 skrll Exp $ */ +/* $NetBSD: cpufunc.c,v 1.28 2021/09/23 06:34:00 skrll Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -30,7 +30,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.27 2021/01/11 17:12:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.28 2021/09/23 06:34:00 skrll Exp $"); #include #include @@ -295,12 +295,12 @@ prt_cache(device_t self, struct aarch64_ } aprint_verbose_dev(self, - "L%d %uKB/%uB*%uL*%uW %s %s cache\n", + "L%d %uKB/%uB %u-way (%u set) %s %s cache\n", level + 1, cunit->cache_size / 1024, cunit->cache_line_size, - cunit->cache_sets, cunit->cache_ways, + cunit->cache_sets, cachetype, cacheable); if (cinfo[level].cacheable != CACHE_CACHEABLE_IDCACHE) Index: src/sys/arch/arm/arm32/cpu.c diff -u src/sys/arch/arm/arm32/cpu.c:1.148 src/sys/arch/arm/arm32/cpu.c:1.149 --- src/sys/arch/arm/arm32/cpu.c:1.148 Tue Jul 6 08:34:28 2021 +++ src/sys/arch/arm/arm32/cpu.c Thu Sep 23 06:34:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.148 2021/07/06 08:34:28 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.149 2021/09/23 06:34:00 skrll Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -46,7 +46,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.148 2021/07/06 08:34:28 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.149 2021/09/23 06:34:00 skrll Exp $"); #include @@ -608,22 +608,28 @@ static void print_cache_info(device_t dv, struct arm_cache_info *info, u_int level) { if (info->cache_unified) { - aprint_normal_dev(dv, "%dKB/%dB %d-way %s L%u %cI%cT Unified cache\n", + aprint_normal_dev(dv, "L%u %dKB/%dB %d-way (%u set) %s %cI%cT Unified cache\n", + level + 1, info->dcache_size / 1024, info->dcache_line_size, info->dcache_ways, - wtnames[info->cache_type], level + 1, + info->dcache_sets, + wtnames[info->cache_type], info->dcache_type & CACHE_TYPE_PIxx ? 'P' : 'V', info->dcache_type & CACHE_TYPE_xxPT ? 'P' : 'V'); } else { - aprint_normal_dev(dv, "%dKB/%dB %d-way L%u %cI%cT Instruction cache\n", + aprint_normal_dev(dv, "L%u %dKB/%dB %d-way (%u set) %cI%cT Instruction cache\n", + level + 1, info->icache_size / 1024, - info->icache_line_size, info->icache_ways, level + 1, + info->icache_line_size, info->icache_ways, + info->icache_sets, info->icache_type & CACHE_TYPE_PIxx ? 'P' : 'V', info->icache_type & CACHE_TYPE_xxPT ? 'P' : 'V'); - aprint_normal_dev(dv, "%dKB/%dB %d-way %s L%u %cI%cT Data cache\n", + aprint_normal_dev(dv, "L%u %dKB/%dB %d-way (%u set) %s %cI%cT Data cache\n", + level + 1, info->dcache_size / 1024, info->dcache_line_size, info->dcache_ways, - wtnames[info->cache_type], level + 1, + info->dcache_sets, + wtnames[info->cache_type], info->dcache_type & CACHE_TYPE_PIxx ? 'P' : 'V', info->dcache_type & CACHE_TYPE_xxPT ? 'P' : 'V'); }
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Thu Sep 23 06:34:00 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: cpufunc.c src/sys/arch/arm/arm32: cpu.c Log Message: Print the cache information in similar formats and arm and aarch64, e.g. arm before [ 1.000] cpu0: 32KB/64B 2-way L1 PIPT Instruction cache [ 1.000] cpu0: 32KB/64B 2-way write-back-locking-C L1 PIPT Data cache [ 1.000] cpu0: 2304KB/64B 16-way write-through L2 PIPT Unified cache arm after [ 1.000] cpu0: L1 32KB/64B 2-way (256 set) PIPT Instruction cache [ 1.000] cpu0: L1 32KB/64B 2-way (256 set) write-back-locking-C PIPT Data cache [ 1.000] cpu0: L2 2304KB/64B 16-way (2304 set) write-through PIPT Unified cache aarch64 before [ 1.030] cpu1: L1 48KB/64B*256L*3W PIPT Instruction cache [ 1.030] cpu1: L1 32KB/64B*256L*2W PIPT Data cache [ 1.030] cpu1: L2 2048KB/64B*2048L*16W PIPT Unified cache aarch64 after [ 1.030] cpu1: L1 48KB/64B 3-way (256 set) PIPT Instruction cache [ 1.030] cpu1: L1 32KB/64B 2-way (256 set) PIPT Data cache [ 1.030] cpu1: L2 2048KB/64B 16-way (2048 set) PIPT Unified cache To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/aarch64/aarch64/cpufunc.c cvs rdiff -u -r1.148 -r1.149 src/sys/arch/arm/arm32/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.