Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp814090rdb; Tue, 15 Aug 2023 12:52:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvefxYMJRGxMYjliq/2ZThmP92Lirl1IknbnNGUMwijf4BZWCvOo77CXYZOzaTMDlici3v X-Received: by 2002:a05:6512:3e14:b0:4fe:a2c:24b0 with SMTP id i20-20020a0565123e1400b004fe0a2c24b0mr11544114lfv.26.1692129175824; Tue, 15 Aug 2023 12:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692129175; cv=none; d=google.com; s=arc-20160816; b=zZf3T2y56L0FQeaBhCdynhMyuRSNhHdyAgdPtRick0XSoL/7l0J4N76hjF7sN6lhIX EktuMFBBgdRLpQ4WsMAK7OEqvTpvKtB6oWNmybBYfj7PMZl5iVADTZSQAtDJMLfOWxn0 6tpJCVlTnMaLKM9xC6MohWNNG3PJtT3r+934SPJ70OFdc/8G+HmN9Tw8HoXlDsviw8ET I+92XWvvTmX5tX1KbM2ubLEhzCe5ZPcCdHXz91z1x/7WEys04sux5sziLBsycFPhY0W6 V9g/Tg9YjebsGDiJJMsTwj/vr5CNPQ3QRB8RXbaAxcXHBtBliD0Jq4n6TDyiRn2PVpWp 8dgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=wmiT1dgC3JFpr1gqULOp5XBSHJH5KT1NMdqXcFJmdV0=; fh=VCSz7ql7/lGyrtPMCIiEfNyNHI4q4EVZv3PxvY3U0p0=; b=E9CF0y1pyG960/vznU/v/pkU0VPsNNJ9n8x9WDVu75lIC64glfAsRXnEXNnO+JmuSD zF/VAvtOcmPVGU8kJDXjJlzdN+5QkLAOBK4/xcszS/iA1DLA9/wVB3NMe6KJ50o4VFa8 YTzbjuOHl9ZbsHqcKTItSk0adQfP+1pFqT2IYyEUMUNRXO3kE7ZuKCAL4ilaKHUYYYpA bCCRXWe9x15pe+gcN4p3QUWOR69xG8XGbBLagxOnXQ1FJ9MwoFrR4rrGTSAudnO5h21e hkIQILLTFwVWtxgtbTr9pLotgSczko+tgu2eeBiWVgVWFtoCSUkPJzjbd3gv8DCL6ZcA le4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rn5-20020a170906d92500b009889b69c1edsi9489942ejb.697.2023.08.15.12.52.26; Tue, 15 Aug 2023 12:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236408AbjHOKZJ (ORCPT + 99 others); Tue, 15 Aug 2023 06:25:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236394AbjHOKYg (ORCPT ); Tue, 15 Aug 2023 06:24:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2636810F2; Tue, 15 Aug 2023 03:24:35 -0700 (PDT) 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 35D871063; Tue, 15 Aug 2023 03:25:17 -0700 (PDT) Received: from [10.57.90.230] (unknown [10.57.90.230]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 60F193F762; Tue, 15 Aug 2023 03:24:33 -0700 (PDT) Message-ID: Date: Tue, 15 Aug 2023 11:24:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v6 1/4] perf: arm_cspmu: Split 64-bit write to 32-bit writes To: Ilkka Koskinen , Will Deacon , Robin Murphy , Besar Wicaksono , Jonathan Cameron , Mark Rutland , Jonathan Corbet Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <20230815063526.9022-1-ilkka@os.amperecomputing.com> <20230815063526.9022-2-ilkka@os.amperecomputing.com> From: Suzuki K Poulose In-Reply-To: <20230815063526.9022-2-ilkka@os.amperecomputing.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 15/08/2023 07:35, Ilkka Koskinen wrote: > Split the 64-bit register accesses if 64-bit access is not supported > by the PMU. > > Signed-off-by: Ilkka Koskinen > Reviewed-by: Besar Wicaksono Do we need a Fixes tag ? With that: Reviewed-by: Suzuki K Poulose Suzuki > --- > drivers/perf/arm_cspmu/arm_cspmu.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c > index 04be94b4aa48..6387cbad7a7d 100644 > --- a/drivers/perf/arm_cspmu/arm_cspmu.c > +++ b/drivers/perf/arm_cspmu/arm_cspmu.c > @@ -715,7 +715,10 @@ static void arm_cspmu_write_counter(struct perf_event *event, u64 val) > if (use_64b_counter_reg(cspmu)) { > offset = counter_offset(sizeof(u64), event->hw.idx); > > - writeq(val, cspmu->base1 + offset); > + if (cspmu->has_atomic_dword) > + writeq(val, cspmu->base1 + offset); > + else > + lo_hi_writeq(val, cspmu->base1 + offset); > } else { > offset = counter_offset(sizeof(u32), event->hw.idx); >