CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Mon May 1 05:12:44 UTC 2023 Modified Files: src/sys/kern: vfs_lookup.c src/sys/sys: proc.h Log Message: Default PROC_MACHINE_ARCH to machine_arch and use this for magic symlinks to resolve "@machine_arch". This keeps behaviour of magic symlinks and 'uname -p' output the same. Fixes PR 57320. To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/kern/vfs_lookup.c cvs rdiff -u -r1.370 -r1.371 src/sys/sys/proc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_lookup.c diff -u src/sys/kern/vfs_lookup.c:1.233 src/sys/kern/vfs_lookup.c:1.234 --- src/sys/kern/vfs_lookup.c:1.233 Sun Apr 9 09:18:09 2023 +++ src/sys/kern/vfs_lookup.c Mon May 1 05:12:44 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.233 2023/04/09 09:18:09 riastradh Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.234 2023/05/01 05:12:44 mlelstv Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.233 2023/04/09 09:18:09 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.234 2023/05/01 05:12:44 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_magiclinks.h" @@ -137,8 +137,8 @@ symlink_magic(struct proc *p, char *cp, * to frequency of use. */ if (MATCH("machine_arch")) { - slen = VNL(MACHINE_ARCH); - SUBSTITUTE("machine_arch", MACHINE_ARCH, slen); + slen = strlen(PROC_MACHINE_ARCH(p)); + SUBSTITUTE("machine_arch", PROC_MACHINE_ARCH(p), slen); } else if (MATCH("machine")) { slen = VNL(MACHINE); SUBSTITUTE("machine", MACHINE, slen); Index: src/sys/sys/proc.h diff -u src/sys/sys/proc.h:1.370 src/sys/sys/proc.h:1.371 --- src/sys/sys/proc.h:1.370 Mon May 9 13:27:24 2022 +++ src/sys/sys/proc.h Mon May 1 05:12:44 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.370 2022/05/09 13:27:24 wiz Exp $ */ +/* $NetBSD: proc.h,v 1.371 2023/05/01 05:12:44 mlelstv Exp $ */ /*- * Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc. @@ -593,6 +593,10 @@ _proclist_skipmarker(struct proc *p0) #define PROC_DBREGSZ(p) (((p)->p_flag & PK_32) ? \ sizeof(process_dbreg32) : sizeof(struct dbreg)) +#ifndef PROC_MACHINE_ARCH +#define PROC_MACHINE_ARCH(p) machine_arch +#endif + /* * PROCLIST_FOREACH: iterate on the given proclist, skipping PK_MARKER ones. */
CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Mon May 1 05:12:44 UTC 2023 Modified Files: src/sys/kern: vfs_lookup.c src/sys/sys: proc.h Log Message: Default PROC_MACHINE_ARCH to machine_arch and use this for magic symlinks to resolve "@machine_arch". This keeps behaviour of magic symlinks and 'uname -p' output the same. Fixes PR 57320. To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/kern/vfs_lookup.c cvs rdiff -u -r1.370 -r1.371 src/sys/sys/proc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:33:57 UTC 2023 Modified Files: src/share/misc: domains Log Message: domains: re-gen with fix. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/share/misc/domains Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/domains diff -u src/share/misc/domains:1.9 src/share/misc/domains:1.10 --- src/share/misc/domains:1.9 Sun Apr 30 22:08:42 2023 +++ src/share/misc/domains Sun Apr 30 22:33:57 2023 @@ -1,6 +1,6 @@ -# $NetBSD: domains,v 1.9 2023/04/30 22:08:42 nikita Exp $ +# $NetBSD: domains,v 1.10 2023/04/30 22:33:57 nikita Exp $ # ISO 3166 country codes, from https://www.iana.org/domains/root/db -# Last update: Mon May 1 00:05:20 CEST 2023 +# Last update: Mon May 1 00:31:16 CEST 2023 # .aaa American Automobile Association, Inc. .aarp AARP @@ -51,7 +51,7 @@ .ally Ally Financial Inc. .alsace REGION GRAND EST .alstom ALSTOM -.am Internet Society Non-governmental Organization +.am "Internet Society" Non-governmental Organization .amazon Amazon Registry Services, Inc. .americanexpress American Express Travel Related Services Company, Inc. .americanfamily AmFam, Inc. @@ -239,7 +239,7 @@ .ceb Not assigned .center Binky Moon, LLC .ceo CEOTLD Pty Ltd -.cern European Organization for Nuclear Research (CERN) +.cern European Organization for Nuclear Research ("CERN") .cf Societe Centrafricaine de Telecommunications (SOCATEL) .cfa CFA Institute .cfd DOTCFD REGISTRY LTD @@ -504,7 +504,7 @@ .gb Reserved Domain - IANA .gbiz Charleston Road Registry Inc. .gd The National Telecommunications Regulatory Commission (NTRC) -.gdn Joint Stock Company Navigation-information systems +.gdn Joint Stock Company "Navigation-information systems" .ge Caucasus Online LLC .gea GEA Group Aktiengesellschaft .gent Combell nv @@ -853,7 +853,7 @@ .monster XYZ.COM LLC .montblanc Not assigned .mopar Not assigned -.mormon IRI Domain Management, LLC (Applicant) +.mormon IRI Domain Management, LLC ("Applicant") .mortgage Dog Beach, LLC .moscow Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) .moto Motorola Trademark Holdings, LLC @@ -1112,7 +1112,7 @@ .sbs SPECIAL BROADCASTING SERVICE CORPORATION .sc VCS Pty Ltd .sca SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ) -.scb The Siam Commercial Bank Public Company Limited (SCB) +.scb The Siam Commercial Bank Public Company Limited ("SCB") .schaeffler Schaeffler Technologies AG Co. KG .schmidt SCHMIDT GROUPE S.A.S. .scholarships Scholarships.com, LLC @@ -1234,7 +1234,7 @@ .taobao Alibaba Group Holding Limited .target Target Domain Holdings, LLC .tatamotors Tata Motors Ltd -.tatar Limited Liability Company Coordination Center of Regional Domain of Tatarstan Republic +.tatar Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic" .tattoo Top Level Design, LLC .tax Binky Moon, LLC .taxi Binky Moon, LLC @@ -1525,7 +1525,7 @@ .广东 Guangzhou YU Wei Information Technology Co., Ltd. .இலங்கை LK Domain Registry .இந்தியா National Internet Exchange of India -.հայ Internet Society Non-governmental Organization +.հայ "Internet Society" Non-governmental Organization .新加坡 Singapore Network Information Centre (SGNIC) Pte Ltd .テスト Not assigned .政务 China Organizational Name Administration Center
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:33:57 UTC 2023 Modified Files: src/share/misc: domains Log Message: domains: re-gen with fix. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/share/misc/domains Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:32:51 UTC 2023 Modified Files: src/share/misc: Makefile Log Message: update-domains: replace missed html. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/share/misc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/Makefile diff -u src/share/misc/Makefile:1.39 src/share/misc/Makefile:1.40 --- src/share/misc/Makefile:1.39 Sun Apr 30 22:08:14 2023 +++ src/share/misc/Makefile Sun Apr 30 22:32:51 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2023/04/30 22:08:14 nikita Exp $ +# $NetBSD: Makefile,v 1.40 2023/04/30 22:32:51 nikita Exp $ # @(#)Makefile 8.1 (Berkeley) 6/8/93 FILES= NetBSD.el acronyms acronyms-o acronyms.comp airport ascii \ @@ -33,6 +33,7 @@ update-domains: ftp -o - ${DOMAIN_URL} \ | ${TOOL_SED} -f ${.CURDIR}/nanpa.sed \ | ${TOOL_SED} '/^\..*/!d' \ + | ${TOOL_SED} 's//\"/g' \ | ${TOOL_AWK} 'BEGIN{FS=":"} {print $$1 " " $$3}' \ ) > domains ; \
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:32:51 UTC 2023 Modified Files: src/share/misc: Makefile Log Message: update-domains: replace missed html. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/share/misc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:08:42 UTC 2023 Modified Files: src/share/misc: domains Log Message: domains: re-gen To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/misc/domains Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/domains diff -u src/share/misc/domains:1.8 src/share/misc/domains:1.9 --- src/share/misc/domains:1.8 Sun Jun 2 16:37:37 2013 +++ src/share/misc/domains Sun Apr 30 22:08:42 2023 @@ -1,254 +1,1556 @@ -# $NetBSD: domains,v 1.8 2013/06/02 16:37:37 rodent Exp $ -# ISO 3166 country codes, from http://www.iana.org/root-whois/index.html -# Last update: Sat Sep 29 17:40:22 CEST 2007 +# $NetBSD: domains,v 1.9 2023/04/30 22:08:42 nikita Exp $ +# ISO 3166 country codes, from https://www.iana.org/domains/root/db +# Last update: Mon May 1 00:05:20 CEST 2023 # -ac Ascension Island -ad Andorra -ae United Arab Emirates -af Afghanistan -ag Antigua and Barbuda -ai Anguilla -al Albania -am Armenia -an Netherlands Antilles -ao Angola -aq Antarctica -ar Argentina -as American Samoa -at Austria -au Australia -aw Aruba -ax Aland Islands -az Azerbaijan -ba Bosnia and Herzegovina -bb Barbados -bd Bangladesh -be Belgium -bf Burkina Faso -bg Bulgaria -bh Bahrain -bi Burundi -bj Benin -bm Bermuda -bn Brunei Darussalam -bo Bolivia -br Brazil -bs Bahamas -bt Bhutan -bv Bouvet Island -bw Botswana -by Belarus -bz Belize -ca Canada -cc Cocos (Keeling) Islands -cd Congo, The Democratic Republic of the -cf Central African Republic -cg Congo, Republic of -ch Switzerland -ci Cote d'Ivoire -ck Cook Islands -cl Chile -cm Cameroon -cn China -co Colombia -cr Costa Rica -cu Cuba -cv Cape Verde -cx Christmas Island -cy Cyprus -cz Czech Republic -de Germany -dj Djibouti -dk Denmark -dm Dominica -do Dominican Republic -dz Algeria -ec Ecuador -ee Estonia -eg Egypt -eh Western Sahara -er Eritrea -es Spain -et Ethiopia -eu European Union -fi Finland -fj Fiji -fk Falkland Islands (Malvinas) -fm Micronesia, Federated States of -fo Faroe Islands -fr France -ga Gabon -gb United Kingdom -gd Grenada -ge Georgia -gf French Guiana -gg Guernsey -gh Ghana -gi Gibraltar -gl Greenland -gm Gambia -gn Guinea -gp Guadeloupe -gq Equatorial Guinea -gr Greece -gs South Georgia and the South Sandwich Islands -gt Guatemala -gu Guam -gw Guinea-Bissau -gy Guyana -hk Hong Kong -hm Heard and McDonald Islands -hn Honduras -hr Croatia/Hrvatska -ht Haiti -hu Hungary -id Indonesia -ie Ireland -il Israel -im Isle of Man -in India -io British Indian Ocean Territory -iq Iraq -ir Iran, Islamic Republic of -is Iceland -it Italy -je Jersey -jm Jamaica -jo Jordan -jp Japan -ke Kenya -kg Kyrgyzstan -kh Cambodia -ki Kiribati -km Comoros -kn Saint Kitts and Nevis -kp Korea, Democratic People's Republic -kr Korea, Republic of -kw Kuwait -ky Cayman Islands -kz Kazakhstan -la Lao People's Democratic Republic -lb Lebanon -lc Saint Lucia -li Liechtenstein -lk Sri Lanka -lr Liberia -ls Lesotho -lt Lithuania -lu Luxembourg -lv Latvia -ly Libyan Arab Jamahiriya -ma Morocco -mc Monaco -md Moldova, Republic of -me Montenegro -mg Madagascar -mh Marshall Islands -mk Macedonia, The Former Yugoslav Republic of -ml Mali -mm Myanmar -mn Mongolia -mo Macao -mp Northern Mariana Islands -mq Martinique -mr Mauritania -ms Montserrat -mt Malta -mu Mauritius -mv Maldives -mw Malawi -mx Mexico -my Malaysia -mz Mozambique -na Namibia -nc New Caledonia -ne Niger -nf Norfolk Island -ng Nigeria -ni Nicaragua -nl Netherlands -no Norway -np Nepal -nr Nauru -nu Niue -nz New Zealand -om Oman -pa Panama -pe Peru -pf French Polynesia -pg Papua New Guinea -ph Philippines -pk Pakistan -pl Poland -pm Saint Pierre and Miquelon -pn Pitcairn Island -pr Puerto Rico -ps Palestinian Territory, Occupied -pt Portugal -pw Palau -py Paraguay -qa Qatar -re Reunion Island -ro Romania -rs Serbia -ru Russian Federation -rw Rwanda -sa Saudi Arabia -sb Solomon Islands -sc Seychelles -sd Sudan -se Sweden -sg Singapore -sh Saint Helena -si Slovenia -sj Svalbard and Jan Mayen Islands -sk Slovak Republic -sl Sierra Leone -sm San Marino -sn Senegal -so Somalia -sr Suriname -st Sao Tome and Principe -su Soviet Union (being phased out) -sv El Salvador -sx Sint Maarten -sy Syrian Arab Republic -sz Swaziland -tc Turks and Caicos Islands -td Chad -tf French Southern Territories -tg Togo -th Thailand -tj Tajikistan -tk Tokelau -tl Timor-Leste -tm Turkmenistan -tn Tunisia -to Tonga -tp East Timor -tr Turkey -tt Trinidad and Tobago -tv Tuvalu -tw Taiwan -tz Tanzania -ua Ukraine -ug Uganda -uk United Kingdom -um United States Minor Outlying Islands -us United States -uy Uruguay -uz Uzbekistan -va Holy See (Vatican City State) -vc Saint Vincent and the Grenadines -ve Venezuela -vg Virgin Islands, British -vi Virgin Islands, U.S. -vn Vietnam -vu Vanuatu -wf Wallis and Futuna Islands -ws Samoa -ye Yemen -yt Mayotte -za South Africa -zm Zambia -zw Zimbabwe +.aaa
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:08:42 UTC 2023 Modified Files: src/share/misc: domains Log Message: domains: re-gen To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/misc/domains Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:08:14 UTC 2023 Modified Files: src/share/misc: Makefile Log Message: fix update-domains rule. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/share/misc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/Makefile diff -u src/share/misc/Makefile:1.38 src/share/misc/Makefile:1.39 --- src/share/misc/Makefile:1.38 Thu Apr 23 02:01:12 2015 +++ src/share/misc/Makefile Sun Apr 30 22:08:14 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2015/04/23 02:01:12 mrg Exp $ +# $NetBSD: Makefile,v 1.39 2023/04/30 22:08:14 nikita Exp $ # @(#)Makefile 8.1 (Berkeley) 6/8/93 FILES= NetBSD.el acronyms acronyms-o acronyms.comp airport ascii \ @@ -23,7 +23,7 @@ FILESBUILD_acronyms-o=yes # According to i...@isi.edu, the URL below is the authoritative list # distributed by the ISO 3166 Maintenance Agency. -DOMAIN_URL= http://www.iana.org/root-whois/index.html +DOMAIN_URL= https://www.iana.org/domains/root/db update-domains: ( \ echo '# $$''NetBSD''$$' ; \ @@ -31,7 +31,9 @@ update-domains: echo '# Last update:' `date` ; \ echo '#' ; \ ftp -o - ${DOMAIN_URL} \ - | ${TOOL_SED} -n -f ${.CURDIR}/domains.sed \ + | ${TOOL_SED} -f ${.CURDIR}/nanpa.sed \ + | ${TOOL_SED} '/^\..*/!d' \ + | ${TOOL_AWK} 'BEGIN{FS=":"} {print $$1 " " $$3}' \ ) > domains ; \ update-na.phone:
CVS commit: src/share/misc
Module Name:src Committed By: nikita Date: Sun Apr 30 22:08:14 UTC 2023 Modified Files: src/share/misc: Makefile Log Message: fix update-domains rule. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/share/misc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: mlelstv Date: Sun Apr 30 14:20:23 UTC 2023 Modified Files: src/sys/arch/arm/broadcom: bcm2835_vcaudio.c Log Message: codec translates to 16bit slinear_le, not the internal format. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/broadcom/bcm2835_vcaudio.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/arm/broadcom/bcm2835_vcaudio.c diff -u src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.18 src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.19 --- src/sys/arch/arm/broadcom/bcm2835_vcaudio.c:1.18 Sat Apr 24 23:36:26 2021 +++ src/sys/arch/arm/broadcom/bcm2835_vcaudio.c Sun Apr 30 14:20:23 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_vcaudio.c,v 1.18 2021/04/24 23:36:26 thorpej Exp $ */ +/* $NetBSD: bcm2835_vcaudio.c,v 1.19 2023/04/30 14:20:23 mlelstv Exp $ */ /*- * Copyright (c) 2013 Jared D. McNeill @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_vcaudio.c,v 1.18 2021/04/24 23:36:26 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_vcaudio.c,v 1.19 2023/04/30 14:20:23 mlelstv Exp $"); #include #include @@ -840,7 +840,7 @@ vcaudio_swvol_codec(audio_filter_arg_t * { struct vcaudio_softc *sc = arg->context; const aint_t *src; - aint_t *dst; + int16_t *dst; u_int sample_count; u_int i;
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: mlelstv Date: Sun Apr 30 14:20:23 UTC 2023 Modified Files: src/sys/arch/arm/broadcom: bcm2835_vcaudio.c Log Message: codec translates to 16bit slinear_le, not the internal format. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/broadcom/bcm2835_vcaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/doc
Module Name:src Committed By: martin Date: Sun Apr 30 10:58:53 UTC 2023 Modified Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Ticket #151 To generate a diff of this commit: cvs rdiff -u -r1.1.2.58 -r1.1.2.59 src/doc/CHANGES-10.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/doc
Module Name:src Committed By: martin Date: Sun Apr 30 10:58:53 UTC 2023 Modified Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Ticket #151 To generate a diff of this commit: cvs rdiff -u -r1.1.2.58 -r1.1.2.59 src/doc/CHANGES-10.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-10.0 diff -u src/doc/CHANGES-10.0:1.1.2.58 src/doc/CHANGES-10.0:1.1.2.59 --- src/doc/CHANGES-10.0:1.1.2.58 Tue Apr 25 16:17:59 2023 +++ src/doc/CHANGES-10.0 Sun Apr 30 10:58:53 2023 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-10.0,v 1.1.2.58 2023/04/25 16:17:59 martin Exp $ +# $NetBSD: CHANGES-10.0,v 1.1.2.59 2023/04/30 10:58:53 martin Exp $ A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16 until the 10.0 release: @@ -1698,3 +1698,8 @@ sys/netinet/ip_output.c1.325 AF_LINK." The fix was mistakenly upstreamed (to NetBSD). [ozaki-r, ticket #150] +sys/dev/sdmmc/sdmmc_mem.c 1.75 + + sdmmc(4): only check chipset write protect status for SD cards. + [jmcneill, ticket #151] +
CVS commit: [netbsd-10] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sun Apr 30 10:58:07 UTC 2023 Modified Files: src/sys/dev/sdmmc [netbsd-10]: sdmmc_mem.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #151): sys/dev/sdmmc/sdmmc_mem.c: revision 1.75 sdmmc: Only check chipset WP status for SD cards. The sdmmc_chip_write_protect callback returns the write protect switch status from the controller (SDWP#). This signal does not exist for eMMC; instead, write protect is signaled using card registers (CSD). So lets skip asking the chipset for WP status on eMMC cards for each write request. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.74.8.1 src/sys/dev/sdmmc/sdmmc_mem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.74 src/sys/dev/sdmmc/sdmmc_mem.c:1.74.8.1 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.74 Tue Aug 3 07:54:39 2021 +++ src/sys/dev/sdmmc/sdmmc_mem.c Sun Apr 30 10:58:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.74 2021/08/03 07:54:39 msaitoh Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.74.8.1 2023/04/30 10:58:07 martin Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -45,7 +45,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.74 2021/08/03 07:54:39 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.74.8.1 2023/04/30 10:58:07 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -2125,7 +2125,8 @@ sdmmc_mem_write_block(struct sdmmc_funct SDMMC_LOCK(sc); mutex_enter(>sc_mtx); - if (sdmmc_chip_write_protect(sc->sc_sct, sc->sc_sch)) { + if (ISSET(sc->sc_flags, SMF_SD_MODE) && + sdmmc_chip_write_protect(sc->sc_sct, sc->sc_sch)) { aprint_normal_dev(sc->sc_dev, "write-protected\n"); error = EIO; goto out;
CVS commit: [netbsd-10] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sun Apr 30 10:58:07 UTC 2023 Modified Files: src/sys/dev/sdmmc [netbsd-10]: sdmmc_mem.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #151): sys/dev/sdmmc/sdmmc_mem.c: revision 1.75 sdmmc: Only check chipset WP status for SD cards. The sdmmc_chip_write_protect callback returns the write protect switch status from the controller (SDWP#). This signal does not exist for eMMC; instead, write protect is signaled using card registers (CSD). So lets skip asking the chipset for WP status on eMMC cards for each write request. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.74.8.1 src/sys/dev/sdmmc/sdmmc_mem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:33 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Omit spurious trailing semicolon in DTRACE_PROBE*. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sdt.h diff -u src/sys/sys/sdt.h:1.21 src/sys/sys/sdt.h:1.22 --- src/sys/sys/sdt.h:1.21 Sun Apr 30 08:46:20 2023 +++ src/sys/sys/sdt.h Sun Apr 30 08:46:33 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sdt.h,v 1.21 2023/04/30 08:46:20 riastradh Exp $ */ +/* $NetBSD: sdt.h,v 1.22 2023/04/30 08:46:33 riastradh Exp $ */ /*- * Copyright 2006-2008 John Birrell @@ -407,25 +407,25 @@ #define DTRACE_PROBE(name) \ DTRACE_PROBE_IMPL_START(name, 0, 0, 0, 0, 0); \ - DTRACE_PROBE_IMPL_END; + DTRACE_PROBE_IMPL_END #define DTRACE_PROBE1(name, type0, arg0)\ DTRACE_PROBE_IMPL_START(name, arg0, 0, 0, 0, 0); \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ - DTRACE_PROBE_IMPL_END; + DTRACE_PROBE_IMPL_END #define DTRACE_PROBE2(name, type0, arg0, type1, arg1) \ DTRACE_PROBE_IMPL_START(name, arg0, arg1, 0, 0, 0); \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ - DTRACE_PROBE_IMPL_END; + DTRACE_PROBE_IMPL_END #define DTRACE_PROBE3(name, type0, arg0, type1, arg1, type2, arg2) \ DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, 0, 0); \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ - DTRACE_PROBE_IMPL_END; + DTRACE_PROBE_IMPL_END #define DTRACE_PROBE4(name, type0, arg0, type1, arg1, type2, arg2, type3, \ arg3) \ @@ -434,7 +434,7 @@ SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 3, #type3, NULL); \ - DTRACE_PROBE_IMPL_END; + DTRACE_PROBE_IMPL_END #define DTRACE_PROBE5(name, type0, arg0, type1, arg1, type2, arg2, type3, \ arg3, type4, arg4) \ @@ -444,7 +444,7 @@ SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 3, #type3, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 4, #type4, NULL); \ - DTRACE_PROBE_IMPL_END; + DTRACE_PROBE_IMPL_END #endif /* KDTRACE_HOOKS */
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:33 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Omit spurious trailing semicolon in DTRACE_PROBE*. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:20 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Nix needless SDT_VAR_DECL. Previously introduced as a provisional build fix, its need has been obviated by making SDT_PROBE* do __USE on the arguments in builds without KDTRACE_HOOKS. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sdt.h diff -u src/sys/sys/sdt.h:1.20 src/sys/sys/sdt.h:1.21 --- src/sys/sys/sdt.h:1.20 Sun Apr 30 08:46:03 2023 +++ src/sys/sys/sdt.h Sun Apr 30 08:46:20 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sdt.h,v 1.20 2023/04/30 08:46:03 riastradh Exp $ */ +/* $NetBSD: sdt.h,v 1.21 2023/04/30 08:46:20 riastradh Exp $ */ /*- * Copyright 2006-2008 John Birrell @@ -173,8 +173,6 @@ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5, arg6,\ xarg6) -#define SDT_VAR_DECL(decl) __nothing - #define DTRACE_PROBE(name) \ __nothing #define DTRACE_PROBE1(name, type0, arg0) \ @@ -400,8 +398,6 @@ (uintptr_t)(arg6)); \ } while (0) -#define SDT_VAR_DECL(decl) decl ; - #define DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, arg3, arg4) do\ { \ static SDT_PROBE_DEFINE(sdt, , , name); \
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:20 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Nix needless SDT_VAR_DECL. Previously introduced as a provisional build fix, its need has been obviated by making SDT_PROBE* do __USE on the arguments in builds without KDTRACE_HOOKS. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:11 UTC 2023 Modified Files: src/sys/kern: vfs_subr.c Log Message: kern/vfs_subr.c: Revert previous build fixes, no longer needed. SDT_PROBE* will now DTRT here. To generate a diff of this commit: cvs rdiff -u -r1.499 -r1.500 src/sys/kern/vfs_subr.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/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.499 src/sys/kern/vfs_subr.c:1.500 --- src/sys/kern/vfs_subr.c:1.499 Sat Apr 29 23:30:18 2023 +++ src/sys/kern/vfs_subr.c Sun Apr 30 08:46:11 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.499 2023/04/29 23:30:18 kre Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.500 2023/04/30 08:46:11 riastradh Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008, 2019, 2020 @@ -69,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.499 2023/04/29 23:30:18 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.500 2023/04/30 08:46:11 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_43.h" @@ -714,7 +714,7 @@ vn_syncer_add1(struct vnode *vp, int del void vn_syncer_add_to_worklist(struct vnode *vp, int delayx) { - SDT_VAR_DECL(vnode_impl_t *vip = VNODE_TO_VIMPL(vp)); + vnode_impl_t *vip = VNODE_TO_VIMPL(vp); KASSERT(mutex_owned(vp->v_interlock)); @@ -840,10 +840,9 @@ sched_sync(void *arg) struct vnode *vp; struct mount *mp; time_t starttime, endtime; - int vdelay, nslot, delayx; - SDT_VAR_DECL(int oslot); + int vdelay, oslot, nslot, delayx; bool synced; - SDT_VAR_DECL(int error); + int error; for (;;) { starttime = time_second; @@ -862,21 +861,14 @@ sched_sync(void *arg) } vdelay = sync_delay(mp); -#ifdef KDTRACE_HOOKS oslot = mp->mnt_synclist_slot; -#endif nslot = sync_delay_slot(vdelay); mp->mnt_synclist_slot = nslot; SDT_PROBE4(vfs, syncer, worklist, mount__update, mp, vdelay, oslot, nslot); SDT_PROBE1(vfs, syncer, sync, mount__start, mp); -#ifdef KDTRACE_HOOKS - error = -#else - (void) -#endif -VFS_SYNC(mp, MNT_LAZY, curlwp->l_cred); + error = VFS_SYNC(mp, MNT_LAZY, curlwp->l_cred); SDT_PROBE2(vfs, syncer, sync, mount__done, mp, error); } @@ -926,9 +918,7 @@ sched_sync(void *arg) * into the future. */ delayx = synced ? syncdelay : lockdelay; -#ifdef KDTRACE_HOOKS oslot = vi->vi_synclist_slot; -#endif vn_syncer_add1(vp, delayx); nslot = vi->vi_synclist_slot; SDT_PROBE4(vfs, syncer, worklist,
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:11 UTC 2023 Modified Files: src/sys/kern: vfs_subr.c Log Message: kern/vfs_subr.c: Revert previous build fixes, no longer needed. SDT_PROBE* will now DTRT here. To generate a diff of this commit: cvs rdiff -u -r1.499 -r1.500 src/sys/kern/vfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:03 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Make sure SDT_PROBE*, DTRACE_PROBE* compile the arguments. This way there's no need to fuss around with conditional declarations and assignments in the callers to avoid `variable set but not used' errors in builds without KDTRACE_HOOKS. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sdt.h diff -u src/sys/sys/sdt.h:1.19 src/sys/sys/sdt.h:1.20 --- src/sys/sys/sdt.h:1.19 Sun Apr 30 08:45:39 2023 +++ src/sys/sys/sdt.h Sun Apr 30 08:46:03 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sdt.h,v 1.19 2023/04/30 08:45:39 riastradh Exp $ */ +/* $NetBSD: sdt.h,v 1.20 2023/04/30 08:46:03 riastradh Exp $ */ /*- * Copyright 2006-2008 John Birrell @@ -96,8 +96,14 @@ #define SDT_PROVIDER_DECLARE(prov) #define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) -#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ - __nothing +#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do\ +{ \ + __MACROUSE((uintptr_t)(arg0)); \ + __MACROUSE((uintptr_t)(arg1)); \ + __MACROUSE((uintptr_t)(arg2)); \ + __MACROUSE((uintptr_t)(arg3)); \ + __MACROUSE((uintptr_t)(arg4)); \ +} while (0) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) #define SDT_PROBE_DEFINE0(prov, mod, func, name) @@ -111,19 +117,45 @@ #define SDT_PROBE_DEFINE7(prov, mod, func, name, arg0, arg1, arg2, \ arg3, arg4, arg5, arg6) -#define SDT_PROBE0(prov, mod, func, name) __nothing -#define SDT_PROBE1(prov, mod, func, name, arg0) __nothing -#define SDT_PROBE2(prov, mod, func, name, arg0, arg1) __nothing -#define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) __nothing -#define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) \ - __nothing -#define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ - __nothing -#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) \ - __nothing -#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ -arg6) \ +#define SDT_PROBE0(prov, mod, func, name) \ __nothing +#define SDT_PROBE1(prov, mod, func, name, arg0) \ + __MACROUSE((uintptr_t)(arg0)) +#define SDT_PROBE2(prov, mod, func, name, arg0, arg1) do \ +{ \ + __MACROUSE((uintptr_t)(arg0)); __MACROUSE((uintptr_t)(arg1)); \ +} while (0) +#define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) do \ +{ \ + __MACROUSE((uintptr_t)(arg0)); __MACROUSE((uintptr_t)(arg1)); \ + __MACROUSE((uintptr_t)(arg2)); \ +} while (0) +#define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) do\ +{ \ + __MACROUSE((uintptr_t)(arg0)); __MACROUSE((uintptr_t)(arg1)); \ + __MACROUSE((uintptr_t)(arg2)); __MACROUSE((uintptr_t)(arg3)); \ +} while (0) +#define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do\ +{ \ + __MACROUSE((uintptr_t)(arg0)); __MACROUSE((uintptr_t)(arg1)); \ + __MACROUSE((uintptr_t)(arg2)); __MACROUSE((uintptr_t)(arg3)); \ + __MACROUSE((uintptr_t)(arg4)); \ +} while (0) +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, \ +arg5) do \ +{ \ + __MACROUSE((uintptr_t)(arg0)); __MACROUSE((uintptr_t)(arg1)); \ + __MACROUSE((uintptr_t)(arg2)); __MACROUSE((uintptr_t)(arg3)); \ + __MACROUSE((uintptr_t)(arg4)); __MACROUSE((uintptr_t)(arg5)); \ +} while (0) +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, \ +arg5, arg6) do \ +{ \ + __MACROUSE((uintptr_t)(arg0)); __MACROUSE((uintptr_t)(arg1)); \ + __MACROUSE((uintptr_t)(arg2)); __MACROUSE((uintptr_t)(arg3)); \ + __MACROUSE((uintptr_t)(arg4)); __MACROUSE((uintptr_t)(arg5)); \ + __MACROUSE((uintptr_t)(arg6)); \ +} while (0) #define SDT_PROBE_DEFINE0_XLATE(prov, mod, func, name) #define SDT_PROBE_DEFINE1_XLATE(prov, mod, func, name, arg0, xarg0) @@ -143,17 +175,32 @@ #define SDT_VAR_DECL(decl) __nothing -#define DTRACE_PROBE(name) __nothing -#define DTRACE_PROBE1(name, type0, arg0) __nothing -#define DTRACE_PROBE2(name, type0, arg0, type1, arg1) __nothing -#define DTRACE_PROBE3(name, type0, arg0, type1, arg1, type2, arg2) \ +#define DTRACE_PROBE(name) \ __nothing +#define DTRACE_PROBE1(name, type0, arg0) \ + __MACROUSE((uintptr_t)(arg0)) +#define DTRACE_PROBE2(name, type0, arg0, type1, arg1) do \ +{ \ +
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:46:03 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Make sure SDT_PROBE*, DTRACE_PROBE* compile the arguments. This way there's no need to fuss around with conditional declarations and assignments in the callers to avoid `variable set but not used' errors in builds without KDTRACE_HOOKS. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:48 UTC 2023 Modified Files: src/sys/sys: cdefs.h Log Message: sys/cdefs.h: New __MACROUSE for macros to type-check arguments. This way, if there's a macro F(x) with a conditional definition -- e.g., conditional on DIAGNOSTIC or KDTRACE_HOOKS -- it can do __MACROUSE(x) in the definition that's supposed to compile away, without triggering `variable set but not used' errors, while still catching type errors in the expression x. But there's no cost or side effects incurred in the generated code because the value is not computed. This should be the same as __USE, but I haven't figured out how to make it work for both bit fields (which are likely to appear in macro arguments) and aggregates (structs/unions, which are likely to appear as variable declarations), so for now we use two separate macros. To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.159 src/sys/sys/cdefs.h:1.160 --- src/sys/sys/cdefs.h:1.159 Sat Jan 22 08:58:48 2022 +++ src/sys/sys/cdefs.h Sun Apr 30 08:45:48 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.159 2022/01/22 08:58:48 skrll Exp $ */ +/* $NetBSD: cdefs.h,v 1.160 2023/04/30 08:45:48 riastradh Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -687,7 +687,38 @@ #define __CASTV(__dt, __st) __CAST(__dt, __CAST(void *, __st)) #define __CASTCV(__dt, __st) __CAST(__dt, __CAST(const void *, __st)) -#define __USE(a) (/*LINTED*/(void)(a)) +/* + * Suppresses `variable set but not used' warnings. + * + * Typically for #ifdefs, where one branch of the #ifdef uses a + * variable but the other does not. Useful in patching external code + * to keep the patches narrowly scoped. + * + * Limitation: Only for variables, and only non-volatile variables. + * + * (Abusing this for anything else may lead to side effects. Pointers + * to volatile objects are OK, as in `volatile int *a', as long as the + * pointer itself is not volatile, as in `int *volatile a'.) + */ +#define __USE(a) (/*LINTED*/(void)(a)) + +/* + * Verifies the expression e compiles, but does not evaluate it. Safe + * when e has side effects. + * + * Typically used for the arguments to macros with conditional + * definitions like DIAGNOSTIC or KDTRACE_HOOKS: when enabled, the + * macro uses the argument; when disabled, the macro passes the + * argument to __MACROUSE but doesn't otherwise use it. Cast to long + * in case the argument is a bit field, which is forbidden in sizeof. + * + * Limitation: Doesn't work for expressions of aggregate (struct/union) + * types. + * + * (If you find a way to handle both bit fields and aggregate types, + * you could unify __USE and __MACROUSE.) + */ +#define __MACROUSE(e) (/*LINTED*/(void)sizeof((long)(e))) #define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \ (~((1ULL << (sizeof(t) * NBBY)) - 1)) : 0ULL)
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:48 UTC 2023 Modified Files: src/sys/sys: cdefs.h Log Message: sys/cdefs.h: New __MACROUSE for macros to type-check arguments. This way, if there's a macro F(x) with a conditional definition -- e.g., conditional on DIAGNOSTIC or KDTRACE_HOOKS -- it can do __MACROUSE(x) in the definition that's supposed to compile away, without triggering `variable set but not used' errors, while still catching type errors in the expression x. But there's no cost or side effects incurred in the generated code because the value is not computed. This should be the same as __USE, but I haven't figured out how to make it work for both bit fields (which are likely to appear in macro arguments) and aggregates (structs/unions, which are likely to appear as variable declarations), so for now we use two separate macros. To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:39 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Whitespace cleanup (and internal macro semicolon tidying). No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sdt.h diff -u src/sys/sys/sdt.h:1.18 src/sys/sys/sdt.h:1.19 --- src/sys/sys/sdt.h:1.18 Sun Apr 30 08:45:30 2023 +++ src/sys/sys/sdt.h Sun Apr 30 08:45:39 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sdt.h,v 1.18 2023/04/30 08:45:30 riastradh Exp $ */ +/* $NetBSD: sdt.h,v 1.19 2023/04/30 08:45:39 riastradh Exp $ */ /*- * Copyright 2006-2008 John Birrell @@ -137,8 +137,8 @@ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4) #define SDT_PROBE_DEFINE6_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5) -#define SDT_PROBE_DEFINE7_XLATE(prov, mod, func, name, arg0, xarg0, \ -arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5, arg6, \ +#define SDT_PROBE_DEFINE7_XLATE(prov, mod, func, name, arg0, xarg0, \ +arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5, arg6,\ xarg6) #define SDT_VAR_DECL(decl) __nothing @@ -148,47 +148,57 @@ #define DTRACE_PROBE2(name, type0, arg0, type1, arg1) __nothing #define DTRACE_PROBE3(name, type0, arg0, type1, arg1, type2, arg2) \ __nothing -#define DTRACE_PROBE4(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3)\ +#define DTRACE_PROBE4(name, type0, arg0, type1, arg1, type2, arg2, type3, \ +arg3) \ __nothing -#define DTRACE_PROBE5(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3,\ -type4, arg4) \ +#define DTRACE_PROBE5(name, type0, arg0, type1, arg1, type2, arg2, type3, \ +arg3, type4, arg4) \ __nothing #else -#define SDT_PROVIDER_DEFINE(prov) \ - struct sdt_provider sdt_provider_##prov[1] = {\ - { #prov, { NULL, NULL }, 0, 0 } \ - }; \ +#define SDT_PROVIDER_DEFINE(prov) \ + struct sdt_provider sdt_provider_##prov[1] = { \ + { #prov, { NULL, NULL }, 0, 0 } \ + }; \ __link_set_add_data(sdt_providers_set, sdt_provider_##prov); -#define SDT_PROVIDER_DECLARE(prov) \ +#define SDT_PROVIDER_DECLARE(prov) \ extern struct sdt_provider sdt_provider_##prov[1] -#define SDT_PROBE_DEFINE(prov, mod, func, name) \ - struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] = { \ - { sizeof(struct sdt_probe), sdt_provider_##prov, \ - { NULL, NULL }, { NULL, NULL }, #mod, #func, #name, 0, 0, \ - NULL } \ - }; \ - __link_set_add_data(sdt_probes_set, sdt_##prov##_##mod##_##func##_##name); +#define SDT_PROBE_DEFINE(prov, mod, func, name) \ + struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] = { \ + { \ + sizeof(struct sdt_probe), sdt_provider_##prov, \ + { NULL, NULL }, { NULL, NULL }, \ + #mod, #func, #name, 0, 0, \ + NULL, \ + } \ + }; \ + __link_set_add_data(sdt_probes_set, \ + sdt_##prov##_##mod##_##func##_##name); -#define SDT_PROBE_DECLARE(prov, mod, func, name)\ +#define SDT_PROBE_DECLARE(prov, mod, func, name) \ extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] -#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \ - if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ - (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ - (uintptr_t) (arg0), (uintptr_t) (arg1), (uintptr_t) (arg2), \ - (uintptr_t) (arg3), (uintptr_t) (arg4)); \ +#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do\ +{ \ + if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ + (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ + (uintptr_t)(arg0), (uintptr_t)(arg1), (uintptr_t)(arg2), \ + (uintptr_t)(arg3), (uintptr_t)(arg4)); \ } while (0) -#define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) \ - static struct sdt_argtype sdta_##prov##_##mod##_##func##_##name##num[1] \ - = { { num, type, xtype, { NULL, NULL },\ - sdt_##prov##_##mod##_##func##_##name }\ - }; \ - __link_set_add_data(sdt_argtypes_set, sdta_##prov##_##mod##_##func##_##name##num); +#define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) \ + static struct sdt_argtype sdta_##prov##_##mod##_##func##_##name##num[1]\ + = { \ + { \ + num, type, xtype, { NULL, NULL }, \ + sdt_##prov##_##mod##_##func##_##name, \ + } \ + }; \ +
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:39 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Whitespace cleanup (and internal macro semicolon tidying). No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:30 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Properly parenthesize macro arguments. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sdt.h diff -u src/sys/sys/sdt.h:1.17 src/sys/sys/sdt.h:1.18 --- src/sys/sys/sdt.h:1.17 Sun Apr 30 08:45:19 2023 +++ src/sys/sys/sdt.h Sun Apr 30 08:45:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sdt.h,v 1.17 2023/04/30 08:45:19 riastradh Exp $ */ +/* $NetBSD: sdt.h,v 1.18 2023/04/30 08:45:30 riastradh Exp $ */ /*- * Copyright 2006-2008 John Birrell @@ -47,37 +47,37 @@ #define DTRACE_PROBE1(prov, name, arg1) do { \ extern void __dtrace_##prov##___##name(unsigned long); \ - __dtrace_##prov##___##name((unsigned long)arg1); \ + __dtrace_##prov##___##name((unsigned long)(arg1)); \ } while (0) #define DTRACE_PROBE2(prov, name, arg1, arg2) do { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long); \ - __dtrace_##prov##___##name((unsigned long)arg1, \ - (unsigned long)arg2);\ + __dtrace_##prov##___##name((unsigned long)(arg1), \ + (unsigned long)(arg2));\ } while (0) #define DTRACE_PROBE3(prov, name, arg1, arg2, arg3) do { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long, unsigned long); \ - __dtrace_##prov##___##name((unsigned long)arg1, \ - (unsigned long)arg2, (unsigned long)arg3); \ + __dtrace_##prov##___##name((unsigned long)(arg1), \ + (unsigned long)(arg2), (unsigned long)(arg3)); \ } while (0) #define DTRACE_PROBE4(prov, name, arg1, arg2, arg3, arg4) do { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long, unsigned long, unsigned long); \ - __dtrace_##prov##___##name((unsigned long)arg1, \ - (unsigned long)arg2, (unsigned long)arg3, \ - (unsigned long)arg4);\ + __dtrace_##prov##___##name((unsigned long)(arg1), \ + (unsigned long)(arg2), (unsigned long)(arg3), \ + (unsigned long)(arg4));\ } while (0) #define DTRACE_PROBE5(prov, name, arg1, arg2, arg3, arg4, arg5) do { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long, unsigned long, unsigned long, unsigned long);\ - __dtrace_##prov##___##name((unsigned long)arg1, \ - (unsigned long)arg2, (unsigned long)arg3, \ - (unsigned long)arg4, (unsigned long)arg5); \ + __dtrace_##prov##___##name((unsigned long)(arg1), \ + (unsigned long)(arg2), (unsigned long)(arg3), \ + (unsigned long)(arg4), (unsigned long)(arg5)); \ } while (0) #else /* _KERNEL */ @@ -323,8 +323,9 @@ uintptr_t, uintptr_t, uintptr_t, uintptr_t), \ sdt_probe_func)( \ sdt_##prov##_##mod##_##func##_##name->id, \ - (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ - (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5);\ + (uintptr_t)(arg0), (uintptr_t)(arg1), \ + (uintptr_t)(arg2), (uintptr_t)(arg3), \ + (uintptr_t)(arg4), (uintptr_t)(arg5)); \ } while (0) #define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ arg6) \ @@ -334,9 +335,10 @@ uintptr_t, uintptr_t, uintptr_t, uintptr_t, \ uintptr_t), sdt_probe_func)( \ sdt_##prov##_##mod##_##func##_##name->id, \ - (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ - (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5, \ - (uintptr_t)arg6); \ + (uintptr_t)(arg0), (uintptr_t)(arg1), \ + (uintptr_t)(arg2), (uintptr_t)(arg3), \ + (uintptr_t)(arg4), (uintptr_t)(arg5), \ + (uintptr_t)(arg6)); \ } while (0) #define SDT_VAR_DECL(decl) decl ;
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:30 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Properly parenthesize macro arguments. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:19 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Nix trailing whitspace. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/sys/sdt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/sdt.h diff -u src/sys/sys/sdt.h:1.16 src/sys/sys/sdt.h:1.17 --- src/sys/sys/sdt.h:1.16 Sat Apr 29 23:30:18 2023 +++ src/sys/sys/sdt.h Sun Apr 30 08:45:19 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sdt.h,v 1.16 2023/04/29 23:30:18 kre Exp $ */ +/* $NetBSD: sdt.h,v 1.17 2023/04/30 08:45:19 riastradh Exp $ */ /*- * Copyright 2006-2008 John Birrell @@ -11,7 +11,7 @@ * 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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Sun Apr 30 08:45:19 UTC 2023 Modified Files: src/sys/sys: sdt.h Log Message: sys/sdt.h: Nix trailing whitspace. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/sys/sdt.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/usb
Module Name:src Committed By: mlelstv Date: Sun Apr 30 08:35:53 UTC 2023 Modified Files: src/sys/dev/usb: uaudio.c Log Message: xhci doesn't like 80 packets per USB interval, but 40 seems to be fine for xhci (and ehci). To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/dev/usb/uaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mlelstv Date: Sun Apr 30 08:35:53 UTC 2023 Modified Files: src/sys/dev/usb: uaudio.c Log Message: xhci doesn't like 80 packets per USB interval, but 40 seems to be fine for xhci (and ehci). To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/dev/usb/uaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/uaudio.c diff -u src/sys/dev/usb/uaudio.c:1.180 src/sys/dev/usb/uaudio.c:1.181 --- src/sys/dev/usb/uaudio.c:1.180 Sun Apr 23 06:13:35 2023 +++ src/sys/dev/usb/uaudio.c Sun Apr 30 08:35:52 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: uaudio.c,v 1.180 2023/04/23 06:13:35 mlelstv Exp $ */ +/* $NetBSD: uaudio.c,v 1.181 2023/04/30 08:35:52 mlelstv Exp $ */ /* * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.180 2023/04/23 06:13:35 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.181 2023/04/30 08:35:52 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -105,7 +105,7 @@ int uaudiodebug = 0; /* number of USB frames per request, also the number of ms */ #define UAUDIO_NFRAMES 10 /* number of microframes per requewst (high, super) */ -#define UAUDIO_NFRAMES_HI (UAUDIO_NFRAMES * USB_UFRAMES_PER_FRAME) +#define UAUDIO_NFRAMES_HI 40 #define MIX_MAX_CHAN 8
Re: CVS commit: src/sys
> Date: Sun, 30 Apr 2023 07:27:34 +0700 > From: Robert Elz > > Date:Sat, 29 Apr 2023 23:30:18 + > From:"Robert Elz" > Message-ID: <20230429233018.cadf4f...@cvs.netbsd.org> > > | Modified Files: > | src/sys/kern: vfs_subr.c > | src/sys/sys: sdt.h > | > | Log Message: > | Fix builds (hopefully) when DTRACE hooks are not included. > > Feel free to revert this and fix things in a better way. Thanks, sorry for the breakage -- had verified a kernel build but not a full distribution build including rump. I'm working on a better fix that doesn't require extra conditionals or declarations like this or compile-testing both ways: make SDT_PROBE* and DTRACE_PROBE* type-check their arguments, but not evaluate them, in builds without KDTRACE_HOOKS. I was hoping I could find a way to repurpose __USE(x) for this, by making it expand to (void)sizeof(x) instead of (void)(x) so it prevents side effects too. That doesn't work for bit fields, though, which is why KASSERT does (void)sizeof((long)(x)). But the cast to long doesn't work for aggregate types, which the i915 code relies on, so we can't just redefine __USE to do (void)sizeof((long)(x)). For now I'll add a new __MACROUSE that handles bit fields but not aggregates (since aggregates are not often passed as arguments), but it'd be nice if someone figured out a way to unify them so they work to type-check but suppress evaluation of all expression types, bit fields and aggregates included.