From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com ([66.111.4.26]:41329 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbeD3Vao (ORCPT ); Mon, 30 Apr 2018 17:30:44 -0400 Date: Mon, 30 Apr 2018 23:27:19 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org, stable@vger.kernel.org, Juergen Gross , Stefano Stabellini , Greg Kroah-Hartman , open list Subject: Re: [PATCH 1/6] xen: Add RING_COPY_RESPONSE() Message-ID: <20180430212719.GF1124@mail-itl> References: <7bd2ff07-9d29-8dea-6f55-5ff24ddd433c@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sfyO1m2EN8ZOtJL6" Content-Disposition: inline In-Reply-To: <7bd2ff07-9d29-8dea-6f55-5ff24ddd433c@oracle.com> Sender: stable-owner@vger.kernel.org List-ID: --sfyO1m2EN8ZOtJL6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 30, 2018 at 05:25:52PM -0400, Boris Ostrovsky wrote: > Also, perhaps the two can be collapsed together, along the lines of >=20 > #define RING_COPY_(action, _r, _idx, _msg) do {=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Use volatile to force the c= opy into _msg. */=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *(_msg) =3D *(volatile typeof(= _msg))RING_GET_##action(_r, _idx);=C2=A0=C2=A0 \ > } while (0) >=20 > #define RING_COPY_REQUEST(_r, _idx, _req)=C2=A0 RING_COPY_(REQUEST, _r, _= idx, > _req) > #define RING_COPY_RESPONSE(_r, _idx, _rsp)=C2=A0 RING_COPY_(RESPONSE, _r, > _idx, _rsp) >=20 >=20 > (I have not tried to compile this so it may well be wrong) It works, thanks :) I'll wait with v2 until I get feedback on other patches. --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --sfyO1m2EN8ZOtJL6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAlrnijYACgkQ24/THMrX 1ywe5wf/ZbvSaUrZdwxhc0FnZ+2VY0DWPXMMvBQIYdQWgdQ9mQGDaSyNcDGhasBc Rotc1hjHj1BoCwuzCs4K7VsN6nqQ6oiMawL2LQnYUx4EFulZIXWHDYitJzKPvaot IxnaF+98TvRX1UMLLeSZ/V6iJtp6GxoEi6iAynqUxly/F8vF4WjQjBx81TRBpULJ tcdFdML8GhndBMU4KP27n7+0JXeaAPOWcXC2YZ9F0cWugTf69ZU7xIItcoq57RD7 nBaBi2BqnhkV3G4lWKJp19alhwWErhqDAMqTU32hf8g2hz1+kzbSc+G5BegQPfWk UKLpd7zXgf/d5I/Xtx8cDfYUGO6xaw== =iFoD -----END PGP SIGNATURE----- --sfyO1m2EN8ZOtJL6--