From 368cbff964ef136c493a3f06b88ff7e35454073d Mon Sep 17 00:00:00 2001
From: hongrongxuan <hongrongxuan@huawei.com>
Date: Wed, 25 Oct 2023 15:21:52 +0800
Subject: [PATCH 04/55] Revert "perf: hisi: Add support for HiSilicon SoC PMU
 driver dt probe"

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8AU2M

-----------------------------------------------------------------

This reverts commit 31067ca7ca856eee32857bdc618e89d3b9a3261a.

In newer version of PMU drivers that we will inclusion them later,
the acpi_evaluate_integer was removed, so this problem is gone.

Signed-off-by: hongrongxuan <hongrongxuan@huawei.com>

 Conflicts:
	drivers/perf/Kconfig
---
 drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c |  1 -
 drivers/perf/hisilicon/hisi_uncore_hha_pmu.c  | 23 ++++---------------
 drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c  | 20 +++-------------
 3 files changed, 7 insertions(+), 37 deletions(-)

diff --git a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
index 8d1c48bc9812..f2a144ba3724 100644
--- a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
@@ -17,7 +17,6 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/list.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/smp.h>
 
diff --git a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
index 52286739c8b9..540f664463a8 100644
--- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
@@ -17,7 +17,6 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/list.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/smp.h>
 
@@ -236,34 +235,20 @@ static const struct acpi_device_id hisi_hha_pmu_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, hisi_hha_pmu_acpi_match);
 
-#ifdef CONFIG_ACPI
-static int hisi_hha_pmu_init_index(struct platform_device *pdev,
+static int hisi_hha_pmu_init_data(struct platform_device *pdev,
 				  struct hisi_pmu *hha_pmu)
 {
-	acpi_status status;
 	unsigned long long id;
+	struct resource *res;
+	acpi_status status;
 
 	status = acpi_evaluate_integer(ACPI_HANDLE(&pdev->dev),
-					"_UID", NULL, &id);
+				       "_UID", NULL, &id);
 	if (ACPI_FAILURE(status))
 		return -EINVAL;
 
 	hha_pmu->index_id = id;
 
-	return 0;
-}
-#endif
-
-static int hisi_hha_pmu_init_data(struct platform_device *pdev,
-				  struct hisi_pmu *hha_pmu)
-{
-	struct resource *res;
-
-#ifdef CONFIG_ACPI
-	if (hisi_hha_pmu_init_index(pdev, hha_pmu))
-		dev_info(&pdev->dev, "Can not init index id by acpi!\n");
-#endif
-
 	/*
 	 * Use SCCL_ID and UID to identify the HHA PMU, while
 	 * SCCL_ID is in MPIDR[aff2].
diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
index 0e766cea4a11..117edd114445 100644
--- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
@@ -17,7 +17,6 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/list.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/smp.h>
 
@@ -235,33 +234,20 @@ static const struct acpi_device_id hisi_l3c_pmu_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, hisi_l3c_pmu_acpi_match);
 
-#ifdef CONFIG_ACPI
-static int hisi_l3c_pmu_init_index(struct platform_device *pdev,
+static int hisi_l3c_pmu_init_data(struct platform_device *pdev,
 				  struct hisi_pmu *l3c_pmu)
 {
 	unsigned long long id;
+	struct resource *res;
 	acpi_status status;
 
 	status = acpi_evaluate_integer(ACPI_HANDLE(&pdev->dev),
-					"_UID", NULL, &id);
+				       "_UID", NULL, &id);
 	if (ACPI_FAILURE(status))
 		return -EINVAL;
 
 	l3c_pmu->index_id = id;
 
-	return 0;
-}
-#endif
-
-static int hisi_l3c_pmu_init_data(struct platform_device *pdev,
-				  struct hisi_pmu *l3c_pmu)
-{
-	struct resource *res;
-
-#ifdef CONFIG_ACPI
-	if (hisi_l3c_pmu_init_index(pdev, l3c_pmu))
-		dev_info(&pdev->dev, "Can not init index id by acpi!");
-#endif
 	/*
 	 * Use the SCCL_ID and CCL_ID to identify the L3C PMU, while
 	 * SCCL_ID is in MPIDR[aff2] and CCL_ID is in MPIDR[aff1].
-- 
2.27.0

