From patchwork Tue May 7 10:52:45 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: 163492 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp1184051ilm; Tue, 7 May 2019 03:54:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHCOjWMU3pVgeA00owx+zCkuhh1QW06T5tif8Yk+tnqfFoMvhTWayHlTyxnpZlN3p43Jgw X-Received: by 2002:a62:864a:: with SMTP id x71mr41605846pfd.228.1557226450604; Tue, 07 May 2019 03:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557226450; cv=none; d=google.com; s=arc-20160816; b=uFIBQ8vpp5zXCCgLPqYVqvpkv39H/D3W8tBtYwPNJse2KJ4Z+GpGmhbveGaBC536Z4 /tojNpANIu/XoKM571pJ6ujKOAcYJ3ud8EmRtX/MroHm1BpoP1TdimJeVL8hFYXML4v/ 6jM8IpIUvvTX0yrgyR3DixfPDdyGxDiNtih1ZNYLjNQGRZGBuQAISB3nXvMifWRe0Ilp WnSAp2wlH5gxbQJF+LzTBqHrW8egJ2ysonLluLd9LM79M/Yyn6lgijHO8FKiAYoUimc1 +gIVvCudW2q5aXHgM5w7FEynIM5oqainKZBYU522R0uEylQZkPU6vTer8VYJ1x2Lgp6W lJBQ== 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=ljUHvXaBgb3ayHM+G9S1WGpwRQM9YHHqL0dVNpluBu8YRy4mmvzyPefSwIN1nH8EjC R0GpYADfrtvilnfz8ipxF0ausXHEsDRB433X0gPNyIE081/mJ+WA9u2MM5Q49BbAV7GM zlGsVRL6sr/ltSHcmnCNzMhKxmpUX2w24/q4AI65pJYNfJ7q5nNVgrOQFM9n/VFUL2vx 3mSw9BhGOTZ3N3lXsyFdJRXKkBiQfQqk6a93Fqoj4GAeEqcSDdugnHl+VjIqNDlfj5oK NjNTgXPJagWwwTiy6jhLBzne7fRAKVrRr1xqtO9NDfJdTrS66vDYKIqoLPTauZvZFWtu m98Q== 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 q8si4965765pfa.124.2019.05.07.03.54.10; Tue, 07 May 2019 03:54:10 -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 S1727180AbfEGKyJ (ORCPT + 30 others); Tue, 7 May 2019 06:54:09 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50242 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727087AbfEGKyH (ORCPT ); Tue, 7 May 2019 06:54:07 -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 3DB9B1682; Tue, 7 May 2019 03:54:07 -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 0AE423F5AF; Tue, 7 May 2019 03:54:05 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, rjw@rjwysocki.net, mathieu.poirier@linaro.org, Suzuki K Poulose Subject: [PATCH v3 18/30] coresight: Remove cpu field from platform data Date: Tue, 7 May 2019 11:52:45 +0100 Message-Id: <1557226378-10131-19-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557226378-10131-1-git-send-email-suzuki.poulose@arm.com> References: <1557226378-10131-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;