Mon Dec 30 19:52:11 2019 UTC ()
Hide ACPI0004 devices on aarch64


(jmcneill)
diff -r1.280 -r1.281 src/sys/dev/acpi/acpi.c

cvs diff -r1.280 -r1.281 src/sys/dev/acpi/acpi.c (expand / switch to unified diff)

--- src/sys/dev/acpi/acpi.c 2019/12/30 19:49:38 1.280
+++ src/sys/dev/acpi/acpi.c 2019/12/30 19:52:11 1.281
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: acpi.c,v 1.280 2019/12/30 19:49:38 jmcneill Exp $ */ 1/* $NetBSD: acpi.c,v 1.281 2019/12/30 19:52:11 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003, 2007 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 of By Noon Software, Inc. 8 * by Charles M. Hannum of By Noon Software, 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.
@@ -90,27 +90,27 @@ @@ -90,27 +90,27 @@
90 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 90 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
91 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 91 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
92 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 92 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
93 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 93 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
94 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 94 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
95 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 95 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
96 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 96 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
97 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 97 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
98 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 98 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
99 * POSSIBILITY OF SUCH DAMAGE. 99 * POSSIBILITY OF SUCH DAMAGE.
100 */ 100 */
101 101
102#include <sys/cdefs.h> 102#include <sys/cdefs.h>
103__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.280 2019/12/30 19:49:38 jmcneill Exp $"); 103__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.281 2019/12/30 19:52:11 jmcneill Exp $");
104 104
105#include "pci.h" 105#include "pci.h"
106#include "opt_acpi.h" 106#include "opt_acpi.h"
107#include "opt_pcifixup.h" 107#include "opt_pcifixup.h"
108 108
109#include <sys/param.h> 109#include <sys/param.h>
110#include <sys/device.h> 110#include <sys/device.h>
111#include <sys/kernel.h> 111#include <sys/kernel.h>
112#include <sys/kmem.h> 112#include <sys/kmem.h>
113#include <sys/malloc.h> 113#include <sys/malloc.h>
114#include <sys/module.h> 114#include <sys/module.h>
115#include <sys/mutex.h> 115#include <sys/mutex.h>
116#include <sys/sysctl.h> 116#include <sys/sysctl.h>
@@ -165,26 +165,27 @@ struct acpi_walkcontext { @@ -165,26 +165,27 @@ struct acpi_walkcontext {
165static const char * const acpi_ignored_ids[] = { 165static const char * const acpi_ignored_ids[] = {
166#if defined(i386) || defined(x86_64) 166#if defined(i386) || defined(x86_64)
167 "ACPI0007", /* ACPI CPUs do not attach to acpi(4) */ 167 "ACPI0007", /* ACPI CPUs do not attach to acpi(4) */
168 "PNP0000", /* AT interrupt controller is handled internally */ 168 "PNP0000", /* AT interrupt controller is handled internally */
169 "PNP0200", /* AT DMA controller is handled internally */ 169 "PNP0200", /* AT DMA controller is handled internally */
170 "PNP0A??", /* PCI Busses are handled internally */ 170 "PNP0A??", /* PCI Busses are handled internally */
171 "PNP0B00", /* AT RTC is handled internally */ 171 "PNP0B00", /* AT RTC is handled internally */
172 "PNP0C0F", /* ACPI PCI link devices are handled internally */ 172 "PNP0C0F", /* ACPI PCI link devices are handled internally */
173#endif 173#endif
174#if defined(x86_64) 174#if defined(x86_64)
175 "PNP0C04", /* FPU is handled internally */ 175 "PNP0C04", /* FPU is handled internally */
176#endif 176#endif
177#if defined(__aarch64__) 177#if defined(__aarch64__)
 178 "ACPI0004", /* ACPI module devices are handled internally */
178 "ACPI0007", /* ACPI CPUs are attached via MADT GICC subtables */ 179 "ACPI0007", /* ACPI CPUs are attached via MADT GICC subtables */
179 "PNP0C0F", /* ACPI PCI link devices are handled internally */ 180 "PNP0C0F", /* ACPI PCI link devices are handled internally */
180#endif 181#endif
181 NULL 182 NULL
182}; 183};
183 184
184/* 185/*
185 * Devices that should be attached early. 186 * Devices that should be attached early.
186 */ 187 */
187static const char * const acpi_early_ids[] = { 188static const char * const acpi_early_ids[] = {
188 "PNP0C09", /* acpiec(4) */ 189 "PNP0C09", /* acpiec(4) */
189 NULL 190 NULL
190}; 191};