s/hander/handler/ and s/hader/header/ in comments and documentation.diff -r1.4 -r1.5 src/lib/libc/sys/sa_enable.2
(andvar)
--- src/lib/libc/sys/sa_enable.2 2004/03/14 23:05:09 1.4
+++ src/lib/libc/sys/sa_enable.2 2022/03/13 17:50:54 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: sa_enable.2,v 1.4 2004/03/14 23:05:09 yamt Exp $ | 1 | .\" $NetBSD: sa_enable.2,v 1.5 2022/03/13 17:50:54 andvar Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c)2004 YAMAMOTO Takashi, | 3 | .\" Copyright (c)2004 YAMAMOTO Takashi, | |
4 | .\" All rights reserved. | 4 | .\" 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 | .\" | |
@@ -44,24 +44,24 @@ | @@ -44,24 +44,24 @@ | |||
44 | .Fn sa_enable | 44 | .Fn sa_enable | |
45 | is used to enable scheduler activation. | 45 | is used to enable scheduler activation. | |
46 | .Pp | 46 | .Pp | |
47 | An upcall handler and upcall stacks should be registered with | 47 | An upcall handler and upcall stacks should be registered with | |
48 | .Fn sa_register | 48 | .Fn sa_register | |
49 | and | 49 | and | |
50 | .Fn sa_stacks | 50 | .Fn sa_stacks | |
51 | beforehand. | 51 | beforehand. | |
52 | .\" ------------------------------------------------------------ | 52 | .\" ------------------------------------------------------------ | |
53 | .Sh RETURN VALUES | 53 | .Sh RETURN VALUES | |
54 | On success, | 54 | On success, | |
55 | .Fn sa_enable | 55 | .Fn sa_enable | |
56 | will not return to userland in the normal way. | 56 | will not return to userland in the normal way. | |
57 | It returns into the upcall hander with an | 57 | It returns into the upcall handler with an | |
58 | .Dv SA_UPCALL_NEWPROC | 58 | .Dv SA_UPCALL_NEWPROC | |
59 | upcall. | 59 | upcall. | |
60 | Otherwise, a value of \-1 is returned and | 60 | Otherwise, a value of \-1 is returned and | |
61 | .Va errno | 61 | .Va errno | |
62 | is set to indicate the error. | 62 | is set to indicate the error. | |
63 | .\" ------------------------------------------------------------ | 63 | .\" ------------------------------------------------------------ | |
64 | .Sh SEE ALSO | 64 | .Sh SEE ALSO | |
65 | .Xr sa_register 2 , | 65 | .Xr sa_register 2 , | |
66 | .Xr sa_stacks 2 , | 66 | .Xr sa_stacks 2 , | |
67 | .Xr pthread 3 | 67 | .Xr pthread 3 |
--- src/lib/libc/sys/sa_yield.2 2004/05/09 11:28:58 1.4
+++ src/lib/libc/sys/sa_yield.2 2022/03/13 17:50:54 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | .\" $NetBSD: sa_yield.2,v 1.4 2004/05/09 11:28:58 yamt Exp $ | 1 | .\" $NetBSD: sa_yield.2,v 1.5 2022/03/13 17:50:54 andvar Exp $ | |
2 | .\" | 2 | .\" | |
3 | .\" Copyright (c)2004 YAMAMOTO Takashi, | 3 | .\" Copyright (c)2004 YAMAMOTO Takashi, | |
4 | .\" All rights reserved. | 4 | .\" 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 | .\" | |
@@ -44,21 +44,21 @@ | @@ -44,21 +44,21 @@ | |||
44 | .Fn sa_yield | 44 | .Fn sa_yield | |
45 | is used to idle a virtual processor on which the calling thread is running. | 45 | is used to idle a virtual processor on which the calling thread is running. | |
46 | It's typically used when the process's userland scheduler has no userland | 46 | It's typically used when the process's userland scheduler has no userland | |
47 | thread to run. | 47 | thread to run. | |
48 | .Pp | 48 | .Pp | |
49 | Scheduler activation should be enabled by | 49 | Scheduler activation should be enabled by | |
50 | .Fn sa_enable | 50 | .Fn sa_enable | |
51 | beforehand. | 51 | beforehand. | |
52 | .\" ------------------------------------------------------------ | 52 | .\" ------------------------------------------------------------ | |
53 | .Sh RETURN VALUES | 53 | .Sh RETURN VALUES | |
54 | On success, | 54 | On success, | |
55 | .Fn sa_yield | 55 | .Fn sa_yield | |
56 | will not return to userland in the normal way. | 56 | will not return to userland in the normal way. | |
57 | It returns into an upcall hander with an upcall. | 57 | It returns into an upcall handler with an upcall. | |
58 | Otherwise, a value of \-1 is returned and | 58 | Otherwise, a value of \-1 is returned and | |
59 | .Va errno | 59 | .Va errno | |
60 | is set to indicate the error. | 60 | is set to indicate the error. | |
61 | .\" ------------------------------------------------------------ | 61 | .\" ------------------------------------------------------------ | |
62 | .Sh SEE ALSO | 62 | .Sh SEE ALSO | |
63 | .Xr sa_enable 2 , | 63 | .Xr sa_enable 2 , | |
64 | .Xr pthread 3 | 64 | .Xr pthread 3 |
--- src/sys/arch/atari/atari/machdep.c 2021/10/09 20:00:41 1.185
+++ src/sys/arch/atari/atari/machdep.c 2022/03/13 17:50:55 1.186
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.185 2021/10/09 20:00:41 tsutsui Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.186 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1988 University of Utah. | 4 | * Copyright (c) 1988 University of Utah. | |
5 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | 5 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | |
6 | * All rights reserved. | 6 | * 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 | * the Systems Programming Group of the University of Utah Computer | 9 | * the Systems Programming Group of the University of Utah Computer | |
10 | * Science Department. | 10 | * Science Department. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
34 | * SUCH DAMAGE. | 34 | * SUCH DAMAGE. | |
35 | * | 35 | * | |
36 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | 36 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | |
37 | * | 37 | * | |
38 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | 38 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | |
39 | */ | 39 | */ | |
40 | 40 | |||
41 | #include <sys/cdefs.h> | 41 | #include <sys/cdefs.h> | |
42 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.185 2021/10/09 20:00:41 tsutsui Exp $"); | 42 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.186 2022/03/13 17:50:55 andvar Exp $"); | |
43 | 43 | |||
44 | #include "opt_ddb.h" | 44 | #include "opt_ddb.h" | |
45 | #include "opt_compat_netbsd.h" | 45 | #include "opt_compat_netbsd.h" | |
46 | #include "opt_mbtype.h" | 46 | #include "opt_mbtype.h" | |
47 | #include "opt_modular.h" | 47 | #include "opt_modular.h" | |
48 | #include "opt_panicbutton.h" | 48 | #include "opt_panicbutton.h" | |
49 | 49 | |||
50 | #include <sys/param.h> | 50 | #include <sys/param.h> | |
51 | #include <sys/systm.h> | 51 | #include <sys/systm.h> | |
52 | #include <sys/signalvar.h> | 52 | #include <sys/signalvar.h> | |
53 | #include <sys/kernel.h> | 53 | #include <sys/kernel.h> | |
54 | #include <sys/proc.h> | 54 | #include <sys/proc.h> | |
55 | #include <sys/buf.h> | 55 | #include <sys/buf.h> | |
@@ -646,27 +646,27 @@ add_sicallback(void (*function)(void *, | @@ -646,27 +646,27 @@ add_sicallback(void (*function)(void *, | |||
646 | si->rock1 = rock1; | 646 | si->rock1 = rock1; | |
647 | si->rock2 = rock2; | 647 | si->rock2 = rock2; | |
648 | 648 | |||
649 | s = splhigh(); | 649 | s = splhigh(); | |
650 | si->next = si_callbacks; | 650 | si->next = si_callbacks; | |
651 | si_callbacks = si; | 651 | si_callbacks = si; | |
652 | splx(s); | 652 | splx(s); | |
653 | 653 | |||
654 | /* | 654 | /* | |
655 | * and cause a software interrupt (spl1). This interrupt might | 655 | * and cause a software interrupt (spl1). This interrupt might | |
656 | * happen immediately, or after returning to a safe enough level. | 656 | * happen immediately, or after returning to a safe enough level. | |
657 | * | 657 | * | |
658 | * XXX: | 658 | * XXX: | |
659 | * According to <machine/scu.h> and lev1intr() hander in locore.s, | 659 | * According to <machine/scu.h> and lev1intr() handler in locore.s, | |
660 | * at least _ATARIHW_ machines (ATARITT and HADES?) seem to have | 660 | * at least _ATARIHW_ machines (ATARITT and HADES?) seem to have | |
661 | * some hardware support which can initiate real hardware interrupt | 661 | * some hardware support which can initiate real hardware interrupt | |
662 | * at ipl 1 for software interrupt. But as per <machine/mtpr.h>, | 662 | * at ipl 1 for software interrupt. But as per <machine/mtpr.h>, | |
663 | * this feature was not used at all on setsoft*() calls and | 663 | * this feature was not used at all on setsoft*() calls and | |
664 | * traditional hp300 derived ssir (simulated software interrupt | 664 | * traditional hp300 derived ssir (simulated software interrupt | |
665 | * request) on VAX REI emulation in locore.s is used. | 665 | * request) on VAX REI emulation in locore.s is used. | |
666 | */ | 666 | */ | |
667 | softint_schedule(si_callback_cookie); | 667 | softint_schedule(si_callback_cookie); | |
668 | } | 668 | } | |
669 | 669 | |||
670 | void | 670 | void | |
671 | rem_sicallback(void (*function)(void *rock1, void *rock2)) | 671 | rem_sicallback(void (*function)(void *rock1, void *rock2)) | |
672 | { | 672 | { |
--- src/sys/arch/mips/mips/cache.c 2020/08/02 06:51:47 1.68
+++ src/sys/arch/mips/mips/cache.c 2022/03/13 17:50:55 1.69
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cache.c,v 1.68 2020/08/02 06:51:47 skrll Exp $ */ | 1 | /* $NetBSD: cache.c,v 1.69 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2001, 2002 Wasabi Systems, Inc. | 4 | * Copyright 2001, 2002 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Jason R. Thorpe and Simon Burge for Wasabi Systems, Inc. | 7 | * Written by Jason R. Thorpe 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 | |
@@ -58,27 +58,27 @@ | @@ -58,27 +58,27 @@ | |||
58 | * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF | 58 | * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF | |
59 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR | 59 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR | |
60 | * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE | 60 | * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE | |
61 | * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE | 61 | * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE | |
62 | * LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 62 | * LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
63 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 63 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
64 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | 64 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
65 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 65 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
66 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | 66 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
67 | * OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | * OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
68 | */ | 68 | */ | |
69 | 69 | |||
70 | #include <sys/cdefs.h> | 70 | #include <sys/cdefs.h> | |
71 | __KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.68 2020/08/02 06:51:47 skrll Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.69 2022/03/13 17:50:55 andvar Exp $"); | |
72 | 72 | |||
73 | #include "opt_cputype.h" | 73 | #include "opt_cputype.h" | |
74 | #include "opt_mips_cache.h" | 74 | #include "opt_mips_cache.h" | |
75 | 75 | |||
76 | #include <sys/param.h> | 76 | #include <sys/param.h> | |
77 | 77 | |||
78 | #include <uvm/uvm_extern.h> | 78 | #include <uvm/uvm_extern.h> | |
79 | 79 | |||
80 | #include <mips/cache.h> | 80 | #include <mips/cache.h> | |
81 | #include <mips/locore.h> | 81 | #include <mips/locore.h> | |
82 | 82 | |||
83 | #ifdef MIPS1 | 83 | #ifdef MIPS1 | |
84 | #include <mips/cache_r3k.h> | 84 | #include <mips/cache_r3k.h> | |
@@ -701,27 +701,27 @@ primary_cache_is_2way: | @@ -701,27 +701,27 @@ primary_cache_is_2way: | |||
701 | switch (MIPS_PRID_IMPL(cpu_id)) { | 701 | switch (MIPS_PRID_IMPL(cpu_id)) { | |
702 | #if defined(MIPS3) || defined(MIPS4) | 702 | #if defined(MIPS3) || defined(MIPS4) | |
703 | case MIPS_R4000: | 703 | case MIPS_R4000: | |
704 | /* | 704 | /* | |
705 | * R4000/R4400 detects virtual alias by VCE as if | 705 | * R4000/R4400 detects virtual alias by VCE as if | |
706 | * its primary cache size were 32KB, because it always | 706 | * its primary cache size were 32KB, because it always | |
707 | * compares 3 bits of vaddr[14:12] which causes | 707 | * compares 3 bits of vaddr[14:12] which causes | |
708 | * primary cache miss and PIdx[2:0] in the secondary | 708 | * primary cache miss and PIdx[2:0] in the secondary | |
709 | * cache tag regardless of its primary cache size. | 709 | * cache tag regardless of its primary cache size. | |
710 | * i.e. VCE could happen even if there is no actual | 710 | * i.e. VCE could happen even if there is no actual | |
711 | * virtual alias on its 8KB or 16KB primary cache | 711 | * virtual alias on its 8KB or 16KB primary cache | |
712 | * which has only 1 or 2 bit valid PIdx in 4KB page. | 712 | * which has only 1 or 2 bit valid PIdx in 4KB page. | |
713 | * Actual primary cache size is ignored wrt VCE | 713 | * Actual primary cache size is ignored wrt VCE | |
714 | * and virtual aliases are resolved by the VCE hander, | 714 | * and virtual aliases are resolved by the VCE handler, | |
715 | * but it's still worth to avoid unnecessary VCE by | 715 | * but it's still worth to avoid unnecessary VCE by | |
716 | * setting alias mask and prefer mask to 32K, though | 716 | * setting alias mask and prefer mask to 32K, though | |
717 | * some other possible aliases (maybe caused by KSEG0 | 717 | * some other possible aliases (maybe caused by KSEG0 | |
718 | * accesses which can't be managed by PMAP_PREFER(9)) | 718 | * accesses which can't be managed by PMAP_PREFER(9)) | |
719 | * will still be resolved by the VCED/VCEI handler. | 719 | * will still be resolved by the VCED/VCEI handler. | |
720 | */ | 720 | */ | |
721 | mci->mci_cache_alias_mask = | 721 | mci->mci_cache_alias_mask = | |
722 | (MIPS3_MAX_PCACHE_SIZE - 1) & ~PAGE_MASK; /* va[14:12] */ | 722 | (MIPS3_MAX_PCACHE_SIZE - 1) & ~PAGE_MASK; /* va[14:12] */ | |
723 | mci->mci_cache_prefer_mask = MIPS3_MAX_PCACHE_SIZE - 1; | 723 | mci->mci_cache_prefer_mask = MIPS3_MAX_PCACHE_SIZE - 1; | |
724 | 724 | |||
725 | mci->mci_icache_virtual_alias = false; | 725 | mci->mci_icache_virtual_alias = false; | |
726 | mci->mci_cache_virtual_alias = false; | 726 | mci->mci_cache_virtual_alias = false; | |
727 | /* FALLTHROUGH */ | 727 | /* FALLTHROUGH */ |
--- src/sys/arch/mips/mips/locore_mips1.S 2021/09/19 10:34:09 1.96
+++ src/sys/arch/mips/mips/locore_mips1.S 2022/03/13 17:50:55 1.97
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: locore_mips1.S,v 1.96 2021/09/19 10:34:09 andvar Exp $ */ | 1 | /* $NetBSD: locore_mips1.S,v 1.97 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1992, 1993 | 4 | * Copyright (c) 1992, 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 | * Digital Equipment Corporation and Ralph Campbell. | 8 | * Digital Equipment Corporation and Ralph Campbell. | |
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. | |
@@ -47,27 +47,27 @@ | @@ -47,27 +47,27 @@ | |||
47 | * v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL) | 47 | * v 1.1 89/07/10 14:27:41 nelson Exp SPRITE (DECWRL) | |
48 | * | 48 | * | |
49 | * @(#)locore.s 8.5 (Berkeley) 1/4/94 | 49 | * @(#)locore.s 8.5 (Berkeley) 1/4/94 | |
50 | */ | 50 | */ | |
51 | #include "opt_cputype.h" | 51 | #include "opt_cputype.h" | |
52 | #include "opt_ddb.h" | 52 | #include "opt_ddb.h" | |
53 | #include "opt_kgdb.h" | 53 | #include "opt_kgdb.h" | |
54 | 54 | |||
55 | #include <sys/cdefs.h> | 55 | #include <sys/cdefs.h> | |
56 | 56 | |||
57 | #include <mips/asm.h> | 57 | #include <mips/asm.h> | |
58 | #include <mips/cpuregs.h> | 58 | #include <mips/cpuregs.h> | |
59 | 59 | |||
60 | RCSID("$NetBSD: locore_mips1.S,v 1.96 2021/09/19 10:34:09 andvar Exp $") | 60 | RCSID("$NetBSD: locore_mips1.S,v 1.97 2022/03/13 17:50:55 andvar Exp $") | |
61 | 61 | |||
62 | #include "assym.h" | 62 | #include "assym.h" | |
63 | 63 | |||
64 | #define _SLLV sllv | 64 | #define _SLLV sllv | |
65 | 65 | |||
66 | #define _SLL sll | 66 | #define _SLL sll | |
67 | #define _SRL srl | 67 | #define _SRL srl | |
68 | #define WIRED_SHIFT 2 | 68 | #define WIRED_SHIFT 2 | |
69 | 69 | |||
70 | /* | 70 | /* | |
71 | * Use correct-sized m?c0/dm?c0 opcodes. | 71 | * Use correct-sized m?c0/dm?c0 opcodes. | |
72 | */ | 72 | */ | |
73 | #define _MFC0 mfc0 | 73 | #define _MFC0 mfc0 | |
@@ -1076,27 +1076,27 @@ LEAF_NOPROFILE(MIPSX(tlb_mod_exception)) | @@ -1076,27 +1076,27 @@ LEAF_NOPROFILE(MIPSX(tlb_mod_exception)) | |||
1076 | or k1, k1, 1 # set modified bit | 1076 | or k1, k1, 1 # set modified bit | |
1077 | sb k1, 0(k0) # save new value | 1077 | sb k1, 0(k0) # save new value | |
1078 | _MFC0 k0, MIPS_COP_0_EXC_PC # get return address | 1078 | _MFC0 k0, MIPS_COP_0_EXC_PC # get return address | |
1079 | nop | 1079 | nop | |
1080 | j k0 | 1080 | j k0 | |
1081 | rfe | 1081 | rfe | |
1082 | 4: | 1082 | 4: | |
1083 | break 0 # panic | 1083 | break 0 # panic | |
1084 | .set at | 1084 | .set at | |
1085 | END(MIPSX(tlb_mod_exception)) | 1085 | END(MIPSX(tlb_mod_exception)) | |
1086 | #endif | 1086 | #endif | |
1087 | 1087 | |||
1088 | /* | 1088 | /* | |
1089 | * Mark where code entreed from exception hander jumptable | 1089 | * Mark where code entreed from exception handler jumptable | |
1090 | * ends, for stack traceback code. | 1090 | * ends, for stack traceback code. | |
1091 | */ | 1091 | */ | |
1092 | 1092 | |||
1093 | .globl _C_LABEL(MIPSX(exceptionentry_end)) | 1093 | .globl _C_LABEL(MIPSX(exceptionentry_end)) | |
1094 | _C_LABEL(MIPSX(exceptionentry_end)): | 1094 | _C_LABEL(MIPSX(exceptionentry_end)): | |
1095 | 1095 | |||
1096 | /*-------------------------------------------------------------------------- | 1096 | /*-------------------------------------------------------------------------- | |
1097 | * | 1097 | * | |
1098 | * mipsN_tlb_get_asid -- | 1098 | * mipsN_tlb_get_asid -- | |
1099 | * | 1099 | * | |
1100 | * Return the pid from the TLB pid reg. | 1100 | * Return the pid from the TLB pid reg. | |
1101 | * | 1101 | * | |
1102 | * tlb_asid_t mipsN_tlb_get_asid(void) | 1102 | * tlb_asid_t mipsN_tlb_get_asid(void) |
--- src/sys/arch/mips/mips/mipsX_subr.S 2021/02/16 06:06:58 1.113
+++ src/sys/arch/mips/mips/mipsX_subr.S 2022/03/13 17:50:55 1.114
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mipsX_subr.S,v 1.113 2021/02/16 06:06:58 simonb Exp $ */ | 1 | /* $NetBSD: mipsX_subr.S,v 1.114 2022/03/13 17:50:55 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.113 2021/02/16 06:06:58 simonb Exp $") | 120 | RCSID("$NetBSD: mipsX_subr.S,v 1.114 2022/03/13 17:50:55 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) | |
@@ -1999,27 +1999,27 @@ MIPSX(kern_tlbi_odd): | @@ -1999,27 +1999,27 @@ MIPSX(kern_tlbi_odd): | |||
1999 | COP0_SYNC | 1999 | COP0_SYNC | |
2000 | #ifdef MIPS3_LOONGSON2 | 2000 | #ifdef MIPS3_LOONGSON2 | |
2001 | li k0, MIPS_DIAG_ITLB_CLEAR | 2001 | li k0, MIPS_DIAG_ITLB_CLEAR | |
2002 | mtc0 k0, MIPS_COP_0_DIAG # invalidate ITLB | 2002 | mtc0 k0, MIPS_COP_0_DIAG # invalidate ITLB | |
2003 | #elif defined(MIPS3) | 2003 | #elif defined(MIPS3) | |
2004 | nop | 2004 | nop | |
2005 | nop | 2005 | nop | |
2006 | #endif | 2006 | #endif | |
2007 | eret | 2007 | eret | |
2008 | END(MIPSX(kern_tlb_invalid_exception)) | 2008 | END(MIPSX(kern_tlb_invalid_exception)) | |
2009 | #endif /* (PGSHIFT & 1) == 0 */ | 2009 | #endif /* (PGSHIFT & 1) == 0 */ | |
2010 | 2010 | |||
2011 | /* | 2011 | /* | |
2012 | * Mark where code entered from exception hander jumptable | 2012 | * Mark where code entered from exception handler jumptable | |
2013 | * ends, for stack traceback code. | 2013 | * ends, for stack traceback code. | |
2014 | */ | 2014 | */ | |
2015 | 2015 | |||
2016 | .globl _C_LABEL(MIPSX(exceptionentry_end)) | 2016 | .globl _C_LABEL(MIPSX(exceptionentry_end)) | |
2017 | _C_LABEL(MIPSX(exceptionentry_end)): | 2017 | _C_LABEL(MIPSX(exceptionentry_end)): | |
2018 | 2018 | |||
2019 | .set at | 2019 | .set at | |
2020 | 2020 | |||
2021 | /*-------------------------------------------------------------------------- | 2021 | /*-------------------------------------------------------------------------- | |
2022 | * | 2022 | * | |
2023 | * mipsN_tlb_get_asid -- | 2023 | * mipsN_tlb_get_asid -- | |
2024 | * | 2024 | * | |
2025 | * Return the current ASID | 2025 | * Return the current ASID |
--- src/sys/arch/mips/mips/trap.c 2021/04/07 02:59:01 1.261
+++ src/sys/arch/mips/mips/trap.c 2022/03/13 17:50:55 1.262
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: trap.c,v 1.261 2021/04/07 02:59:01 simonb Exp $ */ | 1 | /* $NetBSD: trap.c,v 1.262 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1988 University of Utah. | 4 | * Copyright (c) 1988 University of Utah. | |
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 | * the Systems Programming Group of the University of Utah Computer | 9 | * the Systems Programming Group of the University of Utah Computer | |
10 | * Science Department and Ralph Campbell. | 10 | * Science Department and Ralph Campbell. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
34 | * SUCH DAMAGE. | 34 | * SUCH DAMAGE. | |
35 | * | 35 | * | |
36 | * from: Utah Hdr: trap.c 1.32 91/04/06 | 36 | * from: Utah Hdr: trap.c 1.32 91/04/06 | |
37 | * | 37 | * | |
38 | * @(#)trap.c 8.5 (Berkeley) 1/11/94 | 38 | * @(#)trap.c 8.5 (Berkeley) 1/11/94 | |
39 | */ | 39 | */ | |
40 | 40 | |||
41 | #include <sys/cdefs.h> | 41 | #include <sys/cdefs.h> | |
42 | __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.261 2021/04/07 02:59:01 simonb Exp $"); | 42 | __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.262 2022/03/13 17:50:55 andvar Exp $"); | |
43 | 43 | |||
44 | #include "opt_cputype.h" /* which mips CPU levels do we support? */ | 44 | #include "opt_cputype.h" /* which mips CPU levels do we support? */ | |
45 | #include "opt_ddb.h" | 45 | #include "opt_ddb.h" | |
46 | #include "opt_dtrace.h" | 46 | #include "opt_dtrace.h" | |
47 | #include "opt_kgdb.h" | 47 | #include "opt_kgdb.h" | |
48 | #include "opt_multiprocessor.h" | 48 | #include "opt_multiprocessor.h" | |
49 | 49 | |||
50 | #include <sys/param.h> | 50 | #include <sys/param.h> | |
51 | #include <sys/systm.h> | 51 | #include <sys/systm.h> | |
52 | #include <sys/kernel.h> | 52 | #include <sys/kernel.h> | |
53 | #include <sys/cpu.h> | 53 | #include <sys/cpu.h> | |
54 | #include <sys/proc.h> | 54 | #include <sys/proc.h> | |
55 | #include <sys/ras.h> | 55 | #include <sys/ras.h> | |
@@ -337,27 +337,27 @@ trap(uint32_t status, uint32_t cause, va | @@ -337,27 +337,27 @@ trap(uint32_t status, uint32_t cause, va | |||
337 | // We got a TLB MOD exception so we must have a valid ASID | 337 | // We got a TLB MOD exception so we must have a valid ASID | |
338 | // and there must be a matching entry in the TLB. So when | 338 | // and there must be a matching entry in the TLB. So when | |
339 | // we try to update it, we better have done it. | 339 | // we try to update it, we better have done it. | |
340 | KASSERTMSG(pte_valid_p(pte), "%#"PRIx32, pte_value(pte)); | 340 | KASSERTMSG(pte_valid_p(pte), "%#"PRIx32, pte_value(pte)); | |
341 | vaddr = trunc_page(vaddr); | 341 | vaddr = trunc_page(vaddr); | |
342 | int ok = pmap_tlb_update_addr(pmap, vaddr, pte, 0); | 342 | int ok = pmap_tlb_update_addr(pmap, vaddr, pte, 0); | |
343 | kpreempt_enable(); | 343 | kpreempt_enable(); | |
344 | if (ok != 1) { | 344 | if (ok != 1) { | |
345 | #if 0 /* PMAP_FAULTINFO? */ | 345 | #if 0 /* PMAP_FAULTINFO? */ | |
346 | /* | 346 | /* | |
347 | * Since we don't block interrupts here, | 347 | * Since we don't block interrupts here, | |
348 | * this can legitimately happen if we get | 348 | * this can legitimately happen if we get | |
349 | * a TLB miss that's serviced in an interrupt | 349 | * a TLB miss that's serviced in an interrupt | |
350 | * hander that happens to randomly evict the | 350 | * handler that happens to randomly evict the | |
351 | * TLB entry we're concerned about. | 351 | * TLB entry we're concerned about. | |
352 | */ | 352 | */ | |
353 | printf("pmap_tlb_update_addr(%p,%#" | 353 | printf("pmap_tlb_update_addr(%p,%#" | |
354 | PRIxVADDR",%#"PRIxPTE", 0) returned %d\n", | 354 | PRIxVADDR",%#"PRIxPTE", 0) returned %d\n", | |
355 | pmap, vaddr, pte_value(pte), ok); | 355 | pmap, vaddr, pte_value(pte), ok); | |
356 | #endif | 356 | #endif | |
357 | } | 357 | } | |
358 | paddr_t pa = pte_to_paddr(pte); | 358 | paddr_t pa = pte_to_paddr(pte); | |
359 | KASSERTMSG(uvm_pageismanaged(pa), | 359 | KASSERTMSG(uvm_pageismanaged(pa), | |
360 | "%#"PRIxVADDR" pa %#"PRIxPADDR, vaddr, pa); | 360 | "%#"PRIxVADDR" pa %#"PRIxPADDR, vaddr, pa); | |
361 | pmap_set_modified(pa); | 361 | pmap_set_modified(pa); | |
362 | if (type & T_USER) | 362 | if (type & T_USER) | |
363 | userret(l); | 363 | userret(l); |
--- src/sys/arch/powerpc/powerpc/compat_13_machdep.c 2011/12/13 11:03:52 1.21
+++ src/sys/arch/powerpc/powerpc/compat_13_machdep.c 2022/03/13 17:50:55 1.22
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: compat_13_machdep.c,v 1.21 2011/12/13 11:03:52 kiyohara Exp $ */ | 1 | /* $NetBSD: compat_13_machdep.c,v 1.22 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. | 4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. | |
5 | * Copyright (C) 1995, 1996 TooLs GmbH. | 5 | * Copyright (C) 1995, 1996 TooLs GmbH. | |
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 | |
@@ -22,27 +22,27 @@ | @@ -22,27 +22,27 @@ | |||
22 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | 22 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | |
23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
25 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 25 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
27 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 27 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
32 | */ | 32 | */ | |
33 | 33 | |||
34 | #include <sys/cdefs.h> | 34 | #include <sys/cdefs.h> | |
35 | __KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.21 2011/12/13 11:03:52 kiyohara Exp $"); | 35 | __KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.22 2022/03/13 17:50:55 andvar Exp $"); | |
36 | 36 | |||
37 | #ifdef _KERNEL_OPT | 37 | #ifdef _KERNEL_OPT | |
38 | #include "opt_ppcarch.h" | 38 | #include "opt_ppcarch.h" | |
39 | #endif | 39 | #endif | |
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/signalvar.h> | 43 | #include <sys/signalvar.h> | |
44 | #include <sys/kernel.h> | 44 | #include <sys/kernel.h> | |
45 | #include <sys/proc.h> | 45 | #include <sys/proc.h> | |
46 | #include <sys/mount.h> | 46 | #include <sys/mount.h> | |
47 | #include <sys/syscallargs.h> | 47 | #include <sys/syscallargs.h> | |
48 | 48 | |||
@@ -59,27 +59,27 @@ compat_13_sys_sigreturn(struct lwp *l, | @@ -59,27 +59,27 @@ compat_13_sys_sigreturn(struct lwp *l, | |||
59 | { | 59 | { | |
60 | /* { | 60 | /* { | |
61 | syscallarg(struct sigcontext13 *) sigcntxp; | 61 | syscallarg(struct sigcontext13 *) sigcntxp; | |
62 | } */ | 62 | } */ | |
63 | struct proc * const p = l->l_proc; | 63 | struct proc * const p = l->l_proc; | |
64 | struct trapframe * const tf = l->l_md.md_utf; | 64 | struct trapframe * const tf = l->l_md.md_utf; | |
65 | struct sigcontext13 sc; | 65 | struct sigcontext13 sc; | |
66 | int error; | 66 | int error; | |
67 | sigset_t mask; | 67 | sigset_t mask; | |
68 | 68 | |||
69 | /* | 69 | /* | |
70 | * The trampoline hands us the context. | 70 | * The trampoline hands us the context. | |
71 | * It is unsafe to keep track of it ourselves, in the event that a | 71 | * It is unsafe to keep track of it ourselves, in the event that a | |
72 | * program jumps out of a signal hander. | 72 | * program jumps out of a signal handler. | |
73 | */ | 73 | */ | |
74 | if ((error = copyin(SCARG(uap, sigcntxp), &sc, sizeof sc)) != 0) | 74 | if ((error = copyin(SCARG(uap, sigcntxp), &sc, sizeof sc)) != 0) | |
75 | return (error); | 75 | return (error); | |
76 | 76 | |||
77 | if (!PSL_USEROK_P(sc.sc_frame.srr1)) | 77 | if (!PSL_USEROK_P(sc.sc_frame.srr1)) | |
78 | return (EINVAL); | 78 | return (EINVAL); | |
79 | 79 | |||
80 | /* Restore register context. */ | 80 | /* Restore register context. */ | |
81 | memcpy(tf->tf_fixreg, sc.sc_frame.fixreg, sizeof(tf->tf_fixreg)); | 81 | memcpy(tf->tf_fixreg, sc.sc_frame.fixreg, sizeof(tf->tf_fixreg)); | |
82 | tf->tf_lr = sc.sc_frame.lr; | 82 | tf->tf_lr = sc.sc_frame.lr; | |
83 | tf->tf_cr = sc.sc_frame.cr; | 83 | tf->tf_cr = sc.sc_frame.cr; | |
84 | tf->tf_xer = sc.sc_frame.xer; | 84 | tf->tf_xer = sc.sc_frame.xer; | |
85 | tf->tf_ctr = sc.sc_frame.ctr; | 85 | tf->tf_ctr = sc.sc_frame.ctr; |
--- src/sys/arch/powerpc/powerpc/compat_16_machdep.c 2021/10/30 19:44:56 1.22
+++ src/sys/arch/powerpc/powerpc/compat_16_machdep.c 2022/03/13 17:50:55 1.23
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: compat_16_machdep.c,v 1.22 2021/10/30 19:44:56 thorpej Exp $ */ | 1 | /* $NetBSD: compat_16_machdep.c,v 1.23 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. | 4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. | |
5 | * Copyright (C) 1995, 1996 TooLs GmbH. | 5 | * Copyright (C) 1995, 1996 TooLs GmbH. | |
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 | |
@@ -22,27 +22,27 @@ | @@ -22,27 +22,27 @@ | |||
22 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | 22 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | |
23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
25 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 25 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
27 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 27 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
32 | */ | 32 | */ | |
33 | 33 | |||
34 | #include <sys/cdefs.h> | 34 | #include <sys/cdefs.h> | |
35 | __KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.22 2021/10/30 19:44:56 thorpej Exp $"); | 35 | __KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.23 2022/03/13 17:50:55 andvar Exp $"); | |
36 | 36 | |||
37 | #ifdef _KERNEL_OPT | 37 | #ifdef _KERNEL_OPT | |
38 | #include "opt_altivec.h" | 38 | #include "opt_altivec.h" | |
39 | #include "opt_compat_netbsd.h" | 39 | #include "opt_compat_netbsd.h" | |
40 | #include "opt_ppcarch.h" | 40 | #include "opt_ppcarch.h" | |
41 | #endif | 41 | #endif | |
42 | 42 | |||
43 | #include <sys/param.h> | 43 | #include <sys/param.h> | |
44 | #include <sys/mount.h> | 44 | #include <sys/mount.h> | |
45 | #include <sys/proc.h> | 45 | #include <sys/proc.h> | |
46 | #include <sys/syscallargs.h> | 46 | #include <sys/syscallargs.h> | |
47 | #include <sys/systm.h> | 47 | #include <sys/systm.h> | |
48 | #include <sys/ucontext.h> | 48 | #include <sys/ucontext.h> | |
@@ -188,27 +188,27 @@ compat_16_sys___sigreturn14(struct lwp * | @@ -188,27 +188,27 @@ compat_16_sys___sigreturn14(struct lwp * | |||
188 | const struct compat_16_sys___sigreturn14_args *uap, register_t *retval) | 188 | const struct compat_16_sys___sigreturn14_args *uap, register_t *retval) | |
189 | { | 189 | { | |
190 | /* { | 190 | /* { | |
191 | syscallarg(struct sigcontext *) sigcntxp; | 191 | syscallarg(struct sigcontext *) sigcntxp; | |
192 | } */ | 192 | } */ | |
193 | struct proc * const p = l->l_proc; | 193 | struct proc * const p = l->l_proc; | |
194 | struct sigcontext sc; | 194 | struct sigcontext sc; | |
195 | struct utrapframe * const utf = &sc.sc_frame; | 195 | struct utrapframe * const utf = &sc.sc_frame; | |
196 | int error; | 196 | int error; | |
197 | 197 | |||
198 | /* | 198 | /* | |
199 | * The trampoline hands us the context. | 199 | * The trampoline hands us the context. | |
200 | * It is unsafe to keep track of it ourselves, in the event that a | 200 | * It is unsafe to keep track of it ourselves, in the event that a | |
201 | * program jumps out of a signal hander. | 201 | * program jumps out of a signal handler. | |
202 | */ | 202 | */ | |
203 | if ((error = copyin(SCARG(uap, sigcntxp), &sc, sizeof sc)) != 0) | 203 | if ((error = copyin(SCARG(uap, sigcntxp), &sc, sizeof sc)) != 0) | |
204 | return (error); | 204 | return (error); | |
205 | 205 | |||
206 | /* Restore the register context. */ | 206 | /* Restore the register context. */ | |
207 | struct trapframe * const tf = l->l_md.md_utf; | 207 | struct trapframe * const tf = l->l_md.md_utf; | |
208 | 208 | |||
209 | /* | 209 | /* | |
210 | * Make sure SRR1 hasn't been maliciously tampered with. | 210 | * Make sure SRR1 hasn't been maliciously tampered with. | |
211 | */ | 211 | */ | |
212 | if (!PSL_USEROK_P(sc.sc_frame.srr1)) | 212 | if (!PSL_USEROK_P(sc.sc_frame.srr1)) | |
213 | return (EINVAL); | 213 | return (EINVAL); | |
214 | 214 |
--- src/sys/dev/marvell/if_mvxpevar.h 2022/02/16 22:00:56 1.7
+++ src/sys/dev/marvell/if_mvxpevar.h 2022/03/13 17:50:55 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: if_mvxpevar.h,v 1.7 2022/02/16 22:00:56 andvar Exp $ */ | 1 | /* $NetBSD: if_mvxpevar.h,v 1.8 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 2015 Internet Initiative Japan Inc. | 3 | * Copyright (c) 2015 Internet Initiative Japan Inc. | |
4 | * All rights reserved. | 4 | * 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 | * | |
@@ -383,28 +383,28 @@ struct mvxpe_sysctl_mib { | @@ -383,28 +383,28 @@ struct mvxpe_sysctl_mib { | |||
383 | uint64_t counter; | 383 | uint64_t counter; | |
384 | }; | 384 | }; | |
385 | 385 | |||
386 | /* | 386 | /* | |
387 | * Ethernet Device main context | 387 | * Ethernet Device main context | |
388 | */ | 388 | */ | |
389 | struct mvxpe_softc { | 389 | struct mvxpe_softc { | |
390 | device_t sc_dev; | 390 | device_t sc_dev; | |
391 | int sc_port; | 391 | int sc_port; | |
392 | uint32_t sc_version; | 392 | uint32_t sc_version; | |
393 | 393 | |||
394 | /* | 394 | /* | |
395 | * sc_mtx must be held by interface functions to/from | 395 | * sc_mtx must be held by interface functions to/from | |
396 | * other frameworks. interrupt hander, sysctl hander, | 396 | * other frameworks. interrupt handler, sysctl handler, | |
397 | * ioctl hander, and so on. | 397 | * ioctl handler, and so on. | |
398 | */ | 398 | */ | |
399 | kmutex_t sc_mtx; | 399 | kmutex_t sc_mtx; | |
400 | 400 | |||
401 | /* | 401 | /* | |
402 | * Ethernet facilities | 402 | * Ethernet facilities | |
403 | */ | 403 | */ | |
404 | struct ethercom sc_ethercom; | 404 | struct ethercom sc_ethercom; | |
405 | struct mii_data sc_mii; | 405 | struct mii_data sc_mii; | |
406 | u_int8_t sc_enaddr[ETHER_ADDR_LEN]; /* station addr */ | 406 | u_int8_t sc_enaddr[ETHER_ADDR_LEN]; /* station addr */ | |
407 | u_short sc_if_flags; | 407 | u_short sc_if_flags; | |
408 | int sc_wdogsoft; | 408 | int sc_wdogsoft; | |
409 | 409 | |||
410 | /* | 410 | /* |
--- src/sys/dev/marvell/mvxpbmvar.h 2021/09/11 21:30:46 1.3
+++ src/sys/dev/marvell/mvxpbmvar.h 2022/03/13 17:50:55 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mvxpbmvar.h,v 1.3 2021/09/11 21:30:46 andvar Exp $ */ | 1 | /* $NetBSD: mvxpbmvar.h,v 1.4 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 2015 Internet Initiative Japan Inc. | 3 | * Copyright (c) 2015 Internet Initiative Japan Inc. | |
4 | * All rights reserved. | 4 | * 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 | * | |
@@ -90,27 +90,27 @@ struct mvxpbm_softc { | @@ -90,27 +90,27 @@ struct mvxpbm_softc { | |||
90 | /* software emulated */ | 90 | /* software emulated */ | |
91 | int sc_emul; | 91 | int sc_emul; | |
92 | 92 | |||
93 | /* DMA MAP for entire buffer */ | 93 | /* DMA MAP for entire buffer */ | |
94 | bus_dmamap_t sc_buf_map; | 94 | bus_dmamap_t sc_buf_map; | |
95 | char *sc_buf; | 95 | char *sc_buf; | |
96 | paddr_t sc_buf_pa; | 96 | paddr_t sc_buf_pa; | |
97 | size_t sc_buf_size; | 97 | size_t sc_buf_size; | |
98 | 98 | |||
99 | /* memory chunk properties */ | 99 | /* memory chunk properties */ | |
100 | size_t sc_slotsize; /* size of bm_slots include header */ | 100 | size_t sc_slotsize; /* size of bm_slots include header */ | |
101 | uint32_t sc_chunk_count; /* number of chunks */ | 101 | uint32_t sc_chunk_count; /* number of chunks */ | |
102 | size_t sc_chunk_size; /* size of packet buffer */ | 102 | size_t sc_chunk_size; /* size of packet buffer */ | |
103 | size_t sc_chunk_header_size; /* size of hader + padding */ | 103 | size_t sc_chunk_header_size; /* size of header + padding */ | |
104 | off_t sc_chunk_packet_offset; /* allocate m_leading_space */ | 104 | off_t sc_chunk_packet_offset; /* allocate m_leading_space */ | |
105 | 105 | |||
106 | /* for software based management */ | 106 | /* for software based management */ | |
107 | LIST_HEAD(__mvxpbm_freehead, mvxpbm_chunk) sc_free; | 107 | LIST_HEAD(__mvxpbm_freehead, mvxpbm_chunk) sc_free; | |
108 | LIST_HEAD(__mvxpbm_inusehead, mvxpbm_chunk) sc_inuse; | 108 | LIST_HEAD(__mvxpbm_inusehead, mvxpbm_chunk) sc_inuse; | |
109 | }; | 109 | }; | |
110 | 110 | |||
111 | #define BM_SYNC_ALL 0 | 111 | #define BM_SYNC_ALL 0 | |
112 | 112 | |||
113 | /* get mvxpbm device context */ | 113 | /* get mvxpbm device context */ | |
114 | struct mvxpbm_softc *mvxpbm_device(struct marvell_attach_args *); | 114 | struct mvxpbm_softc *mvxpbm_device(struct marvell_attach_args *); | |
115 | 115 | |||
116 | /* allocate new memory chunk */ | 116 | /* allocate new memory chunk */ |
--- src/sys/netbt/l2cap_signal.c 2020/02/29 11:40:06 1.20
+++ src/sys/netbt/l2cap_signal.c 2022/03/13 17:50:55 1.21
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: l2cap_signal.c,v 1.20 2020/02/29 11:40:06 maxv Exp $ */ | 1 | /* $NetBSD: l2cap_signal.c,v 1.21 2022/03/13 17:50:55 andvar Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2005 Iain Hibbert. | 4 | * Copyright (c) 2005 Iain Hibbert. | |
5 | * Copyright (c) 2006 Itronix Inc. | 5 | * Copyright (c) 2006 Itronix 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 | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 21 | * 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 ITRONIX INC. BE LIABLE FOR ANY | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY | |
24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
27 | * ON ANY THEORY OF LIABILITY, WHETHER IN | 27 | * 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: l2cap_signal.c,v 1.20 2020/02/29 11:40:06 maxv Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.21 2022/03/13 17:50:55 andvar Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/kernel.h> | 37 | #include <sys/kernel.h> | |
38 | #include <sys/mbuf.h> | 38 | #include <sys/mbuf.h> | |
39 | #include <sys/proc.h> | 39 | #include <sys/proc.h> | |
40 | #include <sys/queue.h> | 40 | #include <sys/queue.h> | |
41 | #include <sys/systm.h> | 41 | #include <sys/systm.h> | |
42 | 42 | |||
43 | #include <netbt/bluetooth.h> | 43 | #include <netbt/bluetooth.h> | |
44 | #include <netbt/hci.h> | 44 | #include <netbt/hci.h> | |
45 | #include <netbt/l2cap.h> | 45 | #include <netbt/l2cap.h> | |
46 | 46 | |||
47 | /******************************************************************************* | 47 | /******************************************************************************* | |
@@ -54,27 +54,27 @@ static void l2cap_recv_connect_req(struc | @@ -54,27 +54,27 @@ static void l2cap_recv_connect_req(struc | |||
54 | static void l2cap_recv_connect_rsp(struct mbuf *, struct hci_link *); | 54 | static void l2cap_recv_connect_rsp(struct mbuf *, struct hci_link *); | |
55 | static void l2cap_recv_config_req(struct mbuf *, struct hci_link *); | 55 | static void l2cap_recv_config_req(struct mbuf *, struct hci_link *); | |
56 | static void l2cap_recv_config_rsp(struct mbuf *, struct hci_link *); | 56 | static void l2cap_recv_config_rsp(struct mbuf *, struct hci_link *); | |
57 | static void l2cap_recv_disconnect_req(struct mbuf *, struct hci_link *); | 57 | static void l2cap_recv_disconnect_req(struct mbuf *, struct hci_link *); | |
58 | static void l2cap_recv_disconnect_rsp(struct mbuf *, struct hci_link *); | 58 | static void l2cap_recv_disconnect_rsp(struct mbuf *, struct hci_link *); | |
59 | static void l2cap_recv_info_req(struct mbuf *, struct hci_link *); | 59 | static void l2cap_recv_info_req(struct mbuf *, struct hci_link *); | |
60 | static int l2cap_send_signal(struct hci_link *, uint8_t, uint8_t, uint16_t, void *); | 60 | static int l2cap_send_signal(struct hci_link *, uint8_t, uint8_t, uint16_t, void *); | |
61 | static int l2cap_send_command_rej(struct hci_link *, uint8_t, int, ...); | 61 | static int l2cap_send_command_rej(struct hci_link *, uint8_t, int, ...); | |
62 | static void l2cap_qos_btoh(l2cap_qos_t *, void *); | 62 | static void l2cap_qos_btoh(l2cap_qos_t *, void *); | |
63 | static void l2cap_qos_htob(void *, l2cap_qos_t *); | 63 | static void l2cap_qos_htob(void *, l2cap_qos_t *); | |
64 | 64 | |||
65 | /* | 65 | /* | |
66 | * process incoming signal packets (CID 0x0001). Can contain multiple | 66 | * process incoming signal packets (CID 0x0001). Can contain multiple | |
67 | * requests/responses. The signal hander should clear the command from | 67 | * requests/responses. The signal handler should clear the command from | |
68 | * the mbuf before returning. | 68 | * the mbuf before returning. | |
69 | */ | 69 | */ | |
70 | void | 70 | void | |
71 | l2cap_recv_signal(struct mbuf *m, struct hci_link *link) | 71 | l2cap_recv_signal(struct mbuf *m, struct hci_link *link) | |
72 | { | 72 | { | |
73 | l2cap_cmd_hdr_t cmd; | 73 | l2cap_cmd_hdr_t cmd; | |
74 | 74 | |||
75 | for(;;) { | 75 | for(;;) { | |
76 | if (m->m_pkthdr.len < sizeof(cmd)) | 76 | if (m->m_pkthdr.len < sizeof(cmd)) | |
77 | goto finish; | 77 | goto finish; | |
78 | 78 | |||
79 | m_copydata(m, 0, sizeof(cmd), &cmd); | 79 | m_copydata(m, 0, sizeof(cmd), &cmd); | |
80 | cmd.length = le16toh(cmd.length); | 80 | cmd.length = le16toh(cmd.length); |