Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp228711rdd; Wed, 22 Nov 2023 14:16:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFR3nCUl22s8irGQaaj6pXot5y4TkzvRlMAY6K52C9h9xEvaGr+PEJpgsj+TE+rOlsKbvHg X-Received: by 2002:a05:6a00:429b:b0:6c6:b5ae:15a4 with SMTP id bx27-20020a056a00429b00b006c6b5ae15a4mr4518601pfb.20.1700691407130; Wed, 22 Nov 2023 14:16:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700691407; cv=none; d=google.com; s=arc-20160816; b=hvMMwA7y40vtHeWWvMXlQTyveduYd7M+yRC18C4GfBts2nYYy0+eEAuNzxMJfVbX1S aaloXwtFkOw0ns/sB1pwtq8NkP87y/K6WDp09SA0PakTQ8+4Qf59KZep/1wtxtPWxIkq kHGFeItx4A9sXd/v0H6GrjeknO4ZT1kbBka7/zh5KY6f56rTzGNCkg5KjERYIKekeCiw 2T0hxPTJBy6moO9WbiTTsAsKiGOY1hEjmK2PZLW0eIsS3eFuXnFOIwJSXML3gO0Pm8M8 WKiQOixa0Kv+trJLjhEnjDsI1KwMshIOd5yS0VAHCn2AXr4VrSUpxJ7jxBb429d060Fh IZGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=rHQ5lVYi4/2MX2skoChLDy6Ocqhy29V3zUGeEPzVvPk=; fh=KR9Vq+KR6LVo9T2+FVO4iMXsKFxXk6562bN25fp2HZk=; b=CYUXi9csp+C278Z/bkaqZR+PFLq1O8kcUBiRn4J/AQiwz6N5mVsLHrNUGds4HsCqHd Xc6D9NzU1qy+9jGls90sJ3S8gNX7IRn/2gdnAqEG5YLKJ9Z2XUVCHELxZ8gVeJFOomTL pDuEpa8zy8HypP0kfAcnEmFKt4rVUTx8u48+FWic1/4xJB5ybIFfJXswG0/nLf9cvpBb 6WhJdOsYiWGeJxjQs8gAPeaczDJCLgVUmwbXyDfg+s8MqbDGs6K9wGBazLawX4pn4rSw ooph6NYEjSepB2TuJuvGsAL4hBOcBmLbdoA2VnSfNhIqMb/K4YlWgLLX3rEO+YiTXrE1 I0Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4nje9Ql0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bq14-20020a056a02044e00b005b91518ab92si6537pgb.671.2023.11.22.14.16.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 14:16:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4nje9Ql0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 35962837848A; Wed, 22 Nov 2023 14:15:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343586AbjKVWPg (ORCPT + 99 others); Wed, 22 Nov 2023 17:15:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233574AbjKVWPf (ORCPT ); Wed, 22 Nov 2023 17:15:35 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACCE9B9 for ; Wed, 22 Nov 2023 14:15:31 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-da033914f7cso323441276.0 for ; Wed, 22 Nov 2023 14:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700691331; x=1701296131; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=rHQ5lVYi4/2MX2skoChLDy6Ocqhy29V3zUGeEPzVvPk=; b=4nje9Ql02zOsTvSoAPAvpOBNu7wg0GEhOvHpvYlYXOFidCjelO2vDEHo7qUJZ9VTU4 xgnyqJZhshN0b1WfZk+ZvPvShKSbvthyw0HEKtWDGAGg6nfn9KXeCHkg4u9WSbMYyUvr y0Fb+1bawhV8YtiH+tJ2MbrucEmYDruXoV0kME455LZd5F91cm+YJ9Nlclhs4d+PjCNs 9aa68yQMTXmq692YlD7PnPpZNjrWx5sgRnQB6urz2vIlE2+KzrxnueHo96POFFCrLxIP M5YQNxbP9XALPBXEYqzk8BuYqtAAUjfHcv6evKKrg5f7uLqj+05o/Ui+AvSaJFtG246X 6vLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700691331; x=1701296131; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=rHQ5lVYi4/2MX2skoChLDy6Ocqhy29V3zUGeEPzVvPk=; b=qifJxJgLY1neM1IOcbbXbxK0XLmV0wHpJLfOoPurnTaBKjELhTrcy1B40fa4K+KT62 wmVuKoCHnoV+2QdE0pMBWM6NHn9FnMI7P5AaEwYu0LpDdNiEzHu1fFSoMDESOKclmlFk 1u3vjm0d91vSO/aGDJfM3b+YPqZIFnlY2aB/m9sMBdqJ3gjem/xrFdC6mZycxbMr6obs 0ob4mbUISH3hMCo8NQrOe3SQeOINQguBjbepIKP3FEWZ18V1CMiCE5cKNefpljoAh1oL r3+mF1JlRbdAZMKBIQFobg1YNI72PSlCBtGro1NSRp6/KREz3cdoOhyCDmjVbeGJ5gHa YjIQ== X-Gm-Message-State: AOJu0YxYYR5cbICpbh7dLG2bIoXLwxfncbzJiGd6Eva4AnKppI6Qk4HQ PNfHViYPBLDV7lQHrGmLcSaLWQXuWTcP X-Received: from rananta-linux.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:20a1]) (user=rananta job=sendgmr) by 2002:a25:ce4e:0:b0:da0:c6d7:8231 with SMTP id x75-20020a25ce4e000000b00da0c6d78231mr109435ybe.0.1700691330951; Wed, 22 Nov 2023 14:15:30 -0800 (PST) Date: Wed, 22 Nov 2023 22:15:26 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog Message-ID: <20231122221526.2750966-1-rananta@google.com> Subject: [PATCH] KVM: selftests: aarch64: Remove unused functions from vpmu test From: Raghavendra Rao Ananta To: Oliver Upton , Marc Zyngier Cc: James Morse , Suzuki K Poulose , Paolo Bonzini , Zenghui Yu , Shaoqin Huang , Raghavendra Rao Anata , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 14:15:47 -0800 (PST) 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); -- 2.43.0.rc1.413.gea7ed67945-goog