From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHLov-0003eb-90 for qemu-devel@nongnu.org; Sun, 26 Jun 2016 21:58:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHLos-0006ix-Tf for qemu-devel@nongnu.org; Sun, 26 Jun 2016 21:58:40 -0400 Date: Mon, 27 Jun 2016 11:36:52 +1000 From: David Gibson Message-ID: <20160627013652.GC4242@voom.fritz.box> References: <201606241911.u5OJB05n006837@linux03a.ddci.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TiqCXmo5T1hvSQQg" Content-Disposition: inline In-Reply-To: <201606241911.u5OJB05n006837@linux03a.ddci.com> Subject: Re: [Qemu-devel] [PATCH] target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aaron Larson Cc: agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org --TiqCXmo5T1hvSQQg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 24, 2016 at 12:11:00PM -0700, Aaron Larson wrote: >=20 > 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 >=20 > Signed-off-by: Aaron Larson 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(-) >=20 > 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 *mac= hine, > } > =20 > /* 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 { > =20 > void ppce500_init(MachineState *machine, PPCE500Params *params); > =20 > +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" > =20 > #define MAX_CPUS 32 > =20 > @@ -72,12 +73,6 @@ static void spin_reset(void *opaque) > } > } > =20 > -/* 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, --=20 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 --TiqCXmo5T1hvSQQg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXcIM0AAoJEGw4ysog2bOSu30P/1mOyf8Y07Ov7n3FJT6nmTvC wDcwrkDnsbCr9Y4vmqj1FLgSHsJ8h03iuBYk4ucuOmUwmSRJ2MBCJPhDDaExwTqm VbOBfYHAHpuTsR2HuebmS5dJUX4ycl/JhcdtMd6r1/cZ6zsFMw4rqd5ym2rV1B08 Dp1VZD8NPDP7+reHjIXsVlNcC5kDdBB7egxrtOPYj6WNxgOvJDlg7SG67z940OZV lmxdDQ2gGpbRTFrFfxSIwV3FprZNHnvDbHmeRU0l7A2m96Nuvf0vOfe+ulr6OfIr RrDJccH03jlDOOoCqR661AtXM4z7EIyMtfQ6Rt7mV8o1gfMgAitdh+QxUZqoX5mq l0OHtG2Aaq1aYIcAtxEMFiytGBhrp8oZOZf7X4G1k5WXljTZwy7WIvOJNw1fvTe4 8OtxXzk9UgJHwunFZIbfnk8XhSjVVNza6BaJSGojLaxHnoFp0ksEYc4pcnPlt0RR IIInu7HikWCwPZbjFsUAS09rNVkVHP1zBqRctlP+EF+dk3xAeoXRdpGSu4okUpWy u4kqt+GnlV2cWk9NYdAiZTEf9IYGWxTcgQIbV+uDqGJiR07fQyJfIzDeerm74Fqy +/QMAPB/fzT5M50aPC7UibtC6QdlMUq+YoN/ETkWLOlryeJCre+K/WKOniE7ajcH JK3gGZ129blecSRhtk7P =RBRt -----END PGP SIGNATURE----- --TiqCXmo5T1hvSQQg--