From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 591D0C2D0A3 for ; Wed, 4 Nov 2020 10:08:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A52722224E for ; Wed, 4 Nov 2020 10:08:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Osh1Yuoe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A52722224E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d+oKzqyGDq92tGQWxYd31qfthw275+5zV1qNI2+JiTs=; b=Osh1YuoetaCFntUv4qJ7YaAe6 1mKkrrWm+cqnM7qe/l7zZiKtBu9NIKSYteC2IrFs8lwWzrWrox8ix4vFjlch+GXqUnKOo4eN0QiGl 2OczAS2RMM6OcpxRopTW+m+b+uU5IeiDJosf3zjT6xu/iGpMkncLfynTJkHycMx3JZXDLPVbVWk06 qJE3qYYdR43E8mHGBhW36cFZszcg6reYoHjwbbwhfUXZsMwDBZaE4di/RRzHqULkMbrtS8PbTyLvB ZKSMOZiwFaq4QN5D5feKSg+iHLCvIJK0rPJDl+lyx9IGdsN6I8SIlTBIdIj3GDh0bQgb3wUOHZtwc mbbgSVkrg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaFhK-0006h3-Ae; Wed, 04 Nov 2020 10:07:22 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaFhH-0006g2-B8 for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2020 10:07:20 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6FF311474; Wed, 4 Nov 2020 02:07:13 -0800 (PST) Received: from [10.57.20.162] (unknown [10.57.20.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 37B203F66E; Wed, 4 Nov 2020 02:07:12 -0800 (PST) Subject: Re: [PATCH v3 07/26] coresight: Introduce device access abstraction To: Mathieu Poirier References: <20201028220945.3826358-1-suzuki.poulose@arm.com> <20201028220945.3826358-9-suzuki.poulose@arm.com> <20201103171417.GA2854467@xps15> <20201103172544.GA2855763@xps15> From: Suzuki K Poulose Message-ID: <5e322dc6-de2b-8e24-2aad-b7f7a3fbe172@arm.com> Date: Wed, 4 Nov 2020 10:07:11 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201103172544.GA2855763@xps15> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201104_050719_518008_EC09DFF6 X-CRM114-Status: GOOD ( 17.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: coresight@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mike.leach@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/3/20 5:25 PM, Mathieu Poirier wrote: > On Tue, Nov 03, 2020 at 10:14:17AM -0700, Mathieu Poirier wrote: >> Hi Suzuki, >> >> On Wed, Oct 28, 2020 at 10:09:26PM +0000, Suzuki K Poulose wrote: >>> We are about to introduce support for sysreg access to ETMv4.4+ >>> component. Since there are generic routines that access the >>> registers (e.g, CS_LOCK/UNLOCK , claim/disclaim operations, timeout) >>> and in order to preserve the logic of these operations at a >>> single place we introduce an abstraction layer for the accesses >>> to a given device. >>> >>> Cc: Mathieu Poirier >>> Cc: Mike Leach >>> Signed-off-by: Suzuki K Poulose >>> --- >>> drivers/hwtracing/coresight/coresight-catu.c | 1 + >>> drivers/hwtracing/coresight/coresight-core.c | 49 +++++ >>> .../hwtracing/coresight/coresight-cti-core.c | 1 + >>> drivers/hwtracing/coresight/coresight-etb10.c | 1 + >>> .../coresight/coresight-etm3x-core.c | 1 + >>> .../coresight/coresight-etm4x-core.c | 1 + >>> .../hwtracing/coresight/coresight-funnel.c | 1 + >>> .../coresight/coresight-replicator.c | 1 + >>> drivers/hwtracing/coresight/coresight-stm.c | 1 + >>> .../hwtracing/coresight/coresight-tmc-core.c | 1 + >>> drivers/hwtracing/coresight/coresight-tpiu.c | 1 + >>> include/linux/coresight.h | 197 ++++++++++++++++++ >>> 12 files changed, 256 insertions(+) >>> >>> diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c >>> index 99430f6cf5a5..5baf29510f1b 100644 >>> --- a/drivers/hwtracing/coresight/coresight-catu.c >>> +++ b/drivers/hwtracing/coresight/coresight-catu.c >>> @@ -551,6 +551,7 @@ static int catu_probe(struct amba_device *adev, const struct amba_id *id) >>> dev->platform_data = pdata; >>> >>> drvdata->base = base; >>> + catu_desc.access = CSDEV_ACCESS_IOMEM(base); >> >> Ok for those >> >>> catu_desc.pdata = pdata; >>> catu_desc.dev = dev; >>> catu_desc.groups = catu_groups; >>> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c >>> index cc9e8025c533..e96deaca8cab 100644 >>> --- a/drivers/hwtracing/coresight/coresight-core.c >>> +++ b/drivers/hwtracing/coresight/coresight-core.c >>> @@ -1452,6 +1452,54 @@ int coresight_timeout(void __iomem *addr, u32 offset, int position, int value) >>> } >>> EXPORT_SYMBOL_GPL(coresight_timeout); >>> >>> +u32 coresight_relaxed_read32(struct coresight_device *csdev, u32 offset) >>> +{ >>> + return csdev_access_relaxed_read32(&csdev->access, offset); >> >> This really doesn't give us much other than another jump. I would give function >> csdev_access_relaxed_read32() a coresight_device argument instead of a csdev_access >> and rename it to coresight_relaxed_read32(). The same for the other access functions. >> > > Ignore the above, TPIU just gave me the logic behind what you did. Thanks Mathieu, will address your comments in the next version. Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel