CVS commit: src/sys/arch/arm/at91
Module Name:src Committed By: skrll Date: Thu Nov 4 06:57:51 UTC 2021 Modified Files: src/sys/arch/arm/at91: at91emac.c Log Message: Remove unnecessary duplicate bit define in mask PR port-arm/50687 To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/at91/at91emac.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/arm/at91
Module Name:src Committed By: skrll Date: Thu Nov 4 06:57:51 UTC 2021 Modified Files: src/sys/arch/arm/at91: at91emac.c Log Message: Remove unnecessary duplicate bit define in mask PR port-arm/50687 To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/at91/at91emac.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/at91/at91emac.c diff -u src/sys/arch/arm/at91/at91emac.c:1.32 src/sys/arch/arm/at91/at91emac.c:1.33 --- src/sys/arch/arm/at91/at91emac.c:1.32 Wed Feb 19 02:51:54 2020 +++ src/sys/arch/arm/at91/at91emac.c Thu Nov 4 06:57:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: at91emac.c,v 1.32 2020/02/19 02:51:54 thorpej Exp $ */ +/* $NetBSD: at91emac.c,v 1.33 2021/11/04 06:57:51 skrll Exp $ */ /* * Copyright (c) 2007 Embedtronics Oy @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.32 2020/02/19 02:51:54 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.33 2021/11/04 06:57:51 skrll Exp $"); #include #include @@ -774,7 +774,7 @@ emac_setaddr(struct ifnet *ifp) /* disable receiver temporarily */ EMAC_WRITE(ETH_CTL, ctl & ~ETH_CTL_RE); - cfg &= ~(ETH_CFG_MTI | ETH_CFG_UNI | ETH_CFG_CAF | ETH_CFG_UNI); + cfg &= ~(ETH_CFG_MTI | ETH_CFG_UNI | ETH_CFG_CAF); if (ifp->if_flags & IFF_PROMISC) { cfg |= ETH_CFG_CAF;
CVS commit: src/usr.bin/indent
Module Name:src Committed By: rillig Date: Thu Nov 4 00:13:57 UTC 2021 Modified Files: src/usr.bin/indent: io.c Log Message: indent: group conditions in compute_code_indent by topic No functional change. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/usr.bin/indent/io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/indent/io.c diff -u src/usr.bin/indent/io.c:1.109 src/usr.bin/indent/io.c:1.110 --- src/usr.bin/indent/io.c:1.109 Wed Nov 3 21:47:35 2021 +++ src/usr.bin/indent/io.c Thu Nov 4 00:13:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.109 2021/11/03 21:47:35 rillig Exp $ */ +/* $NetBSD: io.c,v 1.110 2021/11/04 00:13:57 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)io.c 8.1 (Be #include #if defined(__NetBSD__) -__RCSID("$NetBSD: io.c,v 1.109 2021/11/03 21:47:35 rillig Exp $"); +__RCSID("$NetBSD: io.c,v 1.110 2021/11/04 00:13:57 rillig Exp $"); #elif defined(__FreeBSD__) __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $"); #endif @@ -297,40 +297,43 @@ dump_line_ff(void) int compute_code_indent(void) { -int target_ind = opt.indent_size * ps.ind_level; +int base_ind = ps.ind_level * opt.indent_size; -if (ps.paren_level != 0) { - if (!opt.lineup_to_parens) { - if (2 * opt.continuation_indent == opt.indent_size) - target_ind += opt.continuation_indent; - else - target_ind += opt.continuation_indent * ps.paren_level; +if (ps.paren_level == 0) { + if (ps.ind_stmt) + return base_ind + opt.continuation_indent; + return base_ind; +} - } else if (opt.lineup_to_parens_always) { +if (opt.lineup_to_parens) { + if (opt.lineup_to_parens_always) { /* * XXX: where does this '- 1' come from? It looks strange but is * nevertheless needed for proper indentation, as demonstrated in * the test opt-lpl.0. */ - target_ind = paren_indent - 1; + return paren_indent - 1; + } + + int w; + int t = paren_indent; - } else { - int w; /* TODO: remove '+ 1' and '- 1' */ - int t = paren_indent; /* TODO: remove '+ 1' and '- 1' */ - - if ((w = 1 + ind_add(t - 1, code.s, code.e) - opt.max_line_length) > 0 - && 1 + ind_add(target_ind, code.s, code.e) <= opt.max_line_length) { - t -= w + 1; - if (t > target_ind + 1) - target_ind = t - 1; - } else - target_ind = t - 1; + /* TODO: remove '+ 1' and '- 1' */ + if ((w = 1 + ind_add(t - 1, code.s, code.e) - opt.max_line_length) > 0 + && 1 + ind_add(base_ind, code.s, code.e) <= opt.max_line_length) { + t -= w + 1; + if (t > base_ind + 1) + return t - 1; + return base_ind; } -} else if (ps.ind_stmt) - target_ind += opt.continuation_indent; + return t - 1; +} -return target_ind; +if (2 * opt.continuation_indent == opt.indent_size) + return base_ind + opt.continuation_indent; +else + return base_ind + opt.continuation_indent * ps.paren_level; } int
CVS commit: src/usr.bin/indent
Module Name:src Committed By: rillig Date: Thu Nov 4 00:13:57 UTC 2021 Modified Files: src/usr.bin/indent: io.c Log Message: indent: group conditions in compute_code_indent by topic No functional change. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/usr.bin/indent/io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: skrll Date: Wed Nov 3 22:02:36 UTC 2021 Modified Files: src/sys/stand/efiboot: boot.c efiacpi.c efifdt.c Log Message: Provide the ablity to ignore ACPI with an 'acpi' command: acpi [{on|off}] To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/stand/efiboot/boot.c cvs rdiff -u -r1.11 -r1.12 src/sys/stand/efiboot/efiacpi.c cvs rdiff -u -r1.31 -r1.32 src/sys/stand/efiboot/efifdt.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/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.40 src/sys/stand/efiboot/boot.c:1.41 --- src/sys/stand/efiboot/boot.c:1.40 Sun Oct 17 14:12:54 2021 +++ src/sys/stand/efiboot/boot.c Wed Nov 3 22:02:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.40 2021/10/17 14:12:54 jmcneill Exp $ */ +/* $NetBSD: boot.c,v 1.41 2021/11/03 22:02:36 skrll Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -93,6 +93,7 @@ static char rndseed_path[255]; int set_bootfile(const char *); int set_bootargs(const char *); +void command_acpi(char *); void command_boot(char *); void command_dev(char *); void command_initrd(char *); @@ -115,6 +116,7 @@ void command_version(char *); void command_quit(char *); const struct boot_command commands[] = { + { "acpi", command_acpi, "acpi [{on|off}]" }, { "boot", command_boot, "boot [dev:][filename] [args]\n (ex. \"hd0a:\\netbsd.old -s\"" }, { "dev", command_dev, "dev" }, #ifdef EFIBOOT_FDT @@ -173,6 +175,23 @@ command_help(char *arg) } void +command_acpi(char *arg) +{ + if (arg && *arg) { + if (strcmp(arg, "on") == 0) + efi_acpi_enable(1); + else if (strcmp(arg, "off") == 0) + efi_acpi_enable(0); + else { + command_help(""); + return; + } + } else { + printf("ACPI support is %sabled\n", + efi_acpi_enabled() ? "en" : "dis"); + } +} +void command_boot(char *arg) { char *fname = arg; Index: src/sys/stand/efiboot/efiacpi.c diff -u src/sys/stand/efiboot/efiacpi.c:1.11 src/sys/stand/efiboot/efiacpi.c:1.12 --- src/sys/stand/efiboot/efiacpi.c:1.11 Wed Oct 6 10:13:19 2021 +++ src/sys/stand/efiboot/efiacpi.c Wed Nov 3 22:02:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: efiacpi.c,v 1.11 2021/10/06 10:13:19 jmcneill Exp $ */ +/* $NetBSD: efiacpi.c,v 1.12 2021/11/03 22:02:36 skrll Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -49,10 +49,11 @@ static EFI_GUID Acpi20TableGuid = ACPI_2 static EFI_GUID Smbios3TableGuid = SMBIOS3_TABLE_GUID; static EFI_GUID SmbiosTableGuid = SMBIOS_TABLE_GUID; -static int acpi_enable = 1; static void *acpi_root = NULL; static void *smbios_table = NULL; +static int acpi_enabled = 1; + int efi_acpi_probe(void) { @@ -76,19 +77,13 @@ efi_acpi_probe(void) int efi_acpi_available(void) { - return acpi_root != NULL; + return acpi_root != NULL && acpi_enabled; } int efi_acpi_enabled(void) { - return acpi_enable; -} - -void -efi_acpi_enable(int enable) -{ - acpi_enable = enable; + return acpi_enabled; } void * @@ -105,6 +100,15 @@ efi_acpi_smbios(void) static char model_buf[128]; +void +efi_acpi_enable(int val) +{ + if (acpi_root == NULL) { + printf("No ACPI node\n"); + } else + acpi_enabled = val; +} + const char * efi_acpi_get_model(void) { Index: src/sys/stand/efiboot/efifdt.c diff -u src/sys/stand/efiboot/efifdt.c:1.31 src/sys/stand/efiboot/efifdt.c:1.32 --- src/sys/stand/efiboot/efifdt.c:1.31 Wed Oct 6 10:15:20 2021 +++ src/sys/stand/efiboot/efifdt.c Wed Nov 3 22:02:36 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: efifdt.c,v 1.31 2021/10/06 10:15:20 jmcneill Exp $ */ +/* $NetBSD: efifdt.c,v 1.32 2021/11/03 22:02:36 skrll Exp $ */ /*- * Copyright (c) 2019 Jason R. Thorpe @@ -391,7 +391,7 @@ efi_fdt_gop(void) /* * In ACPI mode, use GOP as console. */ - if (efi_acpi_available() && efi_acpi_enabled()) { + if (efi_acpi_available()) { snprintf(buf, sizeof(buf), "/chosen/framebuffer@%" PRIx64, mode->FrameBufferBase); fdt_setprop_string(fdt_data, chosen, "stdout-path", buf); } @@ -587,17 +587,18 @@ arch_prepare_boot(const char *fname, con #ifdef EFIBOOT_ACPI /* ACPI support only works for little endian kernels */ - efi_acpi_enable(netbsd_elf_data == ELFDATA2LSB); - - if (efi_acpi_available() && efi_acpi_enabled()) { + if (efi_acpi_available() && netbsd_elf_data == ELFDATA2LSB) { int error = efi_fdt_create_acpifdt(); if (error != 0) { return error; } } else #endif - if (dtb_addr && efi_fdt_set_data((void *)(uintptr_t)dtb_addr) != 0) { - printf("boot: invalid DTB data\n"); + if (!dtb_addr || efi_fdt_set_data((void *)(uintptr_t)dtb_addr) != 0) { + if (!dtb_addr) + printf("boot: no DTB provided\n"); + else + printf("boot: invalid DTB data\n"); return EINVAL; }
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: skrll Date: Wed Nov 3 22:02:36 UTC 2021 Modified Files: src/sys/stand/efiboot: boot.c efiacpi.c efifdt.c Log Message: Provide the ablity to ignore ACPI with an 'acpi' command: acpi [{on|off}] To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/stand/efiboot/boot.c cvs rdiff -u -r1.11 -r1.12 src/sys/stand/efiboot/efiacpi.c cvs rdiff -u -r1.31 -r1.32 src/sys/stand/efiboot/efifdt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/indent
Module Name:src Committed By: rillig Date: Wed Nov 3 21:47:35 UTC 2021 Modified Files: src/usr.bin/indent: indent.c indent.h io.c pr_comment.c Log Message: indent: inline indentation_after, shorten function name to ind_add There were only few calls to indentation_after, so inlining it spares the need to look at yet another function definition. Another effect is that code.s and code.e appear in the code as a pair now, instead of a single code.s, making the scope of the function call obvious. In ind_add, there is no need to check for '\0' anymore since none of the buffers can ever contain a null character, these are filtered out by inbuf_read_line. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/usr.bin/indent/indent.c cvs rdiff -u -r1.75 -r1.76 src/usr.bin/indent/indent.h cvs rdiff -u -r1.108 -r1.109 src/usr.bin/indent/io.c cvs rdiff -u -r1.93 -r1.94 src/usr.bin/indent/pr_comment.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/indent/indent.c diff -u src/usr.bin/indent/indent.c:1.204 src/usr.bin/indent/indent.c:1.205 --- src/usr.bin/indent/indent.c:1.204 Mon Nov 1 23:44:08 2021 +++ src/usr.bin/indent/indent.c Wed Nov 3 21:47:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.c,v 1.204 2021/11/01 23:44:08 rillig Exp $ */ +/* $NetBSD: indent.c,v 1.205 2021/11/03 21:47:35 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)indent.c 5.1 #include #if defined(__NetBSD__) -__RCSID("$NetBSD: indent.c,v 1.204 2021/11/01 23:44:08 rillig Exp $"); +__RCSID("$NetBSD: indent.c,v 1.205 2021/11/03 21:47:35 rillig Exp $"); #elif defined(__FreeBSD__) __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $"); #endif @@ -772,8 +772,7 @@ process_lparen_or_lbracket(int decl_ind, ps.want_blank = false; *code.e++ = token.s[0]; -ps.paren_indents[ps.p_l_follow - 1] = - (short)indentation_after_range(0, code.s, code.e); +ps.paren_indents[ps.p_l_follow - 1] = (short)ind_add(0, code.s, code.e); debug_println("paren_indents[%d] is now %d", ps.p_l_follow - 1, ps.paren_indents[ps.p_l_follow - 1]); @@ -1217,7 +1216,7 @@ process_comma(int decl_ind, bool tabs_to int varname_len = 8; /* rough estimate for the length of a typical * variable name */ if (break_comma && (opt.break_after_comma || - indentation_after_range(compute_code_indent(), code.s, code.e) + ind_add(compute_code_indent(), code.s, code.e) >= opt.max_line_length - varname_len)) *force_nl = true; } Index: src/usr.bin/indent/indent.h diff -u src/usr.bin/indent/indent.h:1.75 src/usr.bin/indent/indent.h:1.76 --- src/usr.bin/indent/indent.h:1.75 Mon Nov 1 23:44:08 2021 +++ src/usr.bin/indent/indent.h Wed Nov 3 21:47:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: indent.h,v 1.75 2021/11/01 23:44:08 rillig Exp $ */ +/* $NetBSD: indent.h,v 1.76 2021/11/03 21:47:35 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -364,8 +364,7 @@ void debug_println(const char *, ...)__p void register_typename(const char *); int compute_code_indent(void); int compute_label_indent(void); -int indentation_after_range(int, const char *, const char *); -int indentation_after(int, const char *); +int ind_add(int, const char *, const char *); void inbuf_skip(void); char inbuf_next(void); Index: src/usr.bin/indent/io.c diff -u src/usr.bin/indent/io.c:1.108 src/usr.bin/indent/io.c:1.109 --- src/usr.bin/indent/io.c:1.108 Sat Oct 30 11:49:38 2021 +++ src/usr.bin/indent/io.c Wed Nov 3 21:47:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.108 2021/10/30 11:49:38 rillig Exp $ */ +/* $NetBSD: io.c,v 1.109 2021/11/03 21:47:35 rillig Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)io.c 8.1 (Be #include #if defined(__NetBSD__) -__RCSID("$NetBSD: io.c,v 1.108 2021/10/30 11:49:38 rillig Exp $"); +__RCSID("$NetBSD: io.c,v 1.109 2021/11/03 21:47:35 rillig Exp $"); #elif defined(__FreeBSD__) __FBSDID("$FreeBSD: head/usr.bin/indent/io.c 334927 2018-06-10 16:44:18Z pstef $"); #endif @@ -136,7 +136,7 @@ dump_line_label(void) } } else output_range(lab.s, lab.e); -ind = indentation_after(ind, lab.s); +ind = ind_add(ind, lab.s, lab.e); ps.is_case_label = false; return ind; @@ -160,7 +160,7 @@ dump_line_code(int ind) ind = output_indent(ind, target_ind); output_range(code.s, code.e); -return indentation_after(ind, code.s); +return ind_add(ind, code.s, code.e); } static void @@ -315,11 +315,11 @@ compute_code_indent(void) target_ind = paren_indent - 1; } else { - int w; - int t = paren_indent; + int w; /* TODO: remove '+ 1' and '- 1' */ + int t = paren_indent; /* TODO: remove '+ 1' and '- 1' */ - if ((w = 1 + indentation_after(t - 1, code.s)
CVS commit: src/usr.bin/indent
Module Name:src Committed By: rillig Date: Wed Nov 3 21:47:35 UTC 2021 Modified Files: src/usr.bin/indent: indent.c indent.h io.c pr_comment.c Log Message: indent: inline indentation_after, shorten function name to ind_add There were only few calls to indentation_after, so inlining it spares the need to look at yet another function definition. Another effect is that code.s and code.e appear in the code as a pair now, instead of a single code.s, making the scope of the function call obvious. In ind_add, there is no need to check for '\0' anymore since none of the buffers can ever contain a null character, these are filtered out by inbuf_read_line. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.204 -r1.205 src/usr.bin/indent/indent.c cvs rdiff -u -r1.75 -r1.76 src/usr.bin/indent/indent.h cvs rdiff -u -r1.108 -r1.109 src/usr.bin/indent/io.c cvs rdiff -u -r1.93 -r1.94 src/usr.bin/indent/pr_comment.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libusbhid
Module Name:src Committed By: nia Date: Wed Nov 3 16:18:09 UTC 2021 Modified Files: src/lib/libusbhid: usage.c Log Message: usbhid(3): use reallocarr To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libusbhid/usage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libusbhid/usage.c diff -u src/lib/libusbhid/usage.c:1.11 src/lib/libusbhid/usage.c:1.12 --- src/lib/libusbhid/usage.c:1.11 Sat Apr 4 21:23:04 2020 +++ src/lib/libusbhid/usage.c Wed Nov 3 16:18:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: usage.c,v 1.11 2020/04/04 21:23:04 fox Exp $ */ +/* $NetBSD: usage.c,v 1.12 2021/11/03 16:18:09 nia Exp $ */ /* * Copyright (c) 1999 Lennart Augustsson @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: usage.c,v 1.11 2020/04/04 21:23:04 fox Exp $"); +__RCSID("$NetBSD: usage.c,v 1.12 2021/11/03 16:18:09 nia Exp $"); #include #include @@ -112,11 +112,9 @@ hid_init(const char *hidname) hidname, lineno); if (curpage->pagesize >= curpage->pagesizemax) { curpage->pagesizemax += 10; -curpage->page_contents = - realloc(curpage->page_contents, - curpage->pagesizemax * - sizeof (struct usage_in_page)); -if (!curpage->page_contents) +if (reallocarr(&curpage->page_contents, + curpage->pagesizemax, + sizeof (struct usage_in_page)) != 0) err(1, "realloc"); } curpage->page_contents[curpage->pagesize].name = n; @@ -124,17 +122,13 @@ hid_init(const char *hidname) curpage->pagesize++; } else { if (npages >= npagesmax) { -if (pages == 0) { +if (pages == NULL) { npagesmax = 5; - pages = malloc(npagesmax * - sizeof (struct usage_page)); } else { npagesmax += 5; - pages = realloc(pages, - npagesmax * - sizeof (struct usage_page)); } -if (!pages) +if (reallocarr(&pages, npagesmax, + sizeof (struct usage_page)) != 0) err(1, "alloc"); } curpage = &pages[npages++]; @@ -142,10 +136,10 @@ hid_init(const char *hidname) curpage->usage = no; curpage->pagesize = 0; curpage->pagesizemax = 10; - curpage->page_contents = -malloc(curpage->pagesizemax * - sizeof (struct usage_in_page)); - if (!curpage->page_contents) + curpage->page_contents = NULL; + if (reallocarr(&curpage->page_contents, + curpage->pagesizemax, + sizeof (struct usage_in_page)) != 0) err(1, "malloc"); } }
CVS commit: src/lib/libusbhid
Module Name:src Committed By: nia Date: Wed Nov 3 16:18:09 UTC 2021 Modified Files: src/lib/libusbhid: usage.c Log Message: usbhid(3): use reallocarr To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libusbhid/usage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Nov 3 15:10:12 UTC 2021 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.1427 -r1.1428 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1426 -r1.1427 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Nov 3 15:09:42 UTC 2021 Modified Files: src/sys/dev/pci: pcidevs Log Message: - Rename EHL_TRACE* macros - Update Jasper Lake's Processor Transaction Routers. To generate a diff of this commit: cvs rdiff -u -r1.1442 -r1.1443 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1442 src/sys/dev/pci/pcidevs:1.1443 --- src/sys/dev/pci/pcidevs:1.1442 Wed Oct 27 18:25:31 2021 +++ src/sys/dev/pci/pcidevs Wed Nov 3 15:09:42 2021 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1442 2021/10/27 18:25:31 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1443 2021/11/03 15:09:42 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -5645,13 +5645,13 @@ product INTEL EHL_GPU_32_SUPER 0x4551 El product INTEL EHL_GPU_32 0x4551 Elkhart Lake GPU (32EU) product INTEL EHL_DPTF 0x4503 Elkhart Lake DPTF product INTEL EHL_GNA 0x4511 Elkhart Lake GNA -product INTEL EHL_TRACE_1 0x4529 Elkhart Lake Trace Hub (Compute Die) +product INTEL EHL_TRACE_2 0x4529 Elkhart Lake Trace Hub (Compute Die) product INTEL EHL_ESPI 0x4b00 Elkhart Lake eSPI product INTEL EHL_P2SB 0x4b20 Elkhart Lake P2SB product INTEL EHL_PMC 0x4b21 Elkhart Lake PMC product INTEL EHL_SMB 0x4b23 Elkhart Lake SMBus product INTEL EHL_SPI_FLASH 0x4b24 Elkhart Lake SPI (FLASH & TPM) -product INTEL EHL_TRACE 0x4b26 Elkhart Lake Trace Hub (PCH) +product INTEL EHL_TRACE_1 0x4b26 Elkhart Lake Trace Hub (PCH) product INTEL EHL_SIO_UART_0 0x4b28 Elkhart Lake SIO UART 0 product INTEL EHL_SIO_UART_1 0x4b29 Elkhart Lake SIO UART 1 product INTEL EHL_SIO_SPI_0 0x4b2a Elkhart Lake SIO SPI 0 @@ -5741,7 +5741,7 @@ product INTEL JSL_P2SB 0x4da0 Jasper La product INTEL JSL_PMC 0x4da1 Jasper Lake PMC product INTEL JSL_SMB 0x4da3 Jasper Lake SMBus product INTEL JSL_SPI_FLASH 0x4da4 Jasper Lake SPI (FLASH) -product INTEL JSL_TRACE 0x4da6 Jasper Lake Intel Trace Hub +product INTEL JSL_TRACE_1 0x4da6 Jasper Lake Intel Trace Hub (PCH) product INTEL JSL_UART_0 0x4da8 Jasper Lake UART 0 product INTEL JSL_UART_1 0x4da9 Jasper Lake UART 1 product INTEL JSL_SPI_0 0x4daa Jasper Lake SPI 0 @@ -5781,7 +5781,13 @@ product INTEL JSL_CNVI_3 0x4df3 Jasper L product INTEL JSL_SCS 0x4df8 Jasper Lake SD Card product INTEL JSL_SPI_2 0x4dfb Jasper Lake SPI 2 product INTEL JSL_DPTF 0x4e03 Jasper Lake DPTF -product INTEL JSL_HB 0x4e22 Jasper Lake Processor Transaction Route +product INTEL JSL_TROUTER_4_1 0x4e12 Jasper Lake Processor Transaction Router (SKU 4) +product INTEL JSL_TROUTER_2_1 0x4e14 Jasper Lake Processor Transaction Router (SKU 2) +product INTEL JSL_TROUTER_2_2 0x4e22 Jasper Lake Processor Transaction Router (SKU 2) +product INTEL JSL_TROUTER_4_2 0x4e24 Jasper Lake Processor Transaction Router (SKU 4) +product INTEL JSL_TROUTER_4_3 0x4e26 Jasper Lake Processor Transaction Router (SKU 4) +product INTEL JSL_TROUTER_4_4 0x4e28 Jasper Lake Processor Transaction Router (SKU 4) +product INTEL JSL_TRACE_2 0x4da6 Jasper Lake Intel Trace Hub (Compute Die) product INTEL JSL_GPU_EU_16 0x4e55 Jasper Lake GPU 16 EU product INTEL JSL_GPU_EU_24 0x4e61 Jasper Lake GPU 24 EU product INTEL JSL_GPU_EU_32 0x4e71 Jasper Lake GPU 32 EU
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Nov 3 15:09:42 UTC 2021 Modified Files: src/sys/dev/pci: pcidevs Log Message: - Rename EHL_TRACE* macros - Update Jasper Lake's Processor Transaction Routers. To generate a diff of this commit: cvs rdiff -u -r1.1442 -r1.1443 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-futex2] src/sys
Module Name:src Committed By: thorpej Date: Wed Nov 3 14:49:21 UTC 2021 Modified Files: src/sys/kern [thorpej-futex2]: kern_lwp.c sys_futex.c src/sys/sys [thorpej-futex2]: futex.h Log Message: Cherry-pick this sys_futex.c revision and associated changes: revision 1.13 date: 2021-09-28 08:05:42 -0700; author: thorpej; state: Exp; lines: +11 -9; commitid: FPndTp2ZDjYuyJaD; futex_release_all_lwp(): No need to pass the "tid" argument separately; that is a vestige of an older version of the code. Also, move a KASSERT() that both futex_release_all_lwp() call sites had inside of futex_release_all_lwp() itself. ...so make this easier to test this sys_futex.c with trunk. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.243.12.1 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.12.4.6 -r1.12.4.7 src/sys/kern/sys_futex.c cvs rdiff -u -r1.4 -r1.4.14.1 src/sys/sys/futex.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-futex2] src/sys
Module Name:src Committed By: thorpej Date: Wed Nov 3 14:49:21 UTC 2021 Modified Files: src/sys/kern [thorpej-futex2]: kern_lwp.c sys_futex.c src/sys/sys [thorpej-futex2]: futex.h Log Message: Cherry-pick this sys_futex.c revision and associated changes: revision 1.13 date: 2021-09-28 08:05:42 -0700; author: thorpej; state: Exp; lines: +11 -9; commitid: FPndTp2ZDjYuyJaD; futex_release_all_lwp(): No need to pass the "tid" argument separately; that is a vestige of an older version of the code. Also, move a KASSERT() that both futex_release_all_lwp() call sites had inside of futex_release_all_lwp() itself. ...so make this easier to test this sys_futex.c with trunk. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.243.12.1 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.12.4.6 -r1.12.4.7 src/sys/kern/sys_futex.c cvs rdiff -u -r1.4 -r1.4.14.1 src/sys/sys/futex.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/kern_lwp.c diff -u src/sys/kern/kern_lwp.c:1.243 src/sys/kern/kern_lwp.c:1.243.12.1 --- src/sys/kern/kern_lwp.c:1.243 Wed Jan 13 07:36:56 2021 +++ src/sys/kern/kern_lwp.c Wed Nov 3 14:49:21 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.243 2021/01/13 07:36:56 skrll Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.243.12.1 2021/11/03 14:49:21 thorpej Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020 @@ -217,7 +217,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.243 2021/01/13 07:36:56 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.243.12.1 2021/11/03 14:49:21 thorpej Exp $"); #include "opt_ddb.h" #include "opt_lockdebug.h" @@ -2060,11 +2060,8 @@ lwp_setprivate(struct lwp *l, void *ptr) void lwp_thread_cleanup(struct lwp *l) { - const lwpid_t tid = l->l_lid; - KASSERT((tid & FUTEX_TID_MASK) == tid); KASSERT(mutex_owned(l->l_proc->p_lock)); - mutex_exit(l->l_proc->p_lock); /* @@ -2072,7 +2069,7 @@ lwp_thread_cleanup(struct lwp *l) * now. */ if (__predict_false(l->l_robust_head != 0)) { - futex_release_all_lwp(l, tid); + futex_release_all_lwp(l); } } Index: src/sys/kern/sys_futex.c diff -u src/sys/kern/sys_futex.c:1.12.4.6 src/sys/kern/sys_futex.c:1.12.4.7 --- src/sys/kern/sys_futex.c:1.12.4.6 Mon Nov 1 08:40:16 2021 +++ src/sys/kern/sys_futex.c Wed Nov 3 14:49:21 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_futex.c,v 1.12.4.6 2021/11/01 08:40:16 chs Exp $ */ +/* $NetBSD: sys_futex.c,v 1.12.4.7 2021/11/03 14:49:21 thorpej Exp $ */ /*- * Copyright (c) 2018, 2019, 2020 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.12.4.6 2021/11/01 08:40:16 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.12.4.7 2021/11/03 14:49:21 thorpej Exp $"); /* * Futexes @@ -2199,7 +2199,7 @@ futex_fetch_robust_entry(uintptr_t const * the i's and cross the t's. */ void -futex_release_all_lwp(struct lwp * const l, lwpid_t const tid) +futex_release_all_lwp(struct lwp * const l) { u_long rhead[_FUTEX_ROBUST_HEAD_NWORDS]; int limit = 100; @@ -2209,13 +2209,15 @@ futex_release_all_lwp(struct lwp * const if (l->l_robust_head == 0) return; + KASSERT((l->l_lid & FUTEX_TID_MASK) == l->l_lid); + /* Read the final snapshot of the robust list head. */ error = futex_fetch_robust_head(l->l_robust_head, rhead); if (error) { - printf("WARNING: pid %jd (%s) lwp %jd tid %jd:" + printf("WARNING: pid %jd (%s) lwp %jd:" " unmapped robust futex list head\n", (uintmax_t)l->l_proc->p_pid, l->l_proc->p_comm, - (uintmax_t)l->l_lid, (uintmax_t)tid); + (uintmax_t)l->l_lid); return; } @@ -2237,21 +2239,21 @@ futex_release_all_lwp(struct lwp * const while (next != l->l_robust_head && limit-- > 0) { /* pending handled below. */ if (next != pending) - release_futex(next + offset, tid, is_pi, false); + release_futex(next + offset, l->l_lid, is_pi, false); error = futex_fetch_robust_entry(next, &next, &is_pi); if (error) break; preempt_point(); } if (limit <= 0) { - printf("WARNING: pid %jd (%s) lwp %jd tid %jd:" + printf("WARNING: pid %jd (%s) lwp %jd:" " exhausted robust futex limit\n", (uintmax_t)l->l_proc->p_pid, l->l_proc->p_comm, - (uintmax_t)l->l_lid, (uintmax_t)tid); + (uintmax_t)l->l_lid); } /* If there's a pending futex, it may need to be released too. */ if (pending != 0) { - release_futex(pending + offset, tid, pending_is_pi, true); + release_futex(pending + offset, l->l_lid, pending_is_pi, true); } } Index: src/sys/sys/futex.h diff -u src/sys/sys/futex.h:1.4 src/sys/sys/futex.h:1.4.14.1 --- src/sys/sys/futex.h:1.4 Tue May 5 15:25:18 2020 +++ src/sys/sys/futex.h Wed Nov 3 14:49:21 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: futex.h,v 1.4 2020/05/05 15:25:18 riastradh Exp $ */ +/* $NetBSD: futex.h,v 1.4.14.1 2021/11/03 14:49:21 thorpej Exp
CVS commit: src/sbin/fdisk
Module Name:src Committed By: nia Date: Wed Nov 3 14:30:04 UTC 2021 Modified Files: src/sbin/fdisk: fdisk.c Log Message: fdisk(8): Convert realloc(x * y) to reallocarr. Eliminate temp variables. To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sbin/fdisk/fdisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/fdisk
Module Name:src Committed By: nia Date: Wed Nov 3 14:30:04 UTC 2021 Modified Files: src/sbin/fdisk: fdisk.c Log Message: fdisk(8): Convert realloc(x * y) to reallocarr. Eliminate temp variables. To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sbin/fdisk/fdisk.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/fdisk/fdisk.c diff -u src/sbin/fdisk/fdisk.c:1.159 src/sbin/fdisk/fdisk.c:1.160 --- src/sbin/fdisk/fdisk.c:1.159 Sun May 24 21:02:12 2020 +++ src/sbin/fdisk/fdisk.c Wed Nov 3 14:30:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fdisk.c,v 1.159 2020/05/24 21:02:12 wiz Exp $ */ +/* $NetBSD: fdisk.c,v 1.160 2021/11/03 14:30:04 nia Exp $ */ /* * Mach Operating System @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fdisk.c,v 1.159 2020/05/24 21:02:12 wiz Exp $"); +__RCSID("$NetBSD: fdisk.c,v 1.160 2021/11/03 14:30:04 nia Exp $"); #endif /* not lint */ #define MBRPTYPENAMES @@ -1148,7 +1148,6 @@ get_extended_ptn(void) struct mbr_partition *mp; struct mbr_sector *boot; daddr_t offset; - struct mbr_sector *nptn; /* find first (there should only be one) extended partition */ for (mp = mboot.mbr_parts; !MBR_IS_EXTENDED(mp->mbrp_type); mp++) @@ -1163,10 +1162,9 @@ get_extended_ptn(void) ext.limit = ext.base + le32toh(mp->mbrp_size); ext.ptn_id = mp - mboot.mbr_parts; for (offset = 0;; offset = le32toh(boot->mbr_parts[1].mbrp_start)) { - nptn = realloc(ext.ptn, (ext.num_ptn + 1) * sizeof *ext.ptn); - if (nptn == NULL) + if (reallocarr(&ext.ptn, + ext.num_ptn + 1, sizeof(*ext.ptn)) != 0) err(1, "Malloc failed"); - ext.ptn = nptn; boot = ext.ptn + ext.num_ptn; if (read_s0(offset + ext.base, boot) == -1) break; @@ -1810,12 +1808,9 @@ add_ext_ptn(daddr_t start, daddr_t size) { int part; struct mbr_partition *partp; - struct mbr_sector *nptn; - nptn = realloc(ext.ptn, (ext.num_ptn + 1) * sizeof *ext.ptn); - if (!nptn) - err(1, "realloc"); - ext.ptn = nptn; + if (reallocarr(&ext.ptn, ext.num_ptn + 1, sizeof(*ext.ptn)) != 0) + err(1, "reallocarr"); for (part = 0; part < ext.num_ptn; part++) if (ext_offset(part) > start) break;
CVS commit: src/sbin/disklabel
Module Name:src Committed By: nia Date: Wed Nov 3 14:25:39 UTC 2021 Modified Files: src/sbin/disklabel: interact.c main.c Log Message: disklabel(8): convert malloc(x * y) to reallocarr To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sbin/disklabel/interact.c cvs rdiff -u -r1.56 -r1.57 src/sbin/disklabel/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/disklabel/interact.c diff -u src/sbin/disklabel/interact.c:1.39 src/sbin/disklabel/interact.c:1.40 --- src/sbin/disklabel/interact.c:1.39 Sun Jan 31 18:57:29 2016 +++ src/sbin/disklabel/interact.c Wed Nov 3 14:25:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: interact.c,v 1.39 2016/01/31 18:57:29 christos Exp $ */ +/* $NetBSD: interact.c,v 1.40 2021/11/03 14:25:39 nia Exp $ */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: interact.c,v 1.39 2016/01/31 18:57:29 christos Exp $"); +__RCSID("$NetBSD: interact.c,v 1.40 2021/11/03 14:25:39 nia Exp $"); #endif /* lint */ #include @@ -674,10 +674,10 @@ dumpnames(const char *prompt, const char size_t i, entry, lines; int columns, width; const char *p; - const char **list; + const char **list = NULL; - if ((list = (const char **)malloc(sizeof(char *) * numentries)) == NULL) - err(1, "malloc"); + if (reallocarr(&list, numentries, sizeof(char *)) != 0) + err(1, "reallocarr"); width = 0; printf("%s:\n", prompt); for (i = 0; i < numentries; i++) { Index: src/sbin/disklabel/main.c diff -u src/sbin/disklabel/main.c:1.56 src/sbin/disklabel/main.c:1.57 --- src/sbin/disklabel/main.c:1.56 Sat May 29 17:41:51 2021 +++ src/sbin/disklabel/main.c Wed Nov 3 14:25:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.56 2021/05/29 17:41:51 christos Exp $ */ +/* $NetBSD: main.c,v 1.57 2021/11/03 14:25:39 nia Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19 static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95"; /* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */ #else -__RCSID("$NetBSD: main.c,v 1.56 2021/05/29 17:41:51 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.57 2021/11/03 14:25:39 nia Exp $"); #endif #endif /* not lint */ @@ -2207,11 +2207,10 @@ list_fs_types(void) ret = 1; if (nelems > 0) { - const char **list; + const char **list = NULL; size_t i; - list = (const char **)malloc(sizeof(char *) * nelems); - if (list == NULL) { + if (reallocarr(&list, nelems, sizeof(char *)) != 0) { warnx("sorry, could not allocate memory for list"); ret = 0; } else {
CVS commit: src/sbin/disklabel
Module Name:src Committed By: nia Date: Wed Nov 3 14:25:39 UTC 2021 Modified Files: src/sbin/disklabel: interact.c main.c Log Message: disklabel(8): convert malloc(x * y) to reallocarr To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sbin/disklabel/interact.c cvs rdiff -u -r1.56 -r1.57 src/sbin/disklabel/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/etc.evbmips
Module Name:src Committed By: skrll Date: Wed Nov 3 08:05:39 UTC 2021 Modified Files: src/etc/etc.evbmips: Makefile.inc Log Message: Add MIPSSIM{,64} as appropriate To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/etc/etc.evbmips/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/etc.evbmips
Module Name:src Committed By: skrll Date: Wed Nov 3 08:05:39 UTC 2021 Modified Files: src/etc/etc.evbmips: Makefile.inc Log Message: Add MIPSSIM{,64} as appropriate To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/etc/etc.evbmips/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbmips/Makefile.inc diff -u src/etc/etc.evbmips/Makefile.inc:1.26 src/etc/etc.evbmips/Makefile.inc:1.27 --- src/etc/etc.evbmips/Makefile.inc:1.26 Sun Apr 25 23:40:52 2021 +++ src/etc/etc.evbmips/Makefile.inc Wed Nov 3 08:05:39 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.26 2021/04/25 23:40:52 christos Exp $ +# $NetBSD: Makefile.inc,v 1.27 2021/11/03 08:05:39 skrll Exp $ # # etc.evbmips/Makefile.inc -- evbmips-specific etc Makefile targets # @@ -14,11 +14,13 @@ KERNEL_SETS+= MALTA MTX-1 OMSAL400 BUILD_KERNELS= INSTALL_CI20 INSTALL_OMSAL400 INSTALL_MALTA KERNEL_SETS+= P4032 P5064 P6032 +KERNEL_SETS+= MIPSSIM .elif ${MACHINE_MIPS64} KERNEL_SETS= MALTA32 MALTA64 XLSATX32 XLSATX64 BUILD_KERNELS= INSTALL_MALTA32 INSTALL_MALTA64 BUILD_KERNELS+= INSTALL_XLSATX32 INSTALL_XLSATX64 +KERNEL_SETS+= MIPSSIM64 . if !empty(MACHINE_ARCH:Mmips*64el) KERNEL_SETS+= P5064-64
CVS commit: src/sys/arch/evbmips/mipssim
Module Name:src Committed By: skrll Date: Wed Nov 3 07:53:56 UTC 2021 Modified Files: src/sys/arch/evbmips/mipssim: virtio_mainbus.c Log Message: Catch up with member renaming To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/mipssim/virtio_mainbus.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/evbmips/mipssim/virtio_mainbus.c diff -u src/sys/arch/evbmips/mipssim/virtio_mainbus.c:1.3 src/sys/arch/evbmips/mipssim/virtio_mainbus.c:1.4 --- src/sys/arch/evbmips/mipssim/virtio_mainbus.c:1.3 Sat Aug 7 16:18:51 2021 +++ src/sys/arch/evbmips/mipssim/virtio_mainbus.c Wed Nov 3 07:53:56 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio_mainbus.c,v 1.3 2021/08/07 16:18:51 thorpej Exp $ */ +/* $NetBSD: virtio_mainbus.c,v 1.4 2021/11/03 07:53:56 skrll Exp $ */ /* * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio_mainbus.c,v 1.3 2021/08/07 16:18:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio_mainbus.c,v 1.4 2021/11/03 07:53:56 skrll Exp $"); #include #include @@ -48,7 +48,7 @@ static void virtio_mainbus_attach(device static int virtio_mainbus_rescan(device_t, const char *, const int *); static int virtio_mainbus_detach(device_t, int); -static int virtio_mainbus_setup_interrupts(struct virtio_mmio_softc *); +static int virtio_mainbus_alloc_interrupts(struct virtio_mmio_softc *); static void virtio_mainbus_free_interrupts(struct virtio_mmio_softc *); struct virtio_mainbus_softc { @@ -100,7 +100,7 @@ virtio_mainbus_attach(device_t parent, d msc->sc_iot = ma->ma_iot; msc->sc_ioh = ioh; msc->sc_iosize = VIRTIO_STRIDE; - msc->sc_setup_interrupts = virtio_mainbus_setup_interrupts; + msc->sc_alloc_interrupts = virtio_mainbus_alloc_interrupts; msc->sc_free_interrupts = virtio_mainbus_free_interrupts; vsc->sc_dev = self; @@ -146,7 +146,7 @@ virtio_mainbus_detach(device_t self, int static int -virtio_mainbus_setup_interrupts(struct virtio_mmio_softc *msc) +virtio_mainbus_alloc_interrupts(struct virtio_mmio_softc *msc) { struct virtio_mainbus_softc *sc = (struct virtio_mainbus_softc *) msc; struct virtio_softc * const vsc = &msc->sc_sc;
CVS commit: src/sys/arch/evbmips/mipssim
Module Name:src Committed By: skrll Date: Wed Nov 3 07:53:56 UTC 2021 Modified Files: src/sys/arch/evbmips/mipssim: virtio_mainbus.c Log Message: Catch up with member renaming To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/mipssim/virtio_mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.