From patchwork Thu Mar 27 13:39:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 27190 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 40C3320062 for ; Thu, 27 Mar 2014 13:55:03 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf12646901iec.2 for ; Thu, 27 Mar 2014 06:55:03 -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: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=6ZG7PjJVw0AyaHIEustxKIqxy/n1v7ZrA/ZFHAF85p4=; b=JWyvMpiKyvgQvhmy3vmvgaL4Rp6mwAMPZOU3lxdt1hk5Nlf/3j5HyEN67+wb3yombO IxnwyzLpGBQwyBovzNuvnFIm7cwqWaNt9U/zRleoW8zFVjJYwLrL4+YUy9/MzB52RkMk /KAtE3v49pwC+OArniFnW7Q/s//txY6sl3NEIjpzfqP2dDGDwAZSMq6uDKz/woEFj+3T VX5riQxChN+q4GndVWJAIQcKo/yfngy9mm03bFmGj3/pZUWfrw48o0rYxl+s6vdMhCdJ udXIG1OncC5d0ejCj+K+bvZME+cHdG5Iq1KKvFAAokRpfsurGlH/LAHJ/N7zlVIldpMD zggw== X-Gm-Message-State: ALoCoQlotvXDl5J4L030/rbNZdaIXyFfm+IQW/npjoZqBQ5r+BDi1IOobK34PZz99mTe9I/NzLPl X-Received: by 10.182.65.168 with SMTP id y8mr754949obs.38.1395928503047; Thu, 27 Mar 2014 06:55:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.117 with SMTP id z108ls1066504qge.51.gmail; Thu, 27 Mar 2014 06:55:02 -0700 (PDT) X-Received: by 10.58.202.106 with SMTP id kh10mr993035vec.31.1395928502926; Thu, 27 Mar 2014 06:55:02 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id xo2si551580vec.116.2014.03.27.06.55.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 06:55:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id db12so4221104veb.10 for ; Thu, 27 Mar 2014 06:55:02 -0700 (PDT) X-Received: by 10.58.229.4 with SMTP id sm4mr1635946vec.10.1395928502837; Thu, 27 Mar 2014 06:55:02 -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.220.78.9 with SMTP id i9csp29773vck; Thu, 27 Mar 2014 06:55:02 -0700 (PDT) X-Received: by 10.180.77.129 with SMTP id s1mr5277700wiw.56.1395928502079; Thu, 27 Mar 2014 06:55:02 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id a9si4712997wiy.42.2014.03.27.06.55.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Mar 2014 06:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTAYL-0007zK-UF; Thu, 27 Mar 2014 13:41:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTAXU-0006He-0H; Thu, 27 Mar 2014 13:40:12 +0000 Received: from mail-wg0-f42.google.com ([74.125.82.42]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WTAXB-0006FJ-8W for linux-arm-kernel@lists.infradead.org; Thu, 27 Mar 2014 13:39:55 +0000 Received: by mail-wg0-f42.google.com with SMTP id y10so2429924wgg.13 for ; Thu, 27 Mar 2014 06:39:31 -0700 (PDT) X-Received: by 10.180.182.199 with SMTP id eg7mr40503518wic.13.1395927570963; Thu, 27 Mar 2014 06:39:30 -0700 (PDT) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id fb6sm12451593wib.2.2014.03.27.06.39.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 06:39:30 -0700 (PDT) From: Ard Biesheuvel To: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: add appropriate asm/unaligned.h Date: Thu, 27 Mar 2014 14:39:51 +0100 Message-Id: <1395927591-20938-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140327_093953_491321_8B0C444C X-CRM114-Status: GOOD ( 10.10 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.42 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" 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=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 The generic asm/unaligned.h does not allow unaligned accesses, resulting in all invocations of get_unaligned_xxx() and put_unaligned_xxx() to be expanded into byte size accesses. On arm64, this is unnecessary, so provide a more permissive asm/unaligned.h instead. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/Kbuild | 1 - arch/arm64/include/asm/unaligned.h | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/include/asm/unaligned.h diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index 43a2c9d2d6f4..f88986a0c1dd 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild @@ -46,7 +46,6 @@ generic-y += termios.h generic-y += topology.h generic-y += trace_clock.h generic-y += types.h -generic-y += unaligned.h generic-y += user.h generic-y += vga.h generic-y += xor.h diff --git a/arch/arm64/include/asm/unaligned.h b/arch/arm64/include/asm/unaligned.h new file mode 100644 index 000000000000..00c4a4e02fd1 --- /dev/null +++ b/arch/arm64/include/asm/unaligned.h @@ -0,0 +1,17 @@ +#ifndef __ASM_UNALIGNED_H +#define __ASM_UNALIGNED_H + +#include +#include + +#if defined(__LITTLE_ENDIAN) +#define get_unaligned __get_unaligned_le +#define put_unaligned __put_unaligned_le +#elif defined(__BIG_ENDIAN) +#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be +#else +#error need to define endianess +#endif + +#endif /* __ASM_UNALIGNED_H */