mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
- 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 -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmjrdesACgkQEsHwGGHe VUp2YBAArrV/gpawIM9ivoX8Fl2q6B8IdVIWVyHgfcNhVuDkivaWngUIV6fMTcY/ j+EuDVCCS1UNOdK0+9j+t2Y/ybZ+c6hIbDiQo6MRGG38A5x1X0oT9657/fLysZzs 6XOo+HF0d9bSoL1FWr6q3UEyUJrhT0kZgk1t81TcR22wSvLiiSBvKOH+GRuSECDm SUOLLQZMNbH1WTY7mLoZ7TzRNPLFFyb8xqeHb8IeffA1U1K7qPueQmzxTgXZVyLs snOdcmhLvR9eev7mIcD+1HbPtMwlkhhari0eHSmnbWWiiTKi4g7MOoudCJPu3jBW nzSmtMPT3PCMI3rnMQTMJIv6GyNi4zgu9gqsTpMP/elaAUjgbp4/D7p5XJrOL4SF oy62QTq8n2kkymQtkG/aa0mZI7cDeUuRLR1nI9avy/+sof6NJM86BbLnUTcQVGTB qa/VuKJdfcuSin//3Mw9+wP7DKLrLvMYn3+/v18vscAvayMNsUHAC5OuY3g7Wh5P YZstG7MtZ+EhHNvnIFlg0wQIZ3Vk3+EUuxq+RMkcJF7VCNP1eKv07Fe4T7luWGt8 qqX3wfZFTNyQxqQSpmYNiR92K6RrWPp76jz700nZ24NQfZs8U1uAjzQgeYBj8c5j Du9Fx8A6mwMw28d9A/cFmQbcVi/M4pI1ctKd7/9o5H4/f6nutlI= =dVwm -----END PGP SIGNATURE----- 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:
commit
8765f46791
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user