From patchwork Wed May 22 10:34:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 164799 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp694719ili; Wed, 22 May 2019 03:36:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzE8HhaR5RaYe3y4V3bA9g4NyX3n762onrDa5Whk7fJiL3Wq4wXQTJQU6+wHC4iKv/1fbZg X-Received: by 2002:a63:5c45:: with SMTP id n5mr46587497pgm.172.1558521400007; Wed, 22 May 2019 03:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558521400; cv=none; d=google.com; s=arc-20160816; b=P/XuafFT/ib04w0GGd1QXRTEXxgl/B1NhVKsKzRGKKsLD4CRHi4mqPEn8Hvfk6axWM 2DyrjRFuCO31lNX8KnEpTlVwg/TSMJCJ2zeu4jK/xFb5ePz4dlMtgiU4a7cbJ25ThV4D WYLMPkx3esAnMeFSCeEem0yFUyeObzLSSsr6UayhWYRDEuaZQANbwXj9LC+xDbUmpVmb 1O0L/gGUD71blOcqMTAeLGne//aurQ42IJsJbSfEkTKW05hprFdS/bdK/IDfCgq1XsDU MfhEqCHLUDGH9d/rU3ds61NLFnPSRyZBcH3mKtLVm5MzC5qpM4AKwG/sp+j+D7/s364z BYEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=jwsZZ+LJTMWX0t8FN8pcM5L+EGyW0vhzJGWLltj48Bg=; b=wdWBI23N2yxxg958s4upBMpmDfTwWPEe7c2WNzgLmY22n/6XR6fw0GDHmkqNd2FSQ+ 0rkwYG2NvOZyM+uVf/N2hL1LjFUFME36QFEx0GbQfMUBL3XXc4UXjmdjTy5AHghjwqaC TNAVyw5J4Wokkc11YWqJqkliOk7l0YfLHDfJpaBHikbzkQTXwm/JA/rjzPO9wfseObJC pJCplA3320+V2aDrE0ttc9H27rbKNucAag0InAHDtB3sa8U0zhMyU7UWufT7EjzXntWo D2SMjwenbNEd5o6MJjrekEKX5ZzD07YGRynfstPoxAgfnx8agZffGWywufMtTP93eWRy alpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si21031822pga.151.2019.05.22.03.36.39; Wed, 22 May 2019 03:36:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729410AbfEVKfp (ORCPT + 30 others); Wed, 22 May 2019 06:35:45 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47108 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729122AbfEVKfm (ORCPT ); Wed, 22 May 2019 06:35:42 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A54F51682; Wed, 22 May 2019 03:35:41 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 950E73F575; Wed, 22 May 2019 03:35:40 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, Suzuki K Poulose Subject: [PATCH v4 18/30] coresight: Remove cpu field from platform data Date: Wed, 22 May 2019 11:34:51 +0100 Message-Id: <1558521304-27469-19-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> References: <1558521304-27469-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CPU field is only used by ETMs and there is a separate API for fetching the same. So, let us use that instead of using the common platform probing helper. Also, remove it from the platform_data. Reviewed-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-etm3x.c | 2 +- drivers/hwtracing/coresight/coresight-etm4x.c | 2 +- drivers/hwtracing/coresight/coresight-platform.c | 1 - include/linux/coresight.h | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index fa2164f..722fab96 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -819,7 +819,7 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id) return ret; } - drvdata->cpu = pdata ? pdata->cpu : 0; + drvdata->cpu = coresight_get_cpu(dev); cpus_read_lock(); etmdrvdata[drvdata->cpu] = drvdata; diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 4355b2e..03576f3 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -1105,7 +1105,7 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) spin_lock_init(&drvdata->spinlock); - drvdata->cpu = pdata ? pdata->cpu : 0; + drvdata->cpu = coresight_get_cpu(dev); cpus_read_lock(); etmdrvdata[drvdata->cpu] = drvdata; diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index ba8c146..541e500 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -325,7 +325,6 @@ coresight_get_platform_data(struct device *dev) /* Use device name as sysfs handle */ pdata->name = dev_name(dev); - pdata->cpu = coresight_get_cpu(dev); if (is_of_node(fwnode)) ret = of_get_coresight_platform_data(dev, pdata); diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 98a4440..bf241db 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -91,14 +91,12 @@ union coresight_dev_subtype { /** * struct coresight_platform_data - data harvested from the DT specification - * @cpu: the CPU a source belongs to. Only applicable for ETM/PTMs. * @name: name of the component as shown under sysfs. * @nr_inport: number of input ports for this component. * @nr_outport: number of output ports for this component. * @conns: Array of nr_outport connections from this component */ struct coresight_platform_data { - int cpu; const char *name; int nr_inport; int nr_outport;