From nobody Tue Nov 26 22:26:52 2024 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 092611D26F6 for ; Wed, 16 Oct 2024 08:02:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729065769; cv=none; b=Zb37OeLXKrpnAgigLgyiVg8JCYbQD8UfGf/F+nhWaGcrWBci6JRxO7p3D2iuUrZcKIGS+cGU19Jy0c24JlsgYCNrXnYDorowMvWN5fqgKClBhcuFKbrwdfWIP09BpRUVj9n9+FLUkG9thMEUNru/hrG3/KpWahBP8JQ9AaS8oNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729065769; c=relaxed/simple; bh=DZav2LWxnb8kglrqPo5rKEzw6khc3lvfFFymXmT6KnQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YEgsvj1MSahX4m5rgIX3CYKjc+ohHDSrPnA3w1u0WH9P5YKNS+s6BWp6ks4Zai9Nm+Epp+p9aPge9327UvHgWWMVCxbbBTNn9yXYFcWXL/K4T2tIAHqc0ZgD2dAX0LtJpcVXfstda9798xhhEWHdkF9cv2SVjv+EVBiiqNC69RE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=U3URSjmq; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="U3URSjmq" Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49G2fiNR021631; Wed, 16 Oct 2024 01:02:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=Y TKLNixyrhOT4WYP0AfkbqATmvDCZWFk/qiVWvbZl1A=; b=U3URSjmqvGOdTxuJj mpN8V2EI9wznHA/GotLXRfVzpZiCrns8oGBqHZIwK4hhaqWBs6/ytqdc4fSM0aU7 3XsZEQuLUkLMRB1uehlEjFGOihMfQaHHLDYQG7m9DqAdAZSFlybfqw8yCWLyMIVl vkF/ocghOrhsMbK+raZxGT/qMsp1B6IHAwhR8Jz2ROh1iG4DgdbTkliNnXj6F02x MVV0BJmmi88rbPpVJ131oHiDXwnhChswuV/jgiAC0vYXNh+3B1kH5JGlGFVQL1fE RxRvlwr4ZyeEgmzM1Ks2bFnaI8sZRxjahcKk1deXLHoN8scJIi4HRl/n+wYocGZ6 mLAdQ== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 42a4x4gfut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Oct 2024 01:02:30 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 16 Oct 2024 01:02:14 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 16 Oct 2024 01:02:14 -0700 Received: from IPBU-BLR-SERVER1.marvell.com (IPBU-BLR-SERVER1.marvell.com [10.28.8.41]) by maili.marvell.com (Postfix) with ESMTP id 9CFB53F706F; Wed, 16 Oct 2024 01:02:11 -0700 (PDT) From: Gowthami Thiagarajan To: , , , CC: , , , , Gowthami Thiagarajan Subject: [PATCH v9 1/5] perf/marvell: Refactor to extract platform data - no functional change Date: Wed, 16 Oct 2024 13:31:49 +0530 Message-ID: <20241016080153.3546353-2-gthiagarajan@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241016080153.3546353-1-gthiagarajan@marvell.com> References: <20241016080153.3546353-1-gthiagarajan@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: a9xJBJOKwHGGf7qQckGenqIh1F6G1Hnk X-Proofpoint-ORIG-GUID: a9xJBJOKwHGGf7qQckGenqIh1F6G1Hnk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 Content-Type: text/plain; charset="utf-8" This commit introduces a refactor to the Marvell DDR pmu driver, specifically targeting the extraction of platform data (referred to as "pdata") from the existing driver. The purpose of this refactor is to prepare for the upcoming support of the next version of the Performance Monitoring Unit (PMU) in this driver. No functional changes are introduced in this refactor. Its sole purpose is to improve code organization and pave the way for future enhancements to the driver. Signed-off-by: Gowthami Thiagarajan --- drivers/perf/marvell_cn10k_ddr_pmu.c | 160 +++++++++++++++++++-------- 1 file changed, 112 insertions(+), 48 deletions(-) diff --git a/drivers/perf/marvell_cn10k_ddr_pmu.c b/drivers/perf/marvell_cn= 10k_ddr_pmu.c index 94f1ebcd2a27..ed929102b53d 100644 --- a/drivers/perf/marvell_cn10k_ddr_pmu.c +++ b/drivers/perf/marvell_cn10k_ddr_pmu.c @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -/* Marvell CN10K DRAM Subsystem (DSS) Performance Monitor Driver +/* + * Marvell CN10K DRAM Subsystem (DSS) Performance Monitor Driver * - * Copyright (C) 2021 Marvell. + * Copyright (C) 2021-2024 Marvell. */ =20 #include @@ -14,24 +15,24 @@ #include =20 /* Performance Counters Operating Mode Control Registers */ -#define DDRC_PERF_CNT_OP_MODE_CTRL 0x8020 +#define CN10K_DDRC_PERF_CNT_OP_MODE_CTRL 0x8020 #define OP_MODE_CTRL_VAL_MANNUAL 0x1 =20 /* Performance Counters Start Operation Control Registers */ -#define DDRC_PERF_CNT_START_OP_CTRL 0x8028 +#define CN10K_DDRC_PERF_CNT_START_OP_CTRL 0x8028 #define START_OP_CTRL_VAL_START 0x1ULL #define START_OP_CTRL_VAL_ACTIVE 0x2 =20 /* Performance Counters End Operation Control Registers */ -#define DDRC_PERF_CNT_END_OP_CTRL 0x8030 +#define CN10K_DDRC_PERF_CNT_END_OP_CTRL 0x8030 #define END_OP_CTRL_VAL_END 0x1ULL =20 /* Performance Counters End Status Registers */ -#define DDRC_PERF_CNT_END_STATUS 0x8038 +#define CN10K_DDRC_PERF_CNT_END_STATUS 0x8038 #define END_STATUS_VAL_END_TIMER_MODE_END 0x1 =20 /* Performance Counters Configuration Registers */ -#define DDRC_PERF_CFG_BASE 0x8040 +#define CN10K_DDRC_PERF_CFG_BASE 0x8040 =20 /* 8 Generic event counter + 2 fixed event counters */ #define DDRC_PERF_NUM_GEN_COUNTERS 8 @@ -42,13 +43,14 @@ DDRC_PERF_NUM_FIX_COUNTERS) =20 /* Generic event counter registers */ -#define DDRC_PERF_CFG(n) (DDRC_PERF_CFG_BASE + 8 * (n)) +#define DDRC_PERF_CFG(base, n) ((base) + 8 * (n)) #define EVENT_ENABLE BIT_ULL(63) =20 /* Two dedicated event counters for DDR reads and writes */ #define EVENT_DDR_READS 101 #define EVENT_DDR_WRITES 100 =20 +#define DDRC_PERF_REG(base, n) ((base) + 8 * (n)) /* * programmable events IDs in programmable event counters. * DO NOT change these event-id numbers, they are used to @@ -102,28 +104,29 @@ #define EVENT_HIF_RD_OR_WR 1 =20 /* Event counter value registers */ -#define DDRC_PERF_CNT_VALUE_BASE 0x8080 -#define DDRC_PERF_CNT_VALUE(n) (DDRC_PERF_CNT_VALUE_BASE + 8 * (n)) +#define CN10K_DDRC_PERF_CNT_VALUE_BASE 0x8080 =20 /* Fixed event counter enable/disable register */ -#define DDRC_PERF_CNT_FREERUN_EN 0x80C0 +#define CN10K_DDRC_PERF_CNT_FREERUN_EN 0x80C0 #define DDRC_PERF_FREERUN_WRITE_EN 0x1 #define DDRC_PERF_FREERUN_READ_EN 0x2 =20 /* Fixed event counter control register */ -#define DDRC_PERF_CNT_FREERUN_CTRL 0x80C8 +#define CN10K_DDRC_PERF_CNT_FREERUN_CTRL 0x80C8 #define DDRC_FREERUN_WRITE_CNT_CLR 0x1 #define DDRC_FREERUN_READ_CNT_CLR 0x2 =20 -/* Fixed event counter value register */ -#define DDRC_PERF_CNT_VALUE_WR_OP 0x80D0 -#define DDRC_PERF_CNT_VALUE_RD_OP 0x80D8 #define DDRC_PERF_CNT_VALUE_OVERFLOW BIT_ULL(48) #define DDRC_PERF_CNT_MAX_VALUE GENMASK_ULL(48, 0) =20 +/* Fixed event counter value register */ +#define CN10K_DDRC_PERF_CNT_VALUE_WR_OP 0x80D0 +#define CN10K_DDRC_PERF_CNT_VALUE_RD_OP 0x80D8 + struct cn10k_ddr_pmu { struct pmu pmu; void __iomem *base; + const struct ddr_pmu_platform_data *p_data; unsigned int cpu; struct device *dev; int active_events; @@ -134,6 +137,23 @@ struct cn10k_ddr_pmu { =20 #define to_cn10k_ddr_pmu(p) container_of(p, struct cn10k_ddr_pmu, pmu) =20 +struct ddr_pmu_platform_data { + u64 counter_overflow_val; + u64 counter_max_val; + u64 cnt_base; + u64 cfg_base; + u64 cnt_op_mode_ctrl; + u64 cnt_start_op_ctrl; + u64 cnt_end_op_ctrl; + u64 cnt_end_status; + u64 cnt_freerun_en; + u64 cnt_freerun_ctrl; + u64 cnt_freerun_clr; + u64 cnt_value_wr_op; + u64 cnt_value_rd_op; + bool is_cn10k; +}; + static ssize_t cn10k_ddr_pmu_event_show(struct device *dev, struct device_attribute *attr, char *page) @@ -354,6 +374,7 @@ static int cn10k_ddr_perf_event_init(struct perf_event = *event) static void cn10k_ddr_perf_counter_enable(struct cn10k_ddr_pmu *pmu, int counter, bool enable) { + const struct ddr_pmu_platform_data *p_data =3D pmu->p_data; u32 reg; u64 val; =20 @@ -363,7 +384,7 @@ static void cn10k_ddr_perf_counter_enable(struct cn10k_= ddr_pmu *pmu, } =20 if (counter < DDRC_PERF_NUM_GEN_COUNTERS) { - reg =3D DDRC_PERF_CFG(counter); + reg =3D DDRC_PERF_CFG(p_data->cfg_base, counter); val =3D readq_relaxed(pmu->base + reg); =20 if (enable) @@ -373,7 +394,8 @@ static void cn10k_ddr_perf_counter_enable(struct cn10k_= ddr_pmu *pmu, =20 writeq_relaxed(val, pmu->base + reg); } else { - val =3D readq_relaxed(pmu->base + DDRC_PERF_CNT_FREERUN_EN); + val =3D readq_relaxed(pmu->base + + p_data->cnt_freerun_en); if (enable) { if (counter =3D=3D DDRC_PERF_READ_COUNTER_IDX) val |=3D DDRC_PERF_FREERUN_READ_EN; @@ -385,27 +407,33 @@ static void cn10k_ddr_perf_counter_enable(struct cn10= k_ddr_pmu *pmu, else val &=3D ~DDRC_PERF_FREERUN_WRITE_EN; } - writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_EN); + writeq_relaxed(val, pmu->base + + p_data->cnt_freerun_en); } } =20 static u64 cn10k_ddr_perf_read_counter(struct cn10k_ddr_pmu *pmu, int coun= ter) { + const struct ddr_pmu_platform_data *p_data =3D pmu->p_data; u64 val; =20 if (counter =3D=3D DDRC_PERF_READ_COUNTER_IDX) - return readq_relaxed(pmu->base + DDRC_PERF_CNT_VALUE_RD_OP); + return readq_relaxed(pmu->base + + p_data->cnt_value_rd_op); =20 if (counter =3D=3D DDRC_PERF_WRITE_COUNTER_IDX) - return readq_relaxed(pmu->base + DDRC_PERF_CNT_VALUE_WR_OP); + return readq_relaxed(pmu->base + + p_data->cnt_value_wr_op); =20 - val =3D readq_relaxed(pmu->base + DDRC_PERF_CNT_VALUE(counter)); + val =3D readq_relaxed(pmu->base + + DDRC_PERF_REG(p_data->cnt_base, counter)); return val; } =20 static void cn10k_ddr_perf_event_update(struct perf_event *event) { struct cn10k_ddr_pmu *pmu =3D to_cn10k_ddr_pmu(event->pmu); + const struct ddr_pmu_platform_data *p_data =3D pmu->p_data; struct hw_perf_event *hwc =3D &event->hw; u64 prev_count, new_count, mask; =20 @@ -414,7 +442,7 @@ static void cn10k_ddr_perf_event_update(struct perf_eve= nt *event) new_count =3D cn10k_ddr_perf_read_counter(pmu, hwc->idx); } while (local64_xchg(&hwc->prev_count, new_count) !=3D prev_count); =20 - mask =3D DDRC_PERF_CNT_MAX_VALUE; + mask =3D p_data->counter_max_val; =20 local64_add((new_count - prev_count) & mask, &event->count); } @@ -435,6 +463,7 @@ static void cn10k_ddr_perf_event_start(struct perf_even= t *event, int flags) static int cn10k_ddr_perf_event_add(struct perf_event *event, int flags) { struct cn10k_ddr_pmu *pmu =3D to_cn10k_ddr_pmu(event->pmu); + const struct ddr_pmu_platform_data *p_data =3D pmu->p_data; struct hw_perf_event *hwc =3D &event->hw; u8 config =3D event->attr.config; int counter, ret; @@ -454,7 +483,7 @@ static int cn10k_ddr_perf_event_add(struct perf_event *= event, int flags) =20 if (counter < DDRC_PERF_NUM_GEN_COUNTERS) { /* Generic counters, configure event id */ - reg_offset =3D DDRC_PERF_CFG(counter); + reg_offset =3D DDRC_PERF_CFG(p_data->cfg_base, counter); ret =3D ddr_perf_get_event_bitmap(config, &val); if (ret) return ret; @@ -467,7 +496,7 @@ static int cn10k_ddr_perf_event_add(struct perf_event *= event, int flags) else val =3D DDRC_FREERUN_WRITE_CNT_CLR; =20 - writeq_relaxed(val, pmu->base + DDRC_PERF_CNT_FREERUN_CTRL); + writeq_relaxed(val, pmu->base + p_data->cnt_freerun_ctrl); } =20 hwc->state |=3D PERF_HES_STOPPED; @@ -512,17 +541,19 @@ static void cn10k_ddr_perf_event_del(struct perf_even= t *event, int flags) static void cn10k_ddr_perf_pmu_enable(struct pmu *pmu) { struct cn10k_ddr_pmu *ddr_pmu =3D to_cn10k_ddr_pmu(pmu); + const struct ddr_pmu_platform_data *p_data =3D ddr_pmu->p_data; =20 writeq_relaxed(START_OP_CTRL_VAL_START, ddr_pmu->base + - DDRC_PERF_CNT_START_OP_CTRL); + p_data->cnt_start_op_ctrl); } =20 static void cn10k_ddr_perf_pmu_disable(struct pmu *pmu) { struct cn10k_ddr_pmu *ddr_pmu =3D to_cn10k_ddr_pmu(pmu); + const struct ddr_pmu_platform_data *p_data =3D ddr_pmu->p_data; =20 writeq_relaxed(END_OP_CTRL_VAL_END, ddr_pmu->base + - DDRC_PERF_CNT_END_OP_CTRL); + p_data->cnt_end_op_ctrl); } =20 static void cn10k_ddr_perf_event_update_all(struct cn10k_ddr_pmu *pmu) @@ -549,6 +580,7 @@ static void cn10k_ddr_perf_event_update_all(struct cn10= k_ddr_pmu *pmu) =20 static irqreturn_t cn10k_ddr_pmu_overflow_handler(struct cn10k_ddr_pmu *pm= u) { + const struct ddr_pmu_platform_data *p_data =3D pmu->p_data; struct perf_event *event; struct hw_perf_event *hwc; u64 prev_count, new_count; @@ -586,7 +618,7 @@ static irqreturn_t cn10k_ddr_pmu_overflow_handler(struc= t cn10k_ddr_pmu *pmu) continue; =20 value =3D cn10k_ddr_perf_read_counter(pmu, i); - if (value =3D=3D DDRC_PERF_CNT_MAX_VALUE) { + if (value =3D=3D p_data->counter_max_val) { pr_info("Counter-(%d) reached max value\n", i); cn10k_ddr_perf_event_update_all(pmu); cn10k_ddr_perf_pmu_disable(&pmu->pmu); @@ -629,11 +661,32 @@ static int cn10k_ddr_pmu_offline_cpu(unsigned int cpu= , struct hlist_node *node) return 0; } =20 +#if defined(CONFIG_ACPI) || defined(CONFIG_OF) +static const struct ddr_pmu_platform_data cn10k_ddr_pmu_pdata =3D { + .counter_overflow_val =3D BIT_ULL(48), + .counter_max_val =3D GENMASK_ULL(48, 0), + .cnt_base =3D CN10K_DDRC_PERF_CNT_VALUE_BASE, + .cfg_base =3D CN10K_DDRC_PERF_CFG_BASE, + .cnt_op_mode_ctrl =3D CN10K_DDRC_PERF_CNT_OP_MODE_CTRL, + .cnt_start_op_ctrl =3D CN10K_DDRC_PERF_CNT_START_OP_CTRL, + .cnt_end_op_ctrl =3D CN10K_DDRC_PERF_CNT_END_OP_CTRL, + .cnt_end_status =3D CN10K_DDRC_PERF_CNT_END_STATUS, + .cnt_freerun_en =3D CN10K_DDRC_PERF_CNT_FREERUN_EN, + .cnt_freerun_ctrl =3D CN10K_DDRC_PERF_CNT_FREERUN_CTRL, + .cnt_freerun_clr =3D 0, + .cnt_value_wr_op =3D CN10K_DDRC_PERF_CNT_VALUE_WR_OP, + .cnt_value_rd_op =3D CN10K_DDRC_PERF_CNT_VALUE_RD_OP, + .is_cn10k =3D TRUE, +}; +#endif + static int cn10k_ddr_perf_probe(struct platform_device *pdev) { + const struct ddr_pmu_platform_data *dev_data; struct cn10k_ddr_pmu *ddr_pmu; struct resource *res; void __iomem *base; + bool is_cn10k; char *name; int ret; =20 @@ -644,30 +697,41 @@ static int cn10k_ddr_perf_probe(struct platform_devic= e *pdev) ddr_pmu->dev =3D &pdev->dev; platform_set_drvdata(pdev, ddr_pmu); =20 + dev_data =3D device_get_match_data(&pdev->dev); + if (!dev_data) { + dev_err(&pdev->dev, "Error: No device match data found\n"); + return -ENODEV; + } + base =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(base)) return PTR_ERR(base); =20 ddr_pmu->base =3D base; =20 - /* Setup the PMU counter to work in manual mode */ - writeq_relaxed(OP_MODE_CTRL_VAL_MANNUAL, ddr_pmu->base + - DDRC_PERF_CNT_OP_MODE_CTRL); - - ddr_pmu->pmu =3D (struct pmu) { - .module =3D THIS_MODULE, - .capabilities =3D PERF_PMU_CAP_NO_EXCLUDE, - .task_ctx_nr =3D perf_invalid_context, - .attr_groups =3D cn10k_attr_groups, - .event_init =3D cn10k_ddr_perf_event_init, - .add =3D cn10k_ddr_perf_event_add, - .del =3D cn10k_ddr_perf_event_del, - .start =3D cn10k_ddr_perf_event_start, - .stop =3D cn10k_ddr_perf_event_stop, - .read =3D cn10k_ddr_perf_event_update, - .pmu_enable =3D cn10k_ddr_perf_pmu_enable, - .pmu_disable =3D cn10k_ddr_perf_pmu_disable, - }; + ddr_pmu->p_data =3D dev_data; + is_cn10k =3D ddr_pmu->p_data->is_cn10k; + + if (is_cn10k) { + /* Setup the PMU counter to work in manual mode */ + writeq_relaxed(OP_MODE_CTRL_VAL_MANNUAL, ddr_pmu->base + + ddr_pmu->p_data->cnt_op_mode_ctrl); + + ddr_pmu->pmu =3D (struct pmu) { + .module =3D THIS_MODULE, + .capabilities =3D PERF_PMU_CAP_NO_EXCLUDE, + .task_ctx_nr =3D perf_invalid_context, + .attr_groups =3D cn10k_attr_groups, + .event_init =3D cn10k_ddr_perf_event_init, + .add =3D cn10k_ddr_perf_event_add, + .del =3D cn10k_ddr_perf_event_del, + .start =3D cn10k_ddr_perf_event_start, + .stop =3D cn10k_ddr_perf_event_stop, + .read =3D cn10k_ddr_perf_event_update, + .pmu_enable =3D cn10k_ddr_perf_pmu_enable, + .pmu_disable =3D cn10k_ddr_perf_pmu_disable, + }; + } =20 /* Choose this cpu to collect perf data */ ddr_pmu->cpu =3D raw_smp_processor_id(); @@ -688,7 +752,7 @@ static int cn10k_ddr_perf_probe(struct platform_device = *pdev) if (ret) goto error; =20 - pr_info("CN10K DDR PMU Driver for ddrc@%llx\n", res->start); + pr_info("DDR PMU Driver for ddrc@%llx\n", res->start); return 0; error: cpuhp_state_remove_instance_nocalls( @@ -710,7 +774,7 @@ static void cn10k_ddr_perf_remove(struct platform_devic= e *pdev) =20 #ifdef CONFIG_OF static const struct of_device_id cn10k_ddr_pmu_of_match[] =3D { - { .compatible =3D "marvell,cn10k-ddr-pmu", }, + { .compatible =3D "marvell,cn10k-ddr-pmu", .data =3D &cn10k_ddr_pmu_pdata= }, { }, }; MODULE_DEVICE_TABLE(of, cn10k_ddr_pmu_of_match); @@ -718,7 +782,7 @@ MODULE_DEVICE_TABLE(of, cn10k_ddr_pmu_of_match); =20 #ifdef CONFIG_ACPI static const struct acpi_device_id cn10k_ddr_pmu_acpi_match[] =3D { - {"MRVL000A", 0}, + {"MRVL000A", (kernel_ulong_t)&cn10k_ddr_pmu_pdata }, {}, }; MODULE_DEVICE_TABLE(acpi, cn10k_ddr_pmu_acpi_match); --=20 2.25.1