Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965247AbbBDLz3 (ORCPT ); Wed, 4 Feb 2015 06:55:29 -0500 Received: from smtp-out4.electric.net ([192.162.216.181]:56586 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbbBDLz1 (ORCPT ); Wed, 4 Feb 2015 06:55:27 -0500 From: David Laight To: "'David Gibson'" , "benh@kernel.crashing.org" , "mpe@ellerman.id.au" , "paulus@samba.org" , "agraf@suse.de" CC: "aik@ozlabs.ru" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "mdroth@us.ibm.com" Subject: RE: [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions Thread-Topic: [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions Thread-Index: AQHQP3N4LF0yB5RukEG2fg/Nz7Pt9pzgYs3Q Date: Wed, 4 Feb 2015 11:54:39 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CADA5A5@AcuExch.aculab.com> References: <1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t14BtYQa017290 Content-Length: 869 Lines: 18 From: David Gibson > arch/powerpc/include/asm/swab.h includes some powerpc specific > byteswapping functions, which are implemented in terms of powerpc's > built in byte reversed load/store instructions. There are two problems with this: > > 1) They're not necessary - gcc is perfectly capable of generating the > byte-reversed load and store instructions when using the normal, > generic byteswapping functions (tested with gcc (GCC) 4.8.3 > 20140911 (Red Hat 4.8.3-9)) Should you be worrying about older versions of gcc? IIRC the internal byteswap 'stuff' is relatively recent (like the last couple of years) so people building current kernels on older distributions might have issues. David ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?