Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp145181rdh; Wed, 22 Nov 2023 22:43:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6Np4sdZ7/nSTemKHa1X5X/O4cMySQuQjgQGTiIGQoBR+4N94cf7kgk8C1asV77HLJ/KgW X-Received: by 2002:a05:6a21:3008:b0:18b:480:a0f3 with SMTP id yd8-20020a056a21300800b0018b0480a0f3mr3763877pzb.4.1700721831910; Wed, 22 Nov 2023 22:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700721831; cv=none; d=google.com; s=arc-20160816; b=tv+TyB/0U4cyhJ+Wn7ZbaXOyEwpMv+zNRcnS/Wlcm2VlQ3R0K+6UqnmoQCkdP9xGGq FqavnAdTUvgZU7RU+mAV5Zic2NWF0Wdp73icYAbK75f5lJU1LSzX0URwncnmZT18vWPz xkCuA7yfc48SDATduO0Kgb6+yB7JpdQ1puvxo6Ib54gyioGr88hxB3jLpAkcUdUH87a2 NZml96obgSI1yocJnCp+Ejc4GGEH1kc6WT8w+X/XL5FSyw7o6aapSJzUz5vq2jFArbTi kcYC5Gg+rOkE3B5+DOBzGzNtm5X3JY+CcFlMt7VS7II/tM1wJ8mcN0v1Rn7sQxsTj1Ty h+fA== 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:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=0Y6v5Xhwln7tu/9zxftOsUtL05MptTTj1UHVhZFfC54=; fh=weuZcaEu/Jf8h6ZHBic6To9l/09CcRkFinAbk2uMz0s=; b=qTHQaj8MKRtHpDoXQACOHycXDphWAEf5fSKqa2/zCCbLO+96VrVV06HLbZ+AVHRFjb dwh2jtr5EPqP005Ah7D+Qzf3nENGOMmVX+YDg+dka3OTrhJbQOQ7Mfcry/IhgYNRbNJO 7ORh/o35iZhMgxJ0DXeb7L9td+Qg/6r8MskprQq8X75mxPzcq6/ZV1yhatyoFeCg3A8i wTbXOEGg3S03c/Dmzg7MzrPo2Odc0soGumWA/Cm28HIjrNOVttBHH4XnxafS8pt3ZSBi hMU0h8fOGwxzQrb6kFMiHLKfkfGn647LGa45/b/yvRS+Zg2gBDu6McjQg/F9hXy/obyg 5iDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BC3KbxyY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id hg22-20020a17090b301600b00280a4766eabsi732008pjb.114.2023.11.22.22.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 22:43:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BC3KbxyY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id E15D3807FD4C; Wed, 22 Nov 2023 22:43:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229737AbjKWGnT (ORCPT + 99 others); Thu, 23 Nov 2023 01:43:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232685AbjKWGnQ (ORCPT ); Thu, 23 Nov 2023 01:43:16 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D07F112 for ; Wed, 22 Nov 2023 22:43:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700721802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0Y6v5Xhwln7tu/9zxftOsUtL05MptTTj1UHVhZFfC54=; b=BC3KbxyY1cqWZHExLgz5VzrUmHGWFze0yQzZNNjt96zxXpMgdGteh1fzFufC++tZZI2v7d MZI2Zr8baoMJcwtrvTWetFhx8RZ37zeV84zS+IbUn1mlzHwNM9DS4iSkd1SGutJmJDl0hM vYy1yOpDvSJyvYFeUQ5aYBA5HINYyOY= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-401-BqVzwA5QM0yqoEDGqaRxug-1; Thu, 23 Nov 2023 01:43:21 -0500 X-MC-Unique: BqVzwA5QM0yqoEDGqaRxug-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2800fffc08eso168480a91.0 for ; Wed, 22 Nov 2023 22:43:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700721799; x=1701326599; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0Y6v5Xhwln7tu/9zxftOsUtL05MptTTj1UHVhZFfC54=; b=drdvimiQZa29aLpK6CdxcXlQLYZHPeB4227bn0RX3w9fQmW+O0WNvJXqNBQ7h/W6tF /R5wI9biMZYC7HSJ8TEr6Z22wYEu0P870iAlIXE+RsfXocxP+9NwzPjlQMs0NVzEJHuc HWL/0VzFnEigc9yO9fgG7rUY7peN6T0nYansgV77TUqZIMriBwzD90KsCJQhWQj8vFw9 j+bqAusO4GS0h+OIPLYo2qIB5A4sG0PxRADliNhDRA2+ZvlJtkBdlTDIg7WhVbFScS9q dp+m3jFBKtKFf1KPkjop5JYX4wnqBNhqAvwWdfuFMYcrMfGLf6895Ov6dA3WLJRouXPt +tWA== X-Gm-Message-State: AOJu0Ywjau2uidYRooXT7F6JMyvCUnfed1uDkrHNNjdKZBQ7QepRXyZ2 Hm01P3WOp+XUuqIWiiw7uVERnck2GTF88dffE3zhUs4Ue9r9YMABjrI7BznO74/IQLwQ16jVV7o U47acJUDjXUSWIFVDmE2rArxTcbHh5+w61+RBrA== X-Received: by 2002:a17:902:d486:b0:1cc:3c2c:fa1a with SMTP id c6-20020a170902d48600b001cc3c2cfa1amr5191037plg.4.1700721799477; Wed, 22 Nov 2023 22:43:19 -0800 (PST) X-Received: by 2002:a17:902:d486:b0:1cc:3c2c:fa1a with SMTP id c6-20020a170902d48600b001cc3c2cfa1amr5191028plg.4.1700721799075; Wed, 22 Nov 2023 22:43:19 -0800 (PST) Received: from [10.66.61.39] ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id a4-20020a1709027d8400b001c9d968563csm538754plm.79.2023.11.22.22.43.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Nov 2023 22:43:18 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2023 14:43:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] KVM: selftests: aarch64: Remove unused functions from vpmu test Content-Language: en-US To: Raghavendra Rao Ananta , Oliver Upton , Marc Zyngier Cc: James Morse , Suzuki K Poulose , Paolo Bonzini , Zenghui Yu , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20231122221526.2750966-1-rananta@google.com> From: Shaoqin Huang In-Reply-To: <20231122221526.2750966-1-rananta@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_SORBS_WEB,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 22 Nov 2023 22:43:49 -0800 (PST) Hi Raghavendra, Those functions might be useful for other pmu tests. Recently I just wrote a pmu_event_filter_test[1] and use the enable_counter(). There may have more pmu tests which can use the helper functions, so I think we can keep it now. And in my series[1], I have moved them into the lib/ as the helper function. [1]https://lore.kernel.org/all/20231123063750.2176250-1-shahuang@redhat.com/ Thanks, Shaoqin On 11/23/23 06:15, Raghavendra Rao Ananta wrote: > vpmu_counter_access's disable_counter() carries a bug that disables > all the counters that are enabled, instead of just the requested one. > Fortunately, it's not an issue as there are no callers of it. Hence, > instead of fixing it, remove the definition entirely. > > Remove enable_counter() as it's unused as well. > > Signed-off-by: Raghavendra Rao Ananta > --- > .../selftests/kvm/aarch64/vpmu_counter_access.c | 16 ---------------- > 1 file changed, 16 deletions(-) > > diff --git a/tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c b/tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c > index 5ea78986e665f..e2f0b720cbfcf 100644 > --- a/tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c > +++ b/tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c > @@ -94,22 +94,6 @@ static inline void write_sel_evtyper(int sel, unsigned long val) > isb(); > } > > -static inline void enable_counter(int idx) > -{ > - uint64_t v = read_sysreg(pmcntenset_el0); > - > - write_sysreg(BIT(idx) | v, pmcntenset_el0); > - isb(); > -} > - > -static inline void disable_counter(int idx) > -{ > - uint64_t v = read_sysreg(pmcntenset_el0); > - > - write_sysreg(BIT(idx) | v, pmcntenclr_el0); > - isb(); > -} > - > static void pmu_disable_reset(void) > { > uint64_t pmcr = read_sysreg(pmcr_el0);