Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1654954pxv; Fri, 2 Jul 2021 08:59:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbI89n8joSiV8WABQB5E6zVDAjzn7oAjFB2Tw9Hh/LAynkse1/dHaEQ+6FVJpmh7Xr/jW3 X-Received: by 2002:a17:907:c02:: with SMTP id ga2mr379799ejc.215.1625241545286; Fri, 02 Jul 2021 08:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625241545; cv=none; d=google.com; s=arc-20160816; b=rwVWbzjXH0cE5G2LQlpzI+81Iz4VLIfTSjnuAZGXt7HWzYpX290zF3UMDoQ8CFBjLW FqEWE5ZDiXa60Xii4uGQydBgr3JmoZCLDfyE/TkVQC2EmkSenz/k8LB3E05Fm1/M/tf+ AyuCkpjwbSwsxOxWHOw3W933fk8Kn0jVncL0WS42brj1Px9T8K00lzoFXiGx69BDNN1v jQZC5sVk2fmXePQneu86OlYgk1OIlAFvM7FSf1EbUrZg2vLSAiO+DP9C0ctO3S6Dl7bA JqG5KHv0HHzyzA1hjt79087Z6UoeHZa2M+jGapE7HZCfu6Bawqrah+T3S4UA91yJw7QS JyHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :organization:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=rbf9QHS+TOT8FIq/tTT9c6A10CUyA7lqgOvI/2S75fY=; b=fzf8S8BWXlqxmoMUC/0j5lopcBa1x1a8n7uSjoQpugPpvHSHOVZOEYN3Gcz4gasGxn GJjVBI09P0sTXyhh5PDVa25Ao2gzpYjzOsWlhe5U5OrpUCOMeYZBXBGTQ+2zpgKBXW0c KdhjYkQ+2Xv50OK/IRd3kmUoqKIv/NWPcMDq7cBxEBf/szLlCAwHyOdmJqH5tSGZgiJE +aUrLnT53Y3Y5t8r7Y8fksd8t8KVev9B4t95BsvUtk8KFIBzsKUOtd/uZy5TjJdxth9E 8cfcARFkNMeSQnkUsbwgs7wQDL4c3vbdLZyHqkKob+TUXirKi59wZvvtwZc5ViCL1wC3 z+yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@ics.forth.gr header.s=av header.b=W1poDQWG; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ics.forth.gr Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne13si2144750ejc.151.2021.07.02.08.58.39; Fri, 02 Jul 2021 08:59:05 -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=fail (test mode) header.i=@ics.forth.gr header.s=av header.b=W1poDQWG; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ics.forth.gr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231757AbhGBP7i (ORCPT + 99 others); Fri, 2 Jul 2021 11:59:38 -0400 Received: from mailgate.ics.forth.gr ([139.91.1.2]:62155 "EHLO mailgate.ics.forth.gr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbhGBP7g (ORCPT ); Fri, 2 Jul 2021 11:59:36 -0400 Received: from av3.ics.forth.gr (av3in.ics.forth.gr [139.91.1.77]) by mailgate.ics.forth.gr (8.15.2/ICS-FORTH/V10-1.8-GATE) with ESMTP id 162Fv1PL051420 for ; Fri, 2 Jul 2021 18:57:01 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; d=ics.forth.gr; s=av; c=relaxed/simple; q=dns/txt; i=@ics.forth.gr; t=1625241416; x=1627833416; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=t0VSE4yvqzLzoGTJTNfADyTmW4ylvlyixsQMnViMXlE=; b=W1poDQWGMNUQdc02AMMYJSW6C6qUeRH/acUywkO/d4MD5tgcU/o9zF5+Py8WOclL trm5ZmcrwwzVK4p6jn0HpS5Fu2EVOWe5rdrsVUK5f4m856HJfHqlCAdFhMIzc8Mw qlXFnflYUcFaIFRQLtnAtTpR/RFAVQ6p2k+US/xgkE0dRnOb1QNb3VWB1skgzSuU IRGY4LBskN2z22ucXLRJ1hYPbxIYMyPjjcKxCvwTAikA6OF4CSPO5UuuqhQsc+B3 hMWF7K5VDUgEyqADTZetuUeeyG9M8AujzOnpBfW+Nde7H1TsvLDIagHEjYiRLTXO zYReTKkrXBgvg7WKpeXrFQ==; X-AuditID: 8b5b014d-96ef2700000067b6-a9-60df37486b8d Received: from enigma.ics.forth.gr (enigma.ics.forth.gr [139.91.151.35]) by av3.ics.forth.gr (Symantec Messaging Gateway) with SMTP id F8.F9.26550.8473FD06; Fri, 2 Jul 2021 18:56:56 +0300 (EEST) X-ICS-AUTH-INFO: Authenticated user: at ics.forth.gr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 02 Jul 2021 18:56:55 +0300 From: Nick Kossifidis To: Palmer Dabbelt Cc: robh+dt@kernel.org, mick@ics.forth.gr, geert@linux-m68k.org, Paul Walmsley , aou@eecs.berkeley.edu, frowand.list@gmail.com, catalin.marinas@arm.com, will@kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] riscv: Remove non-standard linux,elfcorehdr handling Organization: FORTH In-Reply-To: References: Message-ID: <008ddfd79d256dcddd7c802e4eef6b5a@mailhost.ics.forth.gr> X-Sender: mick@mailhost.ics.forth.gr User-Agent: Roundcube Webmail/1.3.16 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeLIzCtJLcpLzFFi42Lpjp6urOthfj/B4Mh+YYutv2exW7xf1sNo Mf/IOVaLmW/+s1k8u7WXyWLT42usFpd3zWGz2Pa5hc2i+d05douXl3uYLdpm8Vu07j3CbtFy x9SB12PNvDWMHm9evmTxONzxhd1j56y77B4PN11i8ti0qpPN49DhDkaPzUvqPS41X2f3+LxJ LoArissmJTUnsyy1SN8ugSvjVvNy5oJNghULWjuYGxj7+boYOTkkBEwk+tr3sXQxcnEICRxl lOhvuMQGkTCVmL23kxHE5hUQlDg58wkLiM0sYCEx9cp+RghbXqJ562xmEJtFQFXi2cmLYHE2 AU2J+ZcOgtWLCKhLHHh9hxmi/iWTxK6/VSC2sICvxK+ZF9lBbH4BYYlPdy+ygticAn4SHS92 Ad3AAXSQr8Tn6yYQJ7hI/N38lBXiNBWJD78fsIOUiALZm+cqTWAUnIXk0FlIDp2F5NAFjMyr GAUSy4z1MpOL9dLyi0oy9NKLNjGC44rRdwfj7c1v9Q4xMnEwHmKU4GBWEuENnXcvQYg3JbGy KrUoP76oNCe1+BCjNAeLkjgvr96EeCGB9MSS1OzU1ILUIpgsEwenVANT/6/LD0RTd+2v8D9Z 96Z3S0fekS9aMs67BYLYbdo39SwyOb71rcM7LbW/DE0f7yo+992sIJvzO3rFnXaPTc1XGXZd ibz3dnrZef6tL765b70Y5RJqo79CNCzt6LO95r9nch91W/XLfW3P3lJxpZUb80ILRHPFDedZ HLm3siqiTjDszu8nuRosz+qVGDylIr1qfLoELjG9/aGksoN58q9So0tdp1jC/EqrNnW2boiV TZu+hV9l9dof9b1bCs+YbHvg49p+yMV/WhnrLLvJnHuU+2/9PJX74Uhb2baj36uLJ3Nv3PSQ XUT/SWbUT3EG1ZvJEa+eVJ3u1J2ulHjnuyyP+okfd4OCjFuzj3pE5hUqsRRnJBpqMRcVJwIA 3+AlDBoDAAA= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Στις 2021-07-01 05:52, Palmer Dabbelt έγραψε: > On Wed, 16 Jun 2021 07:47:46 PDT (-0700), robh+dt@kernel.org wrote: >> On Wed, Jun 16, 2021 at 4:43 AM Nick Kossifidis >> wrote: >>> >>> Στις 2021-06-16 10:56, Geert Uytterhoeven έγραψε: >>> > >>> > I can't comment on the duplication on arm64, but to me, /chosen >>> > sounds like the natural place for both "linux,elfcorehdr" and >>> > "linux,usable-memory-range". First rule of DT is "DT describes >>> > hardware, not software policy", with /chosen describing some software >>> > configuration. >>> > >>> >>> We already have "linux,usable-memory" on /memory node: >>> https://elixir.bootlin.com/linux/v5.13-rc6/source/drivers/of/fdt.c#L1011 >>> and it makes perfect sense to be there since it overrides /memory's >>> reg >>> property. >>> >>> Why define another binding for the same thing on /chosen ? >> >> Go look at the thread adding "linux,usable-memory-range". There were >> only 35 versions of it[1]. I wasn't happy with a 2nd way either, but >> as I've mentioned before we don't always have /memory node. > > I don't really understand what's going on here, but IIUC what I merged > in 5.13 doesn't match the behavior that other architectures have. In > that case I'm happy moving RISC-V over to the more standard way of > doing things and just calling what we have in 5.13 a screwup. > > Sorry for the confusion. Long story short: a) We use "linux,usable-memory" on /memory node to limit the memory of the kdump kernel, it's a standard binding defined at: https://elixir.bootlin.com/linux/v5.13-rc6/source/drivers/of/fdt.c#L1011 b) We used a reserved region (again a standard binding) named "linux,elfcorehdr" which has the same name as a property on /chosen used by arm64 for the same thing. With this patch we 'll use arm64's approach, although it's a bit worse since we'll need to add the same region twice on the fdt (once in /chosen as a property and another one in the reservation map so that it gets reserved during early boot). Fortunately I (still) haven't posted the kexec-tools patches on the mailing list so we don't break userspace by doing this.