mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
Merge tag 'irq_urgent_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Borislav Petkov: - Skip interrupt ID 0 in sifive-plic during suspend/resume because ID 0 is reserved and accessing reserved register space could result in undefined behavior - Fix a function's retval check in aspeed-scu-ic * tag 'irq_urgent_for_v6.18_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/sifive-plic: Avoid interrupt ID 0 handling during suspend/resume irqchip/aspeed-scu-ic: Fix an IS_ERR() vs NULL check
This commit is contained in:
@@ -215,8 +215,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
|
||||
int irq, rc = 0;
|
||||
|
||||
scu_ic->base = of_iomap(node, 0);
|
||||
if (IS_ERR(scu_ic->base)) {
|
||||
rc = PTR_ERR(scu_ic->base);
|
||||
if (!scu_ic->base) {
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,8 @@ static int plic_irq_suspend(void)
|
||||
|
||||
priv = per_cpu_ptr(&plic_handlers, smp_processor_id())->priv;
|
||||
|
||||
for (i = 0; i < priv->nr_irqs; i++) {
|
||||
/* irq ID 0 is reserved */
|
||||
for (i = 1; i < priv->nr_irqs; i++) {
|
||||
__assign_bit(i, priv->prio_save,
|
||||
readl(priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID));
|
||||
}
|
||||
@@ -285,7 +286,8 @@ static void plic_irq_resume(void)
|
||||
|
||||
priv = per_cpu_ptr(&plic_handlers, smp_processor_id())->priv;
|
||||
|
||||
for (i = 0; i < priv->nr_irqs; i++) {
|
||||
/* irq ID 0 is reserved */
|
||||
for (i = 1; i < priv->nr_irqs; i++) {
|
||||
index = BIT_WORD(i);
|
||||
writel((priv->prio_save[index] & BIT_MASK(i)) ? 1 : 0,
|
||||
priv->regs + PRIORITY_BASE + i * PRIORITY_PER_ID);
|
||||
|
||||
Reference in New Issue
Block a user