summaryrefslogtreecommitdiff
path: root/drivers/firmware/ti_sci.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-07-08 22:23:56 +0300
committerNishanth Menon <nm@ti.com>2022-10-28 16:20:17 +0300
commit4dc3883203736dcd979672ac8d9f086dbd4d2140 (patch)
treecf135d1f197c46d76b78b766f9eba543b9f967ba /drivers/firmware/ti_sci.c
parent2f9b0402755c1320420825ea8cda27a5f18e0ac4 (diff)
downloadlinux-4dc3883203736dcd979672ac8d9f086dbd4d2140.tar.xz
firmware: ti_sci: Use the non-atomic bitmap API when applicable
Usages of the 'res_map' bitmap is protected with a spinlock, so non-atomic functions can be used to set/clear bits. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Nishanth Menon <nm@ti.com> Link: https://lore.kernel.org/r/fb7edc555b6fa7c74707f13e422196693a834bc8.1657308216.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'drivers/firmware/ti_sci.c')
-rw-r--r--drivers/firmware/ti_sci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 522be2b75ce1..49677533f376 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -3096,7 +3096,7 @@ u16 ti_sci_get_free_resource(struct ti_sci_resource *res)
free_bit = find_first_zero_bit(desc->res_map, res_count);
if (free_bit != res_count) {
- set_bit(free_bit, desc->res_map);
+ __set_bit(free_bit, desc->res_map);
raw_spin_unlock_irqrestore(&res->lock, flags);
if (desc->num && free_bit < desc->num)
@@ -3127,10 +3127,10 @@ void ti_sci_release_resource(struct ti_sci_resource *res, u16 id)
if (desc->num && desc->start <= id &&
(desc->start + desc->num) > id)
- clear_bit(id - desc->start, desc->res_map);
+ __clear_bit(id - desc->start, desc->res_map);
else if (desc->num_sec && desc->start_sec <= id &&
(desc->start_sec + desc->num_sec) > id)
- clear_bit(id - desc->start_sec, desc->res_map);
+ __clear_bit(id - desc->start_sec, desc->res_map);
}
raw_spin_unlock_irqrestore(&res->lock, flags);
}