CVS commit: src/sys/dev/isa
Module Name:src Committed By: nonaka Date: Sat Jul 3 04:44:16 UTC 2021 Modified Files: src/sys/dev/isa: itesio_isa.c itesio_isavar.h Log Message: itesio(4): Added IT8625E support. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/isa/itesio_isa.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/isa/itesio_isavar.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/isa
Module Name:src Committed By: nonaka Date: Sat Jul 3 04:44:16 UTC 2021 Modified Files: src/sys/dev/isa: itesio_isa.c itesio_isavar.h Log Message: itesio(4): Added IT8625E support. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/isa/itesio_isa.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/isa/itesio_isavar.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/dev/isa/itesio_isa.c diff -u src/sys/dev/isa/itesio_isa.c:1.28 src/sys/dev/isa/itesio_isa.c:1.29 --- src/sys/dev/isa/itesio_isa.c:1.28 Tue Jul 23 09:38:53 2019 +++ src/sys/dev/isa/itesio_isa.c Sat Jul 3 04:44:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: itesio_isa.c,v 1.28 2019/07/23 09:38:53 msaitoh Exp $ */ +/* $NetBSD: itesio_isa.c,v 1.29 2021/07/03 04:44:16 nonaka Exp $ */ /* Derived from $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $ */ /* @@ -34,13 +34,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.28 2019/07/23 09:38:53 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.29 2021/07/03 04:44:16 nonaka Exp $"); #include #include #include #include #include +#include #include #include @@ -52,6 +53,11 @@ __KERNEL_RCSID(0, "$NetBSD: itesio_isa.c #define IT_VOLTSTART_IDX 3 /* voltage start index */ #define IT_FANSTART_IDX 12 /* fan start index */ +/* IT8625: 3 temps, 10 volts, 6 fans */ +#define IT8625_NUM_SENSORS 19 +#define IT8625_VOLTSTART_IDX 3 /* voltage start index */ +#define IT8625_FANSTART_IDX 13 /* fan start index */ + #if defined(ITESIO_DEBUG) #define DPRINTF(x) do { printf x; } while (0) #else @@ -90,6 +96,13 @@ static void itesio_refresh_temp(struct i static void itesio_refresh_volts(struct itesio_softc *, envsys_data_t *); static void itesio_refresh_fans(struct itesio_softc *, envsys_data_t *); static void itesio_refresh(struct sysmon_envsys *, envsys_data_t *); +static void itesio_refresh_it8705_fans(struct itesio_softc *, + envsys_data_t *); +static void itesio_setup_it8625_sensors(struct itesio_softc *); +static void itesio_refresh_it8625_volts(struct itesio_softc *, + envsys_data_t *); +static void itesio_refresh_it8625_fans(struct itesio_softc *, + envsys_data_t *); /* sysmon_wdog glue */ static bool itesio_wdt_suspend(device_t, const pmf_qual_t *); @@ -109,11 +122,58 @@ static const int itesio_vrfact[] = { RFACT_NONE /* VBAT */ }; +static const struct itesio_config itesio_config[] = { + { + .chipid = ITESIO_ID8625, + .no_wdt = true, + .num_sensors = IT8625_NUM_SENSORS, + .voltstart_idx = IT8625_VOLTSTART_IDX, + .fanstart_idx = IT8625_FANSTART_IDX, + .setup_sensors = itesio_setup_it8625_sensors, + .refresh_volts = itesio_refresh_it8625_volts, + .refresh_fans = itesio_refresh_it8625_fans, + }, + { .chipid = ITESIO_ID8628, }, + { .chipid = ITESIO_ID8655, }, + { + .chipid = ITESIO_ID8705, + .no_wdt = true, + .refresh_fans = itesio_refresh_it8705_fans, + }, + { + .chipid = ITESIO_ID8712, + .refresh_fans = itesio_refresh_it8705_fans, + }, + { .chipid = ITESIO_ID8716, }, + { .chipid = ITESIO_ID8718, }, + { .chipid = ITESIO_ID8720, }, + { .chipid = ITESIO_ID8721, }, + { .chipid = ITESIO_ID8726, }, + { .chipid = ITESIO_ID8728, }, + { .chipid = ITESIO_ID8771, }, + { .chipid = ITESIO_ID8772, }, +}; + +static const struct itesio_config * +itesio_isa_find_config(uint16_t chipid) +{ + const struct itesio_config *ic; + size_t i; + + for (i = 0; i < __arraycount(itesio_config); i++) { + ic = _config[i]; + if (chipid == ic->chipid) + return ic; + } + return NULL; +} + static int itesio_isa_match(device_t parent, cfdata_t match, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; + const struct itesio_config *ic; uint16_t cr; /* Must supply an address */ @@ -135,28 +195,16 @@ itesio_isa_match(device_t parent, cfdata itesio_exit(ia->ia_iot, ioh); bus_space_unmap(ia->ia_iot, ioh, 2); - switch (cr) { - case ITESIO_ID8628: - case ITESIO_ID8655: - case ITESIO_ID8705: - case ITESIO_ID8712: - case ITESIO_ID8716: - case ITESIO_ID8718: - case ITESIO_ID8720: - case ITESIO_ID8721: - case ITESIO_ID8726: - case ITESIO_ID8728: - case ITESIO_ID8771: - case ITESIO_ID8772: - ia->ia_nio = 1; - ia->ia_io[0].ir_size = 2; - ia->ia_niomem = 0; - ia->ia_nirq = 0; - ia->ia_ndrq = 0; - return 1; - default: + ic = itesio_isa_find_config(cr); + if (ic == NULL) return 0; - } + + ia->ia_nio = 1; + ia->ia_io[0].ir_size = 2; + ia->ia_niomem = 0; + ia->ia_nirq = 0; + ia->ia_ndrq = 0; + return 1; } static void @@ -164,7 +212,9 @@ itesio_isa_attach(device_t parent, devic { struct itesio_softc *sc = device_private(self); struct isa_attach_args *ia = aux; - int i; + const struct itesio_config *ic; + uint32_t i; + int error; uint8_t cr; sc->sc_iot = ia->ia_iot; @@ -205,6 +255,27 @@ itesio_isa_attach(device_t parent, devic */ itesio_exit(sc->sc_iot,
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Fri Jul 2 23:29:54 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: c99_init_array.c c99_init_array.exp Log Message: tests/lint: encode the array length in the diagnostic To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/c99_init_array.c \ src/tests/usr.bin/xlint/lint1/c99_init_array.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Fri Jul 2 23:29:54 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: c99_init_array.c c99_init_array.exp Log Message: tests/lint: encode the array length in the diagnostic To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/c99_init_array.c \ src/tests/usr.bin/xlint/lint1/c99_init_array.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/c99_init_array.c diff -u src/tests/usr.bin/xlint/lint1/c99_init_array.c:1.2 src/tests/usr.bin/xlint/lint1/c99_init_array.c:1.3 --- src/tests/usr.bin/xlint/lint1/c99_init_array.c:1.2 Fri Jul 2 22:46:43 2021 +++ src/tests/usr.bin/xlint/lint1/c99_init_array.c Fri Jul 2 23:29:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: c99_init_array.c,v 1.2 2021/07/02 22:46:43 rillig Exp $ */ +/* $NetBSD: c99_init_array.c,v 1.3 2021/07/02 23:29:54 rillig Exp $ */ # 3 "c99_init_array.c" /* @@ -10,10 +10,10 @@ // The size of the array is determined by the maximum index, not by the last // one mentioned. int arr_11[] = { [10] = 10, [0] = 0 }; -typedef int ctassert_11[sizeof(arr_11) / sizeof(arr_11[0]) == 11 ? -1 : 1]; -/* expect-1: error: negative array dimension (-1) [20] */ +typedef int ctassert_11[-(int)(sizeof(arr_11) / sizeof(arr_11[0]))]; +/* expect-1: error: negative array dimension (-11) [20] */ // Without an explicit subscript designator, the subscript counts up. int arr_3[] = { [1] = 1, [0] = 0, 1, 2 }; -typedef int ctassert_3[sizeof(arr_3) / sizeof(arr_3[0]) == 3 ? -1 : 1]; -/* expect-1: error: negative array dimension (-1) [20] */ +typedef int ctassert_3[-(int)(sizeof(arr_3) / sizeof(arr_3[0]))]; +/* expect-1: error: negative array dimension (-3) [20] */ Index: src/tests/usr.bin/xlint/lint1/c99_init_array.exp diff -u src/tests/usr.bin/xlint/lint1/c99_init_array.exp:1.2 src/tests/usr.bin/xlint/lint1/c99_init_array.exp:1.3 --- src/tests/usr.bin/xlint/lint1/c99_init_array.exp:1.2 Fri Jul 2 22:46:43 2021 +++ src/tests/usr.bin/xlint/lint1/c99_init_array.exp Fri Jul 2 23:29:54 2021 @@ -1,2 +1,2 @@ -c99_init_array.c(13): error: negative array dimension (-1) [20] -c99_init_array.c(18): error: negative array dimension (-1) [20] +c99_init_array.c(13): error: negative array dimension (-11) [20] +c99_init_array.c(18): error: negative array dimension (-3) [20]
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Jul 2 22:46:43 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: c99_init_array.c c99_init_array.exp src/usr.bin/xlint/lint1: init.c Log Message: lint: fix initialization of array of unknown size The size of the resulting array was computed wrong. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/c99_init_array.c \ src/tests/usr.bin/xlint/lint1/c99_init_array.exp cvs rdiff -u -r1.200 -r1.201 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/c99_init_array.c diff -u src/tests/usr.bin/xlint/lint1/c99_init_array.c:1.1 src/tests/usr.bin/xlint/lint1/c99_init_array.c:1.2 --- src/tests/usr.bin/xlint/lint1/c99_init_array.c:1.1 Fri Jul 2 21:52:36 2021 +++ src/tests/usr.bin/xlint/lint1/c99_init_array.c Fri Jul 2 22:46:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: c99_init_array.c,v 1.1 2021/07/02 21:52:36 rillig Exp $ */ +/* $NetBSD: c99_init_array.c,v 1.2 2021/07/02 22:46:43 rillig Exp $ */ # 3 "c99_init_array.c" /* @@ -11,7 +11,7 @@ // one mentioned. int arr_11[] = { [10] = 10, [0] = 0 }; typedef int ctassert_11[sizeof(arr_11) / sizeof(arr_11[0]) == 11 ? -1 : 1]; -/* TODO: expect-1: error: negative array dimension (-1) [20] */ +/* expect-1: error: negative array dimension (-1) [20] */ // Without an explicit subscript designator, the subscript counts up. int arr_3[] = { [1] = 1, [0] = 0, 1, 2 }; Index: src/tests/usr.bin/xlint/lint1/c99_init_array.exp diff -u src/tests/usr.bin/xlint/lint1/c99_init_array.exp:1.1 src/tests/usr.bin/xlint/lint1/c99_init_array.exp:1.2 --- src/tests/usr.bin/xlint/lint1/c99_init_array.exp:1.1 Fri Jul 2 21:52:36 2021 +++ src/tests/usr.bin/xlint/lint1/c99_init_array.exp Fri Jul 2 22:46:43 2021 @@ -1 +1,2 @@ +c99_init_array.c(13): error: negative array dimension (-1) [20] c99_init_array.c(18): error: negative array dimension (-1) [20] Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.200 src/usr.bin/xlint/lint1/init.c:1.201 --- src/usr.bin/xlint/lint1/init.c:1.200 Tue Jun 29 21:05:32 2021 +++ src/usr.bin/xlint/lint1/init.c Fri Jul 2 22:46:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.200 2021/06/29 21:05:32 rillig Exp $ */ +/* $NetBSD: init.c,v 1.201 2021/07/02 22:46:43 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.200 2021/06/29 21:05:32 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.201 2021/07/02 22:46:43 rillig Exp $"); #endif #include @@ -118,14 +118,29 @@ struct designation { * See C99 6.7.8p17. */ struct brace_level { - const type_t *bl_type; /* The type of the current object that - * is initialized at this brace - * level. */ + /* + * The type of the current object that is initialized at this brace + * level. + */ + const type_t *bl_type; struct designation bl_designation; /* .member[123].member */ - const sym_t *bl_member; /* for structs and unions */ - size_t bl_subscript; /* for arrays */ + /* + * The next member of the struct or union that is to be initialized, + * unless a specific member is selected by a designator. + */ + const sym_t *bl_member; + /* + * The subscript of the next array element that is to be initialized, + * unless a specific subscript is selected by a designator. + */ + size_t bl_subscript; + /* + * The maximum subscript that has ever be seen; only relevant for an + * array of unknown size at the outermost brace level. + */ + size_t bl_max_subscript; bool bl_scalar_done: 1; /* for scalars */ bool bl_confused: 1; /* skip further checks */ @@ -700,6 +715,8 @@ brace_level_advance(struct brace_level * break; case ARRAY: bl->bl_subscript++; + if (bl->bl_subscript > bl->bl_max_subscript) + bl->bl_max_subscript = bl->bl_subscript; break; default: bl->bl_scalar_done = true; @@ -822,12 +839,7 @@ initialization_set_size_of_unknown_array if (in->in_sym->s_type->t_incomplete_array && in->in_brace_level->bl_enclosing == NULL) update_type_of_array_of_unknown_size(in->in_sym, - in->in_brace_level->bl_subscript); - /* - * XXX: bl_subscript is not entirely correct. - * It should rather be max(actually used subscript) + 1. - * int arr[] = { [100] = 100, [0] = 0 }; - */ + in->in_brace_level->bl_max_subscript); } static void
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Jul 2 22:46:43 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: c99_init_array.c c99_init_array.exp src/usr.bin/xlint/lint1: init.c Log Message: lint: fix initialization of array of unknown size The size of the resulting array was computed wrong. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/c99_init_array.c \ src/tests/usr.bin/xlint/lint1/c99_init_array.exp cvs rdiff -u -r1.200 -r1.201 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Jul 2 21:52:36 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: c99_init_array.c c99_init_array.exp Log Message: tests/lint: add test for array subscripts in C99 initialization To generate a diff of this commit: cvs rdiff -u -r1.1070 -r1.1071 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.72 -r1.73 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/c99_init_array.c \ src/tests/usr.bin/xlint/lint1/c99_init_array.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1070 src/distrib/sets/lists/tests/mi:1.1071 --- src/distrib/sets/lists/tests/mi:1.1070 Tue Jun 29 21:33:08 2021 +++ src/distrib/sets/lists/tests/mi Fri Jul 2 21:52:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1070 2021/06/29 21:33:08 rillig Exp $ +# $NetBSD: mi,v 1.1071 2021/07/02 21:52:36 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6107,6 +6107,8 @@ ./usr/tests/usr.bin/xlint/lint1/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua ./usr/tests/usr.bin/xlint/lint1/c11_generic_expression.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/c11_generic_expression.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/c99_init_array.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/c99_init_array.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/c99_init_designator.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/c99_init_designator.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/d_alignof.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/xlint/lint1/Makefile diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.72 src/tests/usr.bin/xlint/lint1/Makefile:1.73 --- src/tests/usr.bin/xlint/lint1/Makefile:1.72 Tue Jun 29 21:33:09 2021 +++ src/tests/usr.bin/xlint/lint1/Makefile Fri Jul 2 21:52:36 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.72 2021/06/29 21:33:09 rillig Exp $ +# $NetBSD: Makefile,v 1.73 2021/07/02 21:52:36 rillig Exp $ NOMAN= # defined MAX_MESSAGE= 345 # see lint1/err.c @@ -12,6 +12,8 @@ TESTS_SH= t_integration FILESDIR= ${TESTSDIR} FILES+= c11_generic_expression.c FILES+= c11_generic_expression.exp +FILES+= c99_init_array.c +FILES+= c99_init_array.exp FILES+= c99_init_designator.c FILES+= c99_init_designator.exp FILES+= d_alignof.c Added files: Index: src/tests/usr.bin/xlint/lint1/c99_init_array.c diff -u /dev/null src/tests/usr.bin/xlint/lint1/c99_init_array.c:1.1 --- /dev/null Fri Jul 2 21:52:36 2021 +++ src/tests/usr.bin/xlint/lint1/c99_init_array.c Fri Jul 2 21:52:36 2021 @@ -0,0 +1,19 @@ +/* $NetBSD: c99_init_array.c,v 1.1 2021/07/02 21:52:36 rillig Exp $ */ +# 3 "c99_init_array.c" + +/* + * Test C99-style initialization of arrays. + */ + +/* lint1-extra-flags: -p */ + +// The size of the array is determined by the maximum index, not by the last +// one mentioned. +int arr_11[] = { [10] = 10, [0] = 0 }; +typedef int ctassert_11[sizeof(arr_11) / sizeof(arr_11[0]) == 11 ? -1 : 1]; +/* TODO: expect-1: error: negative array dimension (-1) [20] */ + +// Without an explicit subscript designator, the subscript counts up. +int arr_3[] = { [1] = 1, [0] = 0, 1, 2 }; +typedef int ctassert_3[sizeof(arr_3) / sizeof(arr_3[0]) == 3 ? -1 : 1]; +/* expect-1: error: negative array dimension (-1) [20] */ Index: src/tests/usr.bin/xlint/lint1/c99_init_array.exp diff -u /dev/null src/tests/usr.bin/xlint/lint1/c99_init_array.exp:1.1 --- /dev/null Fri Jul 2 21:52:36 2021 +++ src/tests/usr.bin/xlint/lint1/c99_init_array.exp Fri Jul 2 21:52:36 2021 @@ -0,0 +1 @@ +c99_init_array.c(18): error: negative array dimension (-1) [20]
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Jul 2 21:52:36 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: c99_init_array.c c99_init_array.exp Log Message: tests/lint: add test for array subscripts in C99 initialization To generate a diff of this commit: cvs rdiff -u -r1.1070 -r1.1071 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.72 -r1.73 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/c99_init_array.c \ src/tests/usr.bin/xlint/lint1/c99_init_array.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Fri Jul 2 21:22:26 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckbool.c Log Message: lint: in strict bool mode, make (flag & FLAG) simpler This is a tiny change in an edge case that does not occur in practice, which is that the left-hand side of the '&' is explicitly cast to an enum type. The apparent "loss of information" from the deleted comment has already been explained in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/ckbool.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/xlint/lint1/ckbool.c diff -u src/usr.bin/xlint/lint1/ckbool.c:1.5 src/usr.bin/xlint/lint1/ckbool.c:1.6 --- src/usr.bin/xlint/lint1/ckbool.c:1.5 Fri Jul 2 18:52:20 2021 +++ src/usr.bin/xlint/lint1/ckbool.c Fri Jul 2 21:22:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ckbool.c,v 1.5 2021/07/02 18:52:20 rillig Exp $ */ +/* $NetBSD: ckbool.c,v 1.6 2021/07/02 21:22:26 rillig Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: ckbool.c,v 1.5 2021/07/02 18:52:20 rillig Exp $"); +__RCSID("$NetBSD: ckbool.c,v 1.6 2021/07/02 21:22:26 rillig Exp $"); #endif #include @@ -229,14 +229,8 @@ is_typeok_bool_operand(const tnode_t *tn /* For enums that are used as bit sets, allow "flags & FLAG". */ if (tn->tn_op == BITAND && tn->tn_left->tn_op == CVT && - tn->tn_left->tn_type->t_tspec == INT && !tn->tn_left->tn_cast && - tn->tn_left->tn_left->tn_type->t_tspec == ENUM && - /* - * XXX: Somehow the type information got lost here. The type - * of the enum constant on the right-hand side should still be - * ENUM, but is INT. - */ - tn->tn_right->tn_type->t_tspec == INT) + tn->tn_left->tn_type->t_is_enum && + tn->tn_right->tn_type->t_is_enum) return true; return false;
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Fri Jul 2 21:22:26 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckbool.c Log Message: lint: in strict bool mode, make (flag & FLAG) simpler This is a tiny change in an edge case that does not occur in practice, which is that the left-hand side of the '&' is explicitly cast to an enum type. The apparent "loss of information" from the deleted comment has already been explained in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/ckbool.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd
Module Name:xsrc Committed By: christos Date: Fri Jul 2 19:31:47 UTC 2021 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd: ppc_video.c Log Message: use PORT_SIZE from compiler.h instead of int. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c 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/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.12 xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.13 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.12 Tue Jun 1 20:33:22 2021 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c Fri Jul 2 15:31:47 2021 @@ -60,7 +60,7 @@ volatile unsigned char *ioBase = MAP_FAI /* XXX why the hell is this necessary?! */ #if defined(__arm__) || defined(__mips__) -unsigned int IOPortBase = (int)MAP_FAILED; +unsigned PORT_SIZE IOPortBase = (unsigned PORT_SIZE)MAP_FAILED; #endif Bool @@ -95,7 +95,7 @@ xf86DisableIO() munmap(__UNVOLATILE(ioBase), 0x1); ioBase = MAP_FAILED; #ifdef __arm__ -IOPortBase = (unsigned int)MAP_FAILED; +IOPortBase = (unsigned PORT_SIZE)MAP_FAILED; #endif } #endif
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd
Module Name:xsrc Committed By: christos Date: Fri Jul 2 19:31:47 UTC 2021 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd: ppc_video.c Log Message: use PORT_SIZE from compiler.h instead of int. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Jul 2 18:52:21 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c d_c99_bool_strict.exp src/usr.bin/xlint/lint1: ckbool.c Log Message: lint: no special check for unary operators in strict bool mode All interesting constellations regarding unary operators are already covered by the simple model from ops.def. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.25 -r1.26 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/lint1/ckbool.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.28 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.29 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.28 Mon Apr 5 01:35:34 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Fri Jul 2 18:52:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict.c,v 1.28 2021/04/05 01:35:34 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict.c,v 1.29 2021/07/02 18:52:20 rillig Exp $ */ # 3 "d_c99_bool_strict.c" /* @@ -439,6 +439,8 @@ strict_bool_operand_unary_address(void) b = *bp; } +/* see strict_bool_operand_unary_all below for the other unary operators. */ + /* * strict-bool-operand-binary: * Operator left: bool? other? right: bool? other? @@ -512,7 +514,7 @@ strict_bool_operand_binary(bool b, int i } void -strict_bool_operand_binary_all(bool b, unsigned u) +strict_bool_operand_unary_all(bool b) { b = !b; b = ~b; /* expect: 335 */ @@ -522,7 +524,11 @@ strict_bool_operand_binary_all(bool b, u b--; /* expect: 335 */ b = +b; /* expect: 335 */ b = -b; /* expect: 335 */ +} +void +strict_bool_operand_binary_all(bool b, unsigned u) +{ b = b * b; /* expect: 336 *//* expect: 337 */ b = b / b; /* expect: 336 *//* expect: 337 */ b = b % b; /* expect: 336 *//* expect: 337 */ Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.25 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.26 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.25 Fri Apr 9 20:12:00 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp Fri Jul 2 18:52:20 2021 @@ -71,98 +71,98 @@ d_c99_bool_strict.c(424): error: operand d_c99_bool_strict.c(425): error: operand of '!' must be bool, not 'int' [330] d_c99_bool_strict.c(426): error: operand of '!' must be bool, not 'int' [330] d_c99_bool_strict.c(427): error: operand of '!' must be bool, not 'int' [330] -d_c99_bool_strict.c(480): error: operands of '=' have incompatible types (_Bool != int) [107] -d_c99_bool_strict.c(486): error: operands of '=' have incompatible types (_Bool != int) [107] -d_c99_bool_strict.c(502): error: operand of '!' must be bool, not 'int' [330] -d_c99_bool_strict.c(503): error: left operand of '&&' must be bool, not 'int' [331] -d_c99_bool_strict.c(503): error: right operand of '&&' must be bool, not 'int' [332] -d_c99_bool_strict.c(504): error: left operand of '||' must be bool, not 'int' [331] -d_c99_bool_strict.c(504): error: right operand of '||' must be bool, not 'int' [332] -d_c99_bool_strict.c(506): error: right operand of '&&' must be bool, not 'int' [332] -d_c99_bool_strict.c(507): error: left operand of '&&' must be bool, not 'int' [331] -d_c99_bool_strict.c(508): error: right operand of '||' must be bool, not 'int' [332] -d_c99_bool_strict.c(509): error: left operand of '||' must be bool, not 'int' [331] -d_c99_bool_strict.c(518): error: operand of '~' must not be bool [335] -d_c99_bool_strict.c(519): error: operand of '++x' must not be bool [335] -d_c99_bool_strict.c(520): error: operand of '--x' must not be bool [335] -d_c99_bool_strict.c(521): error: operand of 'x++' must not be bool [335] -d_c99_bool_strict.c(522): error: operand of 'x--' must not be bool [335] -d_c99_bool_strict.c(523): error: operand of '+' must not be bool [335] -d_c99_bool_strict.c(524): error: operand of '-' must not be bool [335] -d_c99_bool_strict.c(526): error: left operand of '*' must not be bool [336] -d_c99_bool_strict.c(526): error: right operand of '*' must not be bool [337] -d_c99_bool_strict.c(527): error: left operand of '/' must not be bool [336] -d_c99_bool_strict.c(527): error: right operand of '/' must not be bool [337] -d_c99_bool_strict.c(528): error: left operand of '%' must not be bool [336] -d_c99_bool_strict.c(528): error: right operand of '%' must not be bool [337] -d_c99_bool_strict.c(529): error: left operand of '+' must not be bool [336] -d_c99_bool_strict.c(529): error: right operand of '+' must not be bool [337] -d_c99_bool_strict.c(530): error: left operand of '-' must not be bool [336]
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Jul 2 18:52:21 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c d_c99_bool_strict.exp src/usr.bin/xlint/lint1: ckbool.c Log Message: lint: no special check for unary operators in strict bool mode All interesting constellations regarding unary operators are already covered by the simple model from ops.def. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.25 -r1.26 \ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/lint1/ckbool.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/xlint
Module Name:src Committed By: rillig Date: Fri Jul 2 18:22:09 UTC 2021 Modified Files: src/usr.bin/xlint/common: tyname.c src/usr.bin/xlint/lint1: lint1.h Log Message: lint: document lint1_type.t_is_enum Enum types are subject to implicit conversions, as opposed to struct, union, pointer and function types. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.bin/xlint/common/tyname.c cvs rdiff -u -r1.108 -r1.109 src/usr.bin/xlint/lint1/lint1.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint
Module Name:src Committed By: rillig Date: Fri Jul 2 18:22:09 UTC 2021 Modified Files: src/usr.bin/xlint/common: tyname.c src/usr.bin/xlint/lint1: lint1.h Log Message: lint: document lint1_type.t_is_enum Enum types are subject to implicit conversions, as opposed to struct, union, pointer and function types. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.bin/xlint/common/tyname.c cvs rdiff -u -r1.108 -r1.109 src/usr.bin/xlint/lint1/lint1.h 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/xlint/common/tyname.c diff -u src/usr.bin/xlint/common/tyname.c:1.42 src/usr.bin/xlint/common/tyname.c:1.43 --- src/usr.bin/xlint/common/tyname.c:1.42 Mon Jun 28 10:29:05 2021 +++ src/usr.bin/xlint/common/tyname.c Fri Jul 2 18:22:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tyname.c,v 1.42 2021/06/28 10:29:05 rillig Exp $ */ +/* $NetBSD: tyname.c,v 1.43 2021/07/02 18:22:09 rillig Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tyname.c,v 1.42 2021/06/28 10:29:05 rillig Exp $"); +__RCSID("$NetBSD: tyname.c,v 1.43 2021/07/02 18:22:09 rillig Exp $"); #endif #include @@ -351,10 +351,6 @@ type_name(const type_t *tp) if (tp == NULL) return "(null)"; - /* - * XXX: Why is this necessary, and in which cases does this apply? - * Shouldn't the type be an ENUM from the beginning? - */ if ((t = tp->t_tspec) == INT && tp->t_is_enum) t = ENUM; Index: src/usr.bin/xlint/lint1/lint1.h diff -u src/usr.bin/xlint/lint1/lint1.h:1.108 src/usr.bin/xlint/lint1/lint1.h:1.109 --- src/usr.bin/xlint/lint1/lint1.h:1.108 Mon Jun 28 08:52:55 2021 +++ src/usr.bin/xlint/lint1/lint1.h Fri Jul 2 18:22:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lint1.h,v 1.108 2021/06/28 08:52:55 rillig Exp $ */ +/* $NetBSD: lint1.h,v 1.109 2021/07/02 18:22:09 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -165,7 +165,16 @@ struct lint1_type { bool t_vararg : 1; /* prototype with '...' */ bool t_typedef : 1; /* type defined with typedef */ bool t_bitfield : 1; - bool t_is_enum : 1; /* type is (or was) enum (t_enum valid) */ + /* + * Either the type is currently an enum (having t_tspec ENUM), or + * it is an integer type (typically INT) that has been implicitly + * converted from an enum type. In both cases, t_enum is valid. + * + * The information about a former enum type is retained to allow + * type checks in expressions such as ((var1 & 0x0001) == var2), to + * detect when var1 and var2 are from incompatible enum types. + */ + bool t_is_enum : 1; bool t_packed : 1; union { int _t_dim; /* dimension (if ARRAY) */
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: dholland Date: Fri Jul 2 17:14:37 UTC 2021 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: Add VOP_PARSEPATH to zfs's vnode table. "oops" zfs not being under src/sys strikes again :-( To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.71 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.72 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.71 Sun Nov 15 00:54:13 2020 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Fri Jul 2 17:14:36 2021 @@ -6347,6 +6347,7 @@ const struct genfs_ops zfs_genfsops = { int (**zfs_vnodeop_p)(void *); const struct vnodeopv_entry_desc zfs_vnodeop_entries[] = { { _default_desc, vn_default_error }, + { _parsepath_desc, genfs_parsepath }, { _lookup_desc, zfs_netbsd_lookup }, { _create_desc, zfs_netbsd_create }, { _mknod_desc, zfs_netbsd_mknod },
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: dholland Date: Fri Jul 2 17:14:37 UTC 2021 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: Add VOP_PARSEPATH to zfs's vnode table. "oops" zfs not being under src/sys strikes again :-( To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Fri Jul 2 16:57:16 UTC 2021 Modified Files: src/sys/kern: vnode_if.c src/sys/rump/include/rump: rumpvnode_if.h src/sys/rump/librump/rumpvfs: rumpvnode_if.c src/sys/sys: vnode_if.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/kern/vnode_if.c cvs rdiff -u -r1.35 -r1.36 src/sys/rump/include/rump/rumpvnode_if.h cvs rdiff -u -r1.35 -r1.36 src/sys/rump/librump/rumpvfs/rumpvnode_if.c cvs rdiff -u -r1.106 -r1.107 src/sys/sys/vnode_if.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/vnode_if.c diff -u src/sys/kern/vnode_if.c:1.113 src/sys/kern/vnode_if.c:1.114 --- src/sys/kern/vnode_if.c:1.113 Tue Jun 29 22:37:11 2021 +++ src/sys/kern/vnode_if.c Fri Jul 2 16:57:15 2021 @@ -1,11 +1,11 @@ -/* $NetBSD: vnode_if.c,v 1.113 2021/06/29 22:37:11 dholland Exp $ */ +/* $NetBSD: vnode_if.c,v 1.114 2021/07/02 16:57:15 dholland Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.81 2021/06/29 22:34:08 dholland Exp + * NetBSD: vnode_if.src,v 1.82 2021/07/02 16:56:22 dholland Exp * by the script: * NetBSD: vnode_if.sh,v 1.70 2020/05/16 18:31:50 christos Exp */ @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.113 2021/06/29 22:37:11 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.114 2021/07/02 16:57:15 dholland Exp $"); #include #include @@ -171,11 +171,11 @@ VOP_PARSEPATH(struct vnode *dvp, a.a_dvp = dvp; a.a_name = name; a.a_retval = retval; - error = vop_pre(dvp, , , FST_YES); + error = vop_pre(dvp, , , FST_NO); if (error) return error; error = (VCALL(dvp, VOFFSET(vop_parsepath), )); - vop_post(dvp, mp, mpsafe, FST_YES); + vop_post(dvp, mp, mpsafe, FST_NO); return error; } Index: src/sys/rump/include/rump/rumpvnode_if.h diff -u src/sys/rump/include/rump/rumpvnode_if.h:1.35 src/sys/rump/include/rump/rumpvnode_if.h:1.36 --- src/sys/rump/include/rump/rumpvnode_if.h:1.35 Tue Jun 29 22:37:11 2021 +++ src/sys/rump/include/rump/rumpvnode_if.h Fri Jul 2 16:57:15 2021 @@ -1,11 +1,11 @@ -/* $NetBSD: rumpvnode_if.h,v 1.35 2021/06/29 22:37:11 dholland Exp $ */ +/* $NetBSD: rumpvnode_if.h,v 1.36 2021/07/02 16:57:15 dholland Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.81 2021/06/29 22:34:08 dholland Exp + * NetBSD: vnode_if.src,v 1.82 2021/07/02 16:56:22 dholland Exp * by the script: * NetBSD: vnode_if.sh,v 1.70 2020/05/16 18:31:50 christos Exp */ Index: src/sys/rump/librump/rumpvfs/rumpvnode_if.c diff -u src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.35 src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.36 --- src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.35 Tue Jun 29 22:37:11 2021 +++ src/sys/rump/librump/rumpvfs/rumpvnode_if.c Fri Jul 2 16:57:16 2021 @@ -1,11 +1,11 @@ -/* $NetBSD: rumpvnode_if.c,v 1.35 2021/06/29 22:37:11 dholland Exp $ */ +/* $NetBSD: rumpvnode_if.c,v 1.36 2021/07/02 16:57:16 dholland Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.81 2021/06/29 22:34:08 dholland Exp + * NetBSD: vnode_if.src,v 1.82 2021/07/02 16:56:22 dholland Exp * by the script: * NetBSD: vnode_if.sh,v 1.70 2020/05/16 18:31:50 christos Exp */ @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.35 2021/06/29 22:37:11 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.36 2021/07/02 16:57:16 dholland Exp $"); #include #include Index: src/sys/sys/vnode_if.h diff -u src/sys/sys/vnode_if.h:1.106 src/sys/sys/vnode_if.h:1.107 --- src/sys/sys/vnode_if.h:1.106 Tue Jun 29 22:37:11 2021 +++ src/sys/sys/vnode_if.h Fri Jul 2 16:57:15 2021 @@ -1,11 +1,11 @@ -/* $NetBSD: vnode_if.h,v 1.106 2021/06/29 22:37:11 dholland Exp $ */ +/* $NetBSD: vnode_if.h,v 1.107 2021/07/02 16:57:15 dholland Exp $ */ /* * Warning: DO NOT EDIT! This file is automatically generated! * (Modifications made here may easily be lost!) * * Created from the file: - * NetBSD: vnode_if.src,v 1.81 2021/06/29 22:34:08 dholland Exp + * NetBSD: vnode_if.src,v 1.82 2021/07/02 16:56:22 dholland Exp * by the script: * NetBSD: vnode_if.sh,v 1.70 2020/05/16 18:31:50 christos Exp */
CVS commit: src/sys/kern
Module Name:src Committed By: dholland Date: Fri Jul 2 16:56:22 UTC 2021 Modified Files: src/sys/kern: vnode_if.src Log Message: Turn off fstrans for VOP_PARSEPATH. Fixes t_umountstress deadlock. Diagnosis by hannken@. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/kern/vnode_if.src 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/vnode_if.src diff -u src/sys/kern/vnode_if.src:1.81 src/sys/kern/vnode_if.src:1.82 --- src/sys/kern/vnode_if.src:1.81 Tue Jun 29 22:34:08 2021 +++ src/sys/kern/vnode_if.src Fri Jul 2 16:56:22 2021 @@ -1,4 +1,4 @@ -# $NetBSD: vnode_if.src,v 1.81 2021/06/29 22:34:08 dholland Exp $ +# $NetBSD: vnode_if.src,v 1.82 2021/07/02 16:56:22 dholland Exp $ # # Copyright (c) 1992, 1993 # The Regents of the University of California. All rights reserved. @@ -60,9 +60,10 @@ vop_bwrite { }; # -#% parsepath dvp L L L +#% parsepath dvp = = = # vop_parsepath { + FSTRANS=NO IN struct vnode *dvp; IN const char *name; OUT size_t *retval;
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Fri Jul 2 16:57:16 UTC 2021 Modified Files: src/sys/kern: vnode_if.c src/sys/rump/include/rump: rumpvnode_if.h src/sys/rump/librump/rumpvfs: rumpvnode_if.c src/sys/sys: vnode_if.h Log Message: Regen. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/kern/vnode_if.c cvs rdiff -u -r1.35 -r1.36 src/sys/rump/include/rump/rumpvnode_if.h cvs rdiff -u -r1.35 -r1.36 src/sys/rump/librump/rumpvfs/rumpvnode_if.c cvs rdiff -u -r1.106 -r1.107 src/sys/sys/vnode_if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: dholland Date: Fri Jul 2 16:56:22 UTC 2021 Modified Files: src/sys/kern: vnode_if.src Log Message: Turn off fstrans for VOP_PARSEPATH. Fixes t_umountstress deadlock. Diagnosis by hannken@. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/kern/vnode_if.src Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: jmcneill Date: Fri Jul 2 10:14:07 UTC 2021 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: port-macppc/56289: kernel spinout on macppc when runing ATF tests with LOCKDEBUG Move call to snapper_set_rate from trigger_output to commit_settings, since the intr lock is not held when calling the latter. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.59 src/sys/arch/macppc/dev/snapper.c:1.60 --- src/sys/arch/macppc/dev/snapper.c:1.59 Mon Apr 26 14:01:47 2021 +++ src/sys/arch/macppc/dev/snapper.c Fri Jul 2 10:14:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.59 2021/04/26 14:01:47 thorpej Exp $ */ +/* $NetBSD: snapper.c,v 1.60 2021/07/02 10:14:07 jmcneill Exp $ */ /* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */ /* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.59 2021/04/26 14:01:47 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.60 2021/07/02 10:14:07 jmcneill Exp $"); #include #include @@ -133,6 +133,7 @@ static int snapper_query_format(void *, static int snapper_set_format(void *, int, const audio_params_t *, const audio_params_t *, audio_filter_reg_t *, audio_filter_reg_t *); +static int snapper_commit_settings(void *); static int snapper_round_blocksize(void *, int, int, const audio_params_t *); static int snapper_halt_output(void *); static int snapper_halt_input(void *); @@ -232,6 +233,7 @@ CFATTACH_DECL_NEW(snapper, sizeof(struct const struct audio_hw_if snapper_hw_if = { .query_format = snapper_query_format, .set_format = snapper_set_format, + .commit_settings = snapper_commit_settings, .round_blocksize = snapper_round_blocksize, .halt_output = snapper_halt_output, .halt_input = snapper_halt_input, @@ -1013,6 +1015,17 @@ snapper_set_format(void *h, int setmode, } static int +snapper_commit_settings(void *h) +{ + struct snapper_softc *sc; + + DPRINTF("commit_settings\n"); + sc = h; + + return snapper_set_rate(sc); +} + +static int snapper_round_blocksize(void *h, int size, int mode, const audio_params_t *param) { @@ -1408,14 +1421,10 @@ snapper_trigger_output(void *h, void *st struct dbdma_command *cmd; vaddr_t va; int i, len, intmode; - int res; DPRINTF("trigger_output %p %p 0x%x\n", start, end, bsize); sc = h; - if ((res = snapper_set_rate(sc)) != 0) - return res; - cmd = sc->sc_odmacmd; sc->sc_ointr = intr; sc->sc_oarg = arg; @@ -1463,14 +1472,10 @@ snapper_trigger_input(void *h, void *sta struct dbdma_command *cmd; vaddr_t va; int i, len, intmode; - int res; DPRINTF("trigger_input %p %p 0x%x\n", start, end, bsize); sc = h; - if ((res = snapper_set_rate(sc)) != 0) - return res; - cmd = sc->sc_idmacmd; sc->sc_iintr = intr; sc->sc_iarg = arg;
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: jmcneill Date: Fri Jul 2 10:14:07 UTC 2021 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: port-macppc/56289: kernel spinout on macppc when runing ATF tests with LOCKDEBUG Move call to snapper_set_rate from trigger_output to commit_settings, since the intr lock is not held when calling the latter. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/macppc/dev/snapper.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/arm
Module Name:src Committed By: skrll Date: Fri Jul 2 07:15:35 UTC 2021 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: Be consistent about #ifndef ARM32_DISABLE_ALIGNMENT_FAULTS. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/arch/arm/arm/cpufunc.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/arm/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.180 src/sys/arch/arm/arm/cpufunc.c:1.181 --- src/sys/arch/arm/arm/cpufunc.c:1.180 Sun Jan 31 05:59:55 2021 +++ src/sys/arch/arm/arm/cpufunc.c Fri Jul 2 07:15:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.180 2021/01/31 05:59:55 skrll Exp $ */ +/* $NetBSD: cpufunc.c,v 1.181 2021/07/02 07:15:35 skrll Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.180 2021/01/31 05:59:55 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.181 2021/07/02 07:15:35 skrll Exp $"); #include "opt_arm_start.h" #include "opt_compat_netbsd.h" @@ -2868,10 +2868,10 @@ pj4bv7_setup(char *args) pj4b_config(); cpuctrl = CPU_CONTROL_MMU_ENABLE; -#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_UNAL_ENABLE; -#else +#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS cpuctrl |= CPU_CONTROL_AFLT_ENABLE; +#else + cpuctrl |= CPU_CONTROL_UNAL_ENABLE; #endif cpuctrl |= CPU_CONTROL_DC_ENABLE; cpuctrl |= CPU_CONTROL_IC_ENABLE;
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Fri Jul 2 07:15:35 UTC 2021 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: Be consistent about #ifndef ARM32_DISABLE_ALIGNMENT_FAULTS. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/arch/arm/arm/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.