From patchwork Wed Sep 11 22:24:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colton Lewis X-Patchwork-Id: 13801167 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 04ABCEE57DB for ; Wed, 11 Sep 2024 22:27:32 +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=98KHHfZAU1dotPbU8K3avps0YbHY8rCmN7CSHv68LAQ=; b=NuqWN+zshtgwg0nXqD+AvwIt4V gqLSf2mbl+aa8L0Fetix8MgpnocSKCY3dvdf+nJJYZYhe8zXCikxsxJhbKBngb2gv5iw07nw2Ty1i ZNBlQYOvJQctQ+PwVelcb0UBqTZMhMcamDDe4sdTNX0dLBpG0ScC4BC4YaE+oHxbeQ3cmT/kYi/+k kiI5Ket3GOJlw1jFUEWT+lidjFsSbh+zmGdkwJJlFkfhNOi6xIye9oBebezSaTM6tKT2/SbRnMPOM Lx4mQh/e6y12YLoDxAMqynuEwXlIhGYWa5vvuGOx1Jj980WGsHjQ+tf4NxaZPlgtrG3bib/ru7xtB X8tzlWkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soVo3-0000000BBcr-2YBP; Wed, 11 Sep 2024 22:27:23 +0000 Received: from mail-il1-x149.google.com ([2607:f8b0:4864:20::149]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soVlv-0000000BAyB-3M0U for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 22:25:13 +0000 Received: by mail-il1-x149.google.com with SMTP id e9e14a558f8ab-3a050af2717so7248205ab.0 for ; Wed, 11 Sep 2024 15:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1726093510; x=1726698310; 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=98KHHfZAU1dotPbU8K3avps0YbHY8rCmN7CSHv68LAQ=; b=jb7IHP16DE/EcWiACuyCB5mgm99rEqzG7sfUBQZT+aaV9Rbl6nE1w4h1t4dHCsL3jW 46au2MvrVCIAz44ADcUx61r9jC7f5JRjXuW6ljJb2w1D4RVPp14xpyUtcQE677DRXOKc nNh0+N1qV8GCCGmvFKWg3e7iAU01LM2TqZaKurJOtgefJxZVLHlaLweRd6FtABl4ghRY rUl3g14ZGa7JR1Tc9P6xEt166nvEBXdzhalI8KyyaAOeEhUZXDPqcAvL0EeLKuQso1YS TDAK8pIDFdShUmxS6+zkjzistsclKFQwXReeoAGFAUATPd1rzRkk6CeLQsC9TikuclPV umZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726093510; x=1726698310; 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=98KHHfZAU1dotPbU8K3avps0YbHY8rCmN7CSHv68LAQ=; b=jFxBDRkNTr3Wiwa6/UCS1NlHiEmn5j9v4+oo6qLILF0FCuuM32zEE9feN6TWaG54If y7nceHbNpfoGwDXoxQ8SbiGHQVVjZTiStCXqqOm/nfeDXiJtkH4DxSG3B3udFupsacy8 aar9CSkxJCldxjX7H8+hHDA56AWGSjlWVxJ0AxKwXz6XBUREUToszznjeSwKm3HNZRiw 6U7ufej987SNKv8gbUfBX1tEh29nXhARkxbXIwdQuJ11qD/6/WcxkIbuzgVWYkxHh4JN +L7hpYfBQphqa7bvFxC2kTN7gqwITMCD3vfxM7YUbZM23Hy5+8mS1gwUn1pC51sfM75K yhbg== X-Forwarded-Encrypted: i=1; AJvYcCUwtG5Z86ttLR6kvFFGZZmHp+aUv37T+ITbwCwx6+CGMFv9K3SO6KL6O7Tuw9IPziVZpyDZVD8zgDxVy6FMDwoh@lists.infradead.org X-Gm-Message-State: AOJu0YxGGfMuSkHl7cdr78EAhRIwZAuah/A7eiBHVEU0xZWG8DTMejoS EySHnmFgcmB/d6faGEyyCzzKEqHrVLLWdv/x1lfW+yNi6F9J89Bc5sCW9/9oRAkwPZUSyrTH5rP a39gbEQtN3B/uz+vSth0oQw== X-Google-Smtp-Source: AGHT+IHezO/FS6DrvjzqydPLEapvMWYoVJd9AX1NthmyW6WKSgM57sEvRhPyRtAfj2mQLXNB4v5VRUm4UvpIqG0BYA== X-Received: from coltonlewis-kvm.c.googlers.com ([fda3:e722:ac3:cc00:11b:3898:ac11:fa18]) (user=coltonlewis job=sendgmr) by 2002:a05:6e02:1c48:b0:39f:549d:e39d with SMTP id e9e14a558f8ab-3a084967570mr302085ab.5.1726093510446; Wed, 11 Sep 2024 15:25:10 -0700 (PDT) Date: Wed, 11 Sep 2024 22:24:28 +0000 In-Reply-To: <20240911222433.3415301-1-coltonlewis@google.com> Mime-Version: 1.0 References: <20240911222433.3415301-1-coltonlewis@google.com> X-Mailer: git-send-email 2.46.0.598.g6f2099f65c-goog Message-ID: <20240911222433.3415301-2-coltonlewis@google.com> Subject: [PATCH v2 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-20240911_152511_863043_E68FFB53 X-CRM114-Status: GOOD ( 11.71 ) 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.598.g6f2099f65c-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; -}