From patchwork Thu Sep 12 20:51:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colton Lewis X-Patchwork-Id: 13802672 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 B867EEEE262 for ; Thu, 12 Sep 2024 20:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To:From: Subject:Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qgNa1Xt6FnUSigDEF0LKTlfU3qkapsIsHTMTckjKajA=; b=PmzbThWW49FLLExOcMrPn9crop y5qzZ2PY/5DTPNj7pdWvnIEh1q/GhcSv4aSAGvNFja53r+PQ87Dp0CFOOJxNqVMv1dvKCFfNC+Vlw vE/CucayT5fvJfnNjCBYq9nmdR8+xe0+tl88TA8YWagphBIsDh00P8xYSjbT5giSxn6U5ebP4+yT1 NQkVCTQtk/qMMy78u8Y3ks+VUcHIvb9Ns3dJqc/2I1aMkm2y6XS6tFZBzDqQEPc4IDPi/DxPuKATv U86IFinZkJotiQ5DQwM0Mb1KWSnz/7L+IPnqCtkWMSwtqT72ewUBXuPlaVcJPs+aDpd8foD1+1sJx CVSm1VAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soqp7-0000000EDtA-33iX; Thu, 12 Sep 2024 20:53:54 +0000 Received: from mail-io1-xd4a.google.com ([2607:f8b0:4864:20::d4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soqmw-0000000ED9w-3EYF for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2024 20:51:40 +0000 Received: by mail-io1-xd4a.google.com with SMTP id ca18e2360f4ac-82cf30e0092so23857139f.3 for ; Thu, 12 Sep 2024 13:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1726174297; x=1726779097; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=qgNa1Xt6FnUSigDEF0LKTlfU3qkapsIsHTMTckjKajA=; b=dYRZAzawmRWTTqZ++ffs22WRAYpyfOSRb6XLYxNEbQlFfJxUrEJVwC5kQNuBiswt4R 1j+4Cpi1FaDpn/kkfGQq8i1Dv/U/Ynhz+bMjSww4KNv/jwYTtN/mY3Q+LVKMUdyN6QDu prnkfGrtJIIjXzTP2lHBBpvR02ddM6uwZarwqdHXj76zhTNSjgF2fX2cF6pcSCfRjGzg kCNtoUYZ4UenexVH8eQ+KaCdoMORL9EDtL0/j0wD5hivdmILFbj1v+iNyR/97nTfu0YH 3QxapykocD73r03JQlmuOmC3dVdRV4Ghs7x6es1vkEx8suvtw7fyFLRzosMOntrVZVA/ bVAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726174297; x=1726779097; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qgNa1Xt6FnUSigDEF0LKTlfU3qkapsIsHTMTckjKajA=; b=KQyXmOTIenysX6JKFussbttbadlhVwUC1CcAwDv1JfXSSJjoHXhrZdWjDaZNDrZ79x O4qt++UdjXIXu+bBneupZLpEM4X/3pTiTz/NTWy1QrBKjrz3MF0GMYaGebDZvkj5DKeb DsQPKw1sni8IVHZpzS8bNHX1QEcF4nZAWJBRP6Ni99+FI7UhJdo1lvw8MzOpnq0nF/4B 7MppJoASrDjjqQeD7g4yDmCj1szql6fWZnSx1PZk2EGHmMhkMZEmeSCVV6xaKQzCidPq Utltr5s0GggDoOM2fhODjwmtNtoeRbcYdpkjIuhuqAJ36dATMFmVmtZj658lZDOZtsOE 8TYg== X-Forwarded-Encrypted: i=1; AJvYcCVZutDPubB0ZsiTMxRPiVPVWCHOh+3oHiNjU/LbU9HUC5EIvKjvr/lxOwBNvI0Cdc6nUEe6HDv1fLvM3D4QwE86@lists.infradead.org X-Gm-Message-State: AOJu0Yyf5U1ClK+KvXYbyW19dMB7/kyDcRZDGpLFRIa5KjTKYfZw+lAJ bIQLdWhUQWSwDcNfyU+hma8YrbA2y56sIADOU/82hyEB5b5l8s5gg+2QRyfXHRsLUcY6CbgCMig qbx+aHtIdbAFymGA3Zdrm0g== X-Google-Smtp-Source: AGHT+IHFcuQ/5a/hhlw1GFJJYrc3if7U/QuDvmMiMeVXDMjRO3Gjmvd8L1tjO+zUGwBFmEAgEN40MjfIHW+YAT2pgQ== X-Received: from coltonlewis-kvm.c.googlers.com ([fda3:e722:ac3:cc00:11b:3898:ac11:fa18]) (user=coltonlewis job=sendgmr) by 2002:a05:6638:860c:b0:4d2:27c:18f8 with SMTP id 8926c6da1cb9f-4d36e33a768mr13751173.1.1726174297086; Thu, 12 Sep 2024 13:51:37 -0700 (PDT) Date: Thu, 12 Sep 2024 20:51:29 +0000 In-Reply-To: <20240912205133.4171576-1-coltonlewis@google.com> Mime-Version: 1.0 References: <20240912205133.4171576-1-coltonlewis@google.com> X-Mailer: git-send-email 2.46.0.662.g92d0881bb0-goog Message-ID: <20240912205133.4171576-2-coltonlewis@google.com> Subject: [PATCH v3 1/5] arm: perf: Drop unused functions From: Colton Lewis To: kvm@vger.kernel.org Cc: Oliver Upton , Sean Christopherson , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , Will Deacon , Russell King , Catalin Marinas , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Colton Lewis X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240912_135138_832195_4F705D6A X-CRM114-Status: GOOD ( 12.17 ) 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 For arm's implementation, perf_instruction_pointer() and perf_misc_flags() are equivalent to the generic versions in include/linux/perf_event.h so arch/arm doesn't need to provide its own versions. Drop them here. Signed-off-by: Colton Lewis --- arch/arm/include/asm/perf_event.h | 7 ------- arch/arm/kernel/perf_callchain.c | 17 ----------------- 2 files changed, 24 deletions(-) -- 2.46.0.662.g92d0881bb0-goog diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h index bdbc1e590891..c08f16f2e243 100644 --- a/arch/arm/include/asm/perf_event.h +++ b/arch/arm/include/asm/perf_event.h @@ -8,13 +8,6 @@ #ifndef __ARM_PERF_EVENT_H__ #define __ARM_PERF_EVENT_H__ -#ifdef CONFIG_PERF_EVENTS -struct pt_regs; -extern unsigned long perf_instruction_pointer(struct pt_regs *regs); -extern unsigned long perf_misc_flags(struct pt_regs *regs); -#define perf_misc_flags(regs) perf_misc_flags(regs) -#endif - #define perf_arch_fetch_caller_regs(regs, __ip) { \ (regs)->ARM_pc = (__ip); \ frame_pointer((regs)) = (unsigned long) __builtin_frame_address(0); \ diff --git a/arch/arm/kernel/perf_callchain.c b/arch/arm/kernel/perf_callchain.c index 1d230ac9d0eb..a2601b1ef318 100644 --- a/arch/arm/kernel/perf_callchain.c +++ b/arch/arm/kernel/perf_callchain.c @@ -96,20 +96,3 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re arm_get_current_stackframe(regs, &fr); walk_stackframe(&fr, callchain_trace, entry); } - -unsigned long perf_instruction_pointer(struct pt_regs *regs) -{ - return instruction_pointer(regs); -} - -unsigned long perf_misc_flags(struct pt_regs *regs) -{ - int misc = 0; - - if (user_mode(regs)) - misc |= PERF_RECORD_MISC_USER; - else - misc |= PERF_RECORD_MISC_KERNEL; - - return misc; -}