All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Aaron Larson <alarson@ddci.com>
Cc: agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb
Date: Mon, 27 Jun 2016 11:36:52 +1000	[thread overview]
Message-ID: <20160627013652.GC4242@voom.fritz.box> (raw)
In-Reply-To: <201606241911.u5OJB05n006837@linux03a.ddci.com>

[-- Attachment #1: Type: text/plain, Size: 2360 bytes --]

On Fri, Jun 24, 2016 at 12:11:00PM -0700, Aaron Larson wrote:
> 
> Eliminate redundant and incorrect booke206_page_size_to_tlb function
> from ppce500_spin.c in preference to previously existing but newly
> exported definition from e500.c
> 
> Signed-off-by: Aaron Larson <alarson@ddci.com>

Uh.. sorry.. can you provide a reference explaining why the removed
version is wrong?  Doesn't this depend on which MMU Architecture
Version we're emulating?

> ---
>  hw/ppc/e500.c         | 2 +-
>  hw/ppc/e500.h         | 2 ++
>  hw/ppc/ppce500_spin.c | 7 +------
>  3 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index ee1c60b..0cd534d 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -601,7 +601,7 @@ static int ppce500_prep_device_tree(MachineState *machine,
>  }
>  
>  /* Create -kernel TLB entries for BookE.  */
> -static inline hwaddr booke206_page_size_to_tlb(uint64_t size)
> +hwaddr booke206_page_size_to_tlb(uint64_t size)
>  {
>      return 63 - clz64(size >> 10);
>  }
> diff --git a/hw/ppc/e500.h b/hw/ppc/e500.h
> index ef224ea..70ba1d8 100644
> --- a/hw/ppc/e500.h
> +++ b/hw/ppc/e500.h
> @@ -26,4 +26,6 @@ typedef struct PPCE500Params {
>  
>  void ppce500_init(MachineState *machine, PPCE500Params *params);
>  
> +hwaddr booke206_page_size_to_tlb(uint64_t size);
> +
>  #endif
> diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c
> index 225177b..22c584e 100644
> --- a/hw/ppc/ppce500_spin.c
> +++ b/hw/ppc/ppce500_spin.c
> @@ -32,6 +32,7 @@
>  #include "sysemu/sysemu.h"
>  #include "hw/sysbus.h"
>  #include "sysemu/kvm.h"
> +#include "e500.h"
>  
>  #define MAX_CPUS 32
>  
> @@ -72,12 +73,6 @@ static void spin_reset(void *opaque)
>      }
>  }
>  
> -/* Create -kernel TLB entries for BookE, linearly spanning 256MB.  */
> -static inline hwaddr booke206_page_size_to_tlb(uint64_t size)
> -{
> -    return ctz32(size >> 10) >> 1;
> -}
> -
>  static void mmubooke_create_initial_mapping(CPUPPCState *env,
>                                       target_ulong va,
>                                       hwaddr pa,

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-06-27  1:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-24 19:11 [Qemu-devel] [PATCH] target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb Aaron Larson
2016-06-27  1:36 ` David Gibson [this message]
2016-06-27  2:38   ` alarson
2016-06-27  5:32     ` David Gibson
2016-06-27 15:55       ` alarson
2016-06-28  3:16         ` David Gibson

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=20160627013652.GC4242@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=alarson@ddci.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.