[PATCH/TEST] cpuidle: psci: Disable on R-Car H3 ES1.0 and R-Car S4-8 ES1.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
Not intended for upstream merge.
Use only when needed.
---
 drivers/cpuidle/cpuidle-psci.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c
index 540105ca0781f1c3..ba0b90f96f7fe699 100644
--- a/drivers/cpuidle/cpuidle-psci.c
+++ b/drivers/cpuidle/cpuidle-psci.c
@@ -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;
-- 
2.25.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux