All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: catalin.marinas@arm.com, will.deacon@arm.com,
	akpm@linux-foundation.org, ard.biesheuvel@linaro.org
Cc: tbaicar@codeaurora.org, bhsharma@redhat.com, dyoung@redhat.com,
	james.morse@arm.com, mark.rutland@arm.com, al.stone@linaro.org,
	graeme.gregory@linaro.org, hanjun.guo@linaro.org,
	lorenzo.pieralisi@arm.com, sudeep.holla@arm.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	AKASHI Takahiro <takahiro.akashi@linaro.org>
Subject: [PATCH 3/3] init: map UEFI memory map early if on arm or arm64
Date: Fri, 15 Jun 2018 16:56:23 +0900	[thread overview]
Message-ID: <20180615075623.13454-4-takahiro.akashi@linaro.org> (raw)
In-Reply-To: <20180615075623.13454-1-takahiro.akashi@linaro.org>

As ACPI tables may not always be properly aligned, those regions should
be mapped cacheable in order to allow the kernel safe access to them.
UEFI memory map contains necessary information for mappings, and we want
to make sure that it should get accessible before any acpi_os_ioremap()'s.

So, in this patch, efi_enter_virtual_mode(), which was previously named
efi_enable_runtime_services() and invoked via early_initcall on arm/arm64,
is now moved early enough as the first access will occur in
acpi_load_tables() of acpi_early_init().

See a relevant commit:
    arm64: acpi,efi: fix alignment fault in accessing ACPI tables at kdump

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 init/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/init/main.c b/init/main.c
index 3b4ada11ed52..532fc0d02353 100644
--- a/init/main.c
+++ b/init/main.c
@@ -694,6 +694,9 @@ asmlinkage __visible void __init start_kernel(void)
 	debug_objects_mem_init();
 	setup_per_cpu_pageset();
 	numa_policy_init();
+	if (IS_ENABLED(CONFIG_EFI) &&
+	    (IS_ENABLED(CONFIG_ARM64) || IS_ENABLED(CONFIG_ARM)))
+		efi_enter_virtual_mode();
 	acpi_early_init();
 	if (late_time_init)
 		late_time_init();
-- 
2.17.0


WARNING: multiple messages have this Message-ID (diff)
From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] init: map UEFI memory map early if on arm or arm64
Date: Fri, 15 Jun 2018 16:56:23 +0900	[thread overview]
Message-ID: <20180615075623.13454-4-takahiro.akashi@linaro.org> (raw)
In-Reply-To: <20180615075623.13454-1-takahiro.akashi@linaro.org>

As ACPI tables may not always be properly aligned, those regions should
be mapped cacheable in order to allow the kernel safe access to them.
UEFI memory map contains necessary information for mappings, and we want
to make sure that it should get accessible before any acpi_os_ioremap()'s.

So, in this patch, efi_enter_virtual_mode(), which was previously named
efi_enable_runtime_services() and invoked via early_initcall on arm/arm64,
is now moved early enough as the first access will occur in
acpi_load_tables() of acpi_early_init().

See a relevant commit:
    arm64: acpi,efi: fix alignment fault in accessing ACPI tables at kdump

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 init/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/init/main.c b/init/main.c
index 3b4ada11ed52..532fc0d02353 100644
--- a/init/main.c
+++ b/init/main.c
@@ -694,6 +694,9 @@ asmlinkage __visible void __init start_kernel(void)
 	debug_objects_mem_init();
 	setup_per_cpu_pageset();
 	numa_policy_init();
+	if (IS_ENABLED(CONFIG_EFI) &&
+	    (IS_ENABLED(CONFIG_ARM64) || IS_ENABLED(CONFIG_ARM)))
+		efi_enter_virtual_mode();
 	acpi_early_init();
 	if (late_time_init)
 		late_time_init();
-- 
2.17.0

WARNING: multiple messages have this Message-ID (diff)
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: catalin.marinas@arm.com, will.deacon@arm.com,
	akpm@linux-foundation.org, ard.biesheuvel@linaro.org
Cc: mark.rutland@arm.com, lorenzo.pieralisi@arm.com,
	graeme.gregory@linaro.org, al.stone@linaro.org,
	bhsharma@redhat.com, tbaicar@codeaurora.org,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	james.morse@arm.com, hanjun.guo@linaro.org, sudeep.holla@arm.com,
	dyoung@redhat.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] init: map UEFI memory map early if on arm or arm64
Date: Fri, 15 Jun 2018 16:56:23 +0900	[thread overview]
Message-ID: <20180615075623.13454-4-takahiro.akashi@linaro.org> (raw)
In-Reply-To: <20180615075623.13454-1-takahiro.akashi@linaro.org>

As ACPI tables may not always be properly aligned, those regions should
be mapped cacheable in order to allow the kernel safe access to them.
UEFI memory map contains necessary information for mappings, and we want
to make sure that it should get accessible before any acpi_os_ioremap()'s.

So, in this patch, efi_enter_virtual_mode(), which was previously named
efi_enable_runtime_services() and invoked via early_initcall on arm/arm64,
is now moved early enough as the first access will occur in
acpi_load_tables() of acpi_early_init().

See a relevant commit:
    arm64: acpi,efi: fix alignment fault in accessing ACPI tables at kdump

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 init/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/init/main.c b/init/main.c
index 3b4ada11ed52..532fc0d02353 100644
--- a/init/main.c
+++ b/init/main.c
@@ -694,6 +694,9 @@ asmlinkage __visible void __init start_kernel(void)
 	debug_objects_mem_init();
 	setup_per_cpu_pageset();
 	numa_policy_init();
+	if (IS_ENABLED(CONFIG_EFI) &&
+	    (IS_ENABLED(CONFIG_ARM64) || IS_ENABLED(CONFIG_ARM)))
+		efi_enter_virtual_mode();
 	acpi_early_init();
 	if (late_time_init)
 		late_time_init();
-- 
2.17.0


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2018-06-15  7:56 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15  7:56 [PATCH 0/3] arm64: kexec,kdump: fix boot failures on acpi-only system AKASHI Takahiro
2018-06-15  7:56 ` [PATCH 0/3] arm64: kexec, kdump: " AKASHI Takahiro
2018-06-15  7:56 ` AKASHI Takahiro
2018-06-15  7:56 ` [PATCH 1/3] arm64: export memblock_reserve()d regions via /proc/iomem AKASHI Takahiro
2018-06-15  7:56   ` AKASHI Takahiro
2018-06-15  7:56   ` AKASHI Takahiro
2018-06-15  7:56 ` [PATCH 2/3] arm64: acpi,efi: fix alignment fault in accessing ACPI tables at kdump AKASHI Takahiro
2018-06-15  7:56   ` [PATCH 2/3] arm64: acpi, efi: " AKASHI Takahiro
2018-06-15  7:56   ` AKASHI Takahiro
2018-06-15 16:30   ` [PATCH 2/3] arm64: acpi,efi: " James Morse
2018-06-15 16:30     ` James Morse
2018-06-15 16:30     ` James Morse
2018-06-18  6:44     ` AKASHI Takahiro
2018-06-18  6:44       ` AKASHI Takahiro
2018-06-18  6:44       ` AKASHI Takahiro
2018-06-15  7:56 ` AKASHI Takahiro [this message]
2018-06-15  7:56   ` [PATCH 3/3] init: map UEFI memory map early if on arm or arm64 AKASHI Takahiro
2018-06-15  7:56   ` AKASHI Takahiro
2018-06-15 12:52 ` [PATCH 0/3] arm64: kexec,kdump: fix boot failures on acpi-only system Bhupesh Sharma
2018-06-15 12:52   ` [PATCH 0/3] arm64: kexec, kdump: " Bhupesh Sharma
2018-06-15 12:52   ` Bhupesh Sharma
2018-06-15 16:29 ` [PATCH 0/3] arm64: kexec,kdump: " James Morse
2018-06-15 16:29   ` James Morse
2018-06-15 16:29   ` James Morse
2018-06-18  5:57   ` AKASHI Takahiro
2018-06-18  5:57     ` AKASHI Takahiro
2018-06-18  5:57     ` AKASHI Takahiro

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=20180615075623.13454-4-takahiro.akashi@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=al.stone@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhsharma@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=dyoung@redhat.com \
    --cc=graeme.gregory@linaro.org \
    --cc=hanjun.guo@linaro.org \
    --cc=james.morse@arm.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=tbaicar@codeaurora.org \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.