Skip to content

Commit a8db745

Browse files
Sebastian Andrzej SiewiorMarc Zyngier
authored andcommitted
irqchip/gic-v3-its: Make its_lock a raw_spin_lock_t
The its_lock lock is held while a new device is added to the list and during setup while the CPU is booted. Even on -RT the CPU-bootup is performed with disabled interrupts. Make its_lock a raw_spin_lock_t. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 30800b3 commit a8db745

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static struct {
162162
} vpe_proxy;
163163

164164
static LIST_HEAD(its_nodes);
165-
static DEFINE_SPINLOCK(its_lock);
165+
static DEFINE_RAW_SPINLOCK(its_lock);
166166
static struct rdists *gic_rdists;
167167
static struct irq_domain *its_parent;
168168

@@ -2063,12 +2063,12 @@ static void its_cpu_init_collections(void)
20632063
{
20642064
struct its_node *its;
20652065

2066-
spin_lock(&its_lock);
2066+
raw_spin_lock(&its_lock);
20672067

20682068
list_for_each_entry(its, &its_nodes, entry)
20692069
its_cpu_init_collection(its);
20702070

2071-
spin_unlock(&its_lock);
2071+
raw_spin_unlock(&its_lock);
20722072
}
20732073

20742074
static struct its_device *its_find_device(struct its_node *its, u32 dev_id)
@@ -3139,7 +3139,7 @@ static int its_save_disable(void)
31393139
struct its_node *its;
31403140
int err = 0;
31413141

3142-
spin_lock(&its_lock);
3142+
raw_spin_lock(&its_lock);
31433143
list_for_each_entry(its, &its_nodes, entry) {
31443144
void __iomem *base;
31453145

@@ -3171,7 +3171,7 @@ static int its_save_disable(void)
31713171
writel_relaxed(its->ctlr_save, base + GITS_CTLR);
31723172
}
31733173
}
3174-
spin_unlock(&its_lock);
3174+
raw_spin_unlock(&its_lock);
31753175

31763176
return err;
31773177
}
@@ -3181,7 +3181,7 @@ static void its_restore_enable(void)
31813181
struct its_node *its;
31823182
int ret;
31833183

3184-
spin_lock(&its_lock);
3184+
raw_spin_lock(&its_lock);
31853185
list_for_each_entry(its, &its_nodes, entry) {
31863186
void __iomem *base;
31873187
int i;
@@ -3233,7 +3233,7 @@ static void its_restore_enable(void)
32333233
GITS_TYPER_HCC(gic_read_typer(base + GITS_TYPER)))
32343234
its_cpu_init_collection(its);
32353235
}
3236-
spin_unlock(&its_lock);
3236+
raw_spin_unlock(&its_lock);
32373237
}
32383238

32393239
static struct syscore_ops its_syscore_ops = {
@@ -3467,9 +3467,9 @@ static int __init its_probe_one(struct resource *res,
34673467
if (err)
34683468
goto out_free_tables;
34693469

3470-
spin_lock(&its_lock);
3470+
raw_spin_lock(&its_lock);
34713471
list_add(&its->entry, &its_nodes);
3472-
spin_unlock(&its_lock);
3472+
raw_spin_unlock(&its_lock);
34733473

34743474
return 0;
34753475

0 commit comments

Comments
 (0)