From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/4] efi/arm64: efistub: move shared dependencies to <asm/efi.h>
Date: Mon, 16 Jun 2014 17:14:46 +0200 [thread overview]
Message-ID: <1402931688-23597-2-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1402931688-23597-1-git-send-email-ard.biesheuvel@linaro.org>
This moves definitions depended upon both by code under arch/arm64/boot and
under drivers/firmware/efi to <asm/efi.h>. This is in preparation of turning
the stub code under drivers/firmware/efi into a static library.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/arm64/include/asm/efi.h | 13 +++++++++++++
arch/arm64/kernel/efi-stub.c | 11 +----------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h
index 5a46c4e7f539..9eac34a2725a 100644
--- a/arch/arm64/include/asm/efi.h
+++ b/arch/arm64/include/asm/efi.h
@@ -11,4 +11,17 @@ extern void efi_idmap_init(void);
#define efi_idmap_init()
#endif
+
+/* 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 <linux/efi.h>
+#include <asm/efi.h>
#include <linux/libfdt.h>
#include <asm/sections.h>
-/*
- * 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);
--
1.8.3.2
next prev parent reply other threads:[~2014-06-16 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 15:14 [RFC PATCH 1/4] efi/x86: efistub: move shared dependencies to <asm/efi.h> Ard Biesheuvel
2014-06-16 15:14 ` Ard Biesheuvel [this message]
2014-06-16 15:14 ` [RFC PATCH 3/4] efi: efistub: refactor stub components Ard Biesheuvel
2014-06-16 15:14 ` [RFC PATCH 4/4] efi: efistub: convert into static library Ard Biesheuvel
2014-06-16 15:24 ` Ard Biesheuvel
2014-06-25 20:34 ` Matt Fleming
2014-06-25 21:26 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402931688-23597-2-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).