From patchwork Thu Jun 26 14:23:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 4428001 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5CE6BBEEAA for ; Thu, 26 Jun 2014 14:33:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40E95202FF for ; Thu, 26 Jun 2014 14:33:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E76B2028D for ; Thu, 26 Jun 2014 14:33:01 +0000 (UTC) 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 1X0AhO-0004vI-RP; Thu, 26 Jun 2014 14:30:50 +0000 Received: from mail-wi0-f175.google.com ([209.85.212.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X0AhI-0004iA-IB for linux-arm-kernel@lists.infradead.org; Thu, 26 Jun 2014 14:30:49 +0000 Received: by mail-wi0-f175.google.com with SMTP id r20so1161370wiv.2 for ; Thu, 26 Jun 2014 07:30:21 -0700 (PDT) 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=M8PG7WagTWhKMh3rO8CUSbttOiVpmo0f4AqDT5UyCZA=; b=X74CDRxD357aDXXpvoUX8QH8SRGT5/3CQSZbTg8+8yICpTMCBE0H3Ef7q34YKYQ48I gtRGq7zyQjw3QSFOzACA8vQAacnR0tImQdBpYFwviw7JPYYCiOlM9i38peNc7MBCMjPk YXylVesoWRGWHooC88SNPK61uqIpiAQwzTXFBFJYzp+27TR9JkGvRD+9ZmkA95wYAP2g Z8WV0eQ3nOyqQcmDbGHQT76i0cNvanNs56pUdS+JTLLnEb/9qDAA2lU7QpqqCK7JI+mU n1d8zBVvf9Yi2cjNH05/d5XmljkfrRXDebbUV3mk4Mw9ALoarRZYDQSOPv5Uqmev5L0Z 134w== X-Gm-Message-State: ALoCoQl3hs0aaSMkQeTqufW1Ri5WonZXPI+36E2XViOkACXnEqndfTUyWP18fSmj5CFral+aP3Bd X-Received: by 10.194.110.100 with SMTP id hz4mr18341554wjb.65.1403792631430; Thu, 26 Jun 2014 07:23:51 -0700 (PDT) Received: from ards-macbook-pro.local ([109.114.99.252]) by mx.google.com with ESMTPSA id jb16sm25046864wic.10.2014.06.26.07.23.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 07:23:50 -0700 (PDT) From: Ard Biesheuvel To: matt.fleming@intel.com, x86@kernel.org Subject: [PATCH v2 3/5] efi/arm64: efistub: move shared dependencies to Date: Thu, 26 Jun 2014 16:23:35 +0200 Message-Id: <1403792617-25792-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1403792617-25792-1-git-send-email-ard.biesheuvel@linaro.org> References: <1403792617-25792-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_073044_745557_20A50E88 X-CRM114-Status: GOOD ( 11.88 ) X-Spam-Score: -0.7 (/) Cc: linux-efi@vger.kernel.org, Ard Biesheuvel , catalin.marinas@arm.com, msalter@redhat.com, leif.lindholm@linaro.org, roy.franz@linaro.org, hpa@zytor.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This moves definitions depended upon both by code under arch/arm64/boot and under drivers/firmware/efi to . This is in preparation of turning the stub code under drivers/firmware/efi into a static library. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/efi.h | 12 ++++++++++++ arch/arm64/kernel/efi-stub.c | 11 +---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index 375ba342dca6..a34fd3b12e2b 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -32,4 +32,16 @@ extern void efi_idmap_init(void); kernel_neon_end(); \ }) +/* arch specific definitions used by the stub code */ + +/* + * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from + * start of kernel and may not cross a 2MiB boundary. We set alignment to + * 2MiB so we know it won't cross a 2MiB boundary. + */ +#define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */ +#define MAX_FDT_OFFSET SZ_512M + +#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) + #endif /* _ASM_EFI_H */ diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c index 7aa7155a9740..23cbde4324b1 100644 --- a/arch/arm64/kernel/efi-stub.c +++ b/arch/arm64/kernel/efi-stub.c @@ -10,19 +10,10 @@ * */ #include +#include #include #include -/* - * AArch64 requires the DTB to be 8-byte aligned in the first 512MiB from - * start of kernel and may not cross a 2MiB boundary. We set alignment to - * 2MiB so we know it won't cross a 2MiB boundary. - */ -#define EFI_FDT_ALIGN SZ_2M /* used by allocate_new_fdt_and_exit_boot() */ -#define MAX_FDT_OFFSET SZ_512M - -#define efi_call_early(f, ...) sys_table_arg->boottime->f(__VA_ARGS__) - static void efi_char16_printk(efi_system_table_t *sys_table_arg, efi_char16_t *str);