From: matt@codeblueprint.co.uk (Matt Fleming)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] arm64/efi: set EFI_MEMMAP bit only after mapping the memory map
Date: Thu, 12 Nov 2015 15:14:00 +0000 [thread overview]
Message-ID: <20151112151400.GB2681@codeblueprint.co.uk> (raw)
In-Reply-To: <1446126059-25336-2-git-send-email-ard.biesheuvel@linaro.org>
On Thu, 29 Oct, at 02:40:57PM, Ard Biesheuvel wrote:
> In an upcoming patch, we will wire up page_is_ram() to the UEFI memory
> map, so make sure the EFI_MEMMAP bit accurately reflects whether the
> UEFI memory map is available via its permanent mapping.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> arch/arm64/kernel/efi.c | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
> index 852eb927ea85..11b59e9a5954 100644
> --- a/arch/arm64/kernel/efi.c
> +++ b/arch/arm64/kernel/efi.c
> @@ -191,8 +191,6 @@ static __init void reserve_regions(void)
> if (efi_enabled(EFI_DBG))
> pr_cont("\n");
> }
> -
> - set_bit(EFI_MEMMAP, &efi.flags);
> }
>
> void __init efi_init(void)
> @@ -291,13 +289,6 @@ static int __init arm64_enable_runtime_services(void)
> return -1;
> }
>
> - if (efi_runtime_disabled()) {
> - pr_info("EFI runtime services will be disabled.\n");
> - return -1;
> - }
> -
> - pr_info("Remapping and enabling EFI services.\n");
> -
> mapsize = memmap.map_end - memmap.map;
> memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
> mapsize);
> @@ -307,6 +298,14 @@ static int __init arm64_enable_runtime_services(void)
> }
> memmap.map_end = memmap.map + mapsize;
> efi.memmap = &memmap;
> + set_bit(EFI_MEMMAP, &efi.flags);
> +
> + if (efi_runtime_disabled()) {
> + pr_info("EFI runtime services will be disabled.\n");
> + return -1;
> + }
> +
> + pr_info("Remapping and enabling EFI services.\n");
>
> efi.systab = (__force void *)ioremap_cache(efi_system_table,
> sizeof(efi_system_table_t));
Looks pretty straight forward to me (and a good change).
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
next prev parent reply other threads:[~2015-11-12 15:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 13:40 [PATCH 0/3] remove UEFI reserved regions from the linear mapping Ard Biesheuvel
2015-10-29 13:40 ` [PATCH 1/3] arm64/efi: set EFI_MEMMAP bit only after mapping the memory map Ard Biesheuvel
2015-11-12 15:14 ` Matt Fleming [this message]
2015-10-29 13:40 ` [PATCH 2/3] arm64: reimplement page_is_ram() using memblock and UEFI " Ard Biesheuvel
2015-11-12 15:31 ` Matt Fleming
2015-11-12 15:40 ` Ard Biesheuvel
2015-11-12 16:03 ` Mark Rutland
2015-11-12 16:06 ` Ard Biesheuvel
2015-10-29 13:40 ` [PATCH 3/3] arm64/efi: memblock_remove() rather than _reserve UEFI reserved memory Ard Biesheuvel
2015-11-12 15:55 ` [PATCH 0/3] remove UEFI reserved regions from the linear mapping Mark Rutland
2015-11-12 16:01 ` Ard Biesheuvel
2015-11-12 16:13 ` Mark Rutland
2015-11-12 16:30 ` 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=20151112151400.GB2681@codeblueprint.co.uk \
--to=matt@codeblueprint.co.uk \
--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).