From patchwork Wed Nov 22 22:15:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghavendra Rao Ananta X-Patchwork-Id: 13465487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C7B5C27C40 for ; Wed, 22 Nov 2023 22:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: Mime-Version:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=T9bR97XLcgqbkaLBeBBMNyWLZghp6XfKFCsVv8iEjQQ=; b=JOe kxTfsGezytScQ16lYU6eY5kWivgf7x9HCi026Pe1Dw1lQ72b6u5tNr1iRtrQ8ao64rVb2pvE/nGMh RMIHDa0XHoSxjvJAywV9R4C7z43k2GnaRbgM4EqCmDPkO1WNmi2uPKZiFq2nCv6HNvgl01ZjnRAWb wP9/KA/NF9XBHFwyZnfAxA/tpzES6zjuEYPMM55WCD2yoD8Ah+fJrl+TCi0HRGuSyROE2CZbibGp0 ojXOoB41K9YONU1ZFj8dNXzy5jTCkl9HvN7/e1YtdBzT3xEmVVLv1nY8zVNHlW8Rca7Txs9M/iEDd 8ZSrgI4owtpYqTL4Dc3q6wNDtLY8zLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r5vVQ-003BVO-0Q; Wed, 22 Nov 2023 22:15:36 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r5vVN-003BUT-1T for linux-arm-kernel@lists.infradead.org; Wed, 22 Nov 2023 22:15:34 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-da04fb79246so297889276.2 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=lists.infradead.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=rHQ5lVYi4/2MX2skoChLDy6Ocqhy29V3zUGeEPzVvPk=; b=Rg21p0R/TW/ew+Ixki5uOFfpAbdKLdbOTj8yWBz3VM/7LTUcSSjoC7bYtq3lC745Y+ kIQAYVmIHJcMPFqH/JZV3+PR6v3qqNPkZXE+1LGN4UrZlH/UEfUsuW54PVKNmRVs//Qz bMBVO3w9CDXge/mRk4uxWIcb5R/Jc1WZ4tqTzUsLPGNusjeHHFHSmamU1mcvUtRhPNyA 86BKNVLPyNWCXQVw+9oN3idd3qw+U79kK0xI6VmLXuIAKl65hrxcr1cynCmrEq7kuUi+ vWpOnsLs6HKAY3peuVZVsfEyPi4mTlMEz0IhTTB9LAqxAZasqRA7dukhv4VdKck8ltUO oWZw== 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=YkdnJzeOUU9kRx7r1Gho/IBPhY1ND5ZjnYqo5gz3YYD6IlGoct837ecHqrsu8g4Ad6 QhvE3RsqhJhKjZtGH20EPfnKwhWMDP1eGEKq7yJYmc1TxcC3i5mQ5p8d2bhVveIlnWV7 UxknS6+0L289qrcj4L8THWxgpX1z3nU4XG6513yYI6Su69umBpD+gk9wqQEsZ7ZgfXss Mp5Cps+UKzDQI2wOsdqYkloDMkcqQONcx+vbYahmpS99L5Pu+zPqkDawUW6DQ4ftRB96 kjx/IVPNn8BJHIF59TZ/SyG1t44kg1hsyCgxUGbnj7TH39cEvoQJm7kRC0Leq8OFVduF D+mw== X-Gm-Message-State: AOJu0YxvTXqxfUArqc+WaDo20sMOh6KMBiuGNmf7wpSs9ff6eXKCsC+Y PtcWzhDA1Q6Cr0ztGjLjjyw3rI89cda0 X-Google-Smtp-Source: AGHT+IEKPFb2EHSzpX16MEr8UpukYHRCQvq4K7GrE1lzHEciYPJMeZQvd7fCFY+au119NI7M63atWhaudwtg 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231122_141533_498178_DF8BE3B1 X-CRM114-Status: UNSURE ( 8.90 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Zenghui Yu --- .../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);