From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B33E1741DC; Fri, 4 Oct 2024 15:14:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728054900; cv=none; b=FQe0B+xQZsECc+p2urxAxOLndHg3x2sq5axglqUigDwa7FBd34CG63JyBpOG1AgNEUahyzfgBfzYfvaDGTAt2/+IxIsV1ev4E8cfHdwFSu3Gh5kl1mbU7aEnHlhPyQw3yA9rB4KVIuF/e2xQ9nNzrWpuzQ9AdYVnKoxqS2euKHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728054900; c=relaxed/simple; bh=XuU41cUY651vrvEuIIokCiSfp8fKXEBCuJCdw/qwKDE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UH9XORg7JuVMWxuORrn2q8/8py6DWxLBvPbmDz9bxloSrkI7Mst9Yd8JzsiBFhVLVMgH+WiEOAWWE8CmTWmXOlnYzlnN0Y3h7MvPIXhZJApsklA4j6zd0IDYW9xr5Kd5Q+JECh/OLRoSPkr6vro+75GF+FscBCQRrNvoR0DZ420= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 C3131339; Fri, 4 Oct 2024 08:15:26 -0700 (PDT) Received: from J2N7QTR9R3.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 493D13F640; Fri, 4 Oct 2024 08:14:52 -0700 (PDT) Date: Fri, 4 Oct 2024 16:14:47 +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 v5 1/5] arm: perf: Drop unused functions Message-ID: References: <20240920174740.781614-1-coltonlewis@google.com> <20240920174740.781614-2-coltonlewis@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240920174740.781614-2-coltonlewis@google.com> On Fri, Sep 20, 2024 at 05:47:36PM +0000, Colton Lewis wrote: > 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 Acked-by: Mark Rutland Mark. > --- > 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.792.g87dc391469-goog >