From mboxrd@z Thu Jan 1 00:00:00 1970 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 DF884CD5BA7 for ; Thu, 5 Sep 2024 10:26:37 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From: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=hGydPClaVhqw2S5vCswOCjjVlmQnbG3pYGIShOaVj2I=; b=qlVnIZjLqKsEOVzODsuGMm78qJ MNAzGuDOS75uEEmC1Mw6TCGU1rycDR6LER870cX7WbOaLglgPbCCyzQXHUUrScO1WLvRTYKXTyCI4 1n7uulfMxsFcAIyL2mI9C2HnmnpumkVEuvVtuPwQai2XLO6UJxm7NjilCrKb47Wf0ufHVoV5bfjMY R1eoqeQuPsB1CND+kqQuexUWhEOknCtXLb1wj7gVCvdTSX2R+bRZilG8yZUho2umnBFaZe587bzWB 4DRCa+2ZLPWSLLqJrugvZ6ohYgXge+DB5+2GIT4/LB9O9KZe11PwYCcW/01VQ9BX8D8Skoo4QZefm WbeSvtrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm9h4-00000007wqq-0dN7; Thu, 05 Sep 2024 10:26:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm9g3-00000007wbI-1CsL for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 10:25:26 +0000 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 06AA5FEC; Thu, 5 Sep 2024 03:25:49 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BBA503F73F; Thu, 5 Sep 2024 03:25:16 -0700 (PDT) Date: Thu, 5 Sep 2024 11:25:10 +0100 From: Mark Rutland To: Colton Lewis Cc: kvm@vger.kernel.org, Oliver Upton , Sean Christopherson , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , 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 Subject: Re: [PATCH 1/5] arm: perf: Drop unused functions Message-ID: References: <20240904204133.1442132-1-coltonlewis@google.com> <20240904204133.1442132-2-coltonlewis@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240904204133.1442132-2-coltonlewis@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_032523_454190_DFCB499B X-CRM114-Status: GOOD ( 17.87 ) 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 On Wed, Sep 04, 2024 at 08:41:29PM +0000, Colton Lewis wrote: > perf_instruction_pointer() and perf_misc_flags() aren't used anywhere > in this particular perf implementation. Drop them. I think it'd be better to say that arch/arm's implementation of these is equivalent to the generic versions in include/linux/perf_event.h, and so arch/arm doesn't need to provide its own versions. It doesn't matter if arch/arm uses them itself since they're being provided for the core perf code. With words to that effect: Acked-by: Mark Rutland Mark. > > 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(-) > > 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; > -} > -- > 2.46.0.469.g59c65b2a67-goog >