From patchwork Fri Sep 20 17:47:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colton Lewis X-Patchwork-Id: 13808682 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F10742A8D0 for ; Fri, 20 Sep 2024 17:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726854470; cv=none; b=Gv7c27JKUlabkiWK85T+x/Je6rQL+8PcQn8H4ifgVP8sk4r8dyqEx3i+4E6cKlokGbVbAQQXK80C30tR9i7ZycHuAMoSWT5EvaxmNzv3L7GKA8/oPwh5LYVkYJzbX9LBggsyjGYtIiaIDH3ow3gyDUxqxXZY8LhSxf1p76ENO4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726854470; c=relaxed/simple; bh=5Y45c2QmHSpUy9kSzxpEB6TrwN4M0m5LC0e0soV2VJE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=lbYUAhjOUKcXe8udMqr+efLgT62PFnIHwrIxDIn3oGOfUIAuLeauhFF4EwY6JzTwd7zbJK87CmCxQKhFccnGUPxy7yZtp39KjOVsQ7rI7OmNA1J3MLg82D6iY1n4h/4E+tPPxNsv0jZIkBa7nehCet3rVowaU0nOksRoMRA6CPk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--coltonlewis.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=W4AvqX/g; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--coltonlewis.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="W4AvqX/g" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6ddc768e85aso43981397b3.1 for ; Fri, 20 Sep 2024 10:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1726854466; x=1727459266; darn=vger.kernel.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=1u8+tIRQu1/+Yzznd3YfSwPNzKiT5HV8vjSuz+hJEoI=; b=W4AvqX/g9xib5+DB7/3LXIaZ0vSiDVwNo3zRdplKjy+BoOq96+F6sOL1MwiswEOq6h nF+ae3WV5OGpTbdH8yDx5PwwKAHWv2gVXDqlg690yHh3laQ5y690IlisYe7Z4fsIIAxz NaaxBLRSGwneDHZ2qmBrMO8pfZt7pnXUW+PvzDH/x3qHI5+j1On3x0Ak4fQIHz1SjVE8 jTPXkal1O4M4lHp1JVGSjzYZ5BJgdzRxSz/4sJPjspG2ktLlyKp0Y2rV1kxh8rZl4nGQ LqsQ3Ge7z2KdrqdFexdwZVbCdoTNbGyV+GOtepkGkejWFZxfmrBRyZowFs3xodHQEUA4 MvVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726854466; x=1727459266; 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=1u8+tIRQu1/+Yzznd3YfSwPNzKiT5HV8vjSuz+hJEoI=; b=kEMm0fq1gu/vy2NXMJVBxN94d6EIB7BpasbL9BikIm2XggtoWODRvi5aQRu1ZsnBtx FjJU2WjdVSFbWv3F05aMuC2RTINUwUtWsFm1Dj5sVE3uqeVDqz1nC7rkHKbCkqHquC4W cH4fXahTjWrM8szaFoEzvZ+b99hzxQCilgzzWmGNn1OW1IQT8ngT81ugib+hblLvoBVk UY6HtsnRB4GBQmucQJRCkyrzFVzTVlOPOV5EA0QSVTtqBwBBNu7kgPZ+CzAa0vS02KRF luaFAvj7QzoTfcvdx2WvvnGjQAzJWoOGybqWIQWBS4G0XP/tgEuDSwiB9FVenMlPR5Ih L28w== X-Gm-Message-State: AOJu0YxY0HT5oh2Ak325vF19ZimNOklZGHwT5kA1GOpWMgIGIQbTO3La rM8nRxQs98oFXfi4jFxkJjH0u/S41dUnCap57lBPY2aUPNJ5ZUTbzDD/Bm8A5vjZd0FYXrMqqkS KcGHBuByPwkgY3qa+PYPl7jqxhNoZm5DjFygTyF63PN9c1ZxZxIjLow9ySI9nBAHykUQMW/nAWO x+t+1l9NDef9FuX9FT6Kri5pf2psjG85Hgx4M4bENc6cwrkdOYZOtrxBY= X-Google-Smtp-Source: AGHT+IEMZpgFL+UVav7e6/78nxxqsZh8RtB34P8KhO4E9lrAtqCCPkLcHN7A2NJ63pZVH3cqvvVs3DKnxU1JZod0ig== X-Received: from coltonlewis-kvm.c.googlers.com ([fda3:e722:ac3:cc00:11b:3898:ac11:fa18]) (user=coltonlewis job=sendgmr) by 2002:a25:c503:0:b0:e17:8e4f:981a with SMTP id 3f1490d57ef6-e2250cd6079mr6801276.11.1726854465133; Fri, 20 Sep 2024 10:47:45 -0700 (PDT) Date: Fri, 20 Sep 2024 17:47:36 +0000 In-Reply-To: <20240920174740.781614-1-coltonlewis@google.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240920174740.781614-1-coltonlewis@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Message-ID: <20240920174740.781614-2-coltonlewis@google.com> Subject: [PATCH v5 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 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 --- 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; -}