From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: mpe@ellerman.id.au
Cc: kjain@linux.ibm.com, maddy@linux.vnet.ibm.com,
linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com,
rnsastry@linux.ibm.com
Subject: [PATCH] powerpc/perf: Fix power_pmu_wants_prompt_pmi to be defined only for CONFIG_PPC64
Date: Fri, 14 Jan 2022 08:43:55 +0530 [thread overview]
Message-ID: <20220114031355.87480-1-atrajeev@linux.vnet.ibm.com> (raw)
power_pmu_wants_prompt_pmi is used to decide if PMI should
be taken prompt. This is valid only for ppc64 and is used
in CONFIG_PPC_BOOK3S_64 context. Hence include the function
under config check for PPC64
Fixes warning for 32-bit compilation:
>> arch/powerpc/perf/core-book3s.c:2455:6: warning: no previous prototype for 'power_pmu_wants_prompt_pmi' [-Wmissing-prototypes]
2455 | bool power_pmu_wants_prompt_pmi(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 5a7745b96f43 ("powerpc/64s/perf: add power_pmu_wants_prompt_pmi to say whether perf wants PMIs to be soft-NMI")
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
---
Note: Address compilation warning reported here:
https://lore.kernel.org/lkml/202112220137.X16y07Dp-lkp@intel.com/
Patch is based on powerpc/merge
arch/powerpc/perf/core-book3s.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index a684901b6965..b7160fae58c6 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -2452,6 +2452,7 @@ static void perf_event_interrupt(struct pt_regs *regs)
* could possibly return false if only events are being counted rather than
* samples being taken, but for now this is good enough.
*/
+#ifdef CONFIG_PPC64
bool power_pmu_wants_prompt_pmi(void)
{
struct cpu_hw_events *cpuhw;
@@ -2467,6 +2468,7 @@ bool power_pmu_wants_prompt_pmi(void)
cpuhw = this_cpu_ptr(&cpu_hw_events);
return cpuhw->n_events;
}
+#endif
static int power_pmu_prepare_cpu(unsigned int cpu)
{
--
2.33.0
next reply other threads:[~2022-01-14 3:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 3:13 Athira Rajeev [this message]
2022-01-19 11:06 ` [PATCH] powerpc/perf: Fix power_pmu_wants_prompt_pmi to be defined only for CONFIG_PPC64 Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220114031355.87480-1-atrajeev@linux.vnet.ibm.com \
--to=atrajeev@linux.vnet.ibm.com \
--cc=kjain@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=rnsastry@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).