CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Tue Apr 26 05:29:15 UTC 2022 Modified Files: src/sys/arch/x86/x86: lapic.c Log Message: Fix typo. No funcitonal change. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/x86/x86/lapic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/lapic.c diff -u src/sys/arch/x86/x86/lapic.c:1.86 src/sys/arch/x86/x86/lapic.c:1.87 --- src/sys/arch/x86/x86/lapic.c:1.86 Thu Oct 7 12:52:27 2021 +++ src/sys/arch/x86/x86/lapic.c Tue Apr 26 05:29:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: lapic.c,v 1.86 2021/10/07 12:52:27 msaitoh Exp $ */ +/* $NetBSD: lapic.c,v 1.87 2022/04/26 05:29:15 msaitoh Exp $ */ /*- * Copyright (c) 2000, 2008, 2020 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.86 2021/10/07 12:52:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.87 2022/04/26 05:29:15 msaitoh Exp $"); #include "acpica.h" #include "ioapic.h" @@ -1007,7 +1007,7 @@ lapic_dump(void) APIC_LVT_PRINT(ci, "lint", 1, LAPIC_LVT_LINT1); APIC_LVT_PRINT(ci, "err", 0, LAPIC_LVT_ERR); -#undef APIC_LVT_PRIINT +#undef APIC_LVT_PRINT } #else /* XENPV */ void
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Tue Apr 26 05:29:15 UTC 2022 Modified Files: src/sys/arch/x86/x86: lapic.c Log Message: Fix typo. No funcitonal change. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/x86/x86/lapic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/newfs_udf
Module Name:src Committed By: reinoud Date: Mon Apr 25 20:41:25 UTC 2022 Modified Files: src/sbin/newfs_udf: udf_core.c Log Message: Fix endian bug in logical volume creation for metadata/VAT partitions. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/newfs_udf/udf_core.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/newfs_udf/udf_core.c diff -u src/sbin/newfs_udf/udf_core.c:1.4 src/sbin/newfs_udf/udf_core.c:1.5 --- src/sbin/newfs_udf/udf_core.c:1.4 Fri Apr 22 21:22:14 2022 +++ src/sbin/newfs_udf/udf_core.c Mon Apr 25 20:41:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_core.c,v 1.4 2022/04/22 21:22:14 reinoud Exp $ */ +/* $NetBSD: udf_core.c,v 1.5 2022/04/25 20:41:25 reinoud Exp $ */ /* * Copyright (c) 2006, 2008, 2021, 2022 Reinoud Zandijk @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: udf_core.c,v 1.4 2022/04/22 21:22:14 reinoud Exp $"); +__RCSID("$NetBSD: udf_core.c,v 1.5 2022/04/25 20:41:25 reinoud Exp $"); #include #include @@ -1206,7 +1206,7 @@ udf_create_base_logical_dscr(void) /* just one fsd for now */ lvd->lv_fsd_loc.len = udf_rw32(sector_size); - lvd->lv_fsd_loc.loc.part_num = udf_rw32(context.metadata_part); + lvd->lv_fsd_loc.loc.part_num = udf_rw16(context.metadata_part); lvd->lv_fsd_loc.loc.lb_num = udf_rw32(layout.fsd); crclen = sizeof(struct logvol_desc) - 1 - UDF_DESC_TAG_LENGTH;
CVS commit: src/sbin/newfs_udf
Module Name:src Committed By: reinoud Date: Mon Apr 25 20:41:25 UTC 2022 Modified Files: src/sbin/newfs_udf: udf_core.c Log Message: Fix endian bug in logical volume creation for metadata/VAT partitions. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/newfs_udf/udf_core.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/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 15:48:57 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: One more style. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb/elf2bb.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.27 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.28 --- src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.27 Mon Apr 25 14:46:38 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c Mon Apr 25 15:48:57 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2bb.c,v 1.27 2022/04/25 14:46:38 rin Exp $ */ +/* $NetBSD: elf2bb.c,v 1.28 2022/04/25 15:48:57 rin Exp $ */ /*- * Copyright (c) 1996,2006 The NetBSD Foundation, Inc. @@ -431,9 +431,9 @@ main(int argc, char *argv[]) *rpo = 0; rpo += delta; *rpo = 0; rpo += delta; - printf("using %td bytes, %td bytes remaining.\n", delta > 0 ? - rpo-buffer-tsz-dsz : buffer+bbsize-rpo, delta > 0 ? - buffer + bbsize - rpo : rpo - buffer - tsz - dsz); + printf("using %td bytes, %td bytes remaining.\n", + delta > 0 ? rpo - buffer - tsz - dsz : buffer + bbsize - rpo, + delta > 0 ? buffer + bbsize - rpo : rpo - buffer - tsz - dsz); /* * RELOCs must fit into the bss area. */
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 15:48:57 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: One more style. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: reinoud Date: Mon Apr 25 15:37:14 UTC 2022 Modified Files: src/sbin/fsck_udf: main.c Log Message: Relax constraints on sequential media detection by checking for VAT format. This allows fixing images of VAT formatted media too. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sbin/fsck_udf/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_udf/main.c diff -u src/sbin/fsck_udf/main.c:1.12 src/sbin/fsck_udf/main.c:1.13 --- src/sbin/fsck_udf/main.c:1.12 Mon Apr 25 15:18:15 2022 +++ src/sbin/fsck_udf/main.c Mon Apr 25 15:37:14 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.12 2022/04/25 15:18:15 reinoud Exp $ */ +/* $NetBSD: main.c,v 1.13 2022/04/25 15:37:14 reinoud Exp $ */ /* * Copyright (c) 2022 Reinoud Zandijk @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: main.c,v 1.12 2022/04/25 15:18:15 reinoud Exp $"); +__RCSID("$NetBSD: main.c,v 1.13 2022/04/25 15:37:14 reinoud Exp $"); #endif /* not lint */ #include @@ -2862,9 +2862,8 @@ udf_prepare_writing(void) } /* if we are not on sequential media, we're done */ - if ((mmc_discinfo.mmc_cur & MMC_CAP_SEQUENTIAL) == 0) + if ((context.format_flags & FORMAT_VAT) == 0) return 0; - assert(context.format_flags & FORMAT_VAT); /* if the disc is full, we drop back to read only */ if (mmc_discinfo.disc_state == MMC_STATE_FULL)
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: reinoud Date: Mon Apr 25 15:37:14 UTC 2022 Modified Files: src/sbin/fsck_udf: main.c Log Message: Relax constraints on sequential media detection by checking for VAT format. This allows fixing images of VAT formatted media too. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sbin/fsck_udf/main.c 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/x68k/stand
> Module Name: src > Committed By: mlelstv > Date: Mon Apr 25 15:12:07 UTC 2022 > > Modified Files: > src/sys/arch/x68k/stand/boot: conf.c > src/sys/arch/x68k/stand/xxboot: Makefile.xxboot xx.c > > Log Message: > libsa now needs ioctl to support media with large sectors. Provide > missing functions. Only for bootloaders that load a kernel? FS_xxx ops in libsa is also used to load secondary bootloaders (not a kernel that might require module info) on several ports, including x86, and I guess in that case ioctl or the "fsmod" variable is not necessary as before. (I'm afraid "const char *fsmod" might require some ifdefs) --- Izumi Tsutsui
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: reinoud Date: Mon Apr 25 15:18:15 UTC 2022 Modified Files: src/sbin/fsck_udf: main.c Log Message: Fix endian bug in descriptor CRC length on updating a FE/EFE To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sbin/fsck_udf/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_udf/main.c diff -u src/sbin/fsck_udf/main.c:1.11 src/sbin/fsck_udf/main.c:1.12 --- src/sbin/fsck_udf/main.c:1.11 Sun Apr 24 15:07:08 2022 +++ src/sbin/fsck_udf/main.c Mon Apr 25 15:18:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.11 2022/04/24 15:07:08 reinoud Exp $ */ +/* $NetBSD: main.c,v 1.12 2022/04/25 15:18:15 reinoud Exp $ */ /* * Copyright (c) 2022 Reinoud Zandijk @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: main.c,v 1.11 2022/04/24 15:07:08 reinoud Exp $"); +__RCSID("$NetBSD: main.c,v 1.12 2022/04/25 15:18:15 reinoud Exp $"); #endif /* not lint */ #include @@ -3661,7 +3661,7 @@ udf_node_pass3_writeout_update(struct ud { struct file_entry*fe = NULL; struct extfile_entry *efe = NULL; - int error; + int crc_len, error; vat_writeout = 1; if (udf_rw16(dscr->tag.id) == TAGID_FENTRY) { @@ -3682,7 +3682,8 @@ udf_node_pass3_writeout_update(struct ud } /* fixup CRC length (if needed) */ - dscr->tag.desc_crc_len = udf_tagsize(dscr, 1) - sizeof(struct desc_tag); + crc_len = udf_tagsize(dscr, 1) - sizeof(struct desc_tag); + dscr->tag.desc_crc_len = udf_rw16(crc_len); pwarn("%s : updating node\n", udf_node_path(node)); error = udf_write_dscr_virt(dscr, udf_rw32(node->loc.loc.lb_num),
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: reinoud Date: Mon Apr 25 15:18:15 UTC 2022 Modified Files: src/sbin/fsck_udf: main.c Log Message: Fix endian bug in descriptor CRC length on updating a FE/EFE To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sbin/fsck_udf/main.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/x68k/stand
Module Name:src Committed By: mlelstv Date: Mon Apr 25 15:12:07 UTC 2022 Modified Files: src/sys/arch/x68k/stand/boot: conf.c src/sys/arch/x68k/stand/xxboot: Makefile.xxboot xx.c Log Message: libsa now needs ioctl to support media with large sectors. Provide missing functions. libsa defines files[] array itself, just reference it. This also adds another global variable that tracks the root filesystem module. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/stand/boot/conf.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/xx.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/x68k/stand
Module Name:src Committed By: mlelstv Date: Mon Apr 25 15:12:07 UTC 2022 Modified Files: src/sys/arch/x68k/stand/boot: conf.c src/sys/arch/x68k/stand/xxboot: Makefile.xxboot xx.c Log Message: libsa now needs ioctl to support media with large sectors. Provide missing functions. libsa defines files[] array itself, just reference it. This also adds another global variable that tracks the root filesystem module. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/stand/boot/conf.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/xx.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/x68k/stand/boot/conf.c diff -u src/sys/arch/x68k/stand/boot/conf.c:1.11 src/sys/arch/x68k/stand/boot/conf.c:1.12 --- src/sys/arch/x68k/stand/boot/conf.c:1.11 Sat Jun 25 14:35:58 2016 +++ src/sys/arch/x68k/stand/boot/conf.c Mon Apr 25 15:12:07 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.11 2016/06/25 14:35:58 isaki Exp $ */ +/* $NetBSD: conf.c,v 1.12 2022/04/25 15:12:07 mlelstv Exp $ */ /* * Copyright (c) 2001 Minoura Makoto @@ -84,5 +84,3 @@ struct netif_driver *netif_drivers[] = { }; int n_netif_drivers = sizeof(netif_drivers) / sizeof(netif_drivers[0]); - -struct open_file files[SOPEN_MAX]; Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.19 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.20 --- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.19 Fri Feb 4 06:16:03 2022 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Mon Apr 25 15:12:07 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xxboot,v 1.19 2022/02/04 06:16:03 isaki Exp $ +# $NetBSD: Makefile.xxboot,v 1.20 2022/04/25 15:12:07 mlelstv Exp $ NOMAN= # defined @@ -25,7 +25,7 @@ BINMODE= 444 S= ${.CURDIR}/../../../../.. M= $S/arch/x68k .PATH: ${.CURDIR}/.. -SRCS= boot.S bootmain.c conf.c xx.c +SRCS= boot.S bootmain.c xx.c SRCS+= ashrdi3.S SRCS+= ashldi3.S SRCS+= memcpy.S @@ -65,7 +65,7 @@ CPPFLAGS+= -DLIBSA_NO_RAW_ACCESS CPPFLAGS+= -DLIBSA_NO_TWIDDLE CPPFLAGS+= -DUSTAR_SECT_PER_CYL=30 SRCS+= open.c close.c read.c lseek.c loadfile.c loadfile_aout.c alloc.c -SRCS+= errno.c globals.c +SRCS+= errno.c globals.c files.c SRCS+= $(FS).c SRCS+= ${BOOTSRCS} Index: src/sys/arch/x68k/stand/xxboot/xx.c diff -u src/sys/arch/x68k/stand/xxboot/xx.c:1.4 src/sys/arch/x68k/stand/xxboot/xx.c:1.5 --- src/sys/arch/x68k/stand/xxboot/xx.c:1.4 Sun Aug 16 06:43:43 2020 +++ src/sys/arch/x68k/stand/xxboot/xx.c Mon Apr 25 15:12:07 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: xx.c,v 1.4 2020/08/16 06:43:43 isaki Exp $ */ +/* $NetBSD: xx.c,v 1.5 2022/04/25 15:12:07 mlelstv Exp $ */ /* * Copyright (c) 2010 MINOURA Makoto. @@ -72,3 +72,11 @@ xxstrategy(void *arg, int rw, daddr_t db *rsize = size; return 0; } + +int +xxioctl(struct open_file *f, u_long cmd, void *data) +{ + + return ENOTTY; +} +
CVS commit: src/sys/arch/vax/boot
Module Name:src Committed By: mlelstv Date: Mon Apr 25 15:06:34 UTC 2022 Modified Files: src/sys/arch/vax/boot/boot: rom.c vaxstand.h src/sys/arch/vax/boot/xxboot: bootxx.c Log Message: libsa now needs ioctl support to handle media with large sectors. Provide dummy functions. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/vax/boot/boot/rom.c \ src/sys/arch/vax/boot/boot/vaxstand.h cvs rdiff -u -r1.38 -r1.39 src/sys/arch/vax/boot/xxboot/bootxx.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/vax/boot/boot/rom.c diff -u src/sys/arch/vax/boot/boot/rom.c:1.10 src/sys/arch/vax/boot/boot/rom.c:1.11 --- src/sys/arch/vax/boot/boot/rom.c:1.10 Mon May 22 16:59:32 2017 +++ src/sys/arch/vax/boot/boot/rom.c Mon Apr 25 15:06:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rom.c,v 1.10 2017/05/22 16:59:32 ragge Exp $ */ +/* $NetBSD: rom.c,v 1.11 2022/04/25 15:06:34 mlelstv Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -102,3 +102,8 @@ romstrategy (void *f, int func, daddr_t return 0; } +int +romioctl(struct open_file *f, u_long cmd, void *data) +{ + return ENOTTY; +} Index: src/sys/arch/vax/boot/boot/vaxstand.h diff -u src/sys/arch/vax/boot/boot/vaxstand.h:1.10 src/sys/arch/vax/boot/boot/vaxstand.h:1.11 --- src/sys/arch/vax/boot/boot/vaxstand.h:1.10 Mon Mar 19 15:43:45 2018 +++ src/sys/arch/vax/boot/boot/vaxstand.h Mon Apr 25 15:06:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: vaxstand.h,v 1.10 2018/03/19 15:43:45 ragge Exp $ */ +/* $NetBSD: vaxstand.h,v 1.11 2022/04/25 15:06:34 mlelstv Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -58,7 +58,8 @@ int ctuopen(struct open_file *, int, int int tmscpopen(struct open_file *, int, int, int, int), tmscpstrategy(void *, int, daddr_t, size_t, void *, size_t *); int romopen(struct open_file *, int, int, int, int), - romstrategy(void *, int, daddr_t, size_t, void *, size_t *); + romstrategy(void *, int, daddr_t, size_t, void *, size_t *), + romioctl(struct open_file *, u_long, void *); int mfmopen(struct open_file *, int, int, int, int), mfmstrategy(void *, int, daddr_t, size_t, void *, size_t *); int sdopen(struct open_file *), Index: src/sys/arch/vax/boot/xxboot/bootxx.c diff -u src/sys/arch/vax/boot/xxboot/bootxx.c:1.38 src/sys/arch/vax/boot/xxboot/bootxx.c:1.39 --- src/sys/arch/vax/boot/xxboot/bootxx.c:1.38 Tue May 1 07:03:47 2018 +++ src/sys/arch/vax/boot/xxboot/bootxx.c Mon Apr 25 15:06:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.38 2018/05/01 07:03:47 ragge Exp $ */ +/* $NetBSD: bootxx.c,v 1.39 2022/04/25 15:06:34 mlelstv Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -298,6 +298,12 @@ romstrategy(void *sc, int func, daddr_t return 0; } +int +romioctl(struct open_file *f, u_long cmd, void *data) +{ + return ENOTTY; +} + /* * The 11/750 boot ROM for Massbus disks doesn't seen to have layout info * for all RP disks (not RP07 at least) so therefore a very small and dumb
CVS commit: src/sys/arch/vax/boot
Module Name:src Committed By: mlelstv Date: Mon Apr 25 15:06:34 UTC 2022 Modified Files: src/sys/arch/vax/boot/boot: rom.c vaxstand.h src/sys/arch/vax/boot/xxboot: bootxx.c Log Message: libsa now needs ioctl support to handle media with large sectors. Provide dummy functions. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/vax/boot/boot/rom.c \ src/sys/arch/vax/boot/boot/vaxstand.h cvs rdiff -u -r1.38 -r1.39 src/sys/arch/vax/boot/xxboot/bootxx.c 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/amiga/stand/bootblock/elf2bb
On 2022/04/25 23:03, Rin Okuyama wrote: Module Name:src Committed By: rin Date: Mon Apr 25 14:03:15 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c elf2bb.c Log Message: Use htobe{16,32}(9) instead of be{16,32}toh(9) where appropriate. No binary changes both for little and big endian machines. Oops, "be{16,32}toh(3) instead of htobe{16,32}(3)", apparently... Thanks, rin
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:46:38 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: static-ify function bodies of usage() and eval(). No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb/elf2bb.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.26 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.27 --- src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.26 Mon Apr 25 14:39:30 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c Mon Apr 25 14:46:38 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2bb.c,v 1.26 2022/04/25 14:39:30 rin Exp $ */ +/* $NetBSD: elf2bb.c,v 1.27 2022/04/25 14:46:38 rin Exp $ */ /*- * Copyright (c) 1996,2006 The NetBSD Foundation, Inc. @@ -466,7 +466,7 @@ main(int argc, char *argv[]) exit(0); } -void +static void usage(void) { fprintf(stderr, "Usage: %s [-F] bootprog bootprog.bin\n", @@ -475,7 +475,7 @@ usage(void) /* NOTREACHED */ } -int +static int eval(Elf32_Sym *s, uint32_t *o) { int value;
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:46:38 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: static-ify function bodies of usage() and eval(). No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:45:26 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c Log Message: One more style... No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.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/amiga/stand/bootblock/elf2bb/chksum.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.8 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.9 --- src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.8 Mon Apr 25 14:39:30 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c Mon Apr 25 14:45:26 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: chksum.c,v 1.8 2022/04/25 14:39:30 rin Exp $ */ +/* $NetBSD: chksum.c,v 1.9 2022/04/25 14:45:26 rin Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ main(int argc, char *argb[]) { uint32_t cks, cks1; bbsize = atol(argb[1]); - bbsize *= (512 / sizeof (uint32_t)); + bbsize *= (512 / sizeof(uint32_t)); if (4 * bbsize != read(0, myblock, sizeof(uint32_t) * bbsize)) { fprintf(stderr, "short read\n");
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:45:26 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c Log Message: One more style... No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.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/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:39:30 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c elf2bb.c Log Message: Wrap looong lines, and misc style/cosmetic fixes. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb/chksum.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.7 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.8 --- src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.7 Mon Apr 25 14:03:15 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c Mon Apr 25 14:39:30 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: chksum.c,v 1.7 2022/04/25 14:03:15 rin Exp $ */ +/* $NetBSD: chksum.c,v 1.8 2022/04/25 14:39:30 rin Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -65,17 +65,17 @@ main(int argc, char *argb[]) { int bbsize; uint32_t cks, cks1; - bbsize=atol(argb[1]); + bbsize = atol(argb[1]); bbsize *= (512 / sizeof (uint32_t)); - if (4*bbsize != read(0, myblock, sizeof(uint32_t)*bbsize)) { + if (4 * bbsize != read(0, myblock, sizeof(uint32_t) * bbsize)) { fprintf(stderr, "short read\n"); exit(1); } fprintf(stderr, "Cksum field = 0x%x, ", myblock[1]); cks = chksum(myblock, bbsize); fprintf(stderr, "cksum = 0x%x\n", cks); - myblock[1] += 0x - cks; + myblock[1] += 0x - cks; fprintf(stderr, "New cksum field = 0x%x, ", myblock[1]); cks1 = chksum(myblock, bbsize); fprintf(stderr, "cksum = 0x%x\n", cks1); Index: src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.25 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.26 --- src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.25 Mon Apr 25 14:36:47 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c Mon Apr 25 14:39:30 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2bb.c,v 1.25 2022/04/25 14:36:47 rin Exp $ */ +/* $NetBSD: elf2bb.c,v 1.26 2022/04/25 14:39:30 rin Exp $ */ /*- * Copyright (c) 1996,2006 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ char *progname; int bbsize = BBSIZE; uint8_t *buffer; uint32_t *relbuf; - /* can't have more relocs than that*/ + /* can't have more relocs than that */ static int intcmp(const void *i, const void *j) @@ -85,7 +85,7 @@ intcmp(const void *i, const void *j) r = (*(uint32_t *)i) < (*(uint32_t *)j); - return 2*r-1; + return 2 * r - 1; } int @@ -146,7 +146,8 @@ main(int argc, char *argv[]) eh = (Elf32_Ehdr *)image; /* XXX endianness */ - dprintf(("%04x sections, offset %08x\n", be16toh(eh->e_shnum), be32toh(eh->e_shoff))); + dprintf(("%04x sections, offset %08x\n", be16toh(eh->e_shnum), + be32toh(eh->e_shoff))); if (be16toh(eh->e_type) != ET_REL) errx(1, "%s isn't a relocatable file, type=%d", argv[0], be16toh(eh->e_type)); @@ -157,22 +158,27 @@ main(int argc, char *argv[]) /* Calculate sizes from section headers. */ tsz = dsz = bsz = trsz = 0; sh = (Elf32_Shdr *)(image + be32toh(eh->e_shoff)); - shstrtab = (char *)(image + be32toh(sh[be16toh(eh->e_shstrndx)].sh_offset)); - symtab = NULL; /*XXX*/ - strtab = NULL; /*XXX*/ - dprintf(("name type flagsaddr offset size align\n")); + shstrtab = (char *)(image + + be32toh(sh[be16toh(eh->e_shstrndx)].sh_offset)); + symtab = NULL; /* XXX */ + strtab = NULL; /* XXX */ + dprintf(("name type flags" + "addr offset size align\n")); for (i = 0; i < be16toh(eh->e_shnum); ++i) { uint32_t sh_size; - dprintf( ("%2d: %08x %-16s %08x %08x %08x %08x %08x %08x\n", i, + dprintf(("%2d: %08x %-16s %08x %08x %08x %08x %08x %08x\n", i, be32toh(sh[i].sh_name), shstrtab + be32toh(sh[i].sh_name), - be32toh(sh[i].sh_type), - be32toh(sh[i].sh_flags), be32toh(sh[i].sh_addr), - be32toh(sh[i].sh_offset), be32toh(sh[i].sh_size), - be32toh(sh[i].sh_addralign))); - sh_size = (be32toh(sh[i].sh_size) + be32toh(sh[i].sh_addralign) - 1) & - - be32toh(sh[i].sh_addralign); - /* If section allocates memory, add to text, data, or bss size. */ + be32toh(sh[i].sh_type), be32toh(sh[i].sh_flags), + be32toh(sh[i].sh_addr), be32toh(sh[i].sh_offset), + be32toh(sh[i].sh_size), be32toh(sh[i].sh_addralign))); + sh_size = (be32toh(sh[i].sh_size) + + be32toh(sh[i].sh_addralign) - 1) & + (- be32toh(sh[i].sh_addralign)); + /* + * If section allocates memory, add to text, data, + * or bss size. + */ if (be32toh(sh[i].sh_flags) & SHF_ALLOC) { if (be32toh(sh[i].sh_type) == SHT_PROGBITS) { if (be32toh(sh[i].sh_flags) & SHF_WRITE) @@ -188,8 +194,10 @@ main(int argc, char
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:39:30 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c elf2bb.c Log Message: Wrap looong lines, and misc style/cosmetic fixes. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:36:47 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: Do not cast return value from malloc(3). No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb/elf2bb.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.24 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.25 --- src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.24 Mon Apr 25 14:10:15 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c Mon Apr 25 14:36:47 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2bb.c,v 1.24 2022/04/25 14:10:15 rin Exp $ */ +/* $NetBSD: elf2bb.c,v 1.25 2022/04/25 14:36:47 rin Exp $ */ /*- * Copyright (c) 1996,2006 The NetBSD Foundation, Inc. @@ -243,7 +243,7 @@ retry: memset(buffer, 0, bbsize); /* Allocate and load loadable sections */ - sect_offset = (uint32_t *)malloc(be16toh(eh->e_shnum) * sizeof(uint32_t)); + sect_offset = malloc(be16toh(eh->e_shnum) * sizeof(uint32_t)); for (i = 0, l = 0; i < be16toh(eh->e_shnum); ++i) { if (be32toh(sh[i].sh_flags) & SHF_ALLOC) { dprintf(("vaddr 0x%04x size 0x%04x offset 0x%04x section %s\n",
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:36:47 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: Do not cast return value from malloc(3). No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:10:15 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: - static-ify usage(), intcmp(), and eval() - remove prototype declaration for main() NFCI; no binary changes observed for amd64 with -O0. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb/elf2bb.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.23 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.24 --- src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.23 Mon Apr 25 14:03:15 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c Mon Apr 25 14:10:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2bb.c,v 1.23 2022/04/25 14:03:15 rin Exp $ */ +/* $NetBSD: elf2bb.c,v 1.24 2022/04/25 14:10:15 rin Exp $ */ /*- * Copyright (c) 1996,2006 The NetBSD Foundation, Inc. @@ -59,9 +59,9 @@ #include "elf2bb.h" #include "chksum.h" -void usage(void); -int intcmp(const void *, const void *); -int main(int argc, char *argv[]); +static void usage(void); +static int intcmp(const void *, const void *); +static int eval(Elf32_Sym *, uint32_t *); #ifdef DEBUG #define dprintf(x) if (debug) printf x @@ -78,7 +78,7 @@ uint8_t *buffer; uint32_t *relbuf; /* can't have more relocs than that*/ -int +static int intcmp(const void *i, const void *j) { int r; @@ -98,7 +98,6 @@ main(int argc, char *argv[]) char *shstrtab; Elf32_Sym *symtab; char *strtab; - int eval(Elf32_Sym *, uint32_t *); uint32_t *lptr; int i, l, delta; uint8_t *rpo;
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:10:15 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c Log Message: - static-ify usage(), intcmp(), and eval() - remove prototype declaration for main() NFCI; no binary changes observed for amd64 with -O0. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:03:15 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c elf2bb.c Log Message: Use htobe{16,32}(9) instead of be{16,32}toh(9) where appropriate. No binary changes both for little and big endian machines. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb/chksum.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.6 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.7 --- src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.6 Mon Apr 25 13:43:50 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c Mon Apr 25 14:03:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: chksum.c,v 1.6 2022/04/25 13:43:50 rin Exp $ */ +/* $NetBSD: chksum.c,v 1.7 2022/04/25 14:03:15 rin Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -49,7 +49,7 @@ chksum(uint32_t *block, int size) for (i=0; ie_shnum), htobe32(eh->e_shoff))); - if (htobe16(eh->e_type) != ET_REL) + dprintf(("%04x sections, offset %08x\n", be16toh(eh->e_shnum), be32toh(eh->e_shoff))); + if (be16toh(eh->e_type) != ET_REL) errx(1, "%s isn't a relocatable file, type=%d", - argv[0], htobe16(eh->e_type)); - if (htobe16(eh->e_machine) != EM_68K) + argv[0], be16toh(eh->e_type)); + if (be16toh(eh->e_machine) != EM_68K) errx(1, "%s isn't M68K, machine=%d", argv[0], - htobe16(eh->e_machine)); + be16toh(eh->e_machine)); /* Calculate sizes from section headers. */ tsz = dsz = bsz = trsz = 0; - sh = (Elf32_Shdr *)(image + htobe32(eh->e_shoff)); - shstrtab = (char *)(image + htobe32(sh[htobe16(eh->e_shstrndx)].sh_offset)); + sh = (Elf32_Shdr *)(image + be32toh(eh->e_shoff)); + shstrtab = (char *)(image + be32toh(sh[be16toh(eh->e_shstrndx)].sh_offset)); symtab = NULL; /*XXX*/ strtab = NULL; /*XXX*/ dprintf(("name type flagsaddr offset size align\n")); - for (i = 0; i < htobe16(eh->e_shnum); ++i) { + for (i = 0; i < be16toh(eh->e_shnum); ++i) { uint32_t sh_size; dprintf( ("%2d: %08x %-16s %08x %08x %08x %08x %08x %08x\n", i, - htobe32(sh[i].sh_name), shstrtab + htobe32(sh[i].sh_name), - htobe32(sh[i].sh_type), - htobe32(sh[i].sh_flags), htobe32(sh[i].sh_addr), - htobe32(sh[i].sh_offset), htobe32(sh[i].sh_size), - htobe32(sh[i].sh_addralign))); - sh_size = (htobe32(sh[i].sh_size) + htobe32(sh[i].sh_addralign) - 1) & - -htobe32(sh[i].sh_addralign); + be32toh(sh[i].sh_name), shstrtab + be32toh(sh[i].sh_name), + be32toh(sh[i].sh_type), + be32toh(sh[i].sh_flags), be32toh(sh[i].sh_addr), + be32toh(sh[i].sh_offset), be32toh(sh[i].sh_size), + be32toh(sh[i].sh_addralign))); + sh_size = (be32toh(sh[i].sh_size) + be32toh(sh[i].sh_addralign) - 1) & + - be32toh(sh[i].sh_addralign); /* If section allocates memory, add to text, data, or bss size. */ - if (htobe32(sh[i].sh_flags) & SHF_ALLOC) { - if (htobe32(sh[i].sh_type) == SHT_PROGBITS) { -if (htobe32(sh[i].sh_flags) & SHF_WRITE) + if (be32toh(sh[i].sh_flags) & SHF_ALLOC) { + if (be32toh(sh[i].sh_type) == SHT_PROGBITS) { +if (be32toh(sh[i].sh_flags) & SHF_WRITE) dsz += sh_size; else tsz += sh_size; } else bsz += sh_size; /* If it's relocations, add to relocation count */ - } else if (htobe32(sh[i].sh_type) == SHT_RELA) { - trsz += htobe32(sh[i].sh_size); + } else if (be32toh(sh[i].sh_type) == SHT_RELA) { + trsz += be32toh(sh[i].sh_size); } /* Check for SHT_REL? */ /* Get symbol table location. */ - else if (htobe32(sh[i].sh_type) == SHT_SYMTAB) { - symtab = (Elf32_Sym *)(image + htobe32(sh[i].sh_offset)); - } else if (strcmp(".strtab", shstrtab + htobe32(sh[i].sh_name)) == 0) { - strtab = image + htobe32(sh[i].sh_offset); + else if (be32toh(sh[i].sh_type) == SHT_SYMTAB) { + symtab = (Elf32_Sym *)(image + be32toh(sh[i].sh_offset)); + } else if (strcmp(".strtab", shstrtab + be32toh(sh[i].sh_name)) == 0) { + strtab = image + be32toh(sh[i].sh_offset); } } dprintf(("tsz = 0x%x, dsz = 0x%x, bsz = 0x%x, total 0x%x\n", @@ -244,18 +244,18 @@ retry: memset(buffer, 0, bbsize); /* Allocate and load loadable sections */ - sect_offset = (uint32_t *)malloc(htobe16(eh->e_shnum) * sizeof(uint32_t)); - for (i = 0, l = 0; i < htobe16(eh->e_shnum); ++i) { - if (htobe32(sh[i].sh_flags) & SHF_ALLOC) { + sect_offset = (uint32_t *)malloc(be16toh(eh->e_shnum) * sizeof(uint32_t)); + for (i = 0, l = 0; i < be16toh(eh->e_shnum); ++i) { + if (be32toh(sh[i].sh_flags) & SHF_ALLOC) { dprintf(("vaddr 0x%04x size 0x%04x offset 0x%04x section %s\n", - l, htobe32(sh[i].sh_size),
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 14:03:15 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c elf2bb.c Log Message: Use htobe{16,32}(9) instead of be{16,32}toh(9) where appropriate. No binary changes both for little and big endian machines. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 13:43:50 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c chksum.h elf2bb.c Log Message: u_intN_t --> uintN_t No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/elf2bb/chksum.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.5 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.6 --- src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c:1.5 Sat Mar 14 15:36:01 2009 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c Mon Apr 25 13:43:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: chksum.c,v 1.5 2009/03/14 15:36:01 dsl Exp $ */ +/* $NetBSD: chksum.c,v 1.6 2022/04/25 13:43:50 rin Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -39,10 +39,10 @@ #include "chksum.h" -u_int32_t -chksum(u_int32_t *block, int size) +uint32_t +chksum(uint32_t *block, int size) { - u_int32_t sum, lastsum; + uint32_t sum, lastsum; int i; sum = 0; @@ -58,17 +58,17 @@ chksum(u_int32_t *block, int size) } #ifdef TESTSUM -u_int32_t myblock[8192]; +uint32_t myblock[8192]; int main(int argc, char *argb[]) { int bbsize; - u_int32_t cks, cks1; + uint32_t cks, cks1; bbsize=atol(argb[1]); - bbsize *= (512 / sizeof (u_int32_t)); + bbsize *= (512 / sizeof (uint32_t)); - if (4*bbsize != read(0, myblock, sizeof(u_int32_t)*bbsize)) { + if (4*bbsize != read(0, myblock, sizeof(uint32_t)*bbsize)) { fprintf(stderr, "short read\n"); exit(1); } Index: src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.h diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.h:1.3 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.h:1.4 --- src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.h:1.3 Mon Apr 28 20:23:13 2008 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.h Mon Apr 25 13:43:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: chksum.h,v 1.3 2008/04/28 20:23:13 martin Exp $ */ +/* $NetBSD: chksum.h,v 1.4 2022/04/25 13:43:50 rin Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -31,5 +31,5 @@ #define CHKSUMOFFS 1 -u_int32_t chksum(u_int32_t *, int); +uint32_t chksum(uint32_t *, int); Index: src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.21 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.22 --- src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.21 Fri Feb 18 06:42:59 2022 +++ src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c Mon Apr 25 13:43:50 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2bb.c,v 1.21 2022/02/18 06:42:59 mlelstv Exp $ */ +/* $NetBSD: elf2bb.c,v 1.22 2022/04/25 13:43:50 rin Exp $ */ /*- * Copyright (c) 1996,2006 The NetBSD Foundation, Inc. @@ -74,8 +74,8 @@ int debug; char *progname; int bbsize = BBSIZE; -u_int8_t *buffer; -u_int32_t *relbuf; +uint8_t *buffer; +uint32_t *relbuf; /* can't have more relocs than that*/ int @@ -83,7 +83,7 @@ intcmp(const void *i, const void *j) { int r; - r = (*(u_int32_t *)i) < (*(u_int32_t *)j); + r = (*(uint32_t *)i) < (*(uint32_t *)j); return 2*r-1; } @@ -98,16 +98,16 @@ main(int argc, char *argv[]) char *shstrtab; Elf32_Sym *symtab; char *strtab; - int eval(Elf32_Sym *, u_int32_t *); - u_int32_t *lptr; + int eval(Elf32_Sym *, uint32_t *); + uint32_t *lptr; int i, l, delta; - u_int8_t *rpo; - u_int32_t oldaddr, addrdiff; - u_int32_t tsz, dsz, bsz, trsz, relver; - u_int32_t pcrelsz, r32sz; + uint8_t *rpo; + uint32_t oldaddr, addrdiff; + uint32_t tsz, dsz, bsz, trsz, relver; + uint32_t pcrelsz, r32sz; int sumsize = 16; int c; - u_int32_t *sect_offset; + uint32_t *sect_offset; int undefsyms; uint32_t tmp32; uint16_t tmp16; @@ -163,7 +163,7 @@ main(int argc, char *argv[]) strtab = NULL; /*XXX*/ dprintf(("name type flagsaddr offset size align\n")); for (i = 0; i < htobe16(eh->e_shnum); ++i) { - u_int32_t sh_size; + uint32_t sh_size; dprintf( ("%2d: %08x %-16s %08x %08x %08x %08x %08x %08x\n", i, htobe32(sh[i].sh_name), shstrtab + htobe32(sh[i].sh_name), @@ -244,7 +244,7 @@ retry: memset(buffer, 0, bbsize); /* Allocate and load loadable sections */ - sect_offset = (u_int32_t *)malloc(htobe16(eh->e_shnum) * sizeof(u_int32_t)); + sect_offset = (uint32_t *)malloc(htobe16(eh->e_shnum) * sizeof(uint32_t)); for (i = 0, l = 0; i < htobe16(eh->e_shnum); ++i) { if (htobe32(sh[i].sh_flags) & SHF_ALLOC) { dprintf(("vaddr 0x%04x size 0x%04x offset 0x%04x section %s\n", @@ -264,7 +264,7 @@ retry: * relocator version. For now, check that the relocator at * the image
CVS commit: src/sys/arch/amiga/stand/bootblock/elf2bb
Module Name:src Committed By: rin Date: Mon Apr 25 13:43:50 UTC 2022 Modified Files: src/sys/arch/amiga/stand/bootblock/elf2bb: chksum.c chksum.h elf2bb.c Log Message: u_intN_t --> uintN_t No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/stand/bootblock/elf2bb/chksum.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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: Mon Apr 25 12:39:27 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1439 To generate a diff of this commit: cvs rdiff -u -r1.1.2.85 -r1.1.2.86 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/doc
Module Name:src Committed By: martin Date: Mon Apr 25 12:39:27 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1439 To generate a diff of this commit: cvs rdiff -u -r1.1.2.85 -r1.1.2.86 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.85 src/doc/CHANGES-9.3:1.1.2.86 --- src/doc/CHANGES-9.3:1.1.2.85 Sun Apr 24 16:39:56 2022 +++ src/doc/CHANGES-9.3 Mon Apr 25 12:39:27 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.3,v 1.1.2.85 2022/04/24 16:39:56 martin Exp $ +# $NetBSD: CHANGES-9.3,v 1.1.2.86 2022/04/25 12:39:27 martin Exp $ A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3 release: @@ -1548,3 +1548,8 @@ sys/fs/udf/udf_subr.c1.169 PR 56801: implement support for mounting UDF in compat32. [reinoud, ticket #1438] +xsrc/external/mit/xinit/dist/startx.cpp 1.9 + + Do not attempt to trap SIGKILL. + [nia, ticket #1439] +
CVS commit: [netbsd-9] xsrc/external/mit/xinit/dist
Module Name:xsrc Committed By: martin Date: Mon Apr 25 12:38:38 UTC 2022 Modified Files: xsrc/external/mit/xinit/dist [netbsd-9]: startx.cpp Log Message: Pull up following revision(s) (requested by nia in ticket #1439): xsrc/external/mit/xinit/dist/startx.cpp: revision 1.9 Do not attempt to trap SIGKILL To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.2.1 xsrc/external/mit/xinit/dist/startx.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xinit/dist/startx.cpp diff -u xsrc/external/mit/xinit/dist/startx.cpp:1.8 xsrc/external/mit/xinit/dist/startx.cpp:1.8.2.1 --- xsrc/external/mit/xinit/dist/startx.cpp:1.8 Sun Mar 11 10:46:02 2018 +++ xsrc/external/mit/xinit/dist/startx.cpp Mon Apr 25 12:38:38 2022 @@ -282,7 +282,7 @@ if [ x"$enable_xauth" = x1 ] ; then XCOMM create a file with auth information for the server. ':0' is a dummy. xserverauthfile=$HOME/.serverauth.$$ -trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM +trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP BUS TERM xauth -q -f "$xserverauthfile" << EOF add :$dummy . $mcookie EOF
CVS commit: [netbsd-9] xsrc/external/mit/xinit/dist
Module Name:xsrc Committed By: martin Date: Mon Apr 25 12:38:38 UTC 2022 Modified Files: xsrc/external/mit/xinit/dist [netbsd-9]: startx.cpp Log Message: Pull up following revision(s) (requested by nia in ticket #1439): xsrc/external/mit/xinit/dist/startx.cpp: revision 1.9 Do not attempt to trap SIGKILL To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.2.1 xsrc/external/mit/xinit/dist/startx.cpp 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/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:57:23 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixv.c Log Message: Add missing num_{tx,rx}_desc sysctl to sync with ixgbe.c. To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.179 src/sys/dev/pci/ixgbe/ixv.c:1.180 --- src/sys/dev/pci/ixgbe/ixv.c:1.179 Mon Apr 25 07:54:42 2022 +++ src/sys/dev/pci/ixgbe/ixv.c Mon Apr 25 07:57:23 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixv.c,v 1.179 2022/04/25 07:54:42 msaitoh Exp $ */ +/* $NetBSD: ixv.c,v 1.180 2022/04/25 07:57:23 msaitoh Exp $ */ /** @@ -35,7 +35,7 @@ /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/ #include -__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.179 2022/04/25 07:54:42 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.180 2022/04/25 07:57:23 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2563,6 +2563,18 @@ ixv_add_device_sysctls(struct adapter *a aprint_error_dev(dev, "could not create sysctl\n"); if (sysctl_createv(log, 0, , , + CTLFLAG_READONLY, CTLTYPE_INT, + "num_tx_desc", SYSCTL_DESCR("Number of TX descriptors"), + NULL, 0, >num_tx_desc, 0, CTL_CREATE, CTL_EOL) != 0) + aprint_error_dev(dev, "could not create sysctl\n"); + + if (sysctl_createv(log, 0, , , + CTLFLAG_READONLY, CTLTYPE_INT, + "num_rx_desc", SYSCTL_DESCR("Number of RX descriptors"), + NULL, 0, >num_rx_desc, 0, CTL_CREATE, CTL_EOL) != 0) + aprint_error_dev(dev, "could not create sysctl\n"); + + if (sysctl_createv(log, 0, , , CTLFLAG_READWRITE, CTLTYPE_INT, "rx_process_limit", SYSCTL_DESCR("max number of RX packets to process"), ixv_sysctl_rx_process_limit, 0, (void *)adapter, 0, CTL_CREATE,
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:57:23 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixv.c Log Message: Add missing num_{tx,rx}_desc sysctl to sync with ixgbe.c. To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/sys/dev/pci/ixgbe/ixv.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/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:56:47 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Add missing num_tx_desc sysctl. To generate a diff of this commit: cvs rdiff -u -r1.313 -r1.314 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.313 src/sys/dev/pci/ixgbe/ixgbe.c:1.314 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.313 Mon Apr 25 07:54:42 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.c Mon Apr 25 07:56:47 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.313 2022/04/25 07:54:42 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.314 2022/04/25 07:56:47 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.313 2022/04/25 07:54:42 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.314 2022/04/25 07:56:47 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -3430,7 +3430,13 @@ ixgbe_add_device_sysctls(struct adapter if (sysctl_createv(log, 0, , , CTLFLAG_READONLY, CTLTYPE_INT, - "num_rx_desc", SYSCTL_DESCR("Number of rx descriptors"), + "num_tx_desc", SYSCTL_DESCR("Number of TX descriptors"), + NULL, 0, >num_tx_desc, 0, CTL_CREATE, CTL_EOL) != 0) + aprint_error_dev(dev, "could not create sysctl\n"); + + if (sysctl_createv(log, 0, , , + CTLFLAG_READONLY, CTLTYPE_INT, + "num_rx_desc", SYSCTL_DESCR("Number of RX descriptors"), NULL, 0, >num_rx_desc, 0, CTL_CREATE, CTL_EOL) != 0) aprint_error_dev(dev, "could not create sysctl\n");
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:56:47 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Add missing num_tx_desc sysctl. To generate a diff of this commit: cvs rdiff -u -r1.313 -r1.314 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:54:43 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixv.c Log Message: Limit {tx,rx}_process_limit sysctl values from 1 to num_{tx,rx}_desc. To generate a diff of this commit: cvs rdiff -u -r1.312 -r1.313 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.178 -r1.179 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.312 src/sys/dev/pci/ixgbe/ixgbe.c:1.313 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.312 Thu Mar 10 04:14:34 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.c Mon Apr 25 07:54:42 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.312 2022/03/10 04:14:34 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.313 2022/04/25 07:54:42 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.312 2022/03/10 04:14:34 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.313 2022/04/25 07:54:42 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -238,8 +238,6 @@ static int ixgbe_set_advertise(struct ad static int ixgbe_get_default_advertise(struct adapter *); /* Sysctl handlers */ -static void ixgbe_set_sysctl_value(struct adapter *, const char *, - const char *, int *, int); static int ixgbe_sysctl_flowcntl(SYSCTLFN_PROTO); static int ixgbe_sysctl_advertise(SYSCTLFN_PROTO); static int ixgbe_sysctl_interrupt_rate_handler(SYSCTLFN_PROTO); @@ -259,6 +257,8 @@ static int ixgbe_sysctl_tdh_handler(SYSC static int ixgbe_sysctl_eee_state(SYSCTLFN_PROTO); static int ixgbe_sysctl_debug(SYSCTLFN_PROTO); static int ixgbe_sysctl_rx_copy_len(SYSCTLFN_PROTO); +static int ixgbe_sysctl_tx_process_limit(SYSCTLFN_PROTO); +static int ixgbe_sysctl_rx_process_limit(SYSCTLFN_PROTO); static int ixgbe_sysctl_wol_enable(SYSCTLFN_PROTO); static int ixgbe_sysctl_wufc(SYSCTLFN_PROTO); @@ -963,15 +963,6 @@ ixgbe_attach(device_t parent, device_t d /* Set an initial default flow control value */ hw->fc.requested_mode = ixgbe_flow_control; - /* Sysctls for limiting the amount of work done in the taskqueues */ - ixgbe_set_sysctl_value(adapter, "rx_processing_limit", - "max number of rx packets to process", - >rx_process_limit, ixgbe_rx_process_limit); - - ixgbe_set_sysctl_value(adapter, "tx_processing_limit", - "max number of tx packets to process", - >tx_process_limit, ixgbe_tx_process_limit); - /* Do descriptor calc and sanity checks */ if (((ixgbe_txd * sizeof(union ixgbe_adv_tx_desc)) % DBA_ALIGN) != 0 || ixgbe_txd < MIN_TXD || ixgbe_txd > MAX_TXD) { @@ -987,6 +978,14 @@ ixgbe_attach(device_t parent, device_t d } else adapter->num_rx_desc = ixgbe_rxd; + /* Sysctls for limiting the amount of work done in the taskqueues */ + adapter->rx_process_limit + = (ixgbe_rx_process_limit <= adapter->num_rx_desc) + ? ixgbe_rx_process_limit : adapter->num_rx_desc; + adapter->tx_process_limit + = (ixgbe_tx_process_limit <= adapter->num_tx_desc) + ? ixgbe_tx_process_limit : adapter->num_tx_desc; + /* Set default high limit of copying mbuf in rxeof */ adapter->rx_copy_len = IXGBE_RX_COPY_LEN_MAX; @@ -3436,6 +3435,20 @@ ixgbe_add_device_sysctls(struct adapter aprint_error_dev(dev, "could not create sysctl\n"); if (sysctl_createv(log, 0, , , + CTLFLAG_READWRITE, CTLTYPE_INT, "rx_process_limit", + SYSCTL_DESCR("max number of RX packets to process"), + ixgbe_sysctl_rx_process_limit, 0, (void *)adapter, 0, CTL_CREATE, + CTL_EOL) != 0) + aprint_error_dev(dev, "could not create sysctl\n"); + + if (sysctl_createv(log, 0, , , + CTLFLAG_READWRITE, CTLTYPE_INT, "tx_process_limit", + SYSCTL_DESCR("max number of TX packets to process"), + ixgbe_sysctl_tx_process_limit, 0, (void *)adapter, 0, CTL_CREATE, + CTL_EOL) != 0) + aprint_error_dev(dev, "could not create sysctl\n"); + + if (sysctl_createv(log, 0, , , CTLFLAG_READONLY, CTLTYPE_INT, "num_queues", SYSCTL_DESCR("Number of queues"), NULL, 0, >num_queues, 0, CTL_CREATE, CTL_EOL) != 0) @@ -5381,35 +5394,6 @@ ixgbe_free_pci_resources(struct adapter } /* ixgbe_free_pci_resources */ / - * ixgbe_set_sysctl_value - / -static void -ixgbe_set_sysctl_value(struct adapter *adapter, const char *name, -const char *description, int *limit, int value) -{ - device_t dev = adapter->dev; - struct sysctllog **log; - const struct sysctlnode *rnode, *cnode; - - /* - * It's not required to check recovery mode because this function never - * touches hardware. - */ - - log = >sysctllog; - if ((rnode = ixgbe_sysctl_instance(adapter)) == NULL) { - aprint_error_dev(dev,
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:54:43 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c ixv.c Log Message: Limit {tx,rx}_process_limit sysctl values from 1 to num_{tx,rx}_desc. To generate a diff of this commit: cvs rdiff -u -r1.312 -r1.313 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.178 -r1.179 src/sys/dev/pci/ixgbe/ixv.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/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:51:12 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Use cached rx_copy_len in ixgbe_rxeof(). To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/ixgbe/ix_txrx.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/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.96 src/sys/dev/pci/ixgbe/ix_txrx.c:1.97 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.96 Mon Apr 25 07:48:53 2022 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Mon Apr 25 07:51:12 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.96 2022/04/25 07:48:53 msaitoh Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.97 2022/04/25 07:51:12 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.96 2022/04/25 07:48:53 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.97 2022/04/25 07:51:12 msaitoh Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -1806,6 +1806,7 @@ ixgbe_rxeof(struct ix_queue *que) u32 staterr = 0; u32 loopcount = 0, numdesc; u32 limit = adapter->rx_process_limit; + u32 rx_copy_len = adapter->rx_copy_len; bool discard_multidesc = rxr->discard_multidesc; bool wraparound = false; unsigned int syncremain; @@ -1916,7 +1917,7 @@ ixgbe_rxeof(struct ix_queue *que) /* Pre-alloc new mbuf. */ if ((rbuf->fmp == NULL) && - eop && (len <= adapter->rx_copy_len)) { + eop && (len <= rx_copy_len)) { /* For short packet. See below. */ sendmp = m_gethdr(M_NOWAIT, MT_DATA); if (__predict_false(sendmp == NULL)) { @@ -2022,7 +2023,7 @@ ixgbe_rxeof(struct ix_queue *que) * packet. */ - if (eop && (len <= adapter->rx_copy_len)) { + if (eop && (len <= rx_copy_len)) { /* * Optimize. This might be a small packet, may * be just a TCP ACK. Copy into a new mbuf, and
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:51:12 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Use cached rx_copy_len in ixgbe_rxeof(). To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/ixgbe/ix_txrx.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/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:48:53 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Modify comment for consistency. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/dev/pci/ixgbe/ix_txrx.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/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.95 src/sys/dev/pci/ixgbe/ix_txrx.c:1.96 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.95 Tue Jan 25 01:56:22 2022 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Mon Apr 25 07:48:53 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.95 2022/01/25 01:56:22 msaitoh Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.96 2022/04/25 07:48:53 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.95 2022/01/25 01:56:22 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.96 2022/04/25 07:48:53 msaitoh Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -2034,7 +2034,7 @@ ixgbe_rxeof(struct ix_queue *que) IXGBE_EVC_ADD(>rx_copies, 1); rbuf->flags |= IXGBE_RX_COPY; } else { -/* Non short packet */ +/* For long packet */ /* Update new (used in future) mbuf */ newmp->m_pkthdr.len = newmp->m_len
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Mon Apr 25 07:48:53 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Modify comment for consistency. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/dev/pci/ixgbe/ix_txrx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.