Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3989681pxj; Tue, 15 Jun 2021 12:56:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUNy+Y3yszNTLudFglbMTQ5pcc9f3OpJ5V+Qfkiw6PnOZEo3O0bUn7seEuFPwQBeNA8SRz X-Received: by 2002:a50:8e18:: with SMTP id 24mr1505681edw.275.1623786980673; Tue, 15 Jun 2021 12:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623786980; cv=none; d=google.com; s=arc-20160816; b=fm4hy91T0DStuQR8PDQ2LwktJgg4XsOU8bFylmqwAgAfHKR8jEAKFRLqTLcnQVRSaN dkNnvlJL0MC/yDtMCa8su0/aVHQkUkFrLM92iA95x3rqLAOlBJViJzNUdrCJhJ1fW1E0 7j/BKed/wIVQz7+B58yODfyfKmJhKWDnhjqEFv/J6pUZnvikxM0LUqCn1H11syOb8ao+ BojLcWjvubm358eArDPGqR9aJRjO+59N+k2LqUvqZO7rp/H3rnyW6wzokeELmAqe5aQ0 DA+orYBrrXlt8KsHcVFxlNgZyNMwGo4uaMus45yfyy0TNomofP11mAE2tKCvcx2ZBOve nMIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ummKl1kiRdJj6r7uF/IAFUndf0ZXlU14gIJuNgjDbgI=; b=NZn99wutCRmqHFhnMZqzZK0O1xAXMklXopEO1cNkNCXb1m/HA3xkPKQccDp/uxx/Gh b0Z3pgAcykZKxli/LZQsusv2BObPiWO+uLOJNiX0DAdsoHKukJlvLB5OxeKZTGh4I9gS SRI+lvaMWTsTTGvnTJFUDte+orqoDNFe6FVe2OJLS4sCVewYEYKGD3yigYSR6fpR9vTu kDNgX7g3qqZf1ufB9g+H4tVXo9ZSkx+HKkBt1wXtdKK5Bbt4AeVh6hHw7jHyeiTdLN2+ 6EFnIZG5spH7viSWrnJaqfmKaix335lHmm1tYmKAFNnAOfnO56gHzoTZIehLu3ntnIxO RiPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tK5G9Drj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z11si15638429edr.492.2021.06.15.12.55.57; Tue, 15 Jun 2021 12:56:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tK5G9Drj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230283AbhFOT4t (ORCPT + 99 others); Tue, 15 Jun 2021 15:56:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:35190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbhFOT4s (ORCPT ); Tue, 15 Jun 2021 15:56:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E60A16128B; Tue, 15 Jun 2021 19:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623786883; bh=W1xnnWvWsJfJPutiRyGO1n1B7NplEf1u/yklRr5NuJs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tK5G9DrjviDXt2s70irKKqTA9hgoFMYoOFnF8ATDkHvg2PmBhonYuP82rHCvzgnJB HBIrJR9A5eRMDWmjWc687AfWae0aY7aUWQJvk7zkUBoLc0Poj3PMgXYTfXUI28FiaR pqbPV66AfCWwwOt0U1qF9G5+NJZDAKnaNA801ttoZkOar24ORxLgqzScTm8kZgjZPn lvGVvRQrThm282fQcpBinnH7UboackJu9fQwSiDhJ3mO0+QBDdZHl+2MQrBe55L9io UCyIOI6XGeIerYLbs8PUnLexN0gnj4o14X0fm86pr+OPqRJZoDqpO4BGJiBQApM2fe H5LWtm921ip3Q== Received: by mail-ej1-f49.google.com with SMTP id ce15so24427323ejb.4; Tue, 15 Jun 2021 12:54:43 -0700 (PDT) X-Gm-Message-State: AOAM532GhUNHP0lisTZUFy4HX6g8v/MpGPGdVkVmst+jKrks8xH7v5hW nsZeXgj20vzabos6K7NNyEulNV1W1oB7FESX1A== X-Received: by 2002:a17:906:9419:: with SMTP id q25mr1314651ejx.341.1623786882557; Tue, 15 Jun 2021 12:54:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rob Herring Date: Tue, 15 Jun 2021 13:54:30 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] riscv: Remove non-standard linux,elfcorehdr handling To: Nick Kossifidis Cc: Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , Frank Rowand , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-riscv , linux-arm-kernel , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 12:40 PM Nick Kossifidis wrote: > > =CE=A3=CF=84=CE=B9=CF=82 2021-06-15 21:17, Geert Uytterhoeven =CE=AD=CE= =B3=CF=81=CE=B1=CF=88=CE=B5: > > 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 > > NACK > > There is nothing standard about "linux,elfcorehdr", it's an It is and it is documented which is more than we can say for "linux,elfcorehdr" as a node. > 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#L1= 55 > > 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. I might agree if we were designing this all from scratch, but we're not. We've got powerpc doing /memreserve/ + kernel cmdline, arm64 using chosen, and RiscV a 3rd way. What happens when/if RiscV wants to add an IMA buffer? That's no different than this case. The 2 architectures supporting it both use /chosen. Specifying an initrd is no different either. Rob