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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 CF6F6C433E0 for ; Wed, 3 Feb 2021 15:52:44 +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 6A3A864F55 for ; Wed, 3 Feb 2021 15:52:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A3A864F55 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=DIV4LfT1mKVmtPVDMDscCuj+sPh0vkIaj6yClbEHOKo=; b=xVBhsAI1nUk5BkMKWDnE4+F3M eXHrMqlmpuSNJbXvZN8bVJCvoAA7rbHwTpwlg7bFJalyBB+YFqf2ZGpULnSvbDIrojrmpdONHcDvT J2ZFtmSWK459h/hKAmCiVEB+mBCPOGbqmCDV/gGbXJd0qy5UqiuFpT29tG2ktYb5Bk5yexKgbXe7D Era5OhmBHs/VxLHk1WUCKmVANANIuqu286fKost94OH474WVs8Ft/L2Ym8TZYJt3D66eV3khY6PaC GVAOednQMtv8//9CBsbkak5rJeneyxqc/uE1M1fIu2+uAEXAagH2JhYUidE4qfP9uhoDE2mBgeykt 49xrva9ww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7KRL-0005pS-Ic; Wed, 03 Feb 2021 15:51:35 +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 1l7KRI-0005oE-Ua for linux-arm-kernel@lists.infradead.org; Wed, 03 Feb 2021 15:51:33 +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 F2D7311FB; Wed, 3 Feb 2021 07:51:23 -0800 (PST) Received: from [10.57.35.108] (unknown [10.57.35.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B4913F719; Wed, 3 Feb 2021 07:51:22 -0800 (PST) Subject: Re: [PATCH V3 04/14] coresight: ete: Add support for ETE sysreg access To: Mathieu Poirier , Anshuman Khandual References: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> <1611737738-1493-5-git-send-email-anshuman.khandual@arm.com> <20210202175241.GC1536093@xps15> From: Suzuki K Poulose Message-ID: Date: Wed, 3 Feb 2021 15:51:09 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210202175241.GC1536093@xps15> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210203_105133_054128_10BB70EB X-CRM114-Status: GOOD ( 18.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: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, lcherian@marvell.com, 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 2/2/21 5:52 PM, Mathieu Poirier wrote: > On Wed, Jan 27, 2021 at 02:25:28PM +0530, Anshuman Khandual wrote: >> From: Suzuki K Poulose >> >> Add support for handling the system registers for Embedded Trace >> Extensions (ETE). ETE shares most of the registers with ETMv4 except >> for some and also adds some new registers. Re-arrange the ETMv4x list >> to share the common definitions and add the ETE sysreg support. >> >> Cc: Mike Leach >> Cc: Mathieu Poirier >> Signed-off-by: Suzuki K Poulose >> Signed-off-by: Anshuman Khandual >> --- >> drivers/hwtracing/coresight/coresight-etm4x-core.c | 32 +++++++++++++ >> drivers/hwtracing/coresight/coresight-etm4x.h | 52 ++++++++++++++++++---- >> 2 files changed, 75 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c >> index 9edf8be..9e92d2a 100644 >> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c >> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c >> @@ -114,6 +114,38 @@ void etm4x_sysreg_write(u64 val, u32 offset, bool _relaxed, bool _64bit) >> } >> } >> >> +u64 ete_sysreg_read(u32 offset, bool _relaxed, bool _64bit) >> +{ >> + u64 res = 0; >> + >> + switch (offset) { >> + ETE_READ_CASES(res) >> + default : >> + WARN_ONCE(1, "ete: trying to read unsupported register @%x\n", >> + offset); > > Alignment > >> + } >> + >> + if (!_relaxed) >> + __iormb(res); /* Imitate the !relaxed I/O helpers */ >> + >> + return res; >> +} >> + >> +void ete_sysreg_write(u64 val, u32 offset, bool _relaxed, bool _64bit) >> +{ >> + if (!_relaxed) >> + __iowmb(); /* Imitate the !relaxed I/O helpers */ >> + if (!_64bit) >> + val &= GENMASK(31, 0); >> + >> + switch (offset) { >> + ETE_WRITE_CASES(val) >> + default : >> + WARN_ONCE(1, "ete: trying to write to unsupported register @%x\n", >> + offset); > > Alignment > >> + } >> +} > > The etm4x_sysreg_xyz() equivalent of these use a pr_warn_ratelimited() rather > than a WARN_ONE(). > > With that: > > Reviewed-by: Mathieu Poirier Converted to pr_warn_ratelimited() to both instances and fixed Alignment Cheers Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel