[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <abadee118c1945c44d9bff7675b12ec4@mailhost.ics.forth.gr>
Date: Tue, 15 Jun 2021 21:40:43 +0300
From: Nick Kossifidis <mick@....forth.gr>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Rob Herring <robh+dt@...nel.org>,
Nick Kossifidis <mick@....forth.gr>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Frank Rowand <frowand.list@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, devicetree@...r.kernel.org,
linux-riscv@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] riscv: Remove non-standard linux,elfcorehdr handling
Στις 2021-06-15 21:17, Geert Uytterhoeven έγραψε:
> RISC-V uses platform-specific code to locate the elf core header in
> memory. However, this does not conform to the standard
> "linux,elfcorehdr" DT bindings, as it relies on a reserved memory node
> with the "linux,elfcorehdr" compatible value, instead of on a
> "linux,elfcorehdr" property under the "/chosen" node.
>
> The non-compliant code can just be removed, as the standard behavior is
> already implemented by platform-agnostic handling in the FDT core code.
>
> Fixes: 5640975003d0234d ("RISC-V: Add crash kernel support")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
NACK
There is nothing standard about "linux,elfcorehdr", it's an
arm64-specific property on /chosen and it's suboptimal, it gets the
addr/length of ELF core of the previous kernel through that property and
then goes on to reserve that region at:
https://elixir.bootlin.com/linux/v5.13-rc6/source/arch/arm64/mm/init.c#L155
Why on earth is this cleaner than just defining a reserved-region in the
first place (a standard binding) with and hook up a callback with
RESERVEDMEM_OF_DECLARE for it to also initialize elfcorehdr_addr/size ?
If you don't like the compatible string I'm ok to change it, but this
patch breaks kdump on riscv since that region won't be reserved any more
and kernel will corrupt it.
Powered by blists - more mailing lists