Skip to content

Commit f7c7a1b

Browse files
committed
Merge tag 'irq_urgent_for_v6.13_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov: - Disable the secure programming interface of the GIC500 chip in the RK3399 SoC to fix interrupt priority assignment and even make a dead machine boot again when the gic-v3 driver enables pseudo NMIs - Correct the declaration of a percpu variable to fix several sparse warnings * tag 'irq_urgent_for_v6.13_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3: Work around insecure GIC integrations irqchip/gic: Correct declaration of *percpu_base pointer in union gic_base
2 parents acd855a + 773c05f commit f7c7a1b

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

drivers/irqchip/irq-gic-v3.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,22 @@ static bool cpus_have_group0 __ro_after_init;
161161

162162
static void __init gic_prio_init(void)
163163
{
164-
cpus_have_security_disabled = gic_dist_security_disabled();
164+
bool ds;
165+
166+
ds = gic_dist_security_disabled();
167+
if (!ds) {
168+
u32 val;
169+
170+
val = readl_relaxed(gic_data.dist_base + GICD_CTLR);
171+
val |= GICD_CTLR_DS;
172+
writel_relaxed(val, gic_data.dist_base + GICD_CTLR);
173+
174+
ds = gic_dist_security_disabled();
175+
if (ds)
176+
pr_warn("Broken GIC integration, security disabled");
177+
}
178+
179+
cpus_have_security_disabled = ds;
165180
cpus_have_group0 = gic_has_group0();
166181

167182
/*

drivers/irqchip/irq-gic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void gic_check_cpu_features(void)
6464

6565
union gic_base {
6666
void __iomem *common_base;
67-
void __percpu * __iomem *percpu_base;
67+
void __iomem * __percpu *percpu_base;
6868
};
6969

7070
struct gic_chip_data {

0 commit comments

Comments
 (0)