Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp310543ybm; Wed, 22 May 2019 03:39:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3iJuIB8fhQVO8eyRrqEPEJJGlHstF+RNgbiTDoiR59lAjP5MZAyDX0wSy7q2JwyqjiM7J X-Received: by 2002:a63:d347:: with SMTP id u7mr89670744pgi.254.1558521549372; Wed, 22 May 2019 03:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558521549; cv=none; d=google.com; s=arc-20160816; b=D5Dhhv1YH2CW0zcMbvaStJB9aK5UkXZZExanozThA+H9LLBEhZOGJRtxqAbwUnEkYN nBYgLB9m30SVuZBJdebeNCsZhmV/GrfNO/5z40kxG8W1dTgd4nqsDXBIlZsg2zXc9Vl6 xbyHrBPio/OP8niBjn4ana/XH8zKspXqD7rc7Usom6v95Bg7TKiGGPNCUmn3ELPkCkcJ Wq7jcGdkCtgUY7ffMyG6J2GHjj8Z65p4BU1wnR21bxKOpvVCFLk7xI0b5za8snY9XFac ybJ1uDMrDgV2kw6q0eI2lxRSMzrkWBISmGOIgxZWKUp/ql7uFRQsUDQg86fwGES1+fWq P/gA== 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 97si25461947plc.181.2019.05.22.03.38.54; Wed, 22 May 2019 03:39:09 -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 S1729405AbfEVKfo (ORCPT + 99 others); Wed, 22 May 2019 06:35:44 -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(-) 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; -- 2.7.4