forked from Minki/linux
Two fixes for irqchip drivers:
- Save and restore the GICV3 ITS state unconditionally on suspend/resume to handle firmware which fails to do so. - Use the correct index into the fwspec parameters to read the irq trigger type in the EXIU chip driver. -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAl/Dow4THHRnbHhAbGlu dXRyb25peC5kZQAKCRCmGPVMDXSYobqJD/9tqKfmnp4zbjm5RfhpaflL09U8LMax aFCu3mHUftFrXFzZAuHAXYaBpFhqAiHcsFsoqRZA5ZXZt57G0qj6B25s8FDFSfZW 0kHKEyxS7s+4/5G1A2jYLG8/vZ9IeyuYMaBH9P2dk6mgdFFrmIU66dJz4+aXr+ra fs6wsf+fLVYRl7mDYtzOlBbXDDdPMGIWSw8GTgig/BeBOEgzIju82Dzf9hrM/fl/ TvA0Nl3NSOW8N4ymgz9P3xsGfIJtrwUXPSdLKIg7Ne3WksdrCbRZ9DEBFHxhdmvY zvKJY+36Etz7ifdQi+pOCU0X2U+M1gBf7uQdlAQavLSHHZh1UbBk3vPJkoZ/RcPn TxNGWGCcrf2bImlOh/G99UYmnALLgMEYOjTlU8wptvLVG9Bf7ZwCPnN/+uEr3mYR M9sxMLy5bihkarcfrqeQ7vokz1QnSURavSnCfR1+DZAMyNgQnCZ2VDCquu+1N7Gf bsk+VDPrv4rWvOfFQF3cXGjBr0l/ihSo2bENhOeBLzYiNrcpxQ9pn0Ahap/oIrFK YcTHPGCOeBYB22ojAPKRIqj9pzCitWU+aVcgT8A6PAGkum3eitbhMQrCWwVLnzgB uUGy3lFfK9wkQjXunHMmY9V5mqKx3a+G21SmLeLqmlhtaPxXjrJONh5DICvIxWgA l/K9OjzOnqNTUQ== =nOqf -----END PGP SIGNATURE----- Merge tag 'irq-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Two fixes for irqchip drivers: - Save and restore the GICV3 ITS state unconditionally on suspend/resume to handle firmware which fails to do so. - Use the correct index into the fwspec parameters to read the irq trigger type in the EXIU chip driver" * tag 'irq-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend irqchip/exiu: Fix the index of fwspec for IRQ type
This commit is contained in:
commit
8b7a51ba26
@ -42,7 +42,6 @@
|
||||
#define ITS_FLAGS_CMDQ_NEEDS_FLUSHING (1ULL << 0)
|
||||
#define ITS_FLAGS_WORKAROUND_CAVIUM_22375 (1ULL << 1)
|
||||
#define ITS_FLAGS_WORKAROUND_CAVIUM_23144 (1ULL << 2)
|
||||
#define ITS_FLAGS_SAVE_SUSPEND_STATE (1ULL << 3)
|
||||
|
||||
#define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0)
|
||||
#define RDIST_FLAGS_RD_TABLES_PREALLOCATED (1 << 1)
|
||||
@ -4741,9 +4740,6 @@ static int its_save_disable(void)
|
||||
list_for_each_entry(its, &its_nodes, entry) {
|
||||
void __iomem *base;
|
||||
|
||||
if (!(its->flags & ITS_FLAGS_SAVE_SUSPEND_STATE))
|
||||
continue;
|
||||
|
||||
base = its->base;
|
||||
its->ctlr_save = readl_relaxed(base + GITS_CTLR);
|
||||
err = its_force_quiescent(base);
|
||||
@ -4762,9 +4758,6 @@ err:
|
||||
list_for_each_entry_continue_reverse(its, &its_nodes, entry) {
|
||||
void __iomem *base;
|
||||
|
||||
if (!(its->flags & ITS_FLAGS_SAVE_SUSPEND_STATE))
|
||||
continue;
|
||||
|
||||
base = its->base;
|
||||
writel_relaxed(its->ctlr_save, base + GITS_CTLR);
|
||||
}
|
||||
@ -4784,9 +4777,6 @@ static void its_restore_enable(void)
|
||||
void __iomem *base;
|
||||
int i;
|
||||
|
||||
if (!(its->flags & ITS_FLAGS_SAVE_SUSPEND_STATE))
|
||||
continue;
|
||||
|
||||
base = its->base;
|
||||
|
||||
/*
|
||||
@ -4794,7 +4784,10 @@ static void its_restore_enable(void)
|
||||
* don't restore it since writing to CBASER or BASER<n>
|
||||
* registers is undefined according to the GIC v3 ITS
|
||||
* Specification.
|
||||
*
|
||||
* Firmware resuming with the ITS enabled is terminally broken.
|
||||
*/
|
||||
WARN_ON(readl_relaxed(base + GITS_CTLR) & GITS_CTLR_ENABLE);
|
||||
ret = its_force_quiescent(base);
|
||||
if (ret) {
|
||||
pr_err("ITS@%pa: failed to quiesce on resume: %d\n",
|
||||
@ -5074,9 +5067,6 @@ static int __init its_probe_one(struct resource *res,
|
||||
ctlr |= GITS_CTLR_ImDe;
|
||||
writel_relaxed(ctlr, its->base + GITS_CTLR);
|
||||
|
||||
if (GITS_TYPER_HCC(typer))
|
||||
its->flags |= ITS_FLAGS_SAVE_SUSPEND_STATE;
|
||||
|
||||
err = its_init_domain(handle, its);
|
||||
if (err)
|
||||
goto out_free_tables;
|
||||
|
@ -136,7 +136,7 @@ static int exiu_domain_translate(struct irq_domain *domain,
|
||||
if (fwspec->param_count != 2)
|
||||
return -EINVAL;
|
||||
*hwirq = fwspec->param[0];
|
||||
*type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
|
||||
*type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user