From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601AbbI3TIj (ORCPT ); Wed, 30 Sep 2015 15:08:39 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:28265 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754335AbbI3TIh convert rfc822-to-8bit (ORCPT ); Wed, 30 Sep 2015 15:08:37 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcKdUCnXG6JabOfSXKWrat+jNPpz40= X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [PATCH] ARM: fix vdsomunge depends on glibc specific byteswap.h From: "H. Nikolaus Schaller" In-Reply-To: <560C271E.9060103@mentor.com> Date: Wed, 30 Sep 2015 21:08:00 +0200 Cc: Ard Biesheuvel , Szabolcs Nagy , Russell King , Will Deacon , Marek Belisko , LKML , linux-arm-kernel Content-Transfer-Encoding: 8BIT Message-Id: References: <2039A9BE-ADA4-4D28-84F4-C8B9D76834AD@goldelico.com> <560C1DD0.1000907@mentor.com> <8B76E3E8-52BF-4803-B1F9-E5704A858870@goldelico.com> <560C271E.9060103@mentor.com> To: Nathan Lynch X-Mailer: Apple Mail (2.1878.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 30.09.2015 um 20:17 schrieb Nathan Lynch : > On 09/30/2015 12:47 PM, H. Nikolaus Schaller wrote: >> >> Am 30.09.2015 um 19:37 schrieb Nathan Lynch : >>> Why not just use a generic >>> implementation like is found in mips' elf2ecoff? >> >> Do you have a reference? >> I can't find byte swapping in >> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/mips/boot/elf2ecoff.c?id=refs/tags/v4.3-rc3 > > See the swab16 and swab32 macros (yes, "swab" not "swap"). > > Or the __constant_swab* macros in include/linux/uapi/swab.h. > Ah, I did search for swaP... And, I though that they are more conditional on the CPU endianness but that would be sort of htons() and ntohl() and friends. Then I see no problem adding such macros and getting rid of the #include completely. Which is compiler independent and OS independent. Will prepare and submit a V2 asap. Thanks and BR, Nikolaus From mboxrd@z Thu Jan 1 00:00:00 1970 From: hns@goldelico.com (H. Nikolaus Schaller) Date: Wed, 30 Sep 2015 21:08:00 +0200 Subject: [PATCH] ARM: fix vdsomunge depends on glibc specific byteswap.h In-Reply-To: <560C271E.9060103@mentor.com> References: <2039A9BE-ADA4-4D28-84F4-C8B9D76834AD@goldelico.com> <560C1DD0.1000907@mentor.com> <8B76E3E8-52BF-4803-B1F9-E5704A858870@goldelico.com> <560C271E.9060103@mentor.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Am 30.09.2015 um 20:17 schrieb Nathan Lynch : > On 09/30/2015 12:47 PM, H. Nikolaus Schaller wrote: >> >> Am 30.09.2015 um 19:37 schrieb Nathan Lynch : >>> Why not just use a generic >>> implementation like is found in mips' elf2ecoff? >> >> Do you have a reference? >> I can't find byte swapping in >> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/mips/boot/elf2ecoff.c?id=refs/tags/v4.3-rc3 > > See the swab16 and swab32 macros (yes, "swab" not "swap"). > > Or the __constant_swab* macros in include/linux/uapi/swab.h. > Ah, I did search for swaP... And, I though that they are more conditional on the CPU endianness but that would be sort of htons() and ntohl() and friends. Then I see no problem adding such macros and getting rid of the #include completely. Which is compiler independent and OS independent. Will prepare and submit a V2 asap. Thanks and BR, Nikolaus