From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQcXQ-0000Lc-Uk for qemu-devel@nongnu.org; Tue, 02 Feb 2016 10:06:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQcXN-00086t-KH for qemu-devel@nongnu.org; Tue, 02 Feb 2016 10:06:40 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:28897 helo=imgpgp01.kl.imgtec.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQcXN-00086p-Ap for qemu-devel@nongnu.org; Tue, 02 Feb 2016 10:06:37 -0500 Date: Tue, 2 Feb 2016 15:06:35 +0000 From: James Hogan Message-ID: <20160202150635.GC5038@jhogan-linux.le.imgtec.org> References: <1454424701-26111-1-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c3bfwLpm8qysLVxt" Content-Disposition: inline In-Reply-To: <1454424701-26111-1-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qapi: Fix compilation failure on MIPS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Michael Roth , Peter Crosthwaite , armbru@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino , Paolo Bonzini , Richard Henderson --c3bfwLpm8qysLVxt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 02, 2016 at 07:51:41AM -0700, Eric Blake wrote: > Commit 86f4b687 broke compilation on MIPS, which has a preprocessor > pollution of '#define mips 1'. Treat it the same way as we do for > the pollution with 'unix', so that QMP remains backwards compatible > and only the C code needs to use the alternative 'q_mips' spelling. >=20 > CC: James Hogan > Signed-off-by: Eric Blake Thanks, that fixes the build for me. Tested-by: James Hogan Cheers James > --- > scripts/qapi.py | 2 +- > cpus.c | 4 ++-- > hmp.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/scripts/qapi.py b/scripts/qapi.py > index d199222..7f114c4 100644 > --- a/scripts/qapi.py > +++ b/scripts/qapi.py > @@ -1482,7 +1482,7 @@ def c_name(name, protect=3DTrue): > 'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not', > 'not_eq', 'or', 'or_eq', 'xor', 'xor_eq']) > # namespace pollution: > - polluted_words =3D set(['unix', 'errno']) > + polluted_words =3D set(['unix', 'errno', 'mips']) > name =3D name.translate(c_name_trans) > if protect and (name in c89_words | c99_words | c11_words | gcc_words > | cpp_words | polluted_words): > diff --git a/cpus.c b/cpus.c > index 882b618..c8a2317 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -1581,8 +1581,8 @@ CpuInfoList *qmp_query_cpus(Error **errp) > info->value->u.sparc->npc =3D env->npc; > #elif defined(TARGET_MIPS) > info->value->arch =3D CPU_INFO_ARCH_MIPS; > - info->value->u.mips =3D g_new0(CpuInfoMIPS, 1); > - info->value->u.mips->PC =3D env->active_tc.PC; > + info->value->u.q_mips =3D g_new0(CpuInfoMIPS, 1); > + info->value->u.q_mips->PC =3D env->active_tc.PC; > #elif defined(TARGET_TRICORE) > info->value->arch =3D CPU_INFO_ARCH_TRICORE; > info->value->u.tricore =3D g_new0(CpuInfoTricore, 1); > diff --git a/hmp.c b/hmp.c > index a4b74df..ef98344 100644 > --- a/hmp.c > +++ b/hmp.c > @@ -322,7 +322,7 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict) > monitor_printf(mon, " npc=3D0x%016" PRIx64, cpu->value->u.sp= arc->npc); > break; > case CPU_INFO_ARCH_MIPS: > - monitor_printf(mon, " PC=3D0x%016" PRIx64, cpu->value->u.mip= s->PC); > + monitor_printf(mon, " PC=3D0x%016" PRIx64, cpu->value->u.q_m= ips->PC); > break; > case CPU_INFO_ARCH_TRICORE: > monitor_printf(mon, " PC=3D0x%016" PRIx64, cpu->value->u.tri= core->PC); > --=20 > 2.5.0 >=20 --c3bfwLpm8qysLVxt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWsMX7AAoJEGwLaZPeOHZ6AWIP/jFFkgq8UgB3YQd3PmnPRejG YIpIjcuFmdklbBvUvJ3BDNJq6LFx53TZpLy2DkSIliY3NNKXt70Mfq7DRlrlNEoN soryxTqh2UgAtAVIUhOoj2neeUsTU79rKoCt+13yBbu4q/Hq+8du/havJTrCZkFb EEQOs+TuH42zefKBcvdrLfs+5ODG/0rgCEKNA0E0Zn8o9PIpBskV1s7v0DBpl7vA cpButQOkiaA7rbw10LLUwWaW64mLqKPseGT07Rp3FY2TL/JNEMFvI4f3A25O/PEI qTnWuOnnpGGj7eSFoZV+e5j0zIFAFMKbRYhxRXxO7s0vYsdiWaHhARkXCfAOWraF OuT4hlWLRc3Z1IJWHw4BzQdHreDO64TR0nW+g0QnnLut5AMa/VfzEJ24dq9CWiYq nq6PLoYKKnOO8MIdaDXtBdw41Iut80of0TFbCr4Uh9ZAbVWa0KbnR/8IjxOOMnhQ FaOd2eK+e6DBuwcs+q/y6d9C1zmd9lNkWH67UdS55NYjZlr6HxzqX6EqWHT65peF ttOvpIGyek9uH7aSc6+y2cr1D+SlfrwJtj9l9iIJKVZIRrvyOjj0XBJUHlcgblxG XygghWntzR6gfhqbaIfNkhB8noLyCeVN6ritZgnzuOyHcybcS11dXnQ8LXPZ5FQu AIA8omUSwuICbNaFCU1U =7PPj -----END PGP SIGNATURE----- --c3bfwLpm8qysLVxt--