Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2101240pxb; Fri, 25 Mar 2022 11:06:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhKlDzzfMngwGrH9k/eXJWj4RnqFBTRZhi1oPg5BfjH41oneyHBQmBv6PrpQcLKr20Xa/9 X-Received: by 2002:a17:90b:314b:b0:1c7:4a4f:6740 with SMTP id ip11-20020a17090b314b00b001c74a4f6740mr26171054pjb.145.1648231577180; Fri, 25 Mar 2022 11:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648231577; cv=none; d=google.com; s=arc-20160816; b=HqxcI3FSPhn/fJB4mbhOSwDPONgu62zd8MWDrdIFfsvWifOxbL/h3zNRlbHARXhuSq gVRyhx4vHiXKZEr7w2nZeM/bTZ/xudr49y/8IetV/zbqIgl8RmSXH0219O5woamkqFAm zA9lKiWBo2LYVgt5f/nswceJ/CuFm9n0OulflF4EL4fyCiI9vgXuE2LDuS9xxjPtJttV hU9MB9Y+mf8K/yr9vc4DWrUC+HozJgZful71xbAOWYMu0DFF2dpwOF6GkQDhdnsWfYP6 SE0tmM/slQIRpCHlV5VcJ7dOBHJUlu3mDlP+4GzsrykgxrzhYGa10oRa1mVIP4bD2reb YL5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0ulHoL7OIwlWwMsNlax5o/BnlVh8FB9CoqsjWS1NIE8=; b=kZtcdNEI77Y1yy5lvzUhjmc4XBhq2MOM6W4gGy32eLMO2joT9ZbRORxiD25zCtWgSO I9K042uXM2jSsNVyh3ardNTguw5ANGs0jIWGQk2Q8kOuWShfm+8HMUfLrxWaMQyPjV8f vL4a5jCNzNqTYps8CI8YvgsRcj9XXBqJjMQTvGcXFvptBSyjkqWwFUcY4QFFq1/V3nvd +N7E5ncVtp4R5KqF3Ld3jbrvVNZDtCRciDZ2iI8t6Vn0YXd22h5iyTSFVXlCHgf0M00W PE7tulCFnYhbzmII8q3Skxvhcr0Uj+TSpR72m0419LtEBqJIo0n9aGEejy2Y1OcVToCE 89Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AA48uIaV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n64-20020a634043000000b0038653753857si2723061pga.409.2022.03.25.11.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:06:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AA48uIaV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC5EF139AC2; Fri, 25 Mar 2022 10:40:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238834AbiCWQYd (ORCPT + 99 others); Wed, 23 Mar 2022 12:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238745AbiCWQYb (ORCPT ); Wed, 23 Mar 2022 12:24:31 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BC44BD6 for ; Wed, 23 Mar 2022 09:23:01 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id q5so2005467plg.3 for ; Wed, 23 Mar 2022 09:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0ulHoL7OIwlWwMsNlax5o/BnlVh8FB9CoqsjWS1NIE8=; b=AA48uIaVopl/FniL0faxLHf6fd+JuMKR7eZEPdLO7aCJNq8mS8hxHzns3L+vJTOsA9 CfJGqMZZJE2Wh/x5jEPZPLuSECYYXwJPuO/NyjxRd4kcfHdD7Gtl12QyWlzZJYDY56Sp yxIMkZ+Nz/l1vPvb0Eh9G8SRhb5ZI2yUZd6BB/bQFLGQfvaaDWajHuwQ85wxZyU8qE4J gY/gqlGTdaS+MZ9+IXSAOWE3bRHNkn1aHBK5+TIa6divXzosxnEV+eM9RA7DS40unhyO keqOeFNrcqA1TGCPQ/SY3QFV753BHvWpCw64PErzJTkKI3BE1ZVaHwpg5KQHzClDDkDx cV+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0ulHoL7OIwlWwMsNlax5o/BnlVh8FB9CoqsjWS1NIE8=; b=4wySoLHmaV9NWTOkmyleoq7JolasELIQ8ljhVo4/3xjgmAaYgItjeGUrkvbVdnzR7q tY0SnoG6YE1j8nvRMcCo3JbMNx9foni3Wx1iEqSZgL+zjbWQ1bNWkHa0eMI6SgGJg4U+ zCmt4A4HKC/ag87shzKXimqnhyeP+WAWQU1ljPrn1unHooO06VzGsTWzRa4liKLpJV41 fu7UdbXxRmH8p0TuirChb1foyXp4ubjdOE1NTUGNUVnDgi8QcDQlBgUvXNUJFEvWD9RE Feb9O3+migDyR941yURRA5SyIQD1TnGPPGVOuz7gJfPgGPOolsbHQ2vzXWQRlXO/IeGR QOvw== X-Gm-Message-State: AOAM533yS+1GHcf2A4j3Ho+eiDafocS0/VWFXNAEoHIYaUMsGVh+Z0hn rvfgNvpVw6sWPx1xM5itswM4BA== X-Received: by 2002:a17:90b:4c09:b0:1c6:f64a:dd0 with SMTP id na9-20020a17090b4c0900b001c6f64a0dd0mr480337pjb.45.1648052580940; Wed, 23 Mar 2022 09:23:00 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id 8-20020a056a00070800b004e14ae3e8d7sm384475pfl.164.2022.03.23.09.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 09:22:59 -0700 (PDT) Date: Wed, 23 Mar 2022 10:22:57 -0600 From: Mathieu Poirier To: James Clark Cc: suzuki.poulose@arm.com, coresight@lists.linaro.org, mike.leach@linaro.org, anshuman.khandual@arm.com, leo.yan@linaro.com, Leo Yan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 00/15] Make ETM register accesses consistent with sysreg.h Message-ID: <20220323162257.GC3248686@p14s> References: <20220304171913.2292458-1-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220304171913.2292458-1-james.clark@arm.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 04, 2022 at 05:18:57PM +0000, James Clark wrote: > Changes since v2: > * Implement Mike's suggestion of not having _SHIFT and using the existing > FIELD_GET and FIELD_PREP methods. > * Dropped the change to add the new REG_VAL macro because of the above. > * FIELD_PREP could be used in some trivial cases, but in some cases the > shift is still required but can be calculated with __bf_shf > * Improved the commit messages. > * The change is still binary equivalent, but requires an extra step > mentioned at the end of this cover letter. > > Applies to coresight/next 3619ee28488 > Also available at https://gitlab.arm.com/linux-arm/linux-jc/-/tree/james-cs-register-refactor-v3 > > To check for binary equivalence follow the same steps in the cover letter > of v2, but apply the following change to coresight-priv.h. This is because > the existing version of the macros wrap the expression in a new scope {} > that flips something in the compiler: > > #undef FIELD_GET > #define FIELD_GET(_mask, _reg) (((_reg) & (_mask)) >> __bf_shf(_mask)) > #undef FIELD_PREP > #define FIELD_PREP(_mask, _val) (((_val) << __bf_shf(_mask)) & (_mask)) > > Thanks > James > > James Clark (15): > coresight: etm4x: Cleanup TRCIDR0 register accesses > coresight: etm4x: Cleanup TRCIDR2 register accesses > coresight: etm4x: Cleanup TRCIDR3 register accesses > coresight: etm4x: Cleanup TRCIDR4 register accesses > coresight: etm4x: Cleanup TRCIDR5 register accesses > coresight: etm4x: Cleanup TRCCONFIGR register accesses > coresight: etm4x: Cleanup TRCEVENTCTL1R register accesses > coresight: etm4x: Cleanup TRCSTALLCTLR register accesses > coresight: etm4x: Cleanup TRCVICTLR register accesses > coresight: etm3x: Cleanup ETMTECR1 register accesses > coresight: etm4x: Cleanup TRCACATRn register accesses > coresight: etm4x: Cleanup TRCSSCCRn and TRCSSCSRn register accesses > coresight: etm4x: Cleanup TRCSSPCICRn register accesses > coresight: etm4x: Cleanup TRCBBCTLR register accesses > coresight: etm4x: Cleanup TRCRSCTLRn register accesses > > .../coresight/coresight-etm3x-core.c | 2 +- > .../coresight/coresight-etm3x-sysfs.c | 2 +- > .../coresight/coresight-etm4x-core.c | 136 +++++-------- > .../coresight/coresight-etm4x-sysfs.c | 180 +++++++++--------- > drivers/hwtracing/coresight/coresight-etm4x.h | 122 ++++++++++-- > 5 files changed, 244 insertions(+), 198 deletions(-) I am done reviewing this set. I will wait until rc1 or rc2 before moving forward. If there are other comments needing a respin then I will wait for the next revision. Otherwise I will apply this one after correcting the extra lines at the end of patch 15. Thanks, Mathieu > > -- > 2.28.0 >