diff options
author | Joel Fernandes (Google) <joel@joelfernandes.org> | 2019-07-16 18:12:28 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-08-13 17:29:22 -0400 |
commit | bee6f87166e9c6b8d81a7570995bd637e8da485a (patch) | |
tree | 635a1dae3181269d58a849affcc336a7d2c07f2c | |
parent | 842a56cf3eb00f717f9522766c0e7b71bafd5fc1 (diff) |
acpi: Use built-in RCU list checking for acpi_ioremaps list
This commit applies the consolidated list_for_each_entry_rcu() support
for lockdep conditions.
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
-rw-r--r-- | drivers/acpi/osl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 9c0edf2fc0dd..2f9d0d20b836 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
17 | #include <linux/lockdep.h> | ||
17 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/kmod.h> | 20 | #include <linux/kmod.h> |
@@ -80,6 +81,7 @@ struct acpi_ioremap { | |||
80 | 81 | ||
81 | static LIST_HEAD(acpi_ioremaps); | 82 | static LIST_HEAD(acpi_ioremaps); |
82 | static DEFINE_MUTEX(acpi_ioremap_lock); | 83 | static DEFINE_MUTEX(acpi_ioremap_lock); |
84 | #define acpi_ioremap_lock_held() lock_is_held(&acpi_ioremap_lock.dep_map) | ||
83 | 85 | ||
84 | static void __init acpi_request_region (struct acpi_generic_address *gas, | 86 | static void __init acpi_request_region (struct acpi_generic_address *gas, |
85 | unsigned int length, char *desc) | 87 | unsigned int length, char *desc) |
@@ -206,7 +208,7 @@ acpi_map_lookup(acpi_physical_address phys, acpi_size size) | |||
206 | { | 208 | { |
207 | struct acpi_ioremap *map; | 209 | struct acpi_ioremap *map; |
208 | 210 | ||
209 | list_for_each_entry_rcu(map, &acpi_ioremaps, list) | 211 | list_for_each_entry_rcu(map, &acpi_ioremaps, list, acpi_ioremap_lock_held()) |
210 | if (map->phys <= phys && | 212 | if (map->phys <= phys && |
211 | phys + size <= map->phys + map->size) | 213 | phys + size <= map->phys + map->size) |
212 | return map; | 214 | return map; |
@@ -249,7 +251,7 @@ acpi_map_lookup_virt(void __iomem *virt, acpi_size size) | |||
249 | { | 251 | { |
250 | struct acpi_ioremap *map; | 252 | struct acpi_ioremap *map; |
251 | 253 | ||
252 | list_for_each_entry_rcu(map, &acpi_ioremaps, list) | 254 | list_for_each_entry_rcu(map, &acpi_ioremaps, list, acpi_ioremap_lock_held()) |
253 | if (map->virt <= virt && | 255 | if (map->virt <= virt && |
254 | virt + size <= map->virt + map->size) | 256 | virt + size <= map->virt + map->size) |
255 | return map; | 257 | return map; |