From patchwork Mon Feb 1 13:09:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 60912 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3069758lbb; Mon, 1 Feb 2016 05:15:35 -0800 (PST) X-Received: by 10.66.158.129 with SMTP id wu1mr38305849pab.146.1454332535438; Mon, 01 Feb 2016 05:15:35 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id t75si46329877pfa.9.2016.02.01.05.15.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2016 05:15:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org 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 1aQEJA-0002eD-UY; Mon, 01 Feb 2016 13:14:21 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQEFB-0005vJ-Cf for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2016 13:10:17 +0000 Received: by mail-wm0-x231.google.com with SMTP id l66so70400186wml.0 for ; Mon, 01 Feb 2016 05:09:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=C3QxyKwZKfiVKgmW1BRxQ7sQNSn2YiNp49vYXDdvlyw=; b=VtWpN1sWIfzKnrC6dlyuanwzuzaQO6YoHgqL3hWeylmoFhHOW2zK7yVFFlUojv2XX9 dqINlw29yTZJG2moI4r0+zgyNDKnWNAXJ1trAH5oT8V4/sL+Ujh1eZTBrp7ye0rJ/RVE 5bckXtEKbH7O2DB2TPPdqETWb+vGz8bIdkBds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=C3QxyKwZKfiVKgmW1BRxQ7sQNSn2YiNp49vYXDdvlyw=; b=PmFiS+kImRhoT7R4QVHA/d/E/c7lRsk7q1zKDfX5AIHal3oBTovVl9/js1r+1d5ZS/ t6IjdU2BhH6jMINoF4rELTgWEWYPU01lCsljibCBIlFoRBl1hoVq4GFDVDkhoBBdVjlk jZlmz+/4meDUvF810kzM36rnrpz4/7yeQF+Nq/+kwnEkSvglXb2YSUJTE4D9v+moOgev Zqz1jPHAY3K7hM9nCFPJ+qJa4omBBNs+NR3kyq5/UjCxZzfCf3xIwLVBBcRFQR6wXai9 RrBXPD+/ZsUMmhCNMDn9nTVlImTk6pynW2MekOMX0xUTlp1kc4PC8xvhPx8Qzcim2Z1O 0EnA== X-Gm-Message-State: AG10YOQ35YiCzQzBiqWypLWj0H1KGZWvnMWxzyQdZ12tpvfH63cxG2XtsWs2hLweUyAux/c4 X-Received: by 10.194.240.42 with SMTP id vx10mr22295046wjc.38.1454332191539; Mon, 01 Feb 2016 05:09:51 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id e9sm28992124wja.25.2016.02.01.05.09.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 05:09:50 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, mark.rutland@arm.com, keescook@chromium.org Subject: [PATCH v5sub2 4/8] arm64: make asm/elf.h available to asm files Date: Mon, 1 Feb 2016 14:09:34 +0100 Message-Id: <1454332178-4414-5-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454332178-4414-1-git-send-email-ard.biesheuvel@linaro.org> References: <1454332178-4414-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160201_051013_898487_ED4B5DAE X-CRM114-Status: GOOD ( 11.94 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:231 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] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This reshuffles some code in asm/elf.h and puts a #ifndef __ASSEMBLY__ around its C definitions so that the CPP defines can be used in asm source files as well. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/elf.h | 22 ++++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index faad6df49e5b..435f55952e1f 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -24,15 +24,6 @@ #include #include -typedef unsigned long elf_greg_t; - -#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t)) -#define ELF_CORE_COPY_REGS(dest, regs) \ - *(struct user_pt_regs *)&(dest) = (regs)->user_regs; - -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -typedef struct user_fpsimd_state elf_fpregset_t; - /* * AArch64 static relocation types. */ @@ -127,6 +118,17 @@ typedef struct user_fpsimd_state elf_fpregset_t; */ #define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3) +#ifndef __ASSEMBLY__ + +typedef unsigned long elf_greg_t; + +#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t)) +#define ELF_CORE_COPY_REGS(dest, regs) \ + *(struct user_pt_regs *)&(dest) = (regs)->user_regs; + +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; +typedef struct user_fpsimd_state elf_fpregset_t; + /* * When the program starts, a1 contains a pointer to a function to be * registered with atexit, as per the SVR4 ABI. A value of 0 means we have no @@ -186,4 +188,6 @@ extern int aarch32_setup_vectors_page(struct linux_binprm *bprm, #endif /* CONFIG_COMPAT */ +#endif /* !__ASSEMBLY__ */ + #endif