channel %d -> chan %d, for the benefit of 'systat vm'diff -r1.150.6.5 -r1.150.6.6 src/sys/arch/x86/x86/intr.c
(bouyer)
--- src/sys/arch/x86/x86/intr.c 2020/04/19 19:39:10 1.150.6.5
+++ src/sys/arch/x86/x86/intr.c 2020/04/20 20:19:07 1.150.6.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: intr.c,v 1.150.6.5 2020/04/19 19:39:10 bouyer Exp $ */ | 1 | /* $NetBSD: intr.c,v 1.150.6.6 2020/04/20 20:19:07 bouyer Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007, 2008, 2009, 2019 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 Andrew Doran, and by Jason R. Thorpe. | 8 | * by Andrew Doran, and by Jason R. Thorpe. | |
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. | |
@@ -123,27 +123,27 @@ | @@ -123,27 +123,27 @@ | |||
123 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 123 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
124 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 124 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
125 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 125 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
126 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 126 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
127 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 127 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
128 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 128 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
129 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 129 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
130 | * SUCH DAMAGE. | 130 | * SUCH DAMAGE. | |
131 | * | 131 | * | |
132 | * @(#)isa.c 7.2 (Berkeley) 5/13/91 | 132 | * @(#)isa.c 7.2 (Berkeley) 5/13/91 | |
133 | */ | 133 | */ | |
134 | 134 | |||
135 | #include <sys/cdefs.h> | 135 | #include <sys/cdefs.h> | |
136 | __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.150.6.5 2020/04/19 19:39:10 bouyer Exp $"); | 136 | __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.150.6.6 2020/04/20 20:19:07 bouyer Exp $"); | |
137 | 137 | |||
138 | #include "opt_intrdebug.h" | 138 | #include "opt_intrdebug.h" | |
139 | #include "opt_multiprocessor.h" | 139 | #include "opt_multiprocessor.h" | |
140 | #include "opt_acpi.h" | 140 | #include "opt_acpi.h" | |
141 | 141 | |||
142 | #include <sys/param.h> | 142 | #include <sys/param.h> | |
143 | #include <sys/systm.h> | 143 | #include <sys/systm.h> | |
144 | #include <sys/kernel.h> | 144 | #include <sys/kernel.h> | |
145 | #include <sys/syslog.h> | 145 | #include <sys/syslog.h> | |
146 | #include <sys/device.h> | 146 | #include <sys/device.h> | |
147 | #include <sys/kmem.h> | 147 | #include <sys/kmem.h> | |
148 | #include <sys/proc.h> | 148 | #include <sys/proc.h> | |
149 | #include <sys/errno.h> | 149 | #include <sys/errno.h> | |
@@ -1179,27 +1179,27 @@ intr_disestablish(struct intrhand *ih) | @@ -1179,27 +1179,27 @@ intr_disestablish(struct intrhand *ih) | |||
1179 | intr_free_io_intrsource_direct(isp); | 1179 | intr_free_io_intrsource_direct(isp); | |
1180 | } | 1180 | } | |
1181 | mutex_exit(&cpu_lock); | 1181 | mutex_exit(&cpu_lock); | |
1182 | kmem_free(ih, sizeof(*ih)); | 1182 | kmem_free(ih, sizeof(*ih)); | |
1183 | } | 1183 | } | |
1184 | 1184 | |||
1185 | static const char * | 1185 | static const char * | |
1186 | xen_intr_string(int port, char *buf, size_t len, struct pic *pic) | 1186 | xen_intr_string(int port, char *buf, size_t len, struct pic *pic) | |
1187 | { | 1187 | { | |
1188 | KASSERT(pic->pic_type == PIC_XEN); | 1188 | KASSERT(pic->pic_type == PIC_XEN); | |
1189 | 1189 | |||
1190 | KASSERT(port >= 0); | 1190 | KASSERT(port >= 0); | |
1191 | 1191 | |||
1192 | snprintf(buf, len, "%s channel %d", pic->pic_name, port); | 1192 | snprintf(buf, len, "%s chan %d", pic->pic_name, port); | |
1193 | 1193 | |||
1194 | return buf; | 1194 | return buf; | |
1195 | } | 1195 | } | |
1196 | 1196 | |||
1197 | static const char * | 1197 | static const char * | |
1198 | legacy_intr_string(int ih, char *buf, size_t len, struct pic *pic) | 1198 | legacy_intr_string(int ih, char *buf, size_t len, struct pic *pic) | |
1199 | { | 1199 | { | |
1200 | int legacy_irq; | 1200 | int legacy_irq; | |
1201 | 1201 | |||
1202 | KASSERT(pic->pic_type == PIC_I8259); | 1202 | KASSERT(pic->pic_type == PIC_I8259); | |
1203 | #if NLAPIC > 0 | 1203 | #if NLAPIC > 0 | |
1204 | KASSERT(APIC_IRQ_ISLEGACY(ih)); | 1204 | KASSERT(APIC_IRQ_ISLEGACY(ih)); | |
1205 | 1205 |
--- src/sys/arch/xen/x86/xen_intr.c 2020/04/20 11:29:01 1.21.2.8
+++ src/sys/arch/xen/x86/xen_intr.c 2020/04/20 20:19:07 1.21.2.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: xen_intr.c,v 1.21.2.8 2020/04/20 11:29:01 bouyer Exp $ */ | 1 | /* $NetBSD: xen_intr.c,v 1.21.2.9 2020/04/20 20:19:07 bouyer Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998, 2001 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 Charles M. Hannum, and by Jason R. Thorpe. | 8 | * by Charles M. Hannum, and by Jason R. Thorpe. | |
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. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
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 | __KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v 1.21.2.8 2020/04/20 11:29:01 bouyer Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: xen_intr.c,v 1.21.2.9 2020/04/20 20:19:07 bouyer Exp $"); | |
34 | 34 | |||
35 | #include "opt_multiprocessor.h" | 35 | #include "opt_multiprocessor.h" | |
36 | 36 | |||
37 | #include <sys/param.h> | 37 | #include <sys/param.h> | |
38 | #include <sys/kernel.h> | 38 | #include <sys/kernel.h> | |
39 | #include <sys/kmem.h> | 39 | #include <sys/kmem.h> | |
40 | #include <sys/cpu.h> | 40 | #include <sys/cpu.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | 42 | |||
43 | #include <xen/intr.h> | 43 | #include <xen/intr.h> | |
44 | #include <xen/evtchn.h> | 44 | #include <xen/evtchn.h> | |
45 | #include <xen/xenfunc.h> | 45 | #include <xen/xenfunc.h> | |
46 | 46 | |||
@@ -347,27 +347,27 @@ xen_cpu_intr_count(struct cpu_info *ci) | @@ -347,27 +347,27 @@ xen_cpu_intr_count(struct cpu_info *ci) | |||
347 | KASSERT(ci->ci_nintrhand >= 0); | 347 | KASSERT(ci->ci_nintrhand >= 0); | |
348 | 348 | |||
349 | return ci->ci_nintrhand; | 349 | return ci->ci_nintrhand; | |
350 | } | 350 | } | |
351 | 351 | |||
352 | static const char * | 352 | static const char * | |
353 | xen_intr_string(int port, char *buf, size_t len, struct pic *pic) | 353 | xen_intr_string(int port, char *buf, size_t len, struct pic *pic) | |
354 | { | 354 | { | |
355 | KASSERT(pic->pic_type == PIC_XEN); | 355 | KASSERT(pic->pic_type == PIC_XEN); | |
356 | 356 | |||
357 | KASSERT(port >= 0); | 357 | KASSERT(port >= 0); | |
358 | KASSERT(port < NR_EVENT_CHANNELS); | 358 | KASSERT(port < NR_EVENT_CHANNELS); | |
359 | 359 | |||
360 | snprintf(buf, len, "%s channel %d", pic->pic_name, port); | 360 | snprintf(buf, len, "%s chan %d", pic->pic_name, port); | |
361 | 361 | |||
362 | return buf; | 362 | return buf; | |
363 | } | 363 | } | |
364 | 364 | |||
365 | static const char * | 365 | static const char * | |
366 | legacy_intr_string(int ih, char *buf, size_t len, struct pic *pic) | 366 | legacy_intr_string(int ih, char *buf, size_t len, struct pic *pic) | |
367 | { | 367 | { | |
368 | int legacy_irq; | 368 | int legacy_irq; | |
369 | 369 | |||
370 | KASSERT(pic->pic_type == PIC_I8259); | 370 | KASSERT(pic->pic_type == PIC_I8259); | |
371 | #if NLAPIC > 0 | 371 | #if NLAPIC > 0 | |
372 | KASSERT(APIC_IRQ_ISLEGACY(ih)); | 372 | KASSERT(APIC_IRQ_ISLEGACY(ih)); | |
373 | 373 |