kernel_optimize_test/drivers/acpi
Andy Shevchenko 4a5891992c ACPI: scan: Use unique number for instance_no
[ Upstream commit eb50aaf960e3bedfef79063411ffd670da94b84b ]

The decrementation of acpi_device_bus_id->instance_no
in acpi_device_del() is incorrect, because it may cause
a duplicate instance number to be allocated next time
a device with the same acpi_device_bus_id is added.

Replace above mentioned approach by using IDA framework.

While at it, define the instance range to be [0, 4096).

Fixes: e49bd2dd5a ("ACPI: use PNPID:instance_no as bus_id of ACPI device")
Fixes: ca9dc8d42b ("ACPI / scan: Fix acpi_bus_id_list bookkeeping")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: 4.10+ <stable@vger.kernel.org> # 4.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-30 14:32:06 +02:00
..
acpica ACPICA: Always create namespace nodes using acpi_ns_create_node() 2021-03-30 14:31:54 +02:00
apei ACPI, APEI, Fix error return value in apei_map_generic_address() 2020-11-16 19:27:37 +01:00
arm64 arm64: mm: Set ZONE_DMA size based on early IORT scan 2021-03-09 11:11:13 +01:00
dptf ACPI: DPTF: Support Alder Lake 2020-11-10 18:52:51 +01:00
nfit ACPI: NFIT: Fix input validation of bus-family 2020-12-30 11:54:05 +01:00
numa ACPI updates for 5.10-rc1 2020-10-14 11:42:04 -07:00
pmic
x86
ac.c
acpi_adxl.c
acpi_amba.c
acpi_apd.c
acpi_cmos_rtc.c
acpi_configfs.c ACPI: configfs: add missing check after configfs_register_default_group() 2021-03-04 11:38:22 +01:00
acpi_dbg.c ACPI: debug: don't allow debugging when ACPI is disabled 2020-10-16 17:58:52 +02:00
acpi_extlog.c
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c
acpi_lpss.c drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
acpi_memhotplug.c mm/memory_hotplug: prepare passing flags to add_memory() and friends 2020-10-16 11:11:18 -07:00
acpi_pad.c
acpi_platform.c
acpi_pnp.c ACPI: PNP: compare the string length in the matching_id() 2020-12-30 11:54:06 +01:00
acpi_processor.c ACPI: processor: remove comment regarding string _UID support 2020-10-16 18:11:27 +02:00
acpi_tad.c
acpi_video.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
acpi_watchdog.c
battery.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
bgrt.c
blacklist.c
bus.c USB/PHY/Thunderbolt driver patches for 5.10-rc1 2020-10-15 09:51:18 -07:00
button.c ACPI: button: Add DMI quirk for Medion Akoya E2228T 2020-11-09 19:29:41 +01:00
container.c
cppc_acpi.c
custom_method.c
debugfs.c
device_pm.c PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup() 2020-12-30 11:54:05 +01:00
device_sysfs.c ACPI: sysfs: Prefer "compatible" modalias 2021-02-03 23:28:37 +01:00
dock.c ACPI: dock: fix enum-conversion warning 2020-10-27 19:30:27 +01:00
ec_sys.c
ec.c
event.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
evged.c ACPI: GED: fix -Wformat 2020-11-09 19:25:20 +01:00
fan.c ACPI: fan: Initialize performance state sysfs attribute 2020-11-16 15:18:38 +01:00
glue.c
hed.c
internal.h ACPI: scan: Use unique number for instance_no 2021-03-30 14:32:06 +02:00
ioapic.c
irq.c
Kconfig
Makefile
nvs.c
osi.c
osl.c
pci_irq.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
pci_link.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
pci_mcfg.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
pci_root.c Merge branches 'acpi-extlog', 'acpi-memhotplug', 'acpi-button', 'acpi-tools' and 'acpi-pci' 2020-10-13 14:45:36 +02:00
pci_slot.c
power.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
pptt.c
proc.c
processor_core.c
processor_driver.c
processor_idle.c
processor_pdc.c
processor_perflib.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
processor_thermal.c
processor_throttling.c
property.c ACPI: property: Fix fwnode string properties matching 2021-03-04 11:38:22 +01:00
reboot.c ACPI: reboot: Avoid racing after writing to ACPI RESET_REG 2020-10-16 18:04:52 +02:00
resource.c Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" 2020-12-30 11:54:06 +01:00
sbs.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
sbshc.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
sbshc.h ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
scan.c ACPI: scan: Use unique number for instance_no 2021-03-30 14:32:06 +02:00
sleep.c
sleep.h
spcr.c
sysfs.c
tables.c
thermal.c ACPI: thermal: Do not call acpi_thermal_check() directly 2021-02-03 23:28:37 +01:00
tiny-power-button.c
utils.c ACPI: utils: remove unreachable breaks 2020-10-22 18:58:26 +02:00
video_detect.c ACPI: video: Add missing callback back for Sony VPCEH3U1E 2021-03-30 14:31:54 +02:00
wakeup.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00