qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Daniel Henrique Barboza <danielhb413@gmail.com>, 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: Fri, 18 Feb 2022 09:17:09 +1100	[thread overview]
Message-ID: <4256be2c-ff77-e4a2-1cb6-0e750a988618@linaro.org> (raw)
In-Reply-To: <20220216101102.179158-3-danielhb413@gmail.com>

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.


r~


  reply	other threads:[~2022-02-17 22:18 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 [this message]
2022-02-24 20:14     ` Daniel Henrique Barboza
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=4256be2c-ff77-e4a2-1cb6-0e750a988618@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=farosas@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).