Message ID | 1405955785-13477-4-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDYNJBOFRECBB266WSPAKGQEFLW3HJY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 84BFC20672 for <linaro@patches.linaro.org>; Mon, 21 Jul 2014 15:19:07 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 142sf15172449ykq.0 for <linaro@patches.linaro.org>; Mon, 21 Jul 2014 08:19:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=jntPZttABjJB7vhkrysYG0aJiFRJXS57PRMMarH/FgQ=; b=ZXAl09dL3NgVz2082OKQvhTscruhMAVPGOHPcY5sVmKo2VBCWsAWC27hns7RpQDz2b gwlcBGwd2Z0VTcVfc0T+iccy0S7RWm0yOpir1gs3u+3egfUCLO4mcs+dgKLoWeQEGMVt GT54FtcAisgDm1fO1ewN5kwQjhqb3srzn7rycMhLoZsfDIQoZK5QyWrYR5uXIHJtE0Rn F3e9YTjjYio5vpINXqOas8G0MHnsbPN+CIN9/2wUF0IWW82WhtuXX8YlY1aDTrzv8r+T ndqs/Q3WLpioajiOv3tYNKX1FwiQAVnTUEAo6Ljn5Wqh6OqAzeDYCdf8H8d38xjSn3p8 FzeQ== X-Gm-Message-State: ALoCoQlxq+TpOS+ZVF23TgvuvI/xE7GYflLnucvUzlbuSZPQkIdztb9DfgCN6SHXsLZ226RwCzP9 X-Received: by 10.236.202.43 with SMTP id c31mr11209119yho.25.1405955947118; Mon, 21 Jul 2014 08:19:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.116 with SMTP id u107ls1934594qgd.46.gmail; Mon, 21 Jul 2014 08:19:06 -0700 (PDT) X-Received: by 10.52.99.106 with SMTP id ep10mr4299243vdb.73.1405955946905; Mon, 21 Jul 2014 08:19:06 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id xv6si11531279vdc.77.2014.07.21.08.19.06 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jul 2014 08:19:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id hy10so12278776vcb.4 for <patchwork-forward@linaro.org>; Mon, 21 Jul 2014 08:19:05 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr2921647vcf.71.1405955945697; Mon, 21 Jul 2014 08:19:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp120988vcb; Mon, 21 Jul 2014 08:19:05 -0700 (PDT) X-Received: by 10.69.20.11 with SMTP id gy11mr15242829pbd.28.1405955944858; Mon, 21 Jul 2014 08:19:04 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id gu3si14500696pbb.232.2014.07.21.08.19.04 for <patch@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jul 2014 08:19:04 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9FLl-0007kG-7H; Mon, 21 Jul 2014 15:18:01 +0000 Received: from mail-wi0-f178.google.com ([209.85.212.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9FKw-0006e2-Fu for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 15:17:11 +0000 Received: by mail-wi0-f178.google.com with SMTP id hi2so4280398wib.5 for <linux-arm-kernel@lists.infradead.org>; Mon, 21 Jul 2014 08:16:48 -0700 (PDT) X-Received: by 10.180.75.197 with SMTP id e5mr5391497wiw.76.1405955807026; Mon, 21 Jul 2014 08:16:47 -0700 (PDT) Received: from ards-macbook-pro.local ([212.91.105.246]) by mx.google.com with ESMTPSA id ft17sm38327602wjc.14.2014.07.21.08.16.43 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jul 2014 08:16:46 -0700 (PDT) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: matt.fleming@intel.com, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, will.deacon@arm.com, leif.lindholm@linaro.org Subject: [RFC PATCH 03/10] arm64: add macros to emit little endian ASM constants Date: Mon, 21 Jul 2014 17:16:18 +0200 Message-Id: <1405955785-13477-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1405955785-13477-1-git-send-email-ard.biesheuvel@linaro.org> References: <1405955785-13477-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140721_081710_700896_8B684893 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.178 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.178 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: roy.franz@linaro.org, victor.kamensky@linaro.org, steve.capper@linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>, msalter@redhat.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index 5901480bfdca..7db7c946f73f 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -155,3 +155,21 @@ lr .req x30 // link register #endif orr \rd, \lbits, \hbits, lsl #32 .endm + + /* + * Define LE constants + */ + .macro le16, x + .byte \x & 0xff + .byte (\x >> 8) & 0xff + .endm + + .macro le32, x + le16 \x + le16 \x >> 16 + .endm + + .macro le64, x + le32 \x + le32 \x >> 32 + .endm
The Image header contains many constants that should be emitted in little endian regardless of the endianness of the kernel. Add helper macros le16, le32 and le64 to <asm/assembler.h> to aid with this. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm64/include/asm/assembler.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)