fix various typos in comments, documentation and messages.diff -r1.36 -r1.37 src/bin/sh/memalloc.c
(andvar)
--- src/bin/sh/memalloc.c 2022/04/10 09:50:44 1.36
+++ src/bin/sh/memalloc.c 2022/05/31 08:43:13 1.37
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: memalloc.c,v 1.36 2022/04/10 09:50:44 andvar Exp $ */ | 1 | /* $NetBSD: memalloc.c,v 1.37 2022/05/31 08:43:13 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1991, 1993 | 4 | * Copyright (c) 1991, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * Kenneth Almquist. | 8 | * Kenneth Almquist. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -27,27 +27,27 @@ | @@ -27,27 +27,27 @@ | |||
27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
32 | * SUCH DAMAGE. | 32 | * SUCH DAMAGE. | |
33 | */ | 33 | */ | |
34 | 34 | |||
35 | #include <sys/cdefs.h> | 35 | #include <sys/cdefs.h> | |
36 | #ifndef lint | 36 | #ifndef lint | |
37 | #if 0 | 37 | #if 0 | |
38 | static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95"; | 38 | static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95"; | |
39 | #else | 39 | #else | |
40 | __RCSID("$NetBSD: memalloc.c,v 1.36 2022/04/10 09:50:44 andvar Exp $"); | 40 | __RCSID("$NetBSD: memalloc.c,v 1.37 2022/05/31 08:43:13 andvar Exp $"); | |
41 | #endif | 41 | #endif | |
42 | #endif /* not lint */ | 42 | #endif /* not lint */ | |
43 | 43 | |||
44 | #include <limits.h> | 44 | #include <limits.h> | |
45 | #include <stdarg.h> | 45 | #include <stdarg.h> | |
46 | #include <stdlib.h> | 46 | #include <stdlib.h> | |
47 | #include <unistd.h> | 47 | #include <unistd.h> | |
48 | 48 | |||
49 | #include "shell.h" | 49 | #include "shell.h" | |
50 | #include "output.h" | 50 | #include "output.h" | |
51 | #include "memalloc.h" | 51 | #include "memalloc.h" | |
52 | #include "error.h" | 52 | #include "error.h" | |
53 | #include "machdep.h" | 53 | #include "machdep.h" | |
@@ -315,27 +315,27 @@ makestrspace(void) | @@ -315,27 +315,27 @@ makestrspace(void) | |||
315 | growstackblock(); | 315 | growstackblock(); | |
316 | sstrnleft = stackblocksize() - len; | 316 | sstrnleft = stackblocksize() - len; | |
317 | return stackblock() + len; | 317 | return stackblock() + len; | |
318 | } | 318 | } | |
319 | 319 | |||
320 | /* | 320 | /* | |
321 | * Note that this only works to release stack space for reuse | 321 | * Note that this only works to release stack space for reuse | |
322 | * if nothing else has allocated space on the stack since the grabstackstr() | 322 | * if nothing else has allocated space on the stack since the grabstackstr() | |
323 | * | 323 | * | |
324 | * "s" is the start of the area to be released, and "p" represents the end | 324 | * "s" is the start of the area to be released, and "p" represents the end | |
325 | * of the string we have stored beyond there and are now releasing. | 325 | * of the string we have stored beyond there and are now releasing. | |
326 | * (ie: "p" should be the same as in the call to grabstackstr()). | 326 | * (ie: "p" should be the same as in the call to grabstackstr()). | |
327 | * | 327 | * | |
328 | * stunalloc(s) and ungrabstackstr(s, p) are almost interchangable after | 328 | * stunalloc(s) and ungrabstackstr(s, p) are almost interchangeable after | |
329 | * a grabstackstr(), however the latter also returns string space so we | 329 | * a grabstackstr(), however the latter also returns string space so we | |
330 | * can just continue with STPUTC() etc without needing a new STARTSTACKSTR(s) | 330 | * can just continue with STPUTC() etc without needing a new STARTSTACKSTR(s) | |
331 | */ | 331 | */ | |
332 | void | 332 | void | |
333 | ungrabstackstr(char *s, char *p) | 333 | ungrabstackstr(char *s, char *p) | |
334 | { | 334 | { | |
335 | #ifdef DEBUG | 335 | #ifdef DEBUG | |
336 | if (s < stacknxt || stacknxt + stacknleft < s) | 336 | if (s < stacknxt || stacknxt + stacknleft < s) | |
337 | abort(); | 337 | abort(); | |
338 | #endif | 338 | #endif | |
339 | stacknleft += stacknxt - s; | 339 | stacknleft += stacknxt - s; | |
340 | stacknxt = s; | 340 | stacknxt = s; | |
341 | sstrnleft = stacknleft - (p - s); | 341 | sstrnleft = stacknleft - (p - s); |
--- src/lib/libc/gen/pthread_atfork.c 2020/05/15 14:37:21 1.15
+++ src/lib/libc/gen/pthread_atfork.c 2022/05/31 08:43:13 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pthread_atfork.c,v 1.15 2020/05/15 14:37:21 joerg Exp $ */ | 1 | /* $NetBSD: pthread_atfork.c,v 1.16 2022/05/31 08:43:13 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2002 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2002 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Nathan J. Williams. | 8 | * by Nathan J. Williams. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | #if defined(LIBC_SCCS) && !defined(lint) | 33 | #if defined(LIBC_SCCS) && !defined(lint) | |
34 | __RCSID("$NetBSD: pthread_atfork.c,v 1.15 2020/05/15 14:37:21 joerg Exp $"); | 34 | __RCSID("$NetBSD: pthread_atfork.c,v 1.16 2022/05/31 08:43:13 andvar Exp $"); | |
35 | #endif /* LIBC_SCCS and not lint */ | 35 | #endif /* LIBC_SCCS and not lint */ | |
36 | 36 | |||
37 | #include "namespace.h" | 37 | #include "namespace.h" | |
38 | 38 | |||
39 | #include <errno.h> | 39 | #include <errno.h> | |
40 | #include <stdlib.h> | 40 | #include <stdlib.h> | |
41 | #include <unistd.h> | 41 | #include <unistd.h> | |
42 | #include <sys/queue.h> | 42 | #include <sys/queue.h> | |
43 | #include "extern.h" | 43 | #include "extern.h" | |
44 | #include "reentrant.h" | 44 | #include "reentrant.h" | |
45 | 45 | |||
46 | #ifdef __weak_alias | 46 | #ifdef __weak_alias | |
47 | __weak_alias(pthread_atfork, _pthread_atfork) | 47 | __weak_alias(pthread_atfork, _pthread_atfork) | |
@@ -192,25 +192,25 @@ fork(void) | @@ -192,25 +192,25 @@ fork(void) | |||
192 | * the runqueue spinlock could have been held at the | 192 | * the runqueue spinlock could have been held at the | |
193 | * moment of fork(). Since the other threads do not | 193 | * moment of fork(). Since the other threads do not | |
194 | * exist in this process, the spinlock will never be | 194 | * exist in this process, the spinlock will never be | |
195 | * unlocked, and we would wedge. | 195 | * unlocked, and we would wedge. | |
196 | * Instead, we reinitialize atfork_lock, since we know | 196 | * Instead, we reinitialize atfork_lock, since we know | |
197 | * that the state of the atfork lists is consistent here, | 197 | * that the state of the atfork lists is consistent here, | |
198 | * and that there are no other threads to be affected by | 198 | * and that there are no other threads to be affected by | |
199 | * the forcible cleaning of the queue. | 199 | * the forcible cleaning of the queue. | |
200 | * This permits double-forking to work, although | 200 | * This permits double-forking to work, although | |
201 | * it requires knowing that it's "safe" to initialize | 201 | * it requires knowing that it's "safe" to initialize | |
202 | * a locked mutex in this context. | 202 | * a locked mutex in this context. | |
203 | * | 203 | * | |
204 | * The problem exists for users of this interface, | 204 | * The problem exists for users of this interface, | |
205 | * too, since the intented use of pthread_atfork() is | 205 | * too, since the intended use of pthread_atfork() is | |
206 | * to acquire locks across the fork call to ensure | 206 | * to acquire locks across the fork call to ensure | |
207 | * that the child sees consistent state. There's not | 207 | * that the child sees consistent state. There's not | |
208 | * much that can usefully be done in a child handler, | 208 | * much that can usefully be done in a child handler, | |
209 | * and conventional wisdom discourages using them, but | 209 | * and conventional wisdom discourages using them, but | |
210 | * they're part of the interface, so here we are... | 210 | * they're part of the interface, so here we are... | |
211 | */ | 211 | */ | |
212 | mutex_init(&atfork_lock, NULL); | 212 | mutex_init(&atfork_lock, NULL); | |
213 | } | 213 | } | |
214 | 214 | |||
215 | return ret; | 215 | return ret; | |
216 | } | 216 | } |
--- src/lib/libc/stdlib/bsearch.c 2012/03/04 20:01:45 1.15
+++ src/lib/libc/stdlib/bsearch.c 2022/05/31 08:43:14 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: bsearch.c,v 1.15 2012/03/04 20:01:45 christos Exp $ */ | 1 | /* $NetBSD: bsearch.c,v 1.16 2022/05/31 08:43:14 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1990, 1993 | 4 | * Copyright (c) 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -24,43 +24,43 @@ | @@ -24,43 +24,43 @@ | |||
24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 24 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 25 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 26 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 28 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
29 | * SUCH DAMAGE. | 29 | * SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | #if defined(LIBC_SCCS) && !defined(lint) | 33 | #if defined(LIBC_SCCS) && !defined(lint) | |
34 | #if 0 | 34 | #if 0 | |
35 | static char sccsid[] = "@(#)bsearch.c 8.1 (Berkeley) 6/4/93"; | 35 | static char sccsid[] = "@(#)bsearch.c 8.1 (Berkeley) 6/4/93"; | |
36 | #else | 36 | #else | |
37 | __RCSID("$NetBSD: bsearch.c,v 1.15 2012/03/04 20:01:45 christos Exp $"); | 37 | __RCSID("$NetBSD: bsearch.c,v 1.16 2022/05/31 08:43:14 andvar Exp $"); | |
38 | #endif | 38 | #endif | |
39 | #endif /* LIBC_SCCS and not lint */ | 39 | #endif /* LIBC_SCCS and not lint */ | |
40 | 40 | |||
41 | #include <assert.h> | 41 | #include <assert.h> | |
42 | #include <errno.h> | 42 | #include <errno.h> | |
43 | #include <stdlib.h> | 43 | #include <stdlib.h> | |
44 | 44 | |||
45 | /* | 45 | /* | |
46 | * Perform a binary search. | 46 | * Perform a binary search. | |
47 | * | 47 | * | |
48 | * The code below is a bit sneaky. After a comparison fails, we | 48 | * The code below is a bit sneaky. After a comparison fails, we | |
49 | * divide the work in half by moving either left or right. If lim | 49 | * divide the work in half by moving either left or right. If lim | |
50 | * is odd, moving left simply involves halving lim: e.g., when lim | 50 | * is odd, moving left simply involves halving lim: e.g., when lim | |
51 | * is 5 we look at item 2, so we change lim to 2 so that we will | 51 | * is 5 we look at item 2, so we change lim to 2 so that we will | |
52 | * look at items 0 & 1. If lim is even, the same applies. If lim | 52 | * look at items 0 & 1. If lim is even, the same applies. If lim | |
53 | * is odd, moving right again involes halving lim, this time moving | 53 | * is odd, moving right again involves halving lim, this time moving | |
54 | * the base up one item past p: e.g., when lim is 5 we change base | 54 | * the base up one item past p: e.g., when lim is 5 we change base | |
55 | * to item 3 and make lim 2 so that we will look at items 3 and 4. | 55 | * to item 3 and make lim 2 so that we will look at items 3 and 4. | |
56 | * If lim is even, however, we have to shrink it by one before | 56 | * If lim is even, however, we have to shrink it by one before | |
57 | * halving: e.g., when lim is 4, we still looked at item 2, so we | 57 | * halving: e.g., when lim is 4, we still looked at item 2, so we | |
58 | * have to make lim 3, then halve, obtaining 1, so that we will only | 58 | * have to make lim 3, then halve, obtaining 1, so that we will only | |
59 | * look at item 3. | 59 | * look at item 3. | |
60 | */ | 60 | */ | |
61 | void * | 61 | void * | |
62 | bsearch(const void *key, const void *base0, size_t nmemb, size_t size, | 62 | bsearch(const void *key, const void *base0, size_t nmemb, size_t size, | |
63 | int (*compar)(const void *, const void *)) | 63 | int (*compar)(const void *, const void *)) | |
64 | { | 64 | { | |
65 | const char *base = base0; | 65 | const char *base = base0; | |
66 | size_t lim; | 66 | size_t lim; |
--- src/lib/librt/pset.3 2017/07/03 21:32:51 1.13
+++ src/lib/librt/pset.3 2022/05/31 08:43:14 1.14
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: pset.3,v 1.13 2017/07/03 21:32:51 wiz Exp $ | 1 | .\" $NetBSD: pset.3,v 1.14 2022/05/31 08:43:14 andvar Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c) 2008 The NetBSD Foundation, Inc. | 3 | .\" Copyright (c) 2008 The NetBSD Foundation, Inc. | |
4 | .\" All rights reserved. | 4 | .\" All rights reserved. | |
5 | .\" | 5 | .\" | |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | 6 | .\" This code is derived from software contributed to The NetBSD Foundation | |
7 | .\" by Mindaugas Rasiukevicius <rmind at NetBSD org>. | 7 | .\" by Mindaugas Rasiukevicius <rmind at NetBSD org>. | |
8 | .\" | 8 | .\" | |
9 | .\" Redistribution and use in source and binary forms, with or without | 9 | .\" Redistribution and use in source and binary forms, with or without | |
10 | .\" modification, are permitted provided that the following conditions | 10 | .\" modification, are permitted provided that the following conditions | |
11 | .\" are met: | 11 | .\" are met: | |
12 | .\" 1. Redistributions of source code must retain the above copyright | 12 | .\" 1. Redistributions of source code must retain the above copyright | |
13 | .\" notice, this list of conditions and the following disclaimer. | 13 | .\" notice, this list of conditions and the following disclaimer. | |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
@@ -103,27 +103,27 @@ to the target specified by | @@ -103,27 +103,27 @@ to the target specified by | |||
103 | The current processor set ID to which the target is bound or | 103 | The current processor set ID to which the target is bound or | |
104 | .Dv PS_NONE | 104 | .Dv PS_NONE | |
105 | will be returned in | 105 | will be returned in | |
106 | .Fa opsid , | 106 | .Fa opsid , | |
107 | if the pointer is not | 107 | if the pointer is not | |
108 | .Dv NULL . | 108 | .Dv NULL . | |
109 | .Nx | 109 | .Nx | |
110 | supports the following types of targets specified by | 110 | supports the following types of targets specified by | |
111 | .Fa type : | 111 | .Fa type : | |
112 | .Bl -tag -width P_LWPID -offset 2n | 112 | .Bl -tag -width P_LWPID -offset 2n | |
113 | .It Dv P_PID | 113 | .It Dv P_PID | |
114 | Process identified by the PID. | 114 | Process identified by the PID. | |
115 | .It Dv P_LWPID | 115 | .It Dv P_LWPID | |
116 | Thread of the calling process indentified by the LID. | 116 | Thread of the calling process identified by the LID. | |
117 | .El | 117 | .El | |
118 | .Pp | 118 | .Pp | |
119 | The following actions can be specified: | 119 | The following actions can be specified: | |
120 | .Bl -enum -offset 2n | 120 | .Bl -enum -offset 2n | |
121 | .It | 121 | .It | |
122 | If | 122 | If | |
123 | .Fa psid | 123 | .Fa psid | |
124 | is set to | 124 | is set to | |
125 | .Dv PS_QUERY , | 125 | .Dv PS_QUERY , | |
126 | then the current processor set ID to which the target is bound or | 126 | then the current processor set ID to which the target is bound or | |
127 | .Dv PS_NONE | 127 | .Dv PS_NONE | |
128 | will be returned in | 128 | will be returned in | |
129 | .Fa opsid , | 129 | .Fa opsid , |
--- src/libexec/ld.elf_so/arch/aarch64/mdreloc.c 2020/06/16 21:01:30 1.14
+++ src/libexec/ld.elf_so/arch/aarch64/mdreloc.c 2022/05/31 08:43:14 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */ | 1 | /* $NetBSD: mdreloc.c,v 1.15 2022/05/31 08:43:14 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Matt Thomas of 3am Software Foundry. | 8 | * by Matt Thomas of 3am Software Foundry. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -50,27 +50,27 @@ | @@ -50,27 +50,27 @@ | |||
50 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 50 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
51 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 51 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
52 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 52 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
53 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 53 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
54 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 54 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
55 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 55 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
56 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 56 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
58 | * SUCH DAMAGE. | 58 | * SUCH DAMAGE. | |
59 | */ | 59 | */ | |
60 | 60 | |||
61 | #include <sys/cdefs.h> | 61 | #include <sys/cdefs.h> | |
62 | #ifndef lint | 62 | #ifndef lint | |
63 | __RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $"); | 63 | __RCSID("$NetBSD: mdreloc.c,v 1.15 2022/05/31 08:43:14 andvar Exp $"); | |
64 | #endif /* not lint */ | 64 | #endif /* not lint */ | |
65 | 65 | |||
66 | #include <sys/types.h> | 66 | #include <sys/types.h> | |
67 | #include <string.h> | 67 | #include <string.h> | |
68 | 68 | |||
69 | #include "debug.h" | 69 | #include "debug.h" | |
70 | #include "rtld.h" | 70 | #include "rtld.h" | |
71 | 71 | |||
72 | struct tls_data { | 72 | struct tls_data { | |
73 | size_t td_tlsindex; | 73 | size_t td_tlsindex; | |
74 | Elf_Addr td_tlsoffs; | 74 | Elf_Addr td_tlsoffs; | |
75 | }; | 75 | }; | |
76 | 76 | |||
@@ -148,27 +148,27 @@ _rtld_tlsdesc_fill(const Obj_Entry *obj, | @@ -148,27 +148,27 @@ _rtld_tlsdesc_fill(const Obj_Entry *obj, | |||
148 | rdbg(("TLSDESC %s (weak) in %s --> %p", | 148 | rdbg(("TLSDESC %s (weak) in %s --> %p", | |
149 | obj->strtab + obj->symtab[symnum].st_name, | 149 | obj->strtab + obj->symtab[symnum].st_name, | |
150 | obj->path, (void *)where[1])); | 150 | obj->path, (void *)where[1])); | |
151 | 151 | |||
152 | return; | 152 | return; | |
153 | } | 153 | } | |
154 | offs = def->st_value; | 154 | offs = def->st_value; | |
155 | } else { | 155 | } else { | |
156 | defobj = obj; | 156 | defobj = obj; | |
157 | } | 157 | } | |
158 | offs += rela->r_addend; | 158 | offs += rela->r_addend; | |
159 | 159 | |||
160 | if (defobj->tls_done) { | 160 | if (defobj->tls_done) { | |
161 | /* Variable is in initialy allocated TLS segment */ | 161 | /* Variable is in initially allocated TLS segment */ | |
162 | where[0] = (Elf_Addr)_rtld_tlsdesc_static; | 162 | where[0] = (Elf_Addr)_rtld_tlsdesc_static; | |
163 | where[1] = defobj->tlsoffset + offs + | 163 | where[1] = defobj->tlsoffset + offs + | |
164 | sizeof(struct tls_tcb); | 164 | sizeof(struct tls_tcb); | |
165 | 165 | |||
166 | rdbg(("TLSDESC %s --> %p static", | 166 | rdbg(("TLSDESC %s --> %p static", | |
167 | obj->path, (void *)where[1])); | 167 | obj->path, (void *)where[1])); | |
168 | } else { | 168 | } else { | |
169 | /* TLS offset is unknown at load time, use dynamic resolving */ | 169 | /* TLS offset is unknown at load time, use dynamic resolving */ | |
170 | where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic; | 170 | where[0] = (Elf_Addr)_rtld_tlsdesc_dynamic; | |
171 | where[1] = (Elf_Addr)_rtld_tlsdesc_alloc(defobj->tlsindex, offs); | 171 | where[1] = (Elf_Addr)_rtld_tlsdesc_alloc(defobj->tlsindex, offs); | |
172 | 172 | |||
173 | rdbg(("TLSDESC %s in %s --> %p dynamic (%zu, %p)", | 173 | rdbg(("TLSDESC %s in %s --> %p dynamic (%zu, %p)", | |
174 | obj->strtab + obj->symtab[symnum].st_name, | 174 | obj->strtab + obj->symtab[symnum].st_name, |
--- src/sbin/iscsid/iscsid_lists.c 2016/05/29 13:35:45 1.9
+++ src/sbin/iscsid/iscsid_lists.c 2022/05/31 08:43:14 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: iscsid_lists.c,v 1.9 2016/05/29 13:35:45 mlelstv Exp $ */ | 1 | /* $NetBSD: iscsid_lists.c,v 1.10 2022/05/31 08:43:14 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Wasabi Systems, Inc. | 8 | * by Wasabi Systems, Inc. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -682,27 +682,27 @@ get_connection_info(iscsid_get_connectio | @@ -682,27 +682,27 @@ get_connection_info(iscsid_get_connectio | |||
682 | memset(&res->TargetAlias, 0, sizeof(res->TargetAlias)); | 682 | memset(&res->TargetAlias, 0, sizeof(res->TargetAlias)); | |
683 | } | 683 | } | |
684 | if (init != NULL) { | 684 | if (init != NULL) { | |
685 | res->initiator_id = init->entry.sid; | 685 | res->initiator_id = init->entry.sid; | |
686 | strlcpy((char *)res->initiator_address, (char *)init->address, | 686 | strlcpy((char *)res->initiator_address, (char *)init->address, | |
687 | sizeof(res->initiator_address)); | 687 | sizeof(res->initiator_address)); | |
688 | } | 688 | } | |
689 | UNLOCK_SESSIONS; | 689 | UNLOCK_SESSIONS; | |
690 | } | 690 | } | |
691 | 691 | |||
692 | /* ------------------------------------------------------------------------- */ | 692 | /* ------------------------------------------------------------------------- */ | |
693 | 693 | |||
694 | /* | 694 | /* | |
695 | * find_initator_by_addr: | 695 | * find_initiator_by_addr: | |
696 | * Find an Initiator Portal by Address. | 696 | * Find an Initiator Portal by Address. | |
697 | * | 697 | * | |
698 | * Parameter: the address | 698 | * Parameter: the address | |
699 | * | 699 | * | |
700 | * Returns: The pointer to the portal (or NULL if not found) | 700 | * Returns: The pointer to the portal (or NULL if not found) | |
701 | */ | 701 | */ | |
702 | 702 | |||
703 | static initiator_t * | 703 | static initiator_t * | |
704 | find_initiator_by_addr(uint8_t * addr) | 704 | find_initiator_by_addr(uint8_t * addr) | |
705 | { | 705 | { | |
706 | generic_entry_t *curr; | 706 | generic_entry_t *curr; | |
707 | initiator_t *i = NULL; | 707 | initiator_t *i = NULL; | |
708 | 708 |
--- src/share/man/man9/LWP_CACHE_CREDS.9 2007/12/09 08:53:57 1.2
+++ src/share/man/man9/LWP_CACHE_CREDS.9 2022/05/31 08:43:14 1.3
--- src/sys/arch/amiga/dev/if_esreg.h 2009/10/21 23:53:38 1.7
+++ src/sys/arch/amiga/dev/if_esreg.h 2022/05/31 08:43:14 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: if_esreg.h,v 1.7 2009/10/21 23:53:38 snj Exp $ */ | 1 | /* $NetBSD: if_esreg.h,v 1.8 2022/05/31 08:43:14 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1995 Michael L. Hitch | 4 | * Copyright (c) 1995 Michael L. Hitch | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -107,27 +107,27 @@ union smcregs { | @@ -107,27 +107,27 @@ union smcregs { | |||
107 | 107 | |||
108 | /* Configuration Register */ | 108 | /* Configuration Register */ | |
109 | #define CR_RAM32K 0x2000 /* 32Kx16 RAM */ | 109 | #define CR_RAM32K 0x2000 /* 32Kx16 RAM */ | |
110 | #define CR_NO_WAIT_ST 0x0010 /* No wait state */ | 110 | #define CR_NO_WAIT_ST 0x0010 /* No wait state */ | |
111 | #define CR_SET_SQLCH 0x0002 /* Squelch level 240mv */ | 111 | #define CR_SET_SQLCH 0x0002 /* Squelch level 240mv */ | |
112 | 112 | |||
113 | /* Control Register */ | 113 | /* Control Register */ | |
114 | #define CTR_TE_ENA 0x2000 /* Transmit Error enable */ | 114 | #define CTR_TE_ENA 0x2000 /* Transmit Error enable */ | |
115 | #define CTR_AUTO_RLSE 0x0008 /* Auto Release */ | 115 | #define CTR_AUTO_RLSE 0x0008 /* Auto Release */ | |
116 | 116 | |||
117 | /* MMU Command Register */ | 117 | /* MMU Command Register */ | |
118 | #define MMUCR_NOOP 0x0000 /* No operation */ | 118 | #define MMUCR_NOOP 0x0000 /* No operation */ | |
119 | #define MMUCR_ALLOC 0x2000 /* Allocate memory for TX */ | 119 | #define MMUCR_ALLOC 0x2000 /* Allocate memory for TX */ | |
120 | #define MMUCR_RESET 0x4000 /* Reset to intitial state */ | 120 | #define MMUCR_RESET 0x4000 /* Reset to initial state */ | |
121 | #define MMUCR_REM_RX 0x6000 /* Remove frame from top of RX FIFO */ | 121 | #define MMUCR_REM_RX 0x6000 /* Remove frame from top of RX FIFO */ | |
122 | #define MMUCR_REMRLS_RX 0x8000 /* Remove & release from top of RX FIFO */ | 122 | #define MMUCR_REMRLS_RX 0x8000 /* Remove & release from top of RX FIFO */ | |
123 | #define MMUCR_RLSPKT 0xa000 /* Release specific packet */ | 123 | #define MMUCR_RLSPKT 0xa000 /* Release specific packet */ | |
124 | #define MMUCR_ENQ_TX 0xc000 /* Enqueue packet into TX FIFO */ | 124 | #define MMUCR_ENQ_TX 0xc000 /* Enqueue packet into TX FIFO */ | |
125 | #define MMUCR_RESET_TX 0xe000 /* Reset TX FIFOs */ | 125 | #define MMUCR_RESET_TX 0xe000 /* Reset TX FIFOs */ | |
126 | #define MMUCR_BUSY 0x0100 /* MMU busy */ | 126 | #define MMUCR_BUSY 0x0100 /* MMU busy */ | |
127 | 127 | |||
128 | /* Allocation Result Register */ | 128 | /* Allocation Result Register */ | |
129 | #define ARR_FAILED 0x80 /* Allocation failed */ | 129 | #define ARR_FAILED 0x80 /* Allocation failed */ | |
130 | #define ARR_APN 0x1f /* Allocated packet number */ | 130 | #define ARR_APN 0x1f /* Allocated packet number */ | |
131 | 131 | |||
132 | /* FIFO Ports Register */ | 132 | /* FIFO Ports Register */ | |
133 | #define FIFO_TEMPTY 0x8000 /* TX queue empty */ | 133 | #define FIFO_TEMPTY 0x8000 /* TX queue empty */ |
--- src/sys/arch/ia64/include/cpu.h 2019/12/01 15:34:44 1.20
+++ src/sys/arch/ia64/include/cpu.h 2022/05/31 08:43:14 1.21
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cpu.h,v 1.20 2019/12/01 15:34:44 ad Exp $ */ | 1 | /* $NetBSD: cpu.h,v 1.21 2022/05/31 08:43:14 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2006 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2006 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | |
9 | * NASA Ames Research Center, and by Charles M. Hannum. | 9 | * NASA Ames Research Center, and by Charles M. Hannum. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -93,27 +93,27 @@ struct cpu_info { | @@ -93,27 +93,27 @@ struct cpu_info { | |||
93 | struct lwp *ci_onproc; /* current user LWP / kthread */ | 93 | struct lwp *ci_onproc; /* current user LWP / kthread */ | |
94 | struct cctr_state ci_cc; /* cycle counter state */ | 94 | struct cctr_state ci_cc; /* cycle counter state */ | |
95 | struct cpu_info *ci_next; /* next cpu_info structure */ | 95 | struct cpu_info *ci_next; /* next cpu_info structure */ | |
96 | 96 | |||
97 | volatile int ci_mtx_count; /* Negative count of spin mutexes */ | 97 | volatile int ci_mtx_count; /* Negative count of spin mutexes */ | |
98 | volatile int ci_mtx_oldspl; /* Old SPL at this ci_idepth */ | 98 | volatile int ci_mtx_oldspl; /* Old SPL at this ci_idepth */ | |
99 | 99 | |||
100 | /* XXX: Todo */ | 100 | /* XXX: Todo */ | |
101 | /* | 101 | /* | |
102 | * Private members. | 102 | * Private members. | |
103 | */ | 103 | */ | |
104 | cpuid_t ci_cpuid; /* our CPU ID */ | 104 | cpuid_t ci_cpuid; /* our CPU ID */ | |
105 | uint32_t ci_acpiid; /* our ACPI/MADT ID */ | 105 | uint32_t ci_acpiid; /* our ACPI/MADT ID */ | |
106 | uint32_t ci_initapicid; /* our intitial APIC ID */ | 106 | uint32_t ci_initapicid; /* our initial APIC ID */ | |
107 | struct pmap *ci_pmap; /* current pmap */ /* XXX FreeBSD has *pcb_current_pmap in pcb ? */ | 107 | struct pmap *ci_pmap; /* current pmap */ /* XXX FreeBSD has *pcb_current_pmap in pcb ? */ | |
108 | struct lwp *ci_fpcurlwp; /* current owner of the FPU */ | 108 | struct lwp *ci_fpcurlwp; /* current owner of the FPU */ | |
109 | paddr_t ci_curpcb; /* PA of current HW PCB */ | 109 | paddr_t ci_curpcb; /* PA of current HW PCB */ | |
110 | struct pcb *ci_idle_pcb; /* our idle PCB */ | 110 | struct pcb *ci_idle_pcb; /* our idle PCB */ | |
111 | u_int ci_want_resched; /* preempt current process */ | 111 | u_int ci_want_resched; /* preempt current process */ | |
112 | u_int ci_unused; /* unused */ | 112 | u_int ci_unused; /* unused */ | |
113 | u_long ci_intrdepth; /* interrupt trap depth */ | 113 | u_long ci_intrdepth; /* interrupt trap depth */ | |
114 | struct trapframe *ci_db_regs; /* registers for debuggers */ | 114 | struct trapframe *ci_db_regs; /* registers for debuggers */ | |
115 | uint64_t ci_clock; /* clock counter */ | 115 | uint64_t ci_clock; /* clock counter */ | |
116 | uint64_t ci_clockadj; /* clock adjust */ | 116 | uint64_t ci_clockadj; /* clock adjust */ | |
117 | uint64_t ci_vhpt; /* address of vhpt */ | 117 | uint64_t ci_vhpt; /* address of vhpt */ | |
118 | }; | 118 | }; | |
119 | 119 |
--- src/sys/arch/mips/mips/mipsX_subr.S 2022/03/13 17:50:55 1.114
+++ src/sys/arch/mips/mips/mipsX_subr.S 2022/05/31 08:43:14 1.115
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mipsX_subr.S,v 1.114 2022/03/13 17:50:55 andvar Exp $ */ | 1 | /* $NetBSD: mipsX_subr.S,v 1.115 2022/05/31 08:43:14 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2002 Wasabi Systems, Inc. | 4 | * Copyright 2002 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Simon Burge for Wasabi Systems, Inc. | 7 | * Written by Simon Burge for Wasabi Systems, Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -107,27 +107,27 @@ | @@ -107,27 +107,27 @@ | |||
107 | * without express or implied warranty. | 107 | * without express or implied warranty. | |
108 | * | 108 | * | |
109 | * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/loMem.s, | 109 | * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/loMem.s, | |
110 | * v 1.1 89/07/11 17:55:04 nelson Exp SPRITE (DECWRL) | 110 | * v 1.1 89/07/11 17:55:04 nelson Exp SPRITE (DECWRL) | |
111 | * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsm.s, | 111 | * from: Header: /sprite/src/kernel/mach/ds3100.md/RCS/machAsm.s, | |
112 | * v 9.2 90/01/29 18:00:39 shirriff Exp SPRITE (DECWRL) | 112 | * v 9.2 90/01/29 18:00:39 shirriff Exp SPRITE (DECWRL) | |
113 | * from: Header: /sprite/src/kernel/vm/ds3100.md/vmPmaxAsm.s, | 113 | * from: Header: /sprite/src/kernel/vm/ds3100.md/vmPmaxAsm.s, | |
114 | * v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL) | 114 | * v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL) | |
115 | * | 115 | * | |
116 | * @(#)locore.s 8.5 (Berkeley) 1/4/94 | 116 | * @(#)locore.s 8.5 (Berkeley) 1/4/94 | |
117 | */ | 117 | */ | |
118 | 118 | |||
119 | #include <mips/asm.h> | 119 | #include <mips/asm.h> | |
120 | RCSID("$NetBSD: mipsX_subr.S,v 1.114 2022/03/13 17:50:55 andvar Exp $") | 120 | RCSID("$NetBSD: mipsX_subr.S,v 1.115 2022/05/31 08:43:14 andvar Exp $") | |
121 | 121 | |||
122 | #include "opt_cputype.h" | 122 | #include "opt_cputype.h" | |
123 | #include "opt_ddb.h" | 123 | #include "opt_ddb.h" | |
124 | #include "opt_kgdb.h" | 124 | #include "opt_kgdb.h" | |
125 | #include "opt_mips3_wired.h" | 125 | #include "opt_mips3_wired.h" | |
126 | #include "opt_multiprocessor.h" | 126 | #include "opt_multiprocessor.h" | |
127 | #include "opt_vmswap.h" | 127 | #include "opt_vmswap.h" | |
128 | 128 | |||
129 | #include <sys/cdefs.h> | 129 | #include <sys/cdefs.h> | |
130 | #include <sys/endian.h> | 130 | #include <sys/endian.h> | |
131 | 131 | |||
132 | #include <mips/cpuregs.h> | 132 | #include <mips/cpuregs.h> | |
133 | #if defined(MIPS3) | 133 | #if defined(MIPS3) | |
@@ -360,27 +360,27 @@ RCSID("$NetBSD: mipsX_subr.S,v 1.114 202 | @@ -360,27 +360,27 @@ RCSID("$NetBSD: mipsX_subr.S,v 1.114 202 | |||
360 | * | 360 | * | |
361 | * Vector code for the TLB-miss exception vector 0x80000000 | 361 | * Vector code for the TLB-miss exception vector 0x80000000 | |
362 | * on an r4000. | 362 | * on an r4000. | |
363 | * | 363 | * | |
364 | * This code is copied to the TLB exception vector address to | 364 | * This code is copied to the TLB exception vector address to | |
365 | * handle TLB translation misses. | 365 | * handle TLB translation misses. | |
366 | * NOTE: This code should be relocatable and max 32 instructions!!! | 366 | * NOTE: This code should be relocatable and max 32 instructions!!! | |
367 | * | 367 | * | |
368 | * Don't check for invalid pte's here. We load them as well and | 368 | * Don't check for invalid pte's here. We load them as well and | |
369 | * let the processor trap to load the correct value after service. | 369 | * let the processor trap to load the correct value after service. | |
370 | * | 370 | * | |
371 | * Loongson2 processors don't have separate tlbmiss and xtlbmiss handlers; | 371 | * Loongson2 processors don't have separate tlbmiss and xtlbmiss handlers; | |
372 | * so we have to check for useg addresses in tlb_miss. The good news is that | 372 | * so we have to check for useg addresses in tlb_miss. The good news is that | |
373 | * we can use 64 intructions from tlbmiss instead of 32. | 373 | * we can use 64 instructions from tlbmiss instead of 32. | |
374 | * | 374 | * | |
375 | *---------------------------------------------------------------------------- | 375 | *---------------------------------------------------------------------------- | |
376 | */ | 376 | */ | |
377 | #ifdef MIPS3_LOONGSON2 | 377 | #ifdef MIPS3_LOONGSON2 | |
378 | /* this loongson2-specific part is almost a copy of xtlb_miss */ | 378 | /* this loongson2-specific part is almost a copy of xtlb_miss */ | |
379 | VECTOR(MIPSX(tlb_miss), unknown) | 379 | VECTOR(MIPSX(tlb_miss), unknown) | |
380 | .set noat | 380 | .set noat | |
381 | dmfc0 k0, MIPS_COP_0_BAD_VADDR #00: k0=bad address | 381 | dmfc0 k0, MIPS_COP_0_BAD_VADDR #00: k0=bad address | |
382 | #ifdef _LP64 | 382 | #ifdef _LP64 | |
383 | nop #01: nop | 383 | nop #01: nop | |
384 | PTR_SRL k1, k0, 31 #02: clear useg bits | 384 | PTR_SRL k1, k0, 31 #02: clear useg bits | |
385 | beqz k1, 2f #03: k1==0 -> useg address | 385 | beqz k1, 2f #03: k1==0 -> useg address | |
386 | PTR_SLL k1, k0, 2 #0x: clear top bits | 386 | PTR_SLL k1, k0, 2 #0x: clear top bits |
--- src/sys/arch/powerpc/booke/e500_tlb.c 2020/07/07 00:59:29 1.23
+++ src/sys/arch/powerpc/booke/e500_tlb.c 2022/05/31 08:43:15 1.24
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: e500_tlb.c,v 1.23 2020/07/07 00:59:29 rin Exp $ */ | 1 | /* $NetBSD: e500_tlb.c,v 1.24 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | /*- | 2 | /*- | |
3 | * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. | 3 | * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. | |
4 | * All rights reserved. | 4 | * All rights reserved. | |
5 | * | 5 | * | |
6 | * This code is derived from software contributed to The NetBSD Foundation | 6 | * This code is derived from software contributed to The NetBSD Foundation | |
7 | * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects | 7 | * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects | |
8 | * Agency and which was developed by Matt Thomas of 3am Software Foundry. | 8 | * Agency and which was developed by Matt Thomas of 3am Software Foundry. | |
9 | * | 9 | * | |
10 | * This material is based upon work supported by the Defense Advanced Research | 10 | * This material is based upon work supported by the Defense Advanced Research | |
11 | * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under | 11 | * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under | |
12 | * Contract No. N66001-09-C-2073. | 12 | * Contract No. N66001-09-C-2073. | |
13 | * Approved for Public Release, Distribution Unlimited | 13 | * Approved for Public Release, Distribution Unlimited | |
14 | * | 14 | * | |
@@ -27,27 +27,27 @@ | @@ -27,27 +27,27 @@ | |||
27 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 27 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
28 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 28 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
31 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 31 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
32 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 32 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
33 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 33 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
34 | * POSSIBILITY OF SUCH DAMAGE. | 34 | * POSSIBILITY OF SUCH DAMAGE. | |
35 | */ | 35 | */ | |
36 | 36 | |||
37 | #define __PMAP_PRIVATE | 37 | #define __PMAP_PRIVATE | |
38 | 38 | |||
39 | #include <sys/cdefs.h> | 39 | #include <sys/cdefs.h> | |
40 | __KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.23 2020/07/07 00:59:29 rin Exp $"); | 40 | __KERNEL_RCSID(0, "$NetBSD: e500_tlb.c,v 1.24 2022/05/31 08:43:15 andvar Exp $"); | |
41 | 41 | |||
42 | #ifdef _KERNEL_OPT | 42 | #ifdef _KERNEL_OPT | |
43 | #include "opt_multiprocessor.h" | 43 | #include "opt_multiprocessor.h" | |
44 | #include "opt_pmap.h" | 44 | #include "opt_pmap.h" | |
45 | #include "opt_ppcparam.h" | 45 | #include "opt_ppcparam.h" | |
46 | #endif | 46 | #endif | |
47 | 47 | |||
48 | #include <sys/param.h> | 48 | #include <sys/param.h> | |
49 | 49 | |||
50 | #include <uvm/uvm_extern.h> | 50 | #include <uvm/uvm_extern.h> | |
51 | 51 | |||
52 | #include <powerpc/spr.h> | 52 | #include <powerpc/spr.h> | |
53 | #include <powerpc/booke/spr.h> | 53 | #include <powerpc/booke/spr.h> | |
@@ -841,27 +841,27 @@ e500_tlbmemmap(paddr_t memstart, psize_t | @@ -841,27 +841,27 @@ e500_tlbmemmap(paddr_t memstart, psize_t | |||
841 | u_int slots = 0, nextslot = 0; | 841 | u_int slots = 0, nextslot = 0; | |
842 | KASSERT(tlb1->tlb1_numfree > 1); | 842 | KASSERT(tlb1->tlb1_numfree > 1); | |
843 | KASSERT(((memstart + memsize - 1) & -memsize) == memstart); | 843 | KASSERT(((memstart + memsize - 1) & -memsize) == memstart); | |
844 | for (paddr_t lastaddr = memstart; 0 < memsize; ) { | 844 | for (paddr_t lastaddr = memstart; 0 < memsize; ) { | |
845 | u_int cnt = __builtin_clz(memsize); | 845 | u_int cnt = __builtin_clz(memsize); | |
846 | psize_t size = uimin(1UL << (31 - (cnt | 1)), tlb1->tlb1_maxsize); | 846 | psize_t size = uimin(1UL << (31 - (cnt | 1)), tlb1->tlb1_maxsize); | |
847 | slots += memsize / size; | 847 | slots += memsize / size; | |
848 | if (slots > 4) | 848 | if (slots > 4) | |
849 | panic("%s: %d: can't map memory (%#lx) into TLB1: %s", | 849 | panic("%s: %d: can't map memory (%#lx) into TLB1: %s", | |
850 | __func__, __LINE__, memsize, "too fragmented"); | 850 | __func__, __LINE__, memsize, "too fragmented"); | |
851 | if (slots > tlb1->tlb1_numfree - 1) | 851 | if (slots > tlb1->tlb1_numfree - 1) | |
852 | panic("%s: %d: can't map memory (%#lx) into TLB1: %s", | 852 | panic("%s: %d: can't map memory (%#lx) into TLB1: %s", | |
853 | __func__, __LINE__, memsize, | 853 | __func__, __LINE__, memsize, | |
854 | "insufficent TLB entries"); | 854 | "insufficient TLB entries"); | |
855 | for (; nextslot < slots; nextslot++) { | 855 | for (; nextslot < slots; nextslot++) { | |
856 | const u_int freeslot = e500_alloc_tlb1_entry(); | 856 | const u_int freeslot = e500_alloc_tlb1_entry(); | |
857 | struct e500_xtlb * const xtlb = | 857 | struct e500_xtlb * const xtlb = | |
858 | &tlb1->tlb1_entries[freeslot]; | 858 | &tlb1->tlb1_entries[freeslot]; | |
859 | xtlb->e_tlb.tlb_asid = KERNEL_PID; | 859 | xtlb->e_tlb.tlb_asid = KERNEL_PID; | |
860 | xtlb->e_tlb.tlb_size = size; | 860 | xtlb->e_tlb.tlb_size = size; | |
861 | xtlb->e_tlb.tlb_va = lastaddr; | 861 | xtlb->e_tlb.tlb_va = lastaddr; | |
862 | xtlb->e_tlb.tlb_pte = lastaddr | 862 | xtlb->e_tlb.tlb_pte = lastaddr | |
863 | | PTE_M | PTE_xX | PTE_xW | PTE_xR; | 863 | | PTE_M | PTE_xX | PTE_xW | PTE_xR; | |
864 | lastaddr += size; | 864 | lastaddr += size; | |
865 | memsize -= size; | 865 | memsize -= size; | |
866 | slotmask |= 1 << (31 - freeslot); /* clz friendly */ | 866 | slotmask |= 1 << (31 - freeslot); /* clz friendly */ | |
867 | } | 867 | } |
--- src/sys/arch/powerpc/ibm4xx/4xx_locore.S 2007/03/04 06:00:34 1.7
+++ src/sys/arch/powerpc/ibm4xx/4xx_locore.S 2022/05/31 08:43:15 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: 4xx_locore.S,v 1.7 2007/03/04 06:00:34 christos Exp $ */ | 1 | /* $NetBSD: 4xx_locore.S,v 1.8 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2001 Wasabi Systems, Inc. | 4 | * Copyright 2001 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. | 7 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -57,27 +57,27 @@ | @@ -57,27 +57,27 @@ | |||
57 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | 57 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | |
58 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 58 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
59 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 59 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
60 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 60 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
61 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 61 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
62 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 62 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
63 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 63 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
64 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 64 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
65 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 65 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
66 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
67 | */ | 67 | */ | |
68 | 68 | |||
69 | /* | 69 | /* | |
70 | * This is not a standalone file. To use it, #inlcude it at | 70 | * This is not a standalone file. To use it, #include it at | |
71 | * the end of your port's locore.S | 71 | * the end of your port's locore.S | |
72 | */ | 72 | */ | |
73 | 73 | |||
74 | /* | 74 | /* | |
75 | * Pull in common PowerPC locore subroutines. | 75 | * Pull in common PowerPC locore subroutines. | |
76 | */ | 76 | */ | |
77 | #include <powerpc/powerpc/locore_subr.S> | 77 | #include <powerpc/powerpc/locore_subr.S> | |
78 | 78 | |||
79 | /* | 79 | /* | |
80 | * Pull in common trap vector code. | 80 | * Pull in common trap vector code. | |
81 | */ | 81 | */ | |
82 | #include <powerpc/ibm4xx/trap_subr.S> | 82 | #include <powerpc/ibm4xx/trap_subr.S> | |
83 | #include <powerpc/ibm4xx/4xx_trap_subr.S> | 83 | #include <powerpc/ibm4xx/4xx_trap_subr.S> |
--- src/sys/arch/sun3/sun3x/pmap.c 2022/05/04 07:48:34 1.120
+++ src/sys/arch/sun3/sun3x/pmap.c 2022/05/31 08:43:15 1.121
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pmap.c,v 1.120 2022/05/04 07:48:34 andvar Exp $ */ | 1 | /* $NetBSD: pmap.c,v 1.121 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Jeremy Cooper. | 8 | * by Jeremy Cooper. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -95,27 +95,27 @@ | @@ -95,27 +95,27 @@ | |||
95 | * affected by the change. These instances are documented in the code at | 95 | * affected by the change. These instances are documented in the code at | |
96 | * various points. | 96 | * various points. | |
97 | */ | 97 | */ | |
98 | /*** A Note About the Note About the 68851 Address Translation Cache | 98 | /*** A Note About the Note About the 68851 Address Translation Cache | |
99 | * 4 months into this code I discovered that the sun3x does not have | 99 | * 4 months into this code I discovered that the sun3x does not have | |
100 | * a MC68851 chip. Instead, it has a version of this MMU that is part of the | 100 | * a MC68851 chip. Instead, it has a version of this MMU that is part of the | |
101 | * the 68030 CPU. | 101 | * the 68030 CPU. | |
102 | * All though it behaves very similarly to the 68851, it only has 1 task | 102 | * All though it behaves very similarly to the 68851, it only has 1 task | |
103 | * alias and a 22 entry cache. So sadly (or happily), the first paragraph | 103 | * alias and a 22 entry cache. So sadly (or happily), the first paragraph | |
104 | * of the previous note does not apply to the sun3x pmap. | 104 | * of the previous note does not apply to the sun3x pmap. | |
105 | */ | 105 | */ | |
106 | 106 | |||
107 | #include <sys/cdefs.h> | 107 | #include <sys/cdefs.h> | |
108 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2022/05/04 07:48:34 andvar Exp $"); | 108 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.121 2022/05/31 08:43:15 andvar Exp $"); | |
109 | 109 | |||
110 | #include "opt_ddb.h" | 110 | #include "opt_ddb.h" | |
111 | #include "opt_pmap_debug.h" | 111 | #include "opt_pmap_debug.h" | |
112 | 112 | |||
113 | #include <sys/param.h> | 113 | #include <sys/param.h> | |
114 | #include <sys/systm.h> | 114 | #include <sys/systm.h> | |
115 | #include <sys/proc.h> | 115 | #include <sys/proc.h> | |
116 | #include <sys/malloc.h> | 116 | #include <sys/malloc.h> | |
117 | #include <sys/pool.h> | 117 | #include <sys/pool.h> | |
118 | #include <sys/queue.h> | 118 | #include <sys/queue.h> | |
119 | #include <sys/kcore.h> | 119 | #include <sys/kcore.h> | |
120 | #include <sys/atomic.h> | 120 | #include <sys/atomic.h> | |
121 | 121 | |||
@@ -2246,27 +2246,27 @@ pmap_protect_kernel(vaddr_t startva, vad | @@ -2246,27 +2246,27 @@ pmap_protect_kernel(vaddr_t startva, vad | |||
2246 | 2246 | |||
2247 | /* pmap_protect INTERFACE | 2247 | /* pmap_protect INTERFACE | |
2248 | ** | 2248 | ** | |
2249 | * Apply the given protection to the given virtual address range within | 2249 | * Apply the given protection to the given virtual address range within | |
2250 | * the given map. | 2250 | * the given map. | |
2251 | * | 2251 | * | |
2252 | * It is ok for the protection applied to be stronger than what is | 2252 | * It is ok for the protection applied to be stronger than what is | |
2253 | * specified. We use this to our advantage when the given map has no | 2253 | * specified. We use this to our advantage when the given map has no | |
2254 | * mapping for the virtual address. By skipping a page when this | 2254 | * mapping for the virtual address. By skipping a page when this | |
2255 | * is discovered, we are effectively applying a protection of VM_PROT_NONE, | 2255 | * is discovered, we are effectively applying a protection of VM_PROT_NONE, | |
2256 | * and therefore do not need to map the page just to apply a protection | 2256 | * and therefore do not need to map the page just to apply a protection | |
2257 | * code. Only pmap_enter() needs to create new mappings if they do not exist. | 2257 | * code. Only pmap_enter() needs to create new mappings if they do not exist. | |
2258 | * | 2258 | * | |
2259 | * XXX - This function could be speeded up by using pmap_stroll() for inital | 2259 | * XXX - This function could be speeded up by using pmap_stroll() for initial | |
2260 | * setup, and then manual scrolling in the for() loop. | 2260 | * setup, and then manual scrolling in the for() loop. | |
2261 | */ | 2261 | */ | |
2262 | void | 2262 | void | |
2263 | pmap_protect(pmap_t pmap, vaddr_t startva, vaddr_t endva, vm_prot_t prot) | 2263 | pmap_protect(pmap_t pmap, vaddr_t startva, vaddr_t endva, vm_prot_t prot) | |
2264 | { | 2264 | { | |
2265 | bool iscurpmap; | 2265 | bool iscurpmap; | |
2266 | int a_idx, b_idx, c_idx; | 2266 | int a_idx, b_idx, c_idx; | |
2267 | a_tmgr_t *a_tbl; | 2267 | a_tmgr_t *a_tbl; | |
2268 | b_tmgr_t *b_tbl; | 2268 | b_tmgr_t *b_tbl; | |
2269 | c_tmgr_t *c_tbl; | 2269 | c_tmgr_t *c_tbl; | |
2270 | mmu_short_pte_t *pte; | 2270 | mmu_short_pte_t *pte; | |
2271 | 2271 | |||
2272 | if (pmap == pmap_kernel()) { | 2272 | if (pmap == pmap_kernel()) { |
--- src/sys/dev/ata/ata.c 2022/05/28 22:16:43 1.168
+++ src/sys/dev/ata/ata.c 2022/05/31 08:43:15 1.169
@@ -1,41 +1,41 @@ | @@ -1,41 +1,41 @@ | |||
1 | /* $NetBSD: ata.c,v 1.168 2022/05/28 22:16:43 andvar Exp $ */ | 1 | /* $NetBSD: ata.c,v 1.169 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. | 4 | * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
25 | */ | 25 | */ | |
26 | 26 | |||
27 | #include <sys/cdefs.h> | 27 | #include <sys/cdefs.h> | |
28 | __KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.168 2022/05/28 22:16:43 andvar Exp $"); | 28 | __KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.169 2022/05/31 08:43:15 andvar Exp $"); | |
29 | 29 | |||
30 | #include "opt_ata.h" | 30 | #include "opt_ata.h" | |
31 | 31 | |||
32 | #include <sys/param.h> | 32 | #include <sys/param.h> | |
33 | #include <sys/systm.h> | 33 | #include <sys/systm.h> | |
34 | #include <sys/kernel.h> | 34 | #include <sys/kernel.h> | |
35 | #include <sys/device.h> | 35 | #include <sys/device.h> | |
36 | #include <sys/conf.h> | 36 | #include <sys/conf.h> | |
37 | #include <sys/fcntl.h> | 37 | #include <sys/fcntl.h> | |
38 | #include <sys/proc.h> | 38 | #include <sys/proc.h> | |
39 | #include <sys/kthread.h> | 39 | #include <sys/kthread.h> | |
40 | #include <sys/errno.h> | 40 | #include <sys/errno.h> | |
41 | #include <sys/ataio.h> | 41 | #include <sys/ataio.h> | |
@@ -1014,27 +1014,27 @@ void | @@ -1014,27 +1014,27 @@ void | |||
1014 | ata_exec_xfer(struct ata_channel *chp, struct ata_xfer *xfer) | 1014 | ata_exec_xfer(struct ata_channel *chp, struct ata_xfer *xfer) | |
1015 | { | 1015 | { | |
1016 | 1016 | |||
1017 | ATADEBUG_PRINT(("ata_exec_xfer %p channel %d drive %d\n", xfer, | 1017 | ATADEBUG_PRINT(("ata_exec_xfer %p channel %d drive %d\n", xfer, | |
1018 | chp->ch_channel, xfer->c_drive), DEBUG_XFERS); | 1018 | chp->ch_channel, xfer->c_drive), DEBUG_XFERS); | |
1019 | 1019 | |||
1020 | /* complete xfer setup */ | 1020 | /* complete xfer setup */ | |
1021 | xfer->c_chp = chp; | 1021 | xfer->c_chp = chp; | |
1022 | 1022 | |||
1023 | ata_channel_lock(chp); | 1023 | ata_channel_lock(chp); | |
1024 | 1024 | |||
1025 | /* | 1025 | /* | |
1026 | * Standard commands are added to the end of command list, but | 1026 | * Standard commands are added to the end of command list, but | |
1027 | * recovery commands must be run immediatelly. | 1027 | * recovery commands must be run immediately. | |
1028 | */ | 1028 | */ | |
1029 | if ((xfer->c_flags & C_SKIP_QUEUE) == 0) | 1029 | if ((xfer->c_flags & C_SKIP_QUEUE) == 0) | |
1030 | SIMPLEQ_INSERT_TAIL(&chp->ch_queue->queue_xfer, xfer, | 1030 | SIMPLEQ_INSERT_TAIL(&chp->ch_queue->queue_xfer, xfer, | |
1031 | c_xferchain); | 1031 | c_xferchain); | |
1032 | else | 1032 | else | |
1033 | SIMPLEQ_INSERT_HEAD(&chp->ch_queue->queue_xfer, xfer, | 1033 | SIMPLEQ_INSERT_HEAD(&chp->ch_queue->queue_xfer, xfer, | |
1034 | c_xferchain); | 1034 | c_xferchain); | |
1035 | 1035 | |||
1036 | /* | 1036 | /* | |
1037 | * if polling and can sleep, wait for the xfer to be at head of queue | 1037 | * if polling and can sleep, wait for the xfer to be at head of queue | |
1038 | */ | 1038 | */ | |
1039 | if ((xfer->c_flags & (C_POLL | C_WAIT)) == (C_POLL | C_WAIT)) { | 1039 | if ((xfer->c_flags & (C_POLL | C_WAIT)) == (C_POLL | C_WAIT)) { | |
1040 | while (chp->ch_queue->queue_active > 0 || | 1040 | while (chp->ch_queue->queue_active > 0 || |
--- src/sys/dev/ic/arcofi.c 2019/06/08 08:02:38 1.3
+++ src/sys/dev/ic/arcofi.c 2022/05/31 08:43:15 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: arcofi.c,v 1.3 2019/06/08 08:02:38 isaki Exp $ */ | 1 | /* $NetBSD: arcofi.c,v 1.4 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | /* $OpenBSD: arcofi.c,v 1.6 2013/05/15 08:29:24 ratchov Exp $ */ | 2 | /* $OpenBSD: arcofi.c,v 1.6 2013/05/15 08:29:24 ratchov Exp $ */ | |
3 | 3 | |||
4 | /* | 4 | /* | |
5 | * Copyright (c) 2011 Miodrag Vallat. | 5 | * Copyright (c) 2011 Miodrag Vallat. | |
6 | * | 6 | * | |
7 | * Permission to use, copy, modify, and distribute this software for any | 7 | * Permission to use, copy, modify, and distribute this software for any | |
8 | * purpose with or without fee is hereby granted, provided that the above | 8 | * purpose with or without fee is hereby granted, provided that the above | |
9 | * copyright notice and this permission notice appear in all copies. | 9 | * copyright notice and this permission notice appear in all copies. | |
10 | * | 10 | * | |
11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 11 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 12 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 13 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | 14 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
@@ -655,27 +655,27 @@ arcofi_mi_to_gain(int lvl) | @@ -655,27 +655,27 @@ arcofi_mi_to_gain(int lvl) | |||
655 | */ | 655 | */ | |
656 | #if (AUDIO_SPEAKER == AUDIO_LINE_IN) || (AUDIO_LINE_OUT == AUDIO_LINE_IN) || \ | 656 | #if (AUDIO_SPEAKER == AUDIO_LINE_IN) || (AUDIO_LINE_OUT == AUDIO_LINE_IN) || \ | |
657 | (AUDIO_SPEAKER == AUDIO_LINE_OUT) | 657 | (AUDIO_SPEAKER == AUDIO_LINE_OUT) | |
658 | #error Please rework the cr3 handling logic. | 658 | #error Please rework the cr3 handling logic. | |
659 | #endif | 659 | #endif | |
660 | 660 | |||
661 | /* | 661 | /* | |
662 | * The mapping between the available inputs and outputs, and CR3, is as | 662 | * The mapping between the available inputs and outputs, and CR3, is as | |
663 | * follows: | 663 | * follows: | |
664 | * - the `line in' connector is the `MIC' input. | 664 | * - the `line in' connector is the `MIC' input. | |
665 | * - the `line out' connector is the `H out' (heaphones) output. | 665 | * - the `line out' connector is the `H out' (heaphones) output. | |
666 | * - the internal `speaker' is the `LS out' (loudspeaker) output. | 666 | * - the internal `speaker' is the `LS out' (loudspeaker) output. | |
667 | * | 667 | * | |
668 | * Each of these can be enabled or disabled indepently, except for | 668 | * Each of these can be enabled or disabled independently, except for | |
669 | * MIC enabled with H out and LS out disabled, which is not allowed | 669 | * MIC enabled with H out and LS out disabled, which is not allowed | |
670 | * by the chip (and makes no sense for a chip which was intended to | 670 | * by the chip (and makes no sense for a chip which was intended to | |
671 | * be used in phones, not voice recorders); we cheat by keeping one | 671 | * be used in phones, not voice recorders); we cheat by keeping one | |
672 | * output source enabled, but with the output gain forced to minus | 672 | * output source enabled, but with the output gain forced to minus | |
673 | * infinity to mute it. | 673 | * infinity to mute it. | |
674 | * | 674 | * | |
675 | * The truth table is thus: | 675 | * The truth table is thus: | |
676 | * | 676 | * | |
677 | * MIC LS out H out AFEC | 677 | * MIC LS out H out AFEC | |
678 | * off off off POR | 678 | * off off off POR | |
679 | * off off on MUTE | 679 | * off off on MUTE | |
680 | * off on off LH1 | 680 | * off on off LH1 | |
681 | * off on on LH3, X input enabled | 681 | * off on on LH3, X input enabled |
--- src/sys/dev/ic/dm9000reg.h 2021/10/21 13:21:54 1.7
+++ src/sys/dev/ic/dm9000reg.h 2022/05/31 08:43:15 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: dm9000reg.h,v 1.7 2021/10/21 13:21:54 andvar Exp $ */ | 1 | /* $NetBSD: dm9000reg.h,v 1.8 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2009 Paul Fleischer | 4 | * Copyright (c) 2009 Paul Fleischer | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * 1. Redistributions of source code must retain the above copyright | 7 | * 1. Redistributions of source code must retain the above copyright | |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. | |
9 | * 2. Redistributions in binary form must reproduce the above copyright | 9 | * 2. Redistributions in binary form must reproduce the above copyright | |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the | |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. | |
12 | * 3. The name of the company nor the name of the author may be used to | 12 | * 3. The name of the company nor the name of the author may be used to | |
13 | * endorse or promote products derived from this software without specific | 13 | * endorse or promote products derived from this software without specific | |
14 | * prior written permission. | 14 | * prior written permission. | |
@@ -61,27 +61,27 @@ | @@ -61,27 +61,27 @@ | |||
61 | #define DM9000_NSR 0x01 /* "network" status */ | 61 | #define DM9000_NSR 0x01 /* "network" status */ | |
62 | #define DM9000_NSR_RXOV (1<<1) /* receive overflow deteced */ | 62 | #define DM9000_NSR_RXOV (1<<1) /* receive overflow deteced */ | |
63 | #define DM9000_NSR_TX1END (1<<2) /* transmit 1 completed, W1C */ | 63 | #define DM9000_NSR_TX1END (1<<2) /* transmit 1 completed, W1C */ | |
64 | #define DM9000_NSR_TX2END (1<<3) /* transmit 2 completed, W1C */ | 64 | #define DM9000_NSR_TX2END (1<<3) /* transmit 2 completed, W1C */ | |
65 | #define DM9000_NSR_WAKEST (1<<5) /* wakeup event, W1C */ | 65 | #define DM9000_NSR_WAKEST (1<<5) /* wakeup event, W1C */ | |
66 | #define DM9000_NSR_LINKST (1<<6) /* link is up */ | 66 | #define DM9000_NSR_LINKST (1<<6) /* link is up */ | |
67 | #define DM9000_NSR_SPEED (1<<7) /* 1: 100Mbps, 0: 10Mbps */ | 67 | #define DM9000_NSR_SPEED (1<<7) /* 1: 100Mbps, 0: 10Mbps */ | |
68 | #define DM9000_TCR 0x02 /* Tx control */ | 68 | #define DM9000_TCR 0x02 /* Tx control */ | |
69 | #define DM9000_TCR_TXREQ (1<<0) /* request to start Tx, self clear */ | 69 | #define DM9000_TCR_TXREQ (1<<0) /* request to start Tx, self clear */ | |
70 | #define DM9000_TCR_CRC_DIS1 (1<<1) /* disable PAD op on Tx1 */ | 70 | #define DM9000_TCR_CRC_DIS1 (1<<1) /* disable PAD op on Tx1 */ | |
71 | #define DM9000_TCR_PAD_DIS1 (1<<2) /* disbale CRC append on Tx1 */ | 71 | #define DM9000_TCR_PAD_DIS1 (1<<2) /* disbale CRC append on Tx1 */ | |
72 | #define DM9000_TCR_CRC_DIS2 (1<<3) /* disable PAD op on Tx2 */ | 72 | #define DM9000_TCR_CRC_DIS2 (1<<3) /* disable PAD op on Tx2 */ | |
73 | #define DM9000_TCR_PAD_DIS2 (1<<4) /* disbale CRC append on Tx2 */ | 73 | #define DM9000_TCR_PAD_DIS2 (1<<4) /* disbale CRC append on Tx2 */ | |
74 | #define DM9000_TCR_EXCECM (1<<5) /* allow infinate colli. retries */ | 74 | #define DM9000_TCR_EXCECM (1<<5) /* allow infinite colli. retries */ | |
75 | #define DM9000_TCR_TJDIS (1<<6) /* disable xmit jabber, otherwise on */ | 75 | #define DM9000_TCR_TJDIS (1<<6) /* disable xmit jabber, otherwise on */ | |
76 | #define DM9000_TSR1 0x03 /* transmit completion status 1 */ | 76 | #define DM9000_TSR1 0x03 /* transmit completion status 1 */ | |
77 | #define DM9000_TSR2 0x04 /* transmit completion status 2 */ | 77 | #define DM9000_TSR2 0x04 /* transmit completion status 2 */ | |
78 | #define DM9000_TSR_EC (1<<2) /* aborted after 16 collision */ | 78 | #define DM9000_TSR_EC (1<<2) /* aborted after 16 collision */ | |
79 | #define DM9000_TSR_COL (1<<3) /* collision detected while xmit */ | 79 | #define DM9000_TSR_COL (1<<3) /* collision detected while xmit */ | |
80 | #define DM9000_TSR_LCOL (1<<4) /* out of window "late" collision */ | 80 | #define DM9000_TSR_LCOL (1<<4) /* out of window "late" collision */ | |
81 | #define DM9000_TSR_NC (1<<5) /* no carrier signal found */ | 81 | #define DM9000_TSR_NC (1<<5) /* no carrier signal found */ | |
82 | #define DM9000_TSR_CLOSS (1<<6) /* loss of carrier */ | 82 | #define DM9000_TSR_CLOSS (1<<6) /* loss of carrier */ | |
83 | #define DM9000_TSR_TJTO (1<<7) /* Tx jabber time out */ | 83 | #define DM9000_TSR_TJTO (1<<7) /* Tx jabber time out */ | |
84 | #define DM9000_RCR 0x05 /* Rx control */ | 84 | #define DM9000_RCR 0x05 /* Rx control */ | |
85 | #define DM9000_RCR_RXEN (1<<0) /* activate Rx */ | 85 | #define DM9000_RCR_RXEN (1<<0) /* activate Rx */ | |
86 | #define DM9000_RCR_PRMSC (1<<1) /* enable promisc mode */ | 86 | #define DM9000_RCR_PRMSC (1<<1) /* enable promisc mode */ | |
87 | #define DM9000_RCR_RUNT (1<<2) /* accept damaged runt frame */ | 87 | #define DM9000_RCR_RUNT (1<<2) /* accept damaged runt frame */ |
--- src/sys/dev/ic/mpt_debug.c 2015/11/05 21:08:18 1.11
+++ src/sys/dev/ic/mpt_debug.c 2022/05/31 08:43:15 1.12
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mpt_debug.c,v 1.11 2015/11/05 21:08:18 palle Exp $ */ | 1 | /* $NetBSD: mpt_debug.c,v 1.12 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000, 2001 by Greg Ansley | 4 | * Copyright (c) 2000, 2001 by Greg Ansley | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice immediately at the beginning of the file, without modification, | 10 | * notice immediately at the beginning of the file, without modification, | |
11 | * this list of conditions, and the following disclaimer. | 11 | * this list of conditions, and the following disclaimer. | |
12 | * 2. The name of the author may not be used to endorse or promote products | 12 | * 2. The name of the author may not be used to endorse or promote products | |
13 | * derived from this software without specific prior written permission. | 13 | * derived from this software without specific prior written permission. | |
14 | * | 14 | * | |
@@ -25,27 +25,27 @@ | @@ -25,27 +25,27 @@ | |||
25 | * SUCH DAMAGE. | 25 | * SUCH DAMAGE. | |
26 | */ | 26 | */ | |
27 | /* | 27 | /* | |
28 | * Additional Copyright (c) 2002 by Matthew Jacob under same license. | 28 | * Additional Copyright (c) 2002 by Matthew Jacob under same license. | |
29 | */ | 29 | */ | |
30 | 30 | |||
31 | /* | 31 | /* | |
32 | * mpt_debug.c: | 32 | * mpt_debug.c: | |
33 | * | 33 | * | |
34 | * Debug routines for LSI Fusion adapters. | 34 | * Debug routines for LSI Fusion adapters. | |
35 | */ | 35 | */ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | __KERNEL_RCSID(0, "$NetBSD: mpt_debug.c,v 1.11 2015/11/05 21:08:18 palle Exp $"); | 38 | __KERNEL_RCSID(0, "$NetBSD: mpt_debug.c,v 1.12 2022/05/31 08:43:15 andvar Exp $"); | |
39 | 39 | |||
40 | #include <dev/ic/mpt.h> | 40 | #include <dev/ic/mpt.h> | |
41 | 41 | |||
42 | struct Error_Map { | 42 | struct Error_Map { | |
43 | int Error_Code; | 43 | int Error_Code; | |
44 | const char *Error_String; | 44 | const char *Error_String; | |
45 | }; | 45 | }; | |
46 | 46 | |||
47 | static const struct Error_Map IOC_Status[] = { | 47 | static const struct Error_Map IOC_Status[] = { | |
48 | { MPI_IOCSTATUS_SUCCESS, "Success" }, | 48 | { MPI_IOCSTATUS_SUCCESS, "Success" }, | |
49 | { MPI_IOCSTATUS_INVALID_FUNCTION, "IOC: Invalid Function" }, | 49 | { MPI_IOCSTATUS_INVALID_FUNCTION, "IOC: Invalid Function" }, | |
50 | { MPI_IOCSTATUS_BUSY, "IOC: Busy" }, | 50 | { MPI_IOCSTATUS_BUSY, "IOC: Busy" }, | |
51 | { MPI_IOCSTATUS_INVALID_SGL, "IOC: Invalid SGL" }, | 51 | { MPI_IOCSTATUS_INVALID_SGL, "IOC: Invalid SGL" }, | |
@@ -153,29 +153,29 @@ static const struct Error_Map IOC_SCSISt | @@ -153,29 +153,29 @@ static const struct Error_Map IOC_SCSISt | |||
153 | { MPI_SCSI_STATE_TERMINATED, "State_Terminated" }, | 153 | { MPI_SCSI_STATE_TERMINATED, "State_Terminated" }, | |
154 | { MPI_SCSI_STATE_RESPONSE_INFO_VALID, "Repsonse_Info_Valid" }, | 154 | { MPI_SCSI_STATE_RESPONSE_INFO_VALID, "Repsonse_Info_Valid" }, | |
155 | { MPI_SCSI_STATE_QUEUE_TAG_REJECTED, "Queue Tag Rejected" }, | 155 | { MPI_SCSI_STATE_QUEUE_TAG_REJECTED, "Queue Tag Rejected" }, | |
156 | { -1, 0}, | 156 | { -1, 0}, | |
157 | }; | 157 | }; | |
158 | 158 | |||
159 | static const struct Error_Map IOC_SCSIStatus[] = { | 159 | static const struct Error_Map IOC_SCSIStatus[] = { | |
160 | { SCSI_OK, "OK" }, | 160 | { SCSI_OK, "OK" }, | |
161 | { SCSI_CHECK, "Check Condition" }, | 161 | { SCSI_CHECK, "Check Condition" }, | |
162 | #if 0 | 162 | #if 0 | |
163 | { SCSI_STATUS_COND_MET, "Check Condition Met" }, | 163 | { SCSI_STATUS_COND_MET, "Check Condition Met" }, | |
164 | #endif | 164 | #endif | |
165 | { SCSI_BUSY, "Busy" }, | 165 | { SCSI_BUSY, "Busy" }, | |
166 | { SCSI_INTERM, "Intermidiate Condition" }, | 166 | { SCSI_INTERM, "Intermediate Condition" }, | |
167 | #if 0 | 167 | #if 0 | |
168 | { SCSI_STATUS_INTERMED_COND_MET, "Intermidiate Condition Met" }, | 168 | { SCSI_STATUS_INTERMED_COND_MET, "Intermediate Condition Met" }, | |
169 | #endif | 169 | #endif | |
170 | { SCSI_RESV_CONFLICT, "Reservation Conflict" }, | 170 | { SCSI_RESV_CONFLICT, "Reservation Conflict" }, | |
171 | #if 0 | 171 | #if 0 | |
172 | { SCSI_STATUS_CMD_TERMINATED, "Command Terminated" }, | 172 | { SCSI_STATUS_CMD_TERMINATED, "Command Terminated" }, | |
173 | #endif | 173 | #endif | |
174 | { SCSI_QUEUE_FULL, "Queue Full" }, | 174 | { SCSI_QUEUE_FULL, "Queue Full" }, | |
175 | { -1, 0}, | 175 | { -1, 0}, | |
176 | }; | 176 | }; | |
177 | 177 | |||
178 | static const struct Error_Map IOC_Diag[] = { | 178 | static const struct Error_Map IOC_Diag[] = { | |
179 | { MPT_DIAG_ENABLED, "DWE" }, | 179 | { MPT_DIAG_ENABLED, "DWE" }, | |
180 | { MPT_DIAG_FLASHBAD, "FLASH_Bad" }, | 180 | { MPT_DIAG_FLASHBAD, "FLASH_Bad" }, | |
181 | { MPT_DIAG_TTLI, "TTLI" }, | 181 | { MPT_DIAG_TTLI, "TTLI" }, |
--- src/sys/dev/ic/wdc.c 2022/05/24 20:50:19 1.309
+++ src/sys/dev/ic/wdc.c 2022/05/31 08:43:15 1.310
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: wdc.c,v 1.309 2022/05/24 20:50:19 andvar Exp $ */ | 1 | /* $NetBSD: wdc.c,v 1.310 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved. | 4 | * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -48,27 +48,27 @@ | @@ -48,27 +48,27 @@ | |||
48 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 48 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
49 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 49 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
50 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 50 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
51 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 51 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
52 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 52 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
53 | * POSSIBILITY OF SUCH DAMAGE. | 53 | * POSSIBILITY OF SUCH DAMAGE. | |
54 | */ | 54 | */ | |
55 | 55 | |||
56 | /* | 56 | /* | |
57 | * CODE UNTESTED IN THE CURRENT REVISION: | 57 | * CODE UNTESTED IN THE CURRENT REVISION: | |
58 | */ | 58 | */ | |
59 | 59 | |||
60 | #include <sys/cdefs.h> | 60 | #include <sys/cdefs.h> | |
61 | __KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.309 2022/05/24 20:50:19 andvar Exp $"); | 61 | __KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.310 2022/05/31 08:43:15 andvar Exp $"); | |
62 | 62 | |||
63 | #include "opt_ata.h" | 63 | #include "opt_ata.h" | |
64 | #include "opt_wdc.h" | 64 | #include "opt_wdc.h" | |
65 | 65 | |||
66 | #include <sys/param.h> | 66 | #include <sys/param.h> | |
67 | #include <sys/systm.h> | 67 | #include <sys/systm.h> | |
68 | #include <sys/kernel.h> | 68 | #include <sys/kernel.h> | |
69 | #include <sys/conf.h> | 69 | #include <sys/conf.h> | |
70 | #include <sys/buf.h> | 70 | #include <sys/buf.h> | |
71 | #include <sys/device.h> | 71 | #include <sys/device.h> | |
72 | #include <sys/malloc.h> | 72 | #include <sys/malloc.h> | |
73 | #include <sys/kmem.h> | 73 | #include <sys/kmem.h> | |
74 | #include <sys/syslog.h> | 74 | #include <sys/syslog.h> | |
@@ -988,27 +988,27 @@ wdc_reset_channel(struct ata_channel *ch | @@ -988,27 +988,27 @@ wdc_reset_channel(struct ata_channel *ch | |||
988 | else | 988 | else | |
989 | (void) wdcreset(chp, RESET_POLL); | 989 | (void) wdcreset(chp, RESET_POLL); | |
990 | 990 | |||
991 | /* | 991 | /* | |
992 | * wait a bit after reset; in case the DMA engines needs some time | 992 | * wait a bit after reset; in case the DMA engines needs some time | |
993 | * to recover. | 993 | * to recover. | |
994 | */ | 994 | */ | |
995 | ata_delay(chp, 1000, "atardl", flags); | 995 | ata_delay(chp, 1000, "atardl", flags); | |
996 | 996 | |||
997 | /* | 997 | /* | |
998 | * Look for pending xfers. If we have a shared queue, we'll also reset | 998 | * Look for pending xfers. If we have a shared queue, we'll also reset | |
999 | * the other channel if the current xfer is running on it. | 999 | * the other channel if the current xfer is running on it. | |
1000 | * Then we'll kill the eventual active transfer explicitly, so that | 1000 | * Then we'll kill the eventual active transfer explicitly, so that | |
1001 | * it is queued for retry immediatelly without waiting for I/O timeout. | 1001 | * it is queued for retry immediately without waiting for I/O timeout. | |
1002 | */ | 1002 | */ | |
1003 | if (xfer) { | 1003 | if (xfer) { | |
1004 | if (xfer->c_chp != chp) { | 1004 | if (xfer->c_chp != chp) { | |
1005 | ata_thread_run(xfer->c_chp, flags, ATACH_TH_RESET, | 1005 | ata_thread_run(xfer->c_chp, flags, ATACH_TH_RESET, | |
1006 | ATACH_NODRIVE); | 1006 | ATACH_NODRIVE); | |
1007 | } else { | 1007 | } else { | |
1008 | #if NATA_DMA || NATA_PIOBM | 1008 | #if NATA_DMA || NATA_PIOBM | |
1009 | /* | 1009 | /* | |
1010 | * If we're waiting for DMA, stop the | 1010 | * If we're waiting for DMA, stop the | |
1011 | * DMA engine | 1011 | * DMA engine | |
1012 | */ | 1012 | */ | |
1013 | if (chp->ch_flags & ATACH_DMA_WAIT) { | 1013 | if (chp->ch_flags & ATACH_DMA_WAIT) { | |
1014 | (*wdc->dma_finish)(wdc->dma_arg, | 1014 | (*wdc->dma_finish)(wdc->dma_arg, |
--- src/sys/dev/isa/sbreg.h 2005/12/11 12:22:03 1.31
+++ src/sys/dev/isa/sbreg.h 2022/05/31 08:43:15 1.32
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sbreg.h,v 1.31 2005/12/11 12:22:03 christos Exp $ */ | 1 | /* $NetBSD: sbreg.h,v 1.32 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1991-1993 Regents of the University of California. | 4 | * Copyright (c) 1991-1993 Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -260,27 +260,27 @@ | @@ -260,27 +260,27 @@ | |||
260 | #define JAZZ16_CONT_ADPCM_PB 0x7C | 260 | #define JAZZ16_CONT_ADPCM_PB 0x7C | |
261 | #define JAZZ16_SINGLE_ADPCM_REC 0x84 | 261 | #define JAZZ16_SINGLE_ADPCM_REC 0x84 | |
262 | #define JAZZ16_SINGLE_MULAW_REC 0x87 | 262 | #define JAZZ16_SINGLE_MULAW_REC 0x87 | |
263 | #define JAZZ16_CONT_ADPCM_REC 0x8C | 263 | #define JAZZ16_CONT_ADPCM_REC 0x8C | |
264 | #define JAZZ16_CONT_MULAW_REC 0x8F | 264 | #define JAZZ16_CONT_MULAW_REC 0x8F | |
265 | #define JAZZ16_CONT_PB_XX 0x90 | 265 | #define JAZZ16_CONT_PB_XX 0x90 | |
266 | #define JAZZ16_SINGLE_PB_XX 0x91 | 266 | #define JAZZ16_SINGLE_PB_XX 0x91 | |
267 | #define JAZZ16_SINGLE_REC_XX 0x98 | 267 | #define JAZZ16_SINGLE_REC_XX 0x98 | |
268 | #define JAZZ16_CONT_REC_XX 0x99 | 268 | #define JAZZ16_CONT_REC_XX 0x99 | |
269 | 269 | |||
270 | 270 | |||
271 | /* | 271 | /* | |
272 | * The ADPCM encodings are differential, meaning each sample represents | 272 | * The ADPCM encodings are differential, meaning each sample represents | |
273 | * a difference to add to a running sum. The inital value is called the | 273 | * a difference to add to a running sum. The initial value is called the | |
274 | * reference, or reference byte. Any of the ADPCM DMA transfers can specify | 274 | * reference, or reference byte. Any of the ADPCM DMA transfers can specify | |
275 | * that the given transfer begins with a reference byte by or'ing | 275 | * that the given transfer begins with a reference byte by or'ing | |
276 | * in the bit below. | 276 | * in the bit below. | |
277 | */ | 277 | */ | |
278 | #define SB_DSP_REFERENCE 1 | 278 | #define SB_DSP_REFERENCE 1 | |
279 | 279 | |||
280 | /* | 280 | /* | |
281 | * Macros to detect valid hardware configuration data. | 281 | * Macros to detect valid hardware configuration data. | |
282 | */ | 282 | */ | |
283 | #define SBP_IRQ_VALID(irq) ((irq) == 5 || (irq) == 7 || (irq) == 9 || (irq) == 10 || (irq) == 15) | 283 | #define SBP_IRQ_VALID(irq) ((irq) == 5 || (irq) == 7 || (irq) == 9 || (irq) == 10 || (irq) == 15) | |
284 | #define SB_IRQ_VALID(irq) ((irq) == 3 || (irq) == 5 || (irq) == 7 || (irq) == 9) | 284 | #define SB_IRQ_VALID(irq) ((irq) == 3 || (irq) == 5 || (irq) == 7 || (irq) == 9) | |
285 | 285 | |||
286 | #define SB16_DRQ_VALID(chan) ((chan) == 0 || (chan) == 1 || (chan) == 3 || \ | 286 | #define SB16_DRQ_VALID(chan) ((chan) == 0 || (chan) == 1 || (chan) == 3 || \ |
--- src/sys/dev/microcode/aic7xxx/aic79xx.reg 2022/01/25 22:01:34 1.15
+++ src/sys/dev/microcode/aic7xxx/aic79xx.reg 2022/05/31 08:43:15 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: aic79xx.reg,v 1.15 2022/01/25 22:01:34 andvar Exp $ */ | 1 | /* $NetBSD: aic79xx.reg,v 1.16 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Aic79xx register and scratch ram definitions. | 4 | * Aic79xx register and scratch ram definitions. | |
5 | * | 5 | * | |
6 | * Copyright (c) 1994-2001 Justin T. Gibbs. | 6 | * Copyright (c) 1994-2001 Justin T. Gibbs. | |
7 | * Copyright (c) 2000-2002 Adaptec Inc. | 7 | * Copyright (c) 2000-2002 Adaptec Inc. | |
8 | * All rights reserved. | 8 | * All rights reserved. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions, and the following disclaimer, | 14 | * notice, this list of conditions, and the following disclaimer, | |
@@ -1376,27 +1376,27 @@ register SHORTTHRESH { | @@ -1376,27 +1376,27 @@ register SHORTTHRESH { | |||
1376 | * The length, in bytes, of the SCB lun field. | 1376 | * The length, in bytes, of the SCB lun field. | |
1377 | */ | 1377 | */ | |
1378 | register LUNLEN { | 1378 | register LUNLEN { | |
1379 | address 0x030 | 1379 | address 0x030 | |
1380 | access_mode RW | 1380 | access_mode RW | |
1381 | modes M_CFG | 1381 | modes M_CFG | |
1382 | mask ILUNLEN 0x0F | 1382 | mask ILUNLEN 0x0F | |
1383 | mask TLUNLEN 0xF0 | 1383 | mask TLUNLEN 0xF0 | |
1384 | } | 1384 | } | |
1385 | const LUNLEN_SINGLE_LEVEL_LUN 0xF | 1385 | const LUNLEN_SINGLE_LEVEL_LUN 0xF | |
1386 | 1386 | |||
1387 | /* | 1387 | /* | |
1388 | * CDB Limit | 1388 | * CDB Limit | |
1389 | * The size, in bytes, of the embedded CDB field in initator SCBs. | 1389 | * The size, in bytes, of the embedded CDB field in initiator SCBs. | |
1390 | */ | 1390 | */ | |
1391 | register CDBLIMIT { | 1391 | register CDBLIMIT { | |
1392 | address 0x031 | 1392 | address 0x031 | |
1393 | access_mode RW | 1393 | access_mode RW | |
1394 | modes M_CFG | 1394 | modes M_CFG | |
1395 | } | 1395 | } | |
1396 | 1396 | |||
1397 | /* | 1397 | /* | |
1398 | * Maximum Commands | 1398 | * Maximum Commands | |
1399 | * The maximum number of commands to issue during a | 1399 | * The maximum number of commands to issue during a | |
1400 | * single packetized connection. | 1400 | * single packetized connection. | |
1401 | */ | 1401 | */ | |
1402 | register MAXCMD { | 1402 | register MAXCMD { |
--- src/sys/dev/pci/ahcisata_pci.c 2022/05/29 22:26:21 1.64
+++ src/sys/dev/pci/ahcisata_pci.c 2022/05/31 08:43:15 1.65
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ahcisata_pci.c,v 1.64 2022/05/29 22:26:21 rin Exp $ */ | 1 | /* $NetBSD: ahcisata_pci.c,v 1.65 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2006 Manuel Bouyer. | 4 | * Copyright (c) 2006 Manuel Bouyer. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -16,27 +16,27 @@ | @@ -16,27 +16,27 @@ | |||
16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
25 | * | 25 | * | |
26 | */ | 26 | */ | |
27 | 27 | |||
28 | #include <sys/cdefs.h> | 28 | #include <sys/cdefs.h> | |
29 | __KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.64 2022/05/29 22:26:21 rin Exp $"); | 29 | __KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.65 2022/05/31 08:43:15 andvar Exp $"); | |
30 | 30 | |||
31 | #ifdef _KERNEL_OPT | 31 | #ifdef _KERNEL_OPT | |
32 | #include "opt_ahcisata_pci.h" | 32 | #include "opt_ahcisata_pci.h" | |
33 | #endif | 33 | #endif | |
34 | 34 | |||
35 | #include <sys/types.h> | 35 | #include <sys/types.h> | |
36 | #include <sys/kmem.h> | 36 | #include <sys/kmem.h> | |
37 | #include <sys/param.h> | 37 | #include <sys/param.h> | |
38 | #include <sys/kernel.h> | 38 | #include <sys/kernel.h> | |
39 | #include <sys/systm.h> | 39 | #include <sys/systm.h> | |
40 | #include <sys/disklabel.h> | 40 | #include <sys/disklabel.h> | |
41 | #include <sys/pmf.h> | 41 | #include <sys/pmf.h> | |
42 | 42 | |||
@@ -364,27 +364,27 @@ ahci_pci_intr_establish(struct ahci_soft | @@ -364,27 +364,27 @@ ahci_pci_intr_establish(struct ahci_soft | |||
364 | && port >= (psc->sc_nintr - 1)) { | 364 | && port >= (psc->sc_nintr - 1)) { | |
365 | intr_handler = ahci_intr; | 365 | intr_handler = ahci_intr; | |
366 | intr_arg = sc; | 366 | intr_arg = sc; | |
367 | vec = psc->sc_nintr - 1; | 367 | vec = psc->sc_nintr - 1; | |
368 | 368 | |||
369 | if (psc->sc_ih[vec] != NULL) { | 369 | if (psc->sc_ih[vec] != NULL) { | |
370 | /* Already established, nothing more to do */ | 370 | /* Already established, nothing more to do */ | |
371 | goto out; | 371 | goto out; | |
372 | } | 372 | } | |
373 | 373 | |||
374 | if (port == vec) { | 374 | if (port == vec) { | |
375 | /* Print error once */ | 375 | /* Print error once */ | |
376 | aprint_error_dev(self, | 376 | aprint_error_dev(self, | |
377 | "port %d independant interrupt vector not " | 377 | "port %d independent interrupt vector not " | |
378 | "available, sharing with further ports", | 378 | "available, sharing with further ports", | |
379 | port); | 379 | port); | |
380 | } | 380 | } | |
381 | } else { | 381 | } else { | |
382 | /* Vector according to port */ | 382 | /* Vector according to port */ | |
383 | KASSERT(port < psc->sc_nintr); | 383 | KASSERT(port < psc->sc_nintr); | |
384 | KASSERT(psc->sc_ih[port] == NULL); | 384 | KASSERT(psc->sc_ih[port] == NULL); | |
385 | intr_handler = ahci_intr_port; | 385 | intr_handler = ahci_intr_port; | |
386 | intr_arg = &sc->sc_channels[port]; | 386 | intr_arg = &sc->sc_channels[port]; | |
387 | vec = port; | 387 | vec = port; | |
388 | 388 | |||
389 | snprintf(intr_xname, sizeof(intr_xname), "%s port%d", | 389 | snprintf(intr_xname, sizeof(intr_xname), "%s port%d", | |
390 | device_xname(self), port); | 390 | device_xname(self), port); |
--- src/sys/dev/pci/cmpci.c 2021/08/07 16:19:14 1.59
+++ src/sys/dev/pci/cmpci.c 2022/05/31 08:43:15 1.60
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cmpci.c,v 1.59 2021/08/07 16:19:14 thorpej Exp $ */ | 1 | /* $NetBSD: cmpci.c,v 1.60 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Takuya SHIOZAKI <tshiozak@NetBSD.org> . | 8 | * by Takuya SHIOZAKI <tshiozak@NetBSD.org> . | |
9 | * | 9 | * | |
10 | * This code is derived from software contributed to The NetBSD Foundation | 10 | * This code is derived from software contributed to The NetBSD Foundation | |
11 | * by ITOH Yasufumi. | 11 | * by ITOH Yasufumi. | |
12 | * | 12 | * | |
13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without | |
14 | * modification, are permitted provided that the following conditions | 14 | * modification, are permitted provided that the following conditions | |
@@ -33,27 +33,27 @@ | @@ -33,27 +33,27 @@ | |||
33 | * | 33 | * | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * C-Media CMI8x38 Audio Chip Support. | 37 | * C-Media CMI8x38 Audio Chip Support. | |
38 | * | 38 | * | |
39 | * TODO: | 39 | * TODO: | |
40 | * - 4ch / 6ch support. | 40 | * - 4ch / 6ch support. | |
41 | * - Joystick support. | 41 | * - Joystick support. | |
42 | * | 42 | * | |
43 | */ | 43 | */ | |
44 | 44 | |||
45 | #include <sys/cdefs.h> | 45 | #include <sys/cdefs.h> | |
46 | __KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.59 2021/08/07 16:19:14 thorpej Exp $"); | 46 | __KERNEL_RCSID(0, "$NetBSD: cmpci.c,v 1.60 2022/05/31 08:43:15 andvar Exp $"); | |
47 | 47 | |||
48 | #if defined(AUDIO_DEBUG) || defined(DEBUG) | 48 | #if defined(AUDIO_DEBUG) || defined(DEBUG) | |
49 | #define DPRINTF(x) if (cmpcidebug) printf x | 49 | #define DPRINTF(x) if (cmpcidebug) printf x | |
50 | int cmpcidebug = 0; | 50 | int cmpcidebug = 0; | |
51 | #else | 51 | #else | |
52 | #define DPRINTF(x) | 52 | #define DPRINTF(x) | |
53 | #endif | 53 | #endif | |
54 | 54 | |||
55 | #include "mpu.h" | 55 | #include "mpu.h" | |
56 | 56 | |||
57 | #include <sys/param.h> | 57 | #include <sys/param.h> | |
58 | #include <sys/systm.h> | 58 | #include <sys/systm.h> | |
59 | #include <sys/kernel.h> | 59 | #include <sys/kernel.h> | |
@@ -458,27 +458,27 @@ cmpci_attach(device_t parent, device_t s | @@ -458,27 +458,27 @@ cmpci_attach(device_t parent, device_t s | |||
458 | break; | 458 | break; | |
459 | case CMPCI_PCSPEAKER: | 459 | case CMPCI_PCSPEAKER: | |
460 | v = 128; | 460 | v = 128; | |
461 | break; | 461 | break; | |
462 | 462 | |||
463 | /* booleans, set to true */ | 463 | /* booleans, set to true */ | |
464 | case CMPCI_CD_MUTE: | 464 | case CMPCI_CD_MUTE: | |
465 | case CMPCI_MIC_MUTE: | 465 | case CMPCI_MIC_MUTE: | |
466 | case CMPCI_LINE_IN_MUTE: | 466 | case CMPCI_LINE_IN_MUTE: | |
467 | case CMPCI_AUX_IN_MUTE: | 467 | case CMPCI_AUX_IN_MUTE: | |
468 | v = 1; | 468 | v = 1; | |
469 | break; | 469 | break; | |
470 | 470 | |||
471 | /* volume with inital value 0 */ | 471 | /* volume with initial value 0 */ | |
472 | case CMPCI_CD_VOL: | 472 | case CMPCI_CD_VOL: | |
473 | case CMPCI_LINE_IN_VOL: | 473 | case CMPCI_LINE_IN_VOL: | |
474 | case CMPCI_AUX_IN_VOL: | 474 | case CMPCI_AUX_IN_VOL: | |
475 | case CMPCI_MIC_VOL: | 475 | case CMPCI_MIC_VOL: | |
476 | case CMPCI_MIC_RECVOL: | 476 | case CMPCI_MIC_RECVOL: | |
477 | /* FALLTHROUGH */ | 477 | /* FALLTHROUGH */ | |
478 | 478 | |||
479 | /* others are cleared */ | 479 | /* others are cleared */ | |
480 | case CMPCI_MIC_PREAMP: | 480 | case CMPCI_MIC_PREAMP: | |
481 | case CMPCI_RECORD_SOURCE: | 481 | case CMPCI_RECORD_SOURCE: | |
482 | case CMPCI_PLAYBACK_MODE: | 482 | case CMPCI_PLAYBACK_MODE: | |
483 | case CMPCI_SPDIF_IN_SELECT: | 483 | case CMPCI_SPDIF_IN_SELECT: | |
484 | case CMPCI_SPDIF_IN_PHASE: | 484 | case CMPCI_SPDIF_IN_PHASE: |
--- src/sys/dev/pci/if_age.c 2020/03/01 02:51:42 1.69
+++ src/sys/dev/pci/if_age.c 2022/05/31 08:43:15 1.70
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: if_age.c,v 1.69 2020/03/01 02:51:42 thorpej Exp $ */ | 1 | /* $NetBSD: if_age.c,v 1.70 2022/05/31 08:43:15 andvar Exp $ */ | |
2 | /* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */ | 2 | /* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */ | |
3 | 3 | |||
4 | /*- | 4 | /*- | |
5 | * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> | 5 | * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice unmodified, this list of conditions, and the following | 12 | * notice unmodified, this list of conditions, and the following | |
13 | * disclaimer. | 13 | * disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
24 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 24 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 25 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
26 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 26 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
27 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
28 | * SUCH DAMAGE. | 28 | * SUCH DAMAGE. | |
29 | */ | 29 | */ | |
30 | 30 | |||
31 | /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */ | 31 | /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.69 2020/03/01 02:51:42 thorpej Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.70 2022/05/31 08:43:15 andvar Exp $"); | |
35 | 35 | |||
36 | #include "vlan.h" | 36 | #include "vlan.h" | |
37 | 37 | |||
38 | #include <sys/param.h> | 38 | #include <sys/param.h> | |
39 | #include <sys/proc.h> | 39 | #include <sys/proc.h> | |
40 | #include <sys/endian.h> | 40 | #include <sys/endian.h> | |
41 | #include <sys/systm.h> | 41 | #include <sys/systm.h> | |
42 | #include <sys/types.h> | 42 | #include <sys/types.h> | |
43 | #include <sys/sockio.h> | 43 | #include <sys/sockio.h> | |
44 | #include <sys/mbuf.h> | 44 | #include <sys/mbuf.h> | |
45 | #include <sys/queue.h> | 45 | #include <sys/queue.h> | |
46 | #include <sys/kernel.h> | 46 | #include <sys/kernel.h> | |
47 | #include <sys/device.h> | 47 | #include <sys/device.h> | |
@@ -1699,27 +1699,27 @@ age_init(struct ifnet *ifp) | @@ -1699,27 +1699,27 @@ age_init(struct ifnet *ifp) | |||
1699 | (AGE_TX_RING_CNT << DESC_TPD_CNT_SHIFT) & DESC_TPD_CNT_MASK); | 1699 | (AGE_TX_RING_CNT << DESC_TPD_CNT_SHIFT) & DESC_TPD_CNT_MASK); | |
1700 | 1700 | |||
1701 | /* Tell hardware that we're ready to load descriptors. */ | 1701 | /* Tell hardware that we're ready to load descriptors. */ | |
1702 | CSR_WRITE_4(sc, AGE_DMA_BLOCK, DMA_BLOCK_LOAD); | 1702 | CSR_WRITE_4(sc, AGE_DMA_BLOCK, DMA_BLOCK_LOAD); | |
1703 | 1703 | |||
1704 | /* | 1704 | /* | |
1705 | * Initialize mailbox register. | 1705 | * Initialize mailbox register. | |
1706 | * Updated producer/consumer index information is exchanged | 1706 | * Updated producer/consumer index information is exchanged | |
1707 | * through this mailbox register. However Tx producer and | 1707 | * through this mailbox register. However Tx producer and | |
1708 | * Rx return consumer/Rx producer are all shared such that | 1708 | * Rx return consumer/Rx producer are all shared such that | |
1709 | * it's hard to separate code path between Tx and Rx without | 1709 | * it's hard to separate code path between Tx and Rx without | |
1710 | * locking. If L1 hardware have a separate mail box register | 1710 | * locking. If L1 hardware have a separate mail box register | |
1711 | * for Tx and Rx consumer/producer management we could have | 1711 | * for Tx and Rx consumer/producer management we could have | |
1712 | * indepent Tx/Rx handler which in turn Rx handler could have | 1712 | * independent Tx/Rx handler which in turn Rx handler could have | |
1713 | * been run without any locking. | 1713 | * been run without any locking. | |
1714 | */ | 1714 | */ | |
1715 | AGE_COMMIT_MBOX(sc); | 1715 | AGE_COMMIT_MBOX(sc); | |
1716 | 1716 | |||
1717 | /* Configure IPG/IFG parameters. */ | 1717 | /* Configure IPG/IFG parameters. */ | |
1718 | CSR_WRITE_4(sc, AGE_IPG_IFG_CFG, | 1718 | CSR_WRITE_4(sc, AGE_IPG_IFG_CFG, | |
1719 | ((IPG_IFG_IPG2_DEFAULT << IPG_IFG_IPG2_SHIFT) & IPG_IFG_IPG2_MASK) | | 1719 | ((IPG_IFG_IPG2_DEFAULT << IPG_IFG_IPG2_SHIFT) & IPG_IFG_IPG2_MASK) | | |
1720 | ((IPG_IFG_IPG1_DEFAULT << IPG_IFG_IPG1_SHIFT) & IPG_IFG_IPG1_MASK) | | 1720 | ((IPG_IFG_IPG1_DEFAULT << IPG_IFG_IPG1_SHIFT) & IPG_IFG_IPG1_MASK) | | |
1721 | ((IPG_IFG_MIFG_DEFAULT << IPG_IFG_MIFG_SHIFT) & IPG_IFG_MIFG_MASK) | | 1721 | ((IPG_IFG_MIFG_DEFAULT << IPG_IFG_MIFG_SHIFT) & IPG_IFG_MIFG_MASK) | | |
1722 | ((IPG_IFG_IPGT_DEFAULT << IPG_IFG_IPGT_SHIFT) & IPG_IFG_IPGT_MASK)); | 1722 | ((IPG_IFG_IPGT_DEFAULT << IPG_IFG_IPGT_SHIFT) & IPG_IFG_IPGT_MASK)); | |
1723 | 1723 | |||
1724 | /* Set parameters for half-duplex media. */ | 1724 | /* Set parameters for half-duplex media. */ | |
1725 | CSR_WRITE_4(sc, AGE_HDPX_CFG, | 1725 | CSR_WRITE_4(sc, AGE_HDPX_CFG, |
--- src/sys/dev/pckbport/synaptics.c 2022/04/04 07:04:20 1.78
+++ src/sys/dev/pckbport/synaptics.c 2022/05/31 08:43:16 1.79
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: synaptics.c,v 1.78 2022/04/04 07:04:20 blymn Exp $ */ | 1 | /* $NetBSD: synaptics.c,v 1.79 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2005, Steve C. Woodford | 4 | * Copyright (c) 2005, Steve C. Woodford | |
5 | * Copyright (c) 2004, Ales Krenek | 5 | * Copyright (c) 2004, Ales Krenek | |
6 | * Copyright (c) 2004, Kentaro A. Kurahone | 6 | * Copyright (c) 2004, Kentaro A. Kurahone | |
7 | * All rights reserved. | 7 | * All rights reserved. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * | 12 | * | |
13 | * * Redistributions of source code must retain the above copyright | 13 | * * Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -38,27 +38,27 @@ | @@ -38,27 +38,27 @@ | |||
38 | /* | 38 | /* | |
39 | * TODO: | 39 | * TODO: | |
40 | * - Make the sysctl values per-instance instead of global. | 40 | * - Make the sysctl values per-instance instead of global. | |
41 | * - Consider setting initial scaling factors at runtime according | 41 | * - Consider setting initial scaling factors at runtime according | |
42 | * to the values returned by the 'Read Resolutions' command. | 42 | * to the values returned by the 'Read Resolutions' command. | |
43 | * - Support the serial protocol (we only support PS/2 for now) | 43 | * - Support the serial protocol (we only support PS/2 for now) | |
44 | * - Support auto-repeat for up/down button Z-axis emulation. | 44 | * - Support auto-repeat for up/down button Z-axis emulation. | |
45 | * - Maybe add some more gestures (can we use Palm support somehow?) | 45 | * - Maybe add some more gestures (can we use Palm support somehow?) | |
46 | */ | 46 | */ | |
47 | 47 | |||
48 | #include "opt_pms.h" | 48 | #include "opt_pms.h" | |
49 | 49 | |||
50 | #include <sys/cdefs.h> | 50 | #include <sys/cdefs.h> | |
51 | __KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.78 2022/04/04 07:04:20 blymn Exp $"); | 51 | __KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.79 2022/05/31 08:43:16 andvar Exp $"); | |
52 | 52 | |||
53 | #include <sys/param.h> | 53 | #include <sys/param.h> | |
54 | #include <sys/systm.h> | 54 | #include <sys/systm.h> | |
55 | #include <sys/device.h> | 55 | #include <sys/device.h> | |
56 | #include <sys/ioctl.h> | 56 | #include <sys/ioctl.h> | |
57 | #include <sys/sysctl.h> | 57 | #include <sys/sysctl.h> | |
58 | #include <sys/kernel.h> | 58 | #include <sys/kernel.h> | |
59 | #include <sys/proc.h> | 59 | #include <sys/proc.h> | |
60 | 60 | |||
61 | #include <sys/bus.h> | 61 | #include <sys/bus.h> | |
62 | 62 | |||
63 | #include <dev/pckbport/pckbportvar.h> | 63 | #include <dev/pckbport/pckbportvar.h> | |
64 | 64 | |||
@@ -998,27 +998,27 @@ pms_sysctl_synaptics(struct sysctllog ** | @@ -998,27 +998,27 @@ pms_sysctl_synaptics(struct sysctllog ** | |||
998 | CTLTYPE_INT, "button3_edge", | 998 | CTLTYPE_INT, "button3_edge", | |
999 | SYSCTL_DESCR("Left edge of button 3 region"), | 999 | SYSCTL_DESCR("Left edge of button 3 region"), | |
1000 | pms_sysctl_synaptics_verify, 0, | 1000 | pms_sysctl_synaptics_verify, 0, | |
1001 | &synaptics_button3, | 1001 | &synaptics_button3, | |
1002 | 0, CTL_HW, root_num, CTL_CREATE, | 1002 | 0, CTL_HW, root_num, CTL_CREATE, | |
1003 | CTL_EOL)) != 0) | 1003 | CTL_EOL)) != 0) | |
1004 | goto err; | 1004 | goto err; | |
1005 | 1005 | |||
1006 | synaptics_button3_nodenum = node->sysctl_num; | 1006 | synaptics_button3_nodenum = node->sysctl_num; | |
1007 | 1007 | |||
1008 | if ((rc = sysctl_createv(clog, 0, NULL, &node, | 1008 | if ((rc = sysctl_createv(clog, 0, NULL, &node, | |
1009 | CTLFLAG_PERMANENT | CTLFLAG_READWRITE, | 1009 | CTLFLAG_PERMANENT | CTLFLAG_READWRITE, | |
1010 | CTLTYPE_BOOL, "aux_mid_button_scroll", | 1010 | CTLTYPE_BOOL, "aux_mid_button_scroll", | |
1011 | SYSCTL_DESCR("Interpet Y-Axis movement with the middle button held as scrolling on the passthrough device (e.g. TrackPoint)"), | 1011 | SYSCTL_DESCR("Interpret Y-Axis movement with the middle button held as scrolling on the passthrough device (e.g. TrackPoint)"), | |
1012 | pms_sysctl_synaptics_verify, 0, | 1012 | pms_sysctl_synaptics_verify, 0, | |
1013 | &synaptics_aux_mid_button_scroll, | 1013 | &synaptics_aux_mid_button_scroll, | |
1014 | 0, CTL_HW, root_num, CTL_CREATE, | 1014 | 0, CTL_HW, root_num, CTL_CREATE, | |
1015 | CTL_EOL)) != 0) | 1015 | CTL_EOL)) != 0) | |
1016 | goto err; | 1016 | goto err; | |
1017 | 1017 | |||
1018 | synaptics_aux_mid_button_scroll_nodenum = node->sysctl_num; | 1018 | synaptics_aux_mid_button_scroll_nodenum = node->sysctl_num; | |
1019 | 1019 | |||
1020 | if ((rc = sysctl_createv(clog, 0, NULL, &node, | 1020 | if ((rc = sysctl_createv(clog, 0, NULL, &node, | |
1021 | CTLFLAG_PERMANENT | CTLFLAG_READWRITE, | 1021 | CTLFLAG_PERMANENT | CTLFLAG_READWRITE, | |
1022 | CTLTYPE_INT, "vert_scroll_percent", | 1022 | CTLTYPE_INT, "vert_scroll_percent", | |
1023 | SYSCTL_DESCR("Percent of trackpad width to reserve for vertical scroll region"), | 1023 | SYSCTL_DESCR("Percent of trackpad width to reserve for vertical scroll region"), | |
1024 | pms_sysctl_synaptics_verify, 0, | 1024 | pms_sysctl_synaptics_verify, 0, |
--- src/sys/dev/ppbus/ppbus_msq.c 2016/02/14 18:11:16 1.11
+++ src/sys/dev/ppbus/ppbus_msq.c 2022/05/31 08:43:16 1.12
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ppbus_msq.c,v 1.11 2016/02/14 18:11:16 dholland Exp $ */ | 1 | /* $NetBSD: ppbus_msq.c,v 1.12 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1998, 1999 Nicolas Souchu | 4 | * Copyright (c) 1998, 1999 Nicolas Souchu | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
26 | * SUCH DAMAGE. | 26 | * SUCH DAMAGE. | |
27 | * | 27 | * | |
28 | * FreeBSD: src/sys/dev/ppbus/ppb_msq.c,v 1.9.2.1 2000/05/24 00:20:57 n_hibma Exp | 28 | * FreeBSD: src/sys/dev/ppbus/ppb_msq.c,v 1.9.2.1 2000/05/24 00:20:57 n_hibma Exp | |
29 | * | 29 | * | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: ppbus_msq.c,v 1.11 2016/02/14 18:11:16 dholland Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: ppbus_msq.c,v 1.12 2022/05/31 08:43:16 andvar Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | 37 | |||
38 | #include <dev/ppbus/ppbus_conf.h> | 38 | #include <dev/ppbus/ppbus_conf.h> | |
39 | #include <dev/ppbus/ppbus_base.h> | 39 | #include <dev/ppbus/ppbus_base.h> | |
40 | #include <dev/ppbus/ppbus_device.h> | 40 | #include <dev/ppbus/ppbus_device.h> | |
41 | #include <dev/ppbus/ppbus_msq.h> | 41 | #include <dev/ppbus/ppbus_msq.h> | |
42 | #include <dev/ppbus/ppbus_var.h> | 42 | #include <dev/ppbus/ppbus_var.h> | |
43 | 43 | |||
44 | /* | 44 | /* | |
45 | #include "ppbus_if.h" | 45 | #include "ppbus_if.h" | |
46 | */ | 46 | */ | |
@@ -257,27 +257,27 @@ ppbus_MS_init_msq(struct ppbus_microseq | @@ -257,27 +257,27 @@ ppbus_MS_init_msq(struct ppbus_microseq | |||
257 | 257 | |||
258 | default: | 258 | default: | |
259 | panic("%s: unknown parameter (0x%x)!", __func__, param); | 259 | panic("%s: unknown parameter (0x%x)!", __func__, param); | |
260 | } | 260 | } | |
261 | } | 261 | } | |
262 | va_end(p_list); | 262 | va_end(p_list); | |
263 | 263 | |||
264 | return (0); | 264 | return (0); | |
265 | } | 265 | } | |
266 | 266 | |||
267 | /* | 267 | /* | |
268 | * ppbus_MS_microseq() | 268 | * ppbus_MS_microseq() | |
269 | * | 269 | * | |
270 | * Interprete a microsequence. Some microinstructions are executed at adapter | 270 | * Interpret a microsequence. Some microinstructions are executed at adapter | |
271 | * level to avoid function call overhead between ppbus and the adapter | 271 | * level to avoid function call overhead between ppbus and the adapter | |
272 | */ | 272 | */ | |
273 | int | 273 | int | |
274 | ppbus_MS_microseq(device_t dev, device_t busdev, | 274 | ppbus_MS_microseq(device_t dev, device_t busdev, | |
275 | struct ppbus_microseq * msq, int * ret) | 275 | struct ppbus_microseq * msq, int * ret) | |
276 | { | 276 | { | |
277 | struct ppbus_device_softc * ppbdev = device_private(busdev); | 277 | struct ppbus_device_softc * ppbdev = device_private(busdev); | |
278 | struct ppbus_softc * bus = device_private(dev); | 278 | struct ppbus_softc * bus = device_private(dev); | |
279 | struct ppbus_microseq * mi; /* current microinstruction */ | 279 | struct ppbus_microseq * mi; /* current microinstruction */ | |
280 | size_t cnt; | 280 | size_t cnt; | |
281 | int error; | 281 | int error; | |
282 | 282 | |||
283 | struct ppbus_xfer * xfer; | 283 | struct ppbus_xfer * xfer; |
--- src/sys/kern/kern_hook.c 2021/12/03 08:33:30 1.12
+++ src/sys/kern/kern_hook.c 2022/05/31 08:43:16 1.13
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: kern_hook.c,v 1.12 2021/12/03 08:33:30 gson Exp $ */ | 1 | /* $NetBSD: kern_hook.c,v 1.13 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | |
9 | * NASA Ames Research Center, and by Luke Mewburn. | 9 | * NASA Ames Research Center, and by Luke Mewburn. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
30 | * POSSIBILITY OF SUCH DAMAGE. | 30 | * POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.12 2021/12/03 08:33:30 gson Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: kern_hook.c,v 1.13 2022/05/31 08:43:16 andvar Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/condvar.h> | 37 | #include <sys/condvar.h> | |
38 | #include <sys/cpu.h> | 38 | #include <sys/cpu.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/hook.h> | 40 | #include <sys/hook.h> | |
41 | #include <sys/kmem.h> | 41 | #include <sys/kmem.h> | |
42 | #include <sys/malloc.h> | 42 | #include <sys/malloc.h> | |
43 | #include <sys/rwlock.h> | 43 | #include <sys/rwlock.h> | |
44 | #include <sys/systm.h> | 44 | #include <sys/systm.h> | |
45 | 45 | |||
46 | /* | 46 | /* | |
47 | * A generic linear hook. | 47 | * A generic linear hook. | |
@@ -548,27 +548,27 @@ simplehook_disestablish(khook_list_t *l, | @@ -548,27 +548,27 @@ simplehook_disestablish(khook_list_t *l, | |||
548 | KASSERT(lock == NULL || mutex_owned(lock)); | 548 | KASSERT(lock == NULL || mutex_owned(lock)); | |
549 | mutex_enter(&l->hl_lock); | 549 | mutex_enter(&l->hl_lock); | |
550 | 550 | |||
551 | #ifdef DIAGNOSTIC | 551 | #ifdef DIAGNOSTIC | |
552 | LIST_FOREACH(hd0, &l->hl_list, hk_list) { | 552 | LIST_FOREACH(hd0, &l->hl_list, hk_list) { | |
553 | if (hd == hd0) | 553 | if (hd == hd0) | |
554 | break; | 554 | break; | |
555 | } | 555 | } | |
556 | 556 | |||
557 | if (hd0 == NULL) | 557 | if (hd0 == NULL) | |
558 | panic("hook_disestablish: hook %p not established", hd); | 558 | panic("hook_disestablish: hook %p not established", hd); | |
559 | #endif | 559 | #endif | |
560 | 560 | |||
561 | /* The hook is not referred, remove immidiately */ | 561 | /* The hook is not referred, remove immediately */ | |
562 | if (l->hl_state == HKLIST_IDLE) { | 562 | if (l->hl_state == HKLIST_IDLE) { | |
563 | LIST_REMOVE(hd, hk_list); | 563 | LIST_REMOVE(hd, hk_list); | |
564 | kmem_free(hd, sizeof(*hd)); | 564 | kmem_free(hd, sizeof(*hd)); | |
565 | mutex_exit(&l->hl_lock); | 565 | mutex_exit(&l->hl_lock); | |
566 | return; | 566 | return; | |
567 | } | 567 | } | |
568 | 568 | |||
569 | /* remove callback. hd will be removed in dohooks */ | 569 | /* remove callback. hd will be removed in dohooks */ | |
570 | hd->hk_fn = NULL; | 570 | hd->hk_fn = NULL; | |
571 | hd->hk_arg = NULL; | 571 | hd->hk_arg = NULL; | |
572 | 572 | |||
573 | /* If the hook is running, wait for the completion */ | 573 | /* If the hook is running, wait for the completion */ | |
574 | if (l->hl_active_hk == hd && | 574 | if (l->hl_active_hk == hd && |
--- src/sys/kern/subr_blist.c 2022/05/29 10:47:40 1.14
+++ src/sys/kern/subr_blist.c 2022/05/31 08:43:16 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: subr_blist.c,v 1.14 2022/05/29 10:47:40 andvar Exp $ */ | 1 | /* $NetBSD: subr_blist.c,v 1.15 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1998 Matthew Dillon. All Rights Reserved. | 4 | * Copyright (c) 1998 Matthew Dillon. All Rights Reserved. | |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without | |
6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions | |
7 | * are met: | 7 | * are met: | |
8 | * 1. Redistributions of source code must retain the above copyright | 8 | * 1. Redistributions of source code must retain the above copyright | |
9 | * notice, this list of conditions and the following disclaimer. | 9 | * notice, this list of conditions and the following disclaimer. | |
10 | * 2. Redistributions in binary form must reproduce the above copyright | 10 | * 2. Redistributions in binary form must reproduce the above copyright | |
11 | * notice, this list of conditions and the following disclaimer in the | 11 | * notice, this list of conditions and the following disclaimer in the | |
12 | * documentation and/or other materials provided with the distribution. | 12 | * documentation and/or other materials provided with the distribution. | |
13 | * 4. Neither the name of the University nor the names of its contributors | 13 | * 4. Neither the name of the University nor the names of its contributors | |
14 | * may be used to endorse or promote products derived from this software | 14 | * may be used to endorse or promote products derived from this software | |
@@ -76,27 +76,27 @@ | @@ -76,27 +76,27 @@ | |||
76 | * | 76 | * | |
77 | * NOTE: the allocator cannot currently allocate more than | 77 | * NOTE: the allocator cannot currently allocate more than | |
78 | * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too | 78 | * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too | |
79 | * large' if you try. This is an area that could use improvement. The | 79 | * large' if you try. This is an area that could use improvement. The | |
80 | * radix is large enough that this restriction does not effect the swap | 80 | * radix is large enough that this restriction does not effect the swap | |
81 | * system, though. Currently only the allocation code is effected by | 81 | * system, though. Currently only the allocation code is effected by | |
82 | * this algorithmic unfeature. The freeing code can handle arbitrary | 82 | * this algorithmic unfeature. The freeing code can handle arbitrary | |
83 | * ranges. | 83 | * ranges. | |
84 | * | 84 | * | |
85 | * This code can be compiled stand-alone for debugging. | 85 | * This code can be compiled stand-alone for debugging. | |
86 | */ | 86 | */ | |
87 | 87 | |||
88 | #include <sys/cdefs.h> | 88 | #include <sys/cdefs.h> | |
89 | __KERNEL_RCSID(0, "$NetBSD: subr_blist.c,v 1.14 2022/05/29 10:47:40 andvar Exp $"); | 89 | __KERNEL_RCSID(0, "$NetBSD: subr_blist.c,v 1.15 2022/05/31 08:43:16 andvar Exp $"); | |
90 | #if 0 | 90 | #if 0 | |
91 | __FBSDID("$FreeBSD: src/sys/kern/subr_blist.c,v 1.17 2004/06/04 04:03:25 alc Exp $"); | 91 | __FBSDID("$FreeBSD: src/sys/kern/subr_blist.c,v 1.17 2004/06/04 04:03:25 alc Exp $"); | |
92 | #endif | 92 | #endif | |
93 | 93 | |||
94 | #ifdef _KERNEL | 94 | #ifdef _KERNEL | |
95 | 95 | |||
96 | #include <sys/param.h> | 96 | #include <sys/param.h> | |
97 | #include <sys/systm.h> | 97 | #include <sys/systm.h> | |
98 | #include <sys/blist.h> | 98 | #include <sys/blist.h> | |
99 | #include <sys/kmem.h> | 99 | #include <sys/kmem.h> | |
100 | 100 | |||
101 | #else | 101 | #else | |
102 | 102 | |||
@@ -246,27 +246,27 @@ blist_alloc(blist_t bl, blist_blkno_t co | @@ -246,27 +246,27 @@ blist_alloc(blist_t bl, blist_blkno_t co | |||
246 | if (bl) { | 246 | if (bl) { | |
247 | if (bl->bl_radix == BLIST_BMAP_RADIX) | 247 | if (bl->bl_radix == BLIST_BMAP_RADIX) | |
248 | blk = blst_leaf_alloc(bl->bl_root, 0, count); | 248 | blk = blst_leaf_alloc(bl->bl_root, 0, count); | |
249 | else | 249 | else | |
250 | blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, bl->bl_skip); | 250 | blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, bl->bl_skip); | |
251 | if (blk != BLIST_NONE) | 251 | if (blk != BLIST_NONE) | |
252 | bl->bl_free -= count; | 252 | bl->bl_free -= count; | |
253 | } | 253 | } | |
254 | return(blk); | 254 | return(blk); | |
255 | } | 255 | } | |
256 | 256 | |||
257 | /* | 257 | /* | |
258 | * blist_free() - free up space in the block bitmap. Return the base | 258 | * blist_free() - free up space in the block bitmap. Return the base | |
259 | * of a contiguous region. Panic if an inconsistancy is | 259 | * of a contiguous region. Panic if an inconsistency is | |
260 | * found. | 260 | * found. | |
261 | */ | 261 | */ | |
262 | 262 | |||
263 | void | 263 | void | |
264 | blist_free(blist_t bl, blist_blkno_t blkno, blist_blkno_t count) | 264 | blist_free(blist_t bl, blist_blkno_t blkno, blist_blkno_t count) | |
265 | { | 265 | { | |
266 | if (bl) { | 266 | if (bl) { | |
267 | if (bl->bl_radix == BLIST_BMAP_RADIX) | 267 | if (bl->bl_radix == BLIST_BMAP_RADIX) | |
268 | blst_leaf_free(bl->bl_root, blkno, count); | 268 | blst_leaf_free(bl->bl_root, blkno, count); | |
269 | else | 269 | else | |
270 | blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, bl->bl_skip, 0); | 270 | blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, bl->bl_skip, 0); | |
271 | bl->bl_free += count; | 271 | bl->bl_free += count; | |
272 | } | 272 | } |
--- src/sys/kern/subr_vmem.c 2022/02/27 14:24:11 1.107
+++ src/sys/kern/subr_vmem.c 2022/05/31 08:43:16 1.108
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: subr_vmem.c,v 1.107 2022/02/27 14:24:11 riastradh Exp $ */ | 1 | /* $NetBSD: subr_vmem.c,v 1.108 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, | 4 | * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -29,34 +29,34 @@ | @@ -29,34 +29,34 @@ | |||
29 | /* | 29 | /* | |
30 | * reference: | 30 | * reference: | |
31 | * - Magazines and Vmem: Extending the Slab Allocator | 31 | * - Magazines and Vmem: Extending the Slab Allocator | |
32 | * to Many CPUs and Arbitrary Resources | 32 | * to Many CPUs and Arbitrary Resources | |
33 | * http://www.usenix.org/event/usenix01/bonwick.html | 33 | * http://www.usenix.org/event/usenix01/bonwick.html | |
34 | * | 34 | * | |
35 | * locking & the boundary tag pool: | 35 | * locking & the boundary tag pool: | |
36 | * - A pool(9) is used for vmem boundary tags | 36 | * - A pool(9) is used for vmem boundary tags | |
37 | * - During a pool get call the global vmem_btag_refill_lock is taken, | 37 | * - During a pool get call the global vmem_btag_refill_lock is taken, | |
38 | * to serialize access to the allocation reserve, but no other | 38 | * to serialize access to the allocation reserve, but no other | |
39 | * vmem arena locks. | 39 | * vmem arena locks. | |
40 | * - During pool_put calls no vmem mutexes are locked. | 40 | * - During pool_put calls no vmem mutexes are locked. | |
41 | * - pool_drain doesn't hold the pool's mutex while releasing memory to | 41 | * - pool_drain doesn't hold the pool's mutex while releasing memory to | |
42 | * its backing therefore no interferance with any vmem mutexes. | 42 | * its backing therefore no interference with any vmem mutexes. | |
43 | * - The boundary tag pool is forced to put page headers into pool pages | 43 | * - The boundary tag pool is forced to put page headers into pool pages | |
44 | * (PR_PHINPAGE) and not off page to avoid pool recursion. | 44 | * (PR_PHINPAGE) and not off page to avoid pool recursion. | |
45 | * (due to sizeof(bt_t) it should be the case anyway) | 45 | * (due to sizeof(bt_t) it should be the case anyway) | |
46 | */ | 46 | */ | |
47 | 47 | |||
48 | #include <sys/cdefs.h> | 48 | #include <sys/cdefs.h> | |
49 | __KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.107 2022/02/27 14:24:11 riastradh Exp $"); | 49 | __KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.108 2022/05/31 08:43:16 andvar Exp $"); | |
50 | 50 | |||
51 | #if defined(_KERNEL) && defined(_KERNEL_OPT) | 51 | #if defined(_KERNEL) && defined(_KERNEL_OPT) | |
52 | #include "opt_ddb.h" | 52 | #include "opt_ddb.h" | |
53 | #endif /* defined(_KERNEL) && defined(_KERNEL_OPT) */ | 53 | #endif /* defined(_KERNEL) && defined(_KERNEL_OPT) */ | |
54 | 54 | |||
55 | #include <sys/param.h> | 55 | #include <sys/param.h> | |
56 | #include <sys/hash.h> | 56 | #include <sys/hash.h> | |
57 | #include <sys/queue.h> | 57 | #include <sys/queue.h> | |
58 | #include <sys/bitops.h> | 58 | #include <sys/bitops.h> | |
59 | 59 | |||
60 | #if defined(_KERNEL) | 60 | #if defined(_KERNEL) | |
61 | #include <sys/systm.h> | 61 | #include <sys/systm.h> | |
62 | #include <sys/kernel.h> /* hz */ | 62 | #include <sys/kernel.h> /* hz */ |
--- src/sys/netinet/ip_reass.c 2022/02/16 22:00:56 1.22
+++ src/sys/netinet/ip_reass.c 2022/05/31 08:43:16 1.23
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ip_reass.c,v 1.22 2022/02/16 22:00:56 andvar Exp $ */ | 1 | /* $NetBSD: ip_reass.c,v 1.23 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1988, 1993 | 4 | * Copyright (c) 1982, 1986, 1988, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -36,27 +36,27 @@ | @@ -36,27 +36,27 @@ | |||
36 | * | 36 | * | |
37 | * Additive-Increase/Multiplicative-Decrease (AIMD) strategy for IP | 37 | * Additive-Increase/Multiplicative-Decrease (AIMD) strategy for IP | |
38 | * reassembly queue buffer management. | 38 | * reassembly queue buffer management. | |
39 | * | 39 | * | |
40 | * We keep a count of total IP fragments (NB: not fragmented packets), | 40 | * We keep a count of total IP fragments (NB: not fragmented packets), | |
41 | * awaiting reassembly (ip_nfrags) and a limit (ip_maxfrags) on fragments. | 41 | * awaiting reassembly (ip_nfrags) and a limit (ip_maxfrags) on fragments. | |
42 | * If ip_nfrags exceeds ip_maxfrags the limit, we drop half the total | 42 | * If ip_nfrags exceeds ip_maxfrags the limit, we drop half the total | |
43 | * fragments in reassembly queues. This AIMD policy avoids repeatedly | 43 | * fragments in reassembly queues. This AIMD policy avoids repeatedly | |
44 | * deleting single packets under heavy fragmentation load (e.g., from lossy | 44 | * deleting single packets under heavy fragmentation load (e.g., from lossy | |
45 | * NFS peers). | 45 | * NFS peers). | |
46 | */ | 46 | */ | |
47 | 47 | |||
48 | #include <sys/cdefs.h> | 48 | #include <sys/cdefs.h> | |
49 | __KERNEL_RCSID(0, "$NetBSD: ip_reass.c,v 1.22 2022/02/16 22:00:56 andvar Exp $"); | 49 | __KERNEL_RCSID(0, "$NetBSD: ip_reass.c,v 1.23 2022/05/31 08:43:16 andvar Exp $"); | |
50 | 50 | |||
51 | #include <sys/param.h> | 51 | #include <sys/param.h> | |
52 | #include <sys/types.h> | 52 | #include <sys/types.h> | |
53 | 53 | |||
54 | #include <sys/malloc.h> | 54 | #include <sys/malloc.h> | |
55 | #include <sys/mbuf.h> | 55 | #include <sys/mbuf.h> | |
56 | #include <sys/mutex.h> | 56 | #include <sys/mutex.h> | |
57 | #include <sys/pool.h> | 57 | #include <sys/pool.h> | |
58 | #include <sys/queue.h> | 58 | #include <sys/queue.h> | |
59 | #include <sys/sysctl.h> | 59 | #include <sys/sysctl.h> | |
60 | #include <sys/systm.h> | 60 | #include <sys/systm.h> | |
61 | 61 | |||
62 | #include <net/if.h> | 62 | #include <net/if.h> | |
@@ -454,27 +454,27 @@ ip_freef(ipfr_queue_t *fp) | @@ -454,27 +454,27 @@ ip_freef(ipfr_queue_t *fp) | |||
454 | while ((q = TAILQ_FIRST(&fp->ipq_fragq)) != NULL) { | 454 | while ((q = TAILQ_FIRST(&fp->ipq_fragq)) != NULL) { | |
455 | TAILQ_REMOVE(&fp->ipq_fragq, q, ipqe_q); | 455 | TAILQ_REMOVE(&fp->ipq_fragq, q, ipqe_q); | |
456 | m_freem(q->ipqe_m); | 456 | m_freem(q->ipqe_m); | |
457 | pool_cache_put(ipfren_cache, q); | 457 | pool_cache_put(ipfren_cache, q); | |
458 | } | 458 | } | |
459 | free(fp, M_FTABLE); | 459 | free(fp, M_FTABLE); | |
460 | } | 460 | } | |
461 | 461 | |||
462 | /* | 462 | /* | |
463 | * ip_reass_ttl_decr: | 463 | * ip_reass_ttl_decr: | |
464 | * | 464 | * | |
465 | * Decrement TTL of all reasembly queue entries by `ticks'. Count | 465 | * Decrement TTL of all reasembly queue entries by `ticks'. Count | |
466 | * number of distinct fragments (as opposed to partial, fragmented | 466 | * number of distinct fragments (as opposed to partial, fragmented | |
467 | * datagrams) inthe reassembly queue. While we traverse the entire | 467 | * datagrams) in the reassembly queue. While we traverse the entire | |
468 | * reassembly queue, compute and return the median TTL over all | 468 | * reassembly queue, compute and return the median TTL over all | |
469 | * fragments. | 469 | * fragments. | |
470 | */ | 470 | */ | |
471 | static u_int | 471 | static u_int | |
472 | ip_reass_ttl_decr(u_int ticks) | 472 | ip_reass_ttl_decr(u_int ticks) | |
473 | { | 473 | { | |
474 | u_int nfrags, median, dropfraction, keepfraction; | 474 | u_int nfrags, median, dropfraction, keepfraction; | |
475 | ipfr_queue_t *fp, *nfp; | 475 | ipfr_queue_t *fp, *nfp; | |
476 | int i; | 476 | int i; | |
477 | 477 | |||
478 | nfrags = 0; | 478 | nfrags = 0; | |
479 | memset(fragttl_histo, 0, sizeof(fragttl_histo)); | 479 | memset(fragttl_histo, 0, sizeof(fragttl_histo)); | |
480 | 480 |
--- src/sys/netinet/sctp_output.c 2022/05/28 10:36:23 1.30
+++ src/sys/netinet/sctp_output.c 2022/05/31 08:43:16 1.31
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sctp_output.c,v 1.30 2022/05/28 10:36:23 andvar Exp $ */ | 1 | /* $NetBSD: sctp_output.c,v 1.31 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | /* $KAME: sctp_output.c,v 1.48 2005/06/16 18:29:24 jinmei Exp $ */ | 2 | /* $KAME: sctp_output.c,v 1.48 2005/06/16 18:29:24 jinmei Exp $ */ | |
3 | 3 | |||
4 | /* | 4 | /* | |
5 | * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, | 5 | * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | 20 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | |
21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE | 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE | |
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | * SUCH DAMAGE. | 30 | * SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.30 2022/05/28 10:36:23 andvar Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: sctp_output.c,v 1.31 2022/05/31 08:43:16 andvar Exp $"); | |
34 | 34 | |||
35 | #ifdef _KERNEL_OPT | 35 | #ifdef _KERNEL_OPT | |
36 | #include "opt_ipsec.h" | 36 | #include "opt_ipsec.h" | |
37 | #include "opt_inet.h" | 37 | #include "opt_inet.h" | |
38 | #include "opt_sctp.h" | 38 | #include "opt_sctp.h" | |
39 | #endif /* _KERNEL_OPT */ | 39 | #endif /* _KERNEL_OPT */ | |
40 | 40 | |||
41 | #include <sys/param.h> | 41 | #include <sys/param.h> | |
42 | #include <sys/systm.h> | 42 | #include <sys/systm.h> | |
43 | #include <sys/malloc.h> | 43 | #include <sys/malloc.h> | |
44 | #include <sys/mbuf.h> | 44 | #include <sys/mbuf.h> | |
45 | #include <sys/domain.h> | 45 | #include <sys/domain.h> | |
46 | #include <sys/protosw.h> | 46 | #include <sys/protosw.h> | |
@@ -4808,27 +4808,27 @@ sctp_sendall (struct sctp_inpcb *inp, st | @@ -4808,27 +4808,27 @@ sctp_sendall (struct sctp_inpcb *inp, st | |||
4808 | ca->sndlen += m->m_len; | 4808 | ca->sndlen += m->m_len; | |
4809 | m = m->m_next; | 4809 | m = m->m_next; | |
4810 | } | 4810 | } | |
4811 | } else { | 4811 | } else { | |
4812 | ca->sndlen = m->m_pkthdr.len; | 4812 | ca->sndlen = m->m_pkthdr.len; | |
4813 | } | 4813 | } | |
4814 | ca->m = m; | 4814 | ca->m = m; | |
4815 | } | 4815 | } | |
4816 | 4816 | |||
4817 | ret = sctp_initiate_iterator(sctp_sendall_iterator, SCTP_PCB_ANY_FLAGS, SCTP_ASOC_ANY_STATE, | 4817 | ret = sctp_initiate_iterator(sctp_sendall_iterator, SCTP_PCB_ANY_FLAGS, SCTP_ASOC_ANY_STATE, | |
4818 | (void *)ca, 0, sctp_sendall_completes, inp); | 4818 | (void *)ca, 0, sctp_sendall_completes, inp); | |
4819 | if (ret) { | 4819 | if (ret) { | |
4820 | #ifdef SCTP_DEBUG | 4820 | #ifdef SCTP_DEBUG | |
4821 | printf("Failed to initate iterator to takeover associations\n"); | 4821 | printf("Failed to initiate iterator to takeover associations\n"); | |
4822 | #endif | 4822 | #endif | |
4823 | free(ca, M_PCB); | 4823 | free(ca, M_PCB); | |
4824 | return (EFAULT); | 4824 | return (EFAULT); | |
4825 | 4825 | |||
4826 | } | 4826 | } | |
4827 | return (0); | 4827 | return (0); | |
4828 | } | 4828 | } | |
4829 | 4829 | |||
4830 | 4830 | |||
4831 | void | 4831 | void | |
4832 | sctp_toss_old_cookies(struct sctp_association *asoc) | 4832 | sctp_toss_old_cookies(struct sctp_association *asoc) | |
4833 | { | 4833 | { | |
4834 | struct sctp_tmit_chunk *chk, *nchk; | 4834 | struct sctp_tmit_chunk *chk, *nchk; |
--- src/sys/uvm/uvm_aobj.c 2022/04/09 23:38:33 1.155
+++ src/sys/uvm/uvm_aobj.c 2022/05/31 08:43:16 1.156
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: uvm_aobj.c,v 1.155 2022/04/09 23:38:33 riastradh Exp $ */ | 1 | /* $NetBSD: uvm_aobj.c,v 1.156 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and | 4 | * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and | |
5 | * Washington University. | 5 | * Washington University. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -28,27 +28,27 @@ | @@ -28,27 +28,27 @@ | |||
28 | * from: Id: uvm_aobj.c,v 1.1.2.5 1998/02/06 05:14:38 chs Exp | 28 | * from: Id: uvm_aobj.c,v 1.1.2.5 1998/02/06 05:14:38 chs Exp | |
29 | */ | 29 | */ | |
30 | 30 | |||
31 | /* | 31 | /* | |
32 | * uvm_aobj.c: anonymous memory uvm_object pager | 32 | * uvm_aobj.c: anonymous memory uvm_object pager | |
33 | * | 33 | * | |
34 | * author: Chuck Silvers <chuq@chuq.com> | 34 | * author: Chuck Silvers <chuq@chuq.com> | |
35 | * started: Jan-1998 | 35 | * started: Jan-1998 | |
36 | * | 36 | * | |
37 | * - design mostly from Chuck Cranor | 37 | * - design mostly from Chuck Cranor | |
38 | */ | 38 | */ | |
39 | 39 | |||
40 | #include <sys/cdefs.h> | 40 | #include <sys/cdefs.h> | |
41 | __KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.155 2022/04/09 23:38:33 riastradh Exp $"); | 41 | __KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.156 2022/05/31 08:43:16 andvar Exp $"); | |
42 | 42 | |||
43 | #ifdef _KERNEL_OPT | 43 | #ifdef _KERNEL_OPT | |
44 | #include "opt_uvmhist.h" | 44 | #include "opt_uvmhist.h" | |
45 | #endif | 45 | #endif | |
46 | 46 | |||
47 | #include <sys/param.h> | 47 | #include <sys/param.h> | |
48 | #include <sys/systm.h> | 48 | #include <sys/systm.h> | |
49 | #include <sys/kernel.h> | 49 | #include <sys/kernel.h> | |
50 | #include <sys/kmem.h> | 50 | #include <sys/kmem.h> | |
51 | #include <sys/pool.h> | 51 | #include <sys/pool.h> | |
52 | #include <sys/atomic.h> | 52 | #include <sys/atomic.h> | |
53 | 53 | |||
54 | #include <uvm/uvm.h> | 54 | #include <uvm/uvm.h> | |
@@ -374,27 +374,27 @@ uao_free(struct uvm_aobj *aobj) | @@ -374,27 +374,27 @@ uao_free(struct uvm_aobj *aobj) | |||
374 | rw_exit(uobj->vmobjlock); | 374 | rw_exit(uobj->vmobjlock); | |
375 | 375 | |||
376 | #if defined(VMSWAP) | 376 | #if defined(VMSWAP) | |
377 | if (UAO_USES_SWHASH(aobj)) { | 377 | if (UAO_USES_SWHASH(aobj)) { | |
378 | 378 | |||
379 | /* | 379 | /* | |
380 | * free the hash table itself. | 380 | * free the hash table itself. | |
381 | */ | 381 | */ | |
382 | 382 | |||
383 | hashdone(aobj->u_swhash, HASH_LIST, aobj->u_swhashmask); | 383 | hashdone(aobj->u_swhash, HASH_LIST, aobj->u_swhashmask); | |
384 | } else { | 384 | } else { | |
385 | 385 | |||
386 | /* | 386 | /* | |
387 | * free the array itsself. | 387 | * free the array itself. | |
388 | */ | 388 | */ | |
389 | 389 | |||
390 | kmem_free(aobj->u_swslots, aobj->u_pages * sizeof(int)); | 390 | kmem_free(aobj->u_swslots, aobj->u_pages * sizeof(int)); | |
391 | } | 391 | } | |
392 | #endif /* defined(VMSWAP) */ | 392 | #endif /* defined(VMSWAP) */ | |
393 | 393 | |||
394 | /* | 394 | /* | |
395 | * finally free the aobj itself | 395 | * finally free the aobj itself | |
396 | */ | 396 | */ | |
397 | 397 | |||
398 | uvm_obj_destroy(uobj, true); | 398 | uvm_obj_destroy(uobj, true); | |
399 | kmem_free(aobj, sizeof(struct uvm_aobj)); | 399 | kmem_free(aobj, sizeof(struct uvm_aobj)); | |
400 | } | 400 | } |
--- src/tests/dev/audio/audiotest.c 2022/05/24 06:18:34 1.21
+++ src/tests/dev/audio/audiotest.c 2022/05/31 08:43:16 1.22
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: audiotest.c,v 1.21 2022/05/24 06:18:34 andvar Exp $ */ | 1 | /* $NetBSD: audiotest.c,v 1.22 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 2019 Tetsuya Isaki. All rights reserved. | 4 | * Copyright (C) 2019 Tetsuya Isaki. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -16,27 +16,27 @@ | @@ -16,27 +16,27 @@ | |||
16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 18 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | |
20 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 20 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | |
22 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 22 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
23 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 23 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 | * SUCH DAMAGE. | 25 | * SUCH DAMAGE. | |
26 | */ | 26 | */ | |
27 | 27 | |||
28 | #include <sys/cdefs.h> | 28 | #include <sys/cdefs.h> | |
29 | __RCSID("$NetBSD: audiotest.c,v 1.21 2022/05/24 06:18:34 andvar Exp $"); | 29 | __RCSID("$NetBSD: audiotest.c,v 1.22 2022/05/31 08:43:16 andvar Exp $"); | |
30 | 30 | |||
31 | #include <errno.h> | 31 | #include <errno.h> | |
32 | #include <fcntl.h> | 32 | #include <fcntl.h> | |
33 | #define __STDC_FORMAT_MACROS /* for PRIx64 */ | 33 | #define __STDC_FORMAT_MACROS /* for PRIx64 */ | |
34 | #include <inttypes.h> | 34 | #include <inttypes.h> | |
35 | #include <pthread.h> | 35 | #include <pthread.h> | |
36 | #include <stdarg.h> | 36 | #include <stdarg.h> | |
37 | #include <stdbool.h> | 37 | #include <stdbool.h> | |
38 | #include <stdio.h> | 38 | #include <stdio.h> | |
39 | #include <stdlib.h> | 39 | #include <stdlib.h> | |
40 | #include <string.h> | 40 | #include <string.h> | |
41 | #include <unistd.h> | 41 | #include <unistd.h> | |
42 | #include <util.h> | 42 | #include <util.h> | |
@@ -5364,27 +5364,27 @@ DEF(AUDIO_SETINFO_sample_rate) | @@ -5364,27 +5364,27 @@ DEF(AUDIO_SETINFO_sample_rate) | |||
5364 | DEF(AUDIO_SETINFO_sample_rate_0) | 5364 | DEF(AUDIO_SETINFO_sample_rate_0) | |
5365 | { | 5365 | { | |
5366 | struct audio_info ai; | 5366 | struct audio_info ai; | |
5367 | int mode; | 5367 | int mode; | |
5368 | int r; | 5368 | int r; | |
5369 | int fd; | 5369 | int fd; | |
5370 | 5370 | |||
5371 | TEST("AUDIO_SETINFO_sample_rate_0"); | 5371 | TEST("AUDIO_SETINFO_sample_rate_0"); | |
5372 | if (netbsd < 9) { | 5372 | if (netbsd < 9) { | |
5373 | /* | 5373 | /* | |
5374 | * On NetBSD7,8 this will block system call and you will not | 5374 | * On NetBSD7,8 this will block system call and you will not | |
5375 | * even be able to shutdown... | 5375 | * even be able to shutdown... | |
5376 | */ | 5376 | */ | |
5377 | XP_SKIP("This will cause an infinate loop in the kernel"); | 5377 | XP_SKIP("This will cause an infinite loop in the kernel"); | |
5378 | return; | 5378 | return; | |
5379 | } | 5379 | } | |
5380 | 5380 | |||
5381 | mode = openable_mode(); | 5381 | mode = openable_mode(); | |
5382 | fd = OPEN(devaudio, mode); | 5382 | fd = OPEN(devaudio, mode); | |
5383 | REQUIRED_SYS_OK(fd); | 5383 | REQUIRED_SYS_OK(fd); | |
5384 | 5384 | |||
5385 | AUDIO_INITINFO(&ai); | 5385 | AUDIO_INITINFO(&ai); | |
5386 | ai.play.sample_rate = 0; | 5386 | ai.play.sample_rate = 0; | |
5387 | ai.record.sample_rate = 0; | 5387 | ai.record.sample_rate = 0; | |
5388 | r = IOCTL(fd, AUDIO_SETINFO, &ai, "sample_rate=0"); | 5388 | r = IOCTL(fd, AUDIO_SETINFO, &ai, "sample_rate=0"); | |
5389 | /* Expects to fail */ | 5389 | /* Expects to fail */ | |
5390 | XP_SYS_NG(EINVAL, r); | 5390 | XP_SYS_NG(EINVAL, r); |
--- src/usr.bin/nbsvtool/nbsvtool.c 2018/02/06 20:15:39 1.4
+++ src/usr.bin/nbsvtool/nbsvtool.c 2022/05/31 08:43:16 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: nbsvtool.c,v 1.4 2018/02/06 20:15:39 christos Exp $ */ | 1 | /* $NetBSD: nbsvtool.c,v 1.5 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2004, 2008 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Love Hörnquist Åstrand <lha@it.su.se> | 8 | * by Love Hörnquist Åstrand <lha@it.su.se> | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -88,27 +88,27 @@ sign_file(X509 *cert, EVP_PKEY *private_ | @@ -88,27 +88,27 @@ sign_file(X509 *cert, EVP_PKEY *private_ | |||
88 | if (p7 == NULL) | 88 | if (p7 == NULL) | |
89 | errx(EXIT_FAILURE, "Failed to create signature structure"); | 89 | errx(EXIT_FAILURE, "Failed to create signature structure"); | |
90 | 90 | |||
91 | PEM_write_bio_PKCS7(out, p7); | 91 | PEM_write_bio_PKCS7(out, p7); | |
92 | 92 | |||
93 | PKCS7_free(p7); | 93 | PKCS7_free(p7); | |
94 | BIO_free(in); | 94 | BIO_free(in); | |
95 | BIO_free_all(out); | 95 | BIO_free_all(out); | |
96 | } | 96 | } | |
97 | 97 | |||
98 | /* | 98 | /* | |
99 | * Verifies a detached PEM signature in the file `sigfile' of file | 99 | * Verifies a detached PEM signature in the file `sigfile' of file | |
100 | * `infile'. The trust anchor file `anchor' to the trust anchors must | 100 | * `infile'. The trust anchor file `anchor' to the trust anchors must | |
101 | * be given. If its suspended that the sender didn't inlude the whole | 101 | * be given. If its suspended that the sender didn't include the whole | |
102 | * path from the signing certificate to the given trust anchor, extra | 102 | * path from the signing certificate to the given trust anchor, extra | |
103 | * certificates can be passed in `cert_chain'. | 103 | * certificates can be passed in `cert_chain'. | |
104 | */ | 104 | */ | |
105 | 105 | |||
106 | static void | 106 | static void | |
107 | verify_file(STACK_OF(X509) *cert_chain, const char *anchor, | 107 | verify_file(STACK_OF(X509) *cert_chain, const char *anchor, | |
108 | const char *infile, const char *sigfile) | 108 | const char *infile, const char *sigfile) | |
109 | { | 109 | { | |
110 | STACK_OF(X509) *signers; | 110 | STACK_OF(X509) *signers; | |
111 | X509_STORE *store; | 111 | X509_STORE *store; | |
112 | BIO *sig, *in; | 112 | BIO *sig, *in; | |
113 | PKCS7 *p7; | 113 | PKCS7 *p7; | |
114 | int ret, i; | 114 | int ret, i; |
--- src/usr.bin/sed/defs.h 2020/05/15 22:39:54 1.13
+++ src/usr.bin/sed/defs.h 2022/05/31 08:43:16 1.14
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: defs.h,v 1.13 2020/05/15 22:39:54 christos Exp $ */ | 1 | /* $NetBSD: defs.h,v 1.14 2022/05/31 08:43:16 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1992 Diomidis Spinellis. | 4 | * Copyright (c) 1992 Diomidis Spinellis. | |
5 | * Copyright (c) 1992, 1993 | 5 | * Copyright (c) 1992, 1993 | |
6 | * The Regents of the University of California. All rights reserved. | 6 | * The Regents of the University of California. All rights reserved. | |
7 | * | 7 | * | |
8 | * This code is derived from software contributed to Berkeley by | 8 | * This code is derived from software contributed to Berkeley by | |
9 | * Diomidis Spinellis of Imperial College, University of London. | 9 | * Diomidis Spinellis of Imperial College, University of London. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -78,27 +78,27 @@ struct s_subst { | @@ -78,27 +78,27 @@ struct s_subst { | |||
78 | struct s_tr { | 78 | struct s_tr { | |
79 | unsigned char bytetab[256]; | 79 | unsigned char bytetab[256]; | |
80 | struct trmulti { | 80 | struct trmulti { | |
81 | size_t fromlen; | 81 | size_t fromlen; | |
82 | char from[MB_LEN_MAX]; | 82 | char from[MB_LEN_MAX]; | |
83 | size_t tolen; | 83 | size_t tolen; | |
84 | char to[MB_LEN_MAX]; | 84 | char to[MB_LEN_MAX]; | |
85 | } *multis; | 85 | } *multis; | |
86 | size_t nmultis; | 86 | size_t nmultis; | |
87 | }; | 87 | }; | |
88 | 88 | |||
89 | /* | 89 | /* | |
90 | * An internally compiled command. | 90 | * An internally compiled command. | |
91 | * Initialy, label references are stored in t, on a second pass they | 91 | * Initially, label references are stored in t, on a second pass they | |
92 | * are updated to pointers. | 92 | * are updated to pointers. | |
93 | */ | 93 | */ | |
94 | struct s_command { | 94 | struct s_command { | |
95 | struct s_command *next; /* Pointer to next command */ | 95 | struct s_command *next; /* Pointer to next command */ | |
96 | struct s_addr *a1, *a2; /* Start and end address */ | 96 | struct s_addr *a1, *a2; /* Start and end address */ | |
97 | u_long startline; /* Start line number or zero */ | 97 | u_long startline; /* Start line number or zero */ | |
98 | char *t; /* Text for : a c i r w */ | 98 | char *t; /* Text for : a c i r w */ | |
99 | union { | 99 | union { | |
100 | struct s_command *c; /* Command(s) for b t { */ | 100 | struct s_command *c; /* Command(s) for b t { */ | |
101 | struct s_subst *s; /* Substitute command */ | 101 | struct s_subst *s; /* Substitute command */ | |
102 | struct s_tr *y; /* Replace command array */ | 102 | struct s_tr *y; /* Replace command array */ | |
103 | int fd; /* File descriptor for w */ | 103 | int fd; /* File descriptor for w */ | |
104 | } u; | 104 | } u; |