linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] move reservation for elfcorehdr early
@ 2019-12-29  3:48 Poonam Aggrwal
  2019-12-30  5:07 ` Prabhakar Kushwaha
  0 siblings, 1 reply; 3+ messages in thread
From: Poonam Aggrwal @ 2019-12-29  3:48 UTC (permalink / raw)
  To: takahiro.akashi, linux-arm-kernel; +Cc: Poonam Aggrwal, Nikhil Gupta

on some SOCs, elfcorehdr address may overlap with the address of reserved
memory allocated using early_init_fdt_scan_reserved_mem 

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
---
Overlaps seen on LS1043A SoC:
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000f7c00000, size 4 MiB
[    0.000000] OF: reserved mem: initialized node qman-fqd, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000f4000000, size 32 MiB
[    0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000f6000000, size 16 MiB
[    0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id shared-dma-pool
[    0.000000] Reserving 1KB of memory at 0xf7fff000 for elfcorehdr

panic in elfcorehdr_read:
[    0.443984] Unable to handle kernel paging request at virtual address ffff000037fff000
[    0.451942] Mem abort info:
[    0.454740]   ESR = 0x96000006
[    0.457806]   EC = 0x25: DABT (current EL), IL = 32 bits
[    0.463142]   SET = 0, FnV = 0
[    0.466202]   EA = 0, S1PTW = 0
[    0.469353] Data abort info:
[    0.472243]   ISV = 0, ISS = 0x00000006
[    0.476094]   CM = 0, WnR = 0
[    0.479072] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000d9373000
[    0.485806] [ffff000037fff000] pgd=00000000f7bf7003, pud=00000000f7bf6003, pmd=0000000000000000
[    0.494553] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[    0.500146] Modules linked in:
[    0.503211] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc3-00062-gbf8d1cd #5
[    0.510725] Hardware name: LS1043A RDB Board (DT)
[    0.515446] pstate: 80000005 (Nzcv daif -PAN -UAO)
[    0.520260] pc : __memcpy+0x78/0x180
[    0.523847] lr : elfcorehdr_read+0x28/0x38
<snip>
[    0.611262] Call trace:
[    0.613713]  __memcpy+0x78/0x180
[    0.616950]  vmcore_init+0x70/0x534
 arch/arm64/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index b65dffd..e610180 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -438,6 +438,8 @@ void __init arm64_memblock_init(void)
 		initrd_end = initrd_start + phys_initrd_size;
 	}
 
+	reserve_elfcorehdr();
+
 	early_init_fdt_scan_reserved_mem();
 
 	if (IS_ENABLED(CONFIG_ZONE_DMA)) {
@@ -452,8 +454,6 @@ void __init arm64_memblock_init(void)
 
 	reserve_crashkernel();
 
-	reserve_elfcorehdr();
-
 	high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
 
 	dma_contiguous_reserve(arm64_dma32_phys_limit);
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] move reservation for elfcorehdr early
  2019-12-29  3:48 [PATCH] move reservation for elfcorehdr early Poonam Aggrwal
@ 2019-12-30  5:07 ` Prabhakar Kushwaha
  2019-12-30  6:07   ` Poonam Aggrwal
  0 siblings, 1 reply; 3+ messages in thread
From: Prabhakar Kushwaha @ 2019-12-30  5:07 UTC (permalink / raw)
  To: Poonam Aggrwal; +Cc: takahiro.akashi, Nikhil Gupta, linux-arm-kernel

Hi Poonam,

On Sun, Dec 29, 2019 at 9:19 AM Poonam Aggrwal <poonam.aggrwal@nxp.com> wrote:
>
> on some SOCs, elfcorehdr address may overlap with the address of reserved
> memory allocated using early_init_fdt_scan_reserved_mem
>
> Signed-off-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
> ---
> Overlaps seen on LS1043A SoC:
> [    0.000000] Reserved memory: created DMA memory pool at 0x00000000f7c00000, size 4 MiB
> [    0.000000] OF: reserved mem: initialized node qman-fqd, compatible id shared-dma-pool
> [    0.000000] Reserved memory: created DMA memory pool at 0x00000000f4000000, size 32 MiB
> [    0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id shared-dma-pool
> [    0.000000] Reserved memory: created DMA memory pool at 0x00000000f6000000, size 16 MiB
> [    0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id shared-dma-pool
> [    0.000000] Reserving 1KB of memory at 0xf7fff000 for elfcorehdr
>
> panic in elfcorehdr_read:
> [    0.443984] Unable to handle kernel paging request at virtual address ffff000037fff000
> [    0.451942] Mem abort info:
> [    0.454740]   ESR = 0x96000006
> [    0.457806]   EC = 0x25: DABT (current EL), IL = 32 bits
> [    0.463142]   SET = 0, FnV = 0
> [    0.466202]   EA = 0, S1PTW = 0
> [    0.469353] Data abort info:
> [    0.472243]   ISV = 0, ISS = 0x00000006
> [    0.476094]   CM = 0, WnR = 0
> [    0.479072] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000d9373000
> [    0.485806] [ffff000037fff000] pgd=00000000f7bf7003, pud=00000000f7bf6003, pmd=0000000000000000
> [    0.494553] Internal error: Oops: 96000006 [#1] PREEMPT SMP
> [    0.500146] Modules linked in:
> [    0.503211] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc3-00062-gbf8d1cd #5
> [    0.510725] Hardware name: LS1043A RDB Board (DT)
> [    0.515446] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [    0.520260] pc : __memcpy+0x78/0x180
> [    0.523847] lr : elfcorehdr_read+0x28/0x38
> <snip>
> [    0.611262] Call trace:
> [    0.613713]  __memcpy+0x78/0x180
> [    0.616950]  vmcore_init+0x70/0x534
>  arch/arm64/mm/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Please work on subject like arm64: move elfcorehdr reservation early
for crash dump kernel

Rest looks OK. I also tested on Thunder X2 platform with no regression
seen with this patch.

Reviewed-by: Prabhakar Kushwaha <pkushwaha@marvell.com>

--pk

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] move reservation for elfcorehdr early
  2019-12-30  5:07 ` Prabhakar Kushwaha
@ 2019-12-30  6:07   ` Poonam Aggrwal
  0 siblings, 0 replies; 3+ messages in thread
From: Poonam Aggrwal @ 2019-12-30  6:07 UTC (permalink / raw)
  To: 'Prabhakar Kushwaha'
  Cc: takahiro.akashi, Nikhil Gupta, linux-arm-kernel

Thanks Prabhakar

-----Original Message-----
From: Prabhakar Kushwaha <prabhakar.pkin@gmail.com> 
Sent: Monday, December 30, 2019 10:38 AM
To: Poonam Aggrwal <poonam.aggrwal@nxp.com>
Cc: takahiro.akashi@linaro.org; linux-arm-kernel@lists.infradead.org; Nikhil Gupta <nikhil.gupta@nxp.com>
Subject: Re: [PATCH] move reservation for elfcorehdr early

Hi Poonam,

On Sun, Dec 29, 2019 at 9:19 AM Poonam Aggrwal <poonam.aggrwal@nxp.com> wrote:
>
> on some SOCs, elfcorehdr address may overlap with the address of 
> reserved memory allocated using early_init_fdt_scan_reserved_mem
>
> Signed-off-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
> ---
> Overlaps seen on LS1043A SoC:
> [    0.000000] Reserved memory: created DMA memory pool at 0x00000000f7c00000, size 4 MiB
> [    0.000000] OF: reserved mem: initialized node qman-fqd, compatible id shared-dma-pool
> [    0.000000] Reserved memory: created DMA memory pool at 0x00000000f4000000, size 32 MiB
> [    0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id shared-dma-pool
> [    0.000000] Reserved memory: created DMA memory pool at 0x00000000f6000000, size 16 MiB
> [    0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id shared-dma-pool
> [    0.000000] Reserving 1KB of memory at 0xf7fff000 for elfcorehdr
>
> panic in elfcorehdr_read:
> [    0.443984] Unable to handle kernel paging request at virtual address ffff000037fff000
> [    0.451942] Mem abort info:
> [    0.454740]   ESR = 0x96000006
> [    0.457806]   EC = 0x25: DABT (current EL), IL = 32 bits
> [    0.463142]   SET = 0, FnV = 0
> [    0.466202]   EA = 0, S1PTW = 0
> [    0.469353] Data abort info:
> [    0.472243]   ISV = 0, ISS = 0x00000006
> [    0.476094]   CM = 0, WnR = 0
> [    0.479072] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000d9373000
> [    0.485806] [ffff000037fff000] pgd=00000000f7bf7003, pud=00000000f7bf6003, pmd=0000000000000000
> [    0.494553] Internal error: Oops: 96000006 [#1] PREEMPT SMP
> [    0.500146] Modules linked in:
> [    0.503211] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc3-00062-gbf8d1cd #5
> [    0.510725] Hardware name: LS1043A RDB Board (DT)
> [    0.515446] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [    0.520260] pc : __memcpy+0x78/0x180
> [    0.523847] lr : elfcorehdr_read+0x28/0x38
> <snip>
> [    0.611262] Call trace:
> [    0.613713]  __memcpy+0x78/0x180
> [    0.616950]  vmcore_init+0x70/0x534
>  arch/arm64/mm/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Please work on subject like arm64: move elfcorehdr reservation early for crash dump kernel
>Sure, I will add arm64 in the subject, this was a miss from my side.

Rest looks OK. I also tested on Thunder X2 platform with no regression seen with this patch.
> Thanks a lot
Reviewed-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
> Thanks

Regards
Poonam
--pk
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-30  6:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-29  3:48 [PATCH] move reservation for elfcorehdr early Poonam Aggrwal
2019-12-30  5:07 ` Prabhakar Kushwaha
2019-12-30  6:07   ` Poonam Aggrwal

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).