@@ -24,6 +24,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/syscore_ops.h>
+#include <linux/sys_soc.h>
#include <asm/cpuidle.h>
@@ -435,11 +436,22 @@ static struct platform_driver psci_cpuidle_driver = {
},
};
+static const struct soc_device_attribute psci_cpuidle_broken[] = {
+ { .soc_id = "r8a7795", .revision = "ES1.0", }, // PSCI v1.0
+ { .soc_id = "r8a779f0", .revision = "ES1.0", }, // Early PSCI rev
+ { /* sentinel */ }
+};
+
static int __init psci_idle_init(void)
{
struct platform_device *pdev;
int ret;
+ if (soc_device_match(psci_cpuidle_broken)) {
+ pr_info("Skipping %s\n", __func__);
+ return 0;
+ }
+
ret = platform_driver_register(&psci_cpuidle_driver);
if (ret)
return ret;
Some systems with early PSCI revisions have bugs in their CPUidle implementations, causing lock-ups when CONFIG_ARM_PSCI_CPUIDLE is enabled. Add a quirk to detect them, and disable CPUidle accordingly: - On R-Car H3 ES1.0 with PSCI v1.0, enabling CPUidle causes RCU stalls, either during early boot, or while running the PSCI checker, - On R-Car S4-8 with early firmware stacks, enabling CPUidle causes Linux to lock up during early kernel boot. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- Not intended for upstream merge. Use only when needed. --- drivers/cpuidle/cpuidle-psci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)