[linux-yocto] [PATCH 07/15] arch/arm: arch/arm64: Fixed BSP 1.59/old uboot bug

Daniel Dragomir daniel.dragomir at windriver.com
Tue Jun 27 08:41:07 PDT 2017


From: Marek Majtyka <marekx.majtyka at intel.com>

Fixed backward compatibility issue between linux axxia
BSP 1.59 with older uboot releases.

Signed-off-by: Marek Majtyka <marekx.majtyka at intel.com>
---
 drivers/edac/axxia_edac-l3_56xx.c | 24 ++++++++----------------
 include/linux/arm-smccc.h         |  2 ++
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/edac/axxia_edac-l3_56xx.c b/drivers/edac/axxia_edac-l3_56xx.c
index aa574af..d2d9e5a 100644
--- a/drivers/edac/axxia_edac-l3_56xx.c
+++ b/drivers/edac/axxia_edac-l3_56xx.c
@@ -424,24 +424,16 @@ static int intel_edac_l3_probe(struct platform_device *pdev)
 	if (!r)
 		return -EINVAL;
 
-	/* Check if we can use the interrupt */
-	__arm_smccc_smc(0xc4000027,
+	/*
+	 * Check if we can use the interrupt here.
+	 * We are not interested in PMU events, so let's try to disable it.
+	 * Once -1 return, it means old uboot without ccn service.
+	 * Then only polling mechanism is allowed, as it was before.
+	 */
+	if (ARM_SMCCC_UNKNOWN != __arm_smccc_smc(0xc4000027,
 			CCN_MN_ERRINT_STATUS__PMU_EVENTS__DISABLE,
-			0, 0, &ret);
-	if (__arm_smccc_smc(0xc4000026, 0, 0, 0, &ret) &
-			CCN_MN_ERRINT_STATUS__PMU_EVENTS__DISABLED) {
-		/* Can set 'disable' bits, so can acknowledge interrupts */
-
-		/*
-		 * TODO
-		 * perf for now switched off.
-		 *   __arm_smccc_smc(0xc4000027,
-		 *	CCN_MN_ERRINT_STATUS__PMU_EVENTS__ENABLE,
-		 *	0, 0, &ret);
-		 */
-
+			0, 0, &ret))
 		dev_info->irq_used = 1;
-	}
 
 	dev_info->edac_dev->pvt_info = dev_info;
 	dev_info->edac_dev->dev = &dev_info->pdev->dev;
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index d45283a..7c7f7cb 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -47,6 +47,8 @@
 #define ARM_SMCCC_OWNER_TRUSTED_OS      50
 #define ARM_SMCCC_OWNER_TRUSTED_OS_END  63
 
+#define ARM_SMCCC_UNKNOWN		0xffffffff
+
 struct arm_smccc_res {
 	u64 a0;
 	u64 a1;
-- 
2.7.4



More information about the linux-yocto mailing list