linux-stable/include/acpi
Andy Shevchenko e5cdbe4190 ACPI: scan: Use unique number for instance_no
[ Upstream commit eb50aaf960 ]

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:41:41 +02:00
..
platform ACPICA: OSL: Add support to exclude stdarg.h 2018-04-13 19:48:28 +02:00
acbuffer.h
acconfig.h ACPICA: Reference Counts: increase max to 0x4000 for large servers 2019-03-19 13:14:07 +01:00
acexcep.h
acnames.h
acoutput.h ACPICA: Fix deconstification warnings (-Wcast-qual) with function traces. 2016-08-13 03:09:31 +02:00
acpi.h
acpi_bus.h ACPI: scan: Use unique number for instance_no 2021-03-30 14:41:41 +02:00
acpi_drivers.h Revert "ACPI, PCI, IRQ: remove redundant code in acpi_irq_penalty_init()" 2016-07-02 01:38:34 +02:00
acpi_io.h treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
acpi_lpat.h
acpi_numa.h ACPI / NUMA: move bad_srat() and srat_disabled() to drivers/acpi/numa.c 2016-05-30 14:27:08 +02:00
acpiosxf.h ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link clibrary fxxx()/errno/perror() instead 2016-08-13 03:12:32 +02:00
acpixf.h ACPICA: Update version to 20160831 2016-09-10 02:43:03 +02:00
acrestyp.h
actbl.h Revert "ACPICA: FADT support cleanup" 2016-11-14 20:56:17 +01:00
actbl1.h
actbl2.h ACPICA: iasl: Fix IORT SMMU GSI disassembling 2018-03-24 11:00:16 +01:00
actbl3.h
actypes.h ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro 2020-03-11 07:53:05 +01:00
acuuid.h
apei.h
button.h
cppc_acpi.h ACPI / CPPC: Add prefix cppc to cpudata structure name 2016-09-08 23:02:15 +02:00
ghes.h
hed.h
pcc.h mailbox: PCC: Fix return value of pcc_mbox_request_channel() 2016-10-17 14:26:49 +02:00
pdc_intel.h
processor.h ACPI/processor: Convert to hotplug state machine 2016-09-19 21:44:29 +02:00
reboot.h
video.h ACPI / video: Dummy acpi_video_register should return error code 2016-06-25 02:56:59 +02:00