Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1410090 > unrolled thread
| Started by | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| First post | 2016-05-31 12:30 +0200 |
| Last post | 2016-06-08 09:30 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[GIT PULL 0/2] EFI urgent fixes Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-31 12:30 +0200
[PATCH 2/2] efi/arm: Fix the format of debug message from efi Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-31 12:30 +0200
[tip:efi/urgent] efi/arm: Fix the format of EFI debug messages tip-bot for Dennis Chen <tipbot@zytor.com> - 2016-06-03 13:00 +0200
Re: [GIT PULL 0/2] EFI urgent fixes Matt Fleming <matt@codeblueprint.co.uk> - 2016-06-06 12:10 +0200
Re: [GIT PULL 0/2] EFI urgent fixes Ingo Molnar <mingo@kernel.org> - 2016-06-08 09:30 +0200
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Date | 2016-05-31 12:30 +0200 |
| Subject | [GIT PULL 0/2] EFI urgent fixes |
| Message-ID | <rEP5U-1qK-9@gated-at.bofh.it> |
Folks, please pull the following urgent patches which fix a boot crash
when using the "noefi" parameter and the debug output on arm.
The following changes since commit 1a695a905c18548062509178b98bc91e67510864:
Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent
for you to fetch changes up to 1f0cf3892caeab20a99c19f5523499be77b533cd:
efi/arm: Fix the format of debug message from efi (2016-05-30 22:51:53 +0100)
----------------------------------------------------------------
* Fix crash when booting with the "noefi" kernel parameter, caused by
recent changes to for_each_efi_memory_desc_in_map() - Vitaly Kuznetsov
* Unscramble the debug output on arm when efi=debug and memblock=debug
is passed on the kernel cmdline - Dennis Chen
----------------------------------------------------------------
Dennis Chen (1):
efi/arm: Fix the format of debug message from efi
Vitaly Kuznetsov (1):
efi: Fix for_each_efi_memory_desc_in_map() for empty memmaps
drivers/firmware/efi/arm-init.c | 14 ++++++--------
include/linux/efi.h | 2 +-
2 files changed, 7 insertions(+), 9 deletions(-)
[toc] | [next] | [standalone]
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Date | 2016-05-31 12:30 +0200 |
| Subject | [PATCH 2/2] efi/arm: Fix the format of debug message from efi |
| Message-ID | <rEP5U-1qK-21@gated-at.bofh.it> |
| In reply to | #1410090 |
From: Dennis Chen <dennis.chen@arm.com>
When enable debug of efi and memblock with 'efi=debug memblock=debug' appended
to the kernel command line, the debug message output for earyly_con looks like:
[ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC]
[ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c
[ 0.000000] *
...
This patch is trying to fix the above output messed up by memblock_add(),
so we can get below debug mesg looks more formally after applied:
[ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC]*
[ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c
...
Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-efi@vger.kernel.org
Cc: Steve McIntyre <steve@einval.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mark Salter <msalter@redhat.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
drivers/firmware/efi/arm-init.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c
index a850cbc48d8d..c49d50e68aee 100644
--- a/drivers/firmware/efi/arm-init.c
+++ b/drivers/firmware/efi/arm-init.c
@@ -174,6 +174,7 @@ static __init void reserve_regions(void)
{
efi_memory_desc_t *md;
u64 paddr, npages, size;
+ int resv;
if (efi_enabled(EFI_DBG))
pr_info("Processing EFI memory map:\n");
@@ -190,12 +191,14 @@ static __init void reserve_regions(void)
paddr = md->phys_addr;
npages = md->num_pages;
+ resv = is_reserve_region(md);
if (efi_enabled(EFI_DBG)) {
char buf[64];
- pr_info(" 0x%012llx-0x%012llx %s",
+ pr_info(" 0x%012llx-0x%012llx %s%s\n",
paddr, paddr + (npages << EFI_PAGE_SHIFT) - 1,
- efi_md_typeattr_format(buf, sizeof(buf), md));
+ efi_md_typeattr_format(buf, sizeof(buf), md),
+ resv ? "*" : "");
}
memrange_efi_to_native(&paddr, &npages);
@@ -204,14 +207,9 @@ static __init void reserve_regions(void)
if (is_normal_ram(md))
early_init_dt_add_memory_arch(paddr, size);
- if (is_reserve_region(md)) {
+ if (resv)
memblock_mark_nomap(paddr, size);
- if (efi_enabled(EFI_DBG))
- pr_cont("*");
- }
- if (efi_enabled(EFI_DBG))
- pr_cont("\n");
}
set_bit(EFI_MEMMAP, &efi.flags);
--
2.7.3
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Dennis Chen <tipbot@zytor.com> |
|---|---|
| Date | 2016-06-03 13:00 +0200 |
| Subject | [tip:efi/urgent] efi/arm: Fix the format of EFI debug messages |
| Message-ID | <rFUZz-25k-1@gated-at.bofh.it> |
| In reply to | #1410092 |
Commit-ID: c75343972b79ef5bd44c498a63b326e37470bbfc
Gitweb: http://git.kernel.org/tip/c75343972b79ef5bd44c498a63b326e37470bbfc
Author: Dennis Chen <dennis.chen@arm.com>
AuthorDate: Tue, 31 May 2016 11:23:44 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 3 Jun 2016 09:57:36 +0200
efi/arm: Fix the format of EFI debug messages
When both EFI and memblock debugging is enabled on the kernel command line:
'efi=debug memblock=debug'
.. the debug messages for early_con look the following way:
[ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC]
[ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c
[ 0.000000] *
...
Note the misplaced '*' line, which happened because the memblock debug message
was printed while the EFI debug message was still being constructed..
This patch fixes the output to be the expected:
[ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC]
[ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC]*
[ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c
...
Note how the '*' is now in the proper EFI debug message line.
Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Salter <msalter@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Steve McIntyre <steve@einval.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1464690224-4503-3-git-send-email-matt@codeblueprint.co.uk
[ Made the changelog more readable. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/firmware/efi/arm-init.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c
index a850cbc..c49d50e 100644
--- a/drivers/firmware/efi/arm-init.c
+++ b/drivers/firmware/efi/arm-init.c
@@ -174,6 +174,7 @@ static __init void reserve_regions(void)
{
efi_memory_desc_t *md;
u64 paddr, npages, size;
+ int resv;
if (efi_enabled(EFI_DBG))
pr_info("Processing EFI memory map:\n");
@@ -190,12 +191,14 @@ static __init void reserve_regions(void)
paddr = md->phys_addr;
npages = md->num_pages;
+ resv = is_reserve_region(md);
if (efi_enabled(EFI_DBG)) {
char buf[64];
- pr_info(" 0x%012llx-0x%012llx %s",
+ pr_info(" 0x%012llx-0x%012llx %s%s\n",
paddr, paddr + (npages << EFI_PAGE_SHIFT) - 1,
- efi_md_typeattr_format(buf, sizeof(buf), md));
+ efi_md_typeattr_format(buf, sizeof(buf), md),
+ resv ? "*" : "");
}
memrange_efi_to_native(&paddr, &npages);
@@ -204,14 +207,9 @@ static __init void reserve_regions(void)
if (is_normal_ram(md))
early_init_dt_add_memory_arch(paddr, size);
- if (is_reserve_region(md)) {
+ if (resv)
memblock_mark_nomap(paddr, size);
- if (efi_enabled(EFI_DBG))
- pr_cont("*");
- }
- if (efi_enabled(EFI_DBG))
- pr_cont("\n");
}
set_bit(EFI_MEMMAP, &efi.flags);
[toc] | [prev] | [next] | [standalone]
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Date | 2016-06-06 12:10 +0200 |
| Message-ID | <rGZDQ-3sr-1@gated-at.bofh.it> |
| In reply to | #1410090 |
On Tue, 31 May, at 11:23:42AM, Matt Fleming wrote: > Folks, please pull the following urgent patches which fix a boot crash > when using the "noefi" parameter and the debug output on arm. > > The following changes since commit 1a695a905c18548062509178b98bc91e67510864: > > Linux 4.7-rc1 (2016-05-29 09:29:24 -0700) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent > > for you to fetch changes up to 1f0cf3892caeab20a99c19f5523499be77b533cd: > > efi/arm: Fix the format of debug message from efi (2016-05-30 22:51:53 +0100) > > ---------------------------------------------------------------- > * Fix crash when booting with the "noefi" kernel parameter, caused by > recent changes to for_each_efi_memory_desc_in_map() - Vitaly Kuznetsov > > * Unscramble the debug output on arm when efi=debug and memblock=debug > is passed on the kernel cmdline - Dennis Chen > > ---------------------------------------------------------------- > Dennis Chen (1): > efi/arm: Fix the format of debug message from efi > > Vitaly Kuznetsov (1): > efi: Fix for_each_efi_memory_desc_in_map() for empty memmaps > > drivers/firmware/efi/arm-init.c | 14 ++++++-------- > include/linux/efi.h | 2 +- > 2 files changed, 7 insertions(+), 9 deletions(-) Ping? I see these patches queued up in tip/efi/urgent but they don't appear to be in Linus' tree yet.
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-06-08 09:30 +0200 |
| Message-ID | <rHG66-5xf-29@gated-at.bofh.it> |
| In reply to | #1414858 |
* Matt Fleming <matt@codeblueprint.co.uk> wrote: > On Tue, 31 May, at 11:23:42AM, Matt Fleming wrote: > > Folks, please pull the following urgent patches which fix a boot crash > > when using the "noefi" parameter and the debug output on arm. > > > > The following changes since commit 1a695a905c18548062509178b98bc91e67510864: > > > > Linux 4.7-rc1 (2016-05-29 09:29:24 -0700) > > > > are available in the git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git tags/efi-urgent > > > > for you to fetch changes up to 1f0cf3892caeab20a99c19f5523499be77b533cd: > > > > efi/arm: Fix the format of debug message from efi (2016-05-30 22:51:53 +0100) > > > > ---------------------------------------------------------------- > > * Fix crash when booting with the "noefi" kernel parameter, caused by > > recent changes to for_each_efi_memory_desc_in_map() - Vitaly Kuznetsov > > > > * Unscramble the debug output on arm when efi=debug and memblock=debug > > is passed on the kernel cmdline - Dennis Chen > > > > ---------------------------------------------------------------- > > Dennis Chen (1): > > efi/arm: Fix the format of debug message from efi > > > > Vitaly Kuznetsov (1): > > efi: Fix for_each_efi_memory_desc_in_map() for empty memmaps > > > > drivers/firmware/efi/arm-init.c | 14 ++++++-------- > > include/linux/efi.h | 2 +- > > 2 files changed, 7 insertions(+), 9 deletions(-) > > Ping? I see these patches queued up in tip/efi/urgent but they don't > appear to be in Linus' tree yet. Yeah, will get them to Linus later today. Thanks, Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web