From patchwork Thu Jan 9 20:11:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 308941 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 48F0B2C00A4 for ; Fri, 10 Jan 2014 07:11:59 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8B4BC4AC81; Thu, 9 Jan 2014 21:11:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jU61Djy6Mn07; Thu, 9 Jan 2014 21:11:56 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 936194AC92; Thu, 9 Jan 2014 21:11:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FC754AC81 for ; Thu, 9 Jan 2014 21:11:47 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DOczY85oSjdd for ; Thu, 9 Jan 2014 21:11:42 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-qc0-f178.google.com (mail-qc0-f178.google.com [209.85.216.178]) by theia.denx.de (Postfix) with ESMTPS id 1BB5D4AC54 for ; Thu, 9 Jan 2014 21:11:33 +0100 (CET) Received: by mail-qc0-f178.google.com with SMTP id i17so3057739qcy.37 for ; Thu, 09 Jan 2014 12:11:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=3cHe/A/FAnfatvvQOLqJJ4aDm0U0hLPJw8ZPAtXORcQ=; b=Tdjv6phz/5uj6tkb5/DRe7yhIS046xPYjgDbEWveQWKnSCOsX85P7JvKSDZbyCFo2F EGCa7EkhZ90+cs4QbI1HgaFA62MGAtpqrgch2oYXtg02IUTWpy6xnc1h+Q0grA5x5s/+ 2vBKm93hxr2d/PSiL6zIrG18/MfgnguqJolJJgF0aBg8KRkygeiKTYe1eZ85cTnH3srd L8P0mGivFP0WZloiZx+qT+nCtKJXtjY+VbxsR80ZU7e2HZORHyOaMw8SIdYC1NFtBLZn ahavVtt37Bp3URevv6kwftE3v44w2I+zI4UILpLuq1zmb5Ar7PgKvztfa0X+SYFjm2uo llQQ== X-Received: by 10.49.12.43 with SMTP id v11mr11314391qeb.50.1389298291292; Thu, 09 Jan 2014 12:11:31 -0800 (PST) Received: from localhost.localdomain (cpe-174-106-216-211.ec.res.rr.com. [174.106.216.211]) by mx.google.com with ESMTPSA id gk2sm2448100qeb.4.2014.01.09.12.11.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Jan 2014 12:11:30 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Thu, 9 Jan 2014 15:11:27 -0500 Message-Id: <1389298287-11236-1-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH] armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The toolchain sets __aarch64__ for both LE and BE. In the case of posix_types.h we cannot reliably use config.h as that will lead to problems. In the case of byteorder.h it's clearer to check the EB flag being set in either case instead. Cc: David Feng Signed-off-by: Tom Rini --- arch/arm/include/asm/byteorder.h | 14 +------------- arch/arm/include/asm/posix_types.h | 6 +++--- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h index 71a9966..20cce76 100644 --- a/arch/arm/include/asm/byteorder.h +++ b/arch/arm/include/asm/byteorder.h @@ -23,22 +23,10 @@ # define __SWAB_64_THRU_32__ #endif -#ifdef CONFIG_ARM64 - -#ifdef __AARCH64EB__ -#include -#else -#include -#endif - -#else /* CONFIG_ARM64 */ - -#ifdef __ARMEB__ +#if defined(__ARMEB__) || defined(__AARCH64EB__) #include #else #include #endif -#endif /* CONFIG_ARM64 */ - #endif diff --git a/arch/arm/include/asm/posix_types.h b/arch/arm/include/asm/posix_types.h index 9ba9add..fe4483f 100644 --- a/arch/arm/include/asm/posix_types.h +++ b/arch/arm/include/asm/posix_types.h @@ -31,15 +31,15 @@ typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; -#ifdef CONFIG_ARM64 +#ifdef __aarch64__ typedef unsigned long __kernel_size_t; typedef long __kernel_ssize_t; typedef long __kernel_ptrdiff_t; -#else /* CONFIG_ARM64 */ +#else typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; -#endif /* CONFIG_ARM64 */ +#endif typedef long __kernel_time_t; typedef long __kernel_suseconds_t;