From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, clg@kaod.org,
Fabiano Rosas <farosas@linux.ibm.com>
Subject: Re: [PATCH v12 2/5] target/ppc: make power8-pmu.c CONFIG_TCG only
Date: Thu, 24 Feb 2022 17:14:01 -0300 [thread overview]
Message-ID: <7f068345-8d5c-ff6b-8445-c5471cec964f@gmail.com> (raw)
In-Reply-To: <4256be2c-ff77-e4a2-1cb6-0e750a988618@linaro.org>
On 2/17/22 19:17, Richard Henderson wrote:
> On 2/16/22 21:10, Daniel Henrique Barboza wrote:
>> static void init_tcg_pmu_power8(CPUPPCState *env)
>> {
>> -#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
>> +#if defined(CONFIG_TCG)
>> /* Init PMU overflow timers */
>> if (!kvm_enabled()) {
>> cpu_ppc_pmu_init(env);
>> @@ -7872,10 +7872,9 @@ static void ppc_cpu_reset(DeviceState *dev)
>> if (env->mmu_model != POWERPC_MMU_REAL) {
>> ppc_tlb_invalidate_all(env);
>> }
>> + pmu_update_summaries(env);
>> #endif /* CONFIG_TCG */
>> #endif
>> -
>> - pmu_update_summaries(env);
>
> It looks like you could remove all of the ifdefs if you simply use tcg_enabled() rather than !kvm_enabled(). If !defined(CONFIG_TCG), tcg_enabled() will be constant false, and the block will be optimized away.
Just tested and it works. Thanks for the tip.
I'll re-send with this change.
Thanks,
Daniel
>
>
> r~
next prev parent reply other threads:[~2022-02-24 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 10:10 [PATCH v12 0/5] PMU-EBB support for PPC64 TCG Daniel Henrique Barboza
2022-02-16 10:10 ` [PATCH v12 1/5] target/ppc: fix indent of powerpc_set_excp_state() Daniel Henrique Barboza
2022-02-16 10:10 ` [PATCH v12 2/5] target/ppc: make power8-pmu.c CONFIG_TCG only Daniel Henrique Barboza
2022-02-17 22:17 ` Richard Henderson
2022-02-24 20:14 ` Daniel Henrique Barboza [this message]
2022-02-16 10:11 ` [PATCH v12 3/5] target/ppc: finalize pre-EBB PMU logic Daniel Henrique Barboza
2022-02-16 10:11 ` [PATCH v12 4/5] target/ppc: add PPC_INTERRUPT_EBB and EBB exceptions Daniel Henrique Barboza
2022-02-16 10:11 ` [PATCH v12 5/5] target/ppc: trigger PERFM EBBs from power8-pmu.c Daniel Henrique Barboza
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=7f068345-8d5c-ff6b-8445-c5471cec964f@gmail.com \
--to=danielhb413@gmail.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=farosas@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).