Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751699AbbHTLCJ (ORCPT ); Thu, 20 Aug 2015 07:02:09 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:56580 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbbHTLCG (ORCPT ); Thu, 20 Aug 2015 07:02:06 -0400 Message-ID: <55D5B3A9.6040901@ti.com> Date: Thu, 20 Aug 2015 14:02:01 +0300 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: yalin wang , , , , open list Subject: Re: [RFC] fbdev/riva:change to use generice function to implement reverse_order() References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Qmbadipqd1E4IBI1aK5URLUlXsdSEf4FH" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2913 Lines: 81 --Qmbadipqd1E4IBI1aK5URLUlXsdSEf4FH Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/08/15 13:12, yalin wang wrote: > This change to use swab32(bitrev32()) to implement reverse_order() > function, have better performance on some platforms. Which platforms? Presuming you tested this, roughly how much better performance? If you didn't, how do you know it's faster? > Signed-off-by: yalin wang > --- > drivers/video/fbdev/riva/fbdev.c | 19 ++++++------------- > 1 file changed, 6 insertions(+), 13 deletions(-) >=20 > diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riv= a/fbdev.c > index f1ad274..4803901 100644 > --- a/drivers/video/fbdev/riva/fbdev.c > +++ b/drivers/video/fbdev/riva/fbdev.c > @@ -40,6 +40,7 @@ > #include > #include > #include > +#include > #include > #ifdef CONFIG_PMAC_BACKLIGHT > #include > @@ -84,6 +85,7 @@ > #define SetBit(n) (1<<(n)) > #define Set8Bits(value) ((value)&0xff) > =20 > +#define reverse_order(v) swab32(bitrev32(v)) > /* HW cursor parameters */ > #define MAX_CURS 32 > =20 > @@ -451,15 +453,6 @@ static inline unsigned char MISCin(struct riva_par= *par) > return (VGA_RD08(par->riva.PVIO, 0x3cc)); > } > =20 > -static inline void reverse_order(u32 *l) I would suggest to do the work in the inline function, instead of a macro. And if you keep the function prototype the same, then the changes to each reverse_order call site are not needed. Tomi --Qmbadipqd1E4IBI1aK5URLUlXsdSEf4FH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJV1bOpAAoJEPo9qoy8lh715eIQAK/0hFs/HNCLddA763S6Z62d cFPwUOw0uHy8KP99rWGssKIxwI26kTJ6zTQOxoPmEIQta3H8bu5UvwvIhQ0qkuHw fRgqgo4vbQWHaPvpaFKYhiLq3omSqUHRXP/wiuC/N+yf6eJmRWwzd6MUJdDnH4Nz 1HyhOgk5dy6vyN6zGV+A2jLFPalct2yGT2TqqRa2M0v4CL6a+4rjjaLdjN/kbPTs VwqF30CO/GAPqYEp2rVBkjNYng0SgLS8ne+6hkxH+BDolStT9fR3O6DqWZfJ5KUk NEfHFiJ3p10+oF/NBuZnvNBaqz68VrHbCTHUBjna05iL5gcXbUCfTUK/zwxZuEwJ ICiSUwfIJSqv9FkhMHhBG6RfutZovHj5brQ20RpLvHO+sRAOWYLyezxB3Go3K26k jCy45lcGo1NCYlnBsf+atzDyQrWxTC/NoBY/o2KM+DSER5YPWCZPof4xAgkeL0jd DrtP3o4L4U2eFexDriPYwaQWl4szg1FuBBA2qglIIofXF6+ThiO6F4Cw7Kfr3rwQ 4VUOkH3PtWiR2k8YTFaaiUDs1FDQ68K4YrFUomk2WdfmExCkd6G4BZtyOuvkR3sh A0mkoevCYa0m4p5nwlgkUCfca/PdiZPC+gEoSI0vmUdXtYP5mRMrqFIuYdY4KVAJ jBbtQxizSLhJ6Nj1ii27 =lZOM -----END PGP SIGNATURE----- --Qmbadipqd1E4IBI1aK5URLUlXsdSEf4FH-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/