From patchwork Mon Apr 15 16:04:04 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: 162229 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3107880jan; Mon, 15 Apr 2019 09:08:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy8YjQmwokNmtCMAmEgVsrgzIzxlGcMeUk4xoiE9F4tkjYjxwvCQulYtROl76Xd2S+3hiQ X-Received: by 2002:a17:902:2b81:: with SMTP id l1mr77096298plb.289.1555344491062; Mon, 15 Apr 2019 09:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555344491; cv=none; d=google.com; s=arc-20160816; b=yHy+2bwF18U3SJaUsFVq7mCzuXLHUawZ7Fjd6kHUTp/Q5g/kA1mFp3cbo7sx6kZc1o /wBI9bYEJc0hqyOgcvXWOZL6OnCbgds7V4vFJ/VasoGki5rJsIIbMdqMUVzMSutrWv3t K/BYKfGf0tlplD6+1IBfFSER7WNmyvaUYEZtPOrkDmjv/r87Yu3twPd1tr+RrMntThjG aEwCgRH5cdkeys81yyzmKNskeGXJFEiVEuH13IG15eF9jBpuK4XThLWOwbEERwP95T8L FE1zWwT0NxEc5dpvPmfQCwmYsNGo+wiJPh7havdE0FiYKh+8Djji5uqDBuSo7XA2Pp4I uSOQ== 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=eanOL7O9qlnH+y8vlF7WvmtX7w9O13ThWVE7PSdkFno=; b=p4K9ppky1mnceprxm+vMcVgI5NOEN85xTc1vvJ63plCP7KFrkWu0jbVOtydf13y7Nr NOh3ts4mVSa/DsP0qMzjDu2enmsMmCIkppb+z/S/Szoju8iQPbwOPXkBzNXGwbFKHz2Y WsCOHBplU5SyCnr94FZOk0pV5jCTs00f8h9T48NYQTdDgvFvwzfYJyihL8+hAunnSG6o f5DCBHFM6Tya3oIqYu68+LC/yoTKi2DEYVHMsPlVtXxKtYBUvdKElK1+3CwOpCVIzFxp jNnnE73g1V2BpWL94XwodqlunEUaSFqO7SmkbWKRDP0KLQBMQp0sLKxRNE6qS+Yisv62 /y+w== 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 s5si45214973plr.307.2019.04.15.09.08.10; Mon, 15 Apr 2019 09:08:11 -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 S1727956AbfDOQIJ (ORCPT + 30 others); Mon, 15 Apr 2019 12:08:09 -0400 Received: from foss.arm.com ([217.140.101.70]:37916 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728009AbfDOQGW (ORCPT ); Mon, 15 Apr 2019 12:06:22 -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 AAFF11684; Mon, 15 Apr 2019 09:06:21 -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 314FD3F68F; Mon, 15 Apr 2019 09:06:20 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, mathieu.poirier@linaro.org, mike.leach@linaro.org, rjw@rjwysocki.net, robert.walker@arm.com, Suzuki K Poulose Subject: [PATCH v2 21/36] coresight: Remove cpu field from platform data Date: Mon, 15 Apr 2019 17:04:04 +0100 Message-Id: <1555344260-12375-22-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555344260-12375-1-git-send-email-suzuki.poulose@arm.com> References: <1555344260-12375-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. Cc: 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 998b9f3..ced31d1 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -997,7 +997,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 8a86ba3..f1ab1b5 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -316,7 +316,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)) return of_get_coresight_platform_data(dev, pdata); diff --git a/include/linux/coresight.h b/include/linux/coresight.h index a48cd9b..bb7548f 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;