From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932936AbbI3SSb (ORCPT ); Wed, 30 Sep 2015 14:18:31 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:49770 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932775AbbI3SS2 (ORCPT ); Wed, 30 Sep 2015 14:18:28 -0400 Subject: Re: [PATCH] ARM: fix vdsomunge depends on glibc specific byteswap.h To: "H. Nikolaus Schaller" References: <2039A9BE-ADA4-4D28-84F4-C8B9D76834AD@goldelico.com> <560C1DD0.1000907@mentor.com> <8B76E3E8-52BF-4803-B1F9-E5704A858870@goldelico.com> CC: Ard Biesheuvel , Szabolcs Nagy , Russell King , Will Deacon , Marek Belisko , LKML , linux-arm-kernel From: Nathan Lynch Message-ID: <560C271E.9060103@mentor.com> Date: Wed, 30 Sep 2015 13:17:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <8B76E3E8-52BF-4803-B1F9-E5704A858870@goldelico.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.