Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp59815pxj; Wed, 16 Jun 2021 20:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0flJ+eZjtfkwrd8Au2zFsF4mz4RsysphyV89P+PqOHKfUu9N4Ty53NGlniQOtFd6LTaBK X-Received: by 2002:a05:6e02:1a0c:: with SMTP id s12mr717289ild.52.1623899789514; Wed, 16 Jun 2021 20:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623899789; cv=none; d=google.com; s=arc-20160816; b=I0tmkVevPiSKOFU0uRE+roGDqRjtrnV+b52QpzqWOaqg+yHl6aB9CvcLsQylEwKMkP scbdCHwTss8OtMD5Gl7xC0g+Tu1/YZTeP6V3YGiZ12KtLwxISwDIGnyhITWAHFj/gn5k CDunaQlmtrZlxdyHp4vCvoWVoqaZRwplN9CpusVnZkxnhR88mJWBbTODNDClU/xmDY2L 69QYkts0XqYhyQ2jhpCdvAl3iTibSnJadWX1O4XWvQBjdlg4F5EZDOPtk2cjWcPlwEf7 jq+Q1A5zqCphrLzl4Q/QYONFJTQ2yCS0GjTWYslgLvgDzbnOxiTNrFsau+W44ZIEhgiW hUfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=XsbmcWdS/YIcLL6mMGFfj7bfGnV28eL04LNJ7iHjaEA=; b=Jcz/g5p6mzpPNuLVrSdf4673q8eXg0QtBVTBxCG3YvfpA6wxvPcKBNbrPWOG7W47GI qYfVI8cdpNxrRzBmiw8SmyXgS+ViGNN5CI0hqKL7dmmwtpBPFXwIovJB0AgpbjeJhxp2 pkryJgv0XZ0MQAn8kLogU0Ozt87ePdswlIqZ06pbM1T/WSpZ8tieoayckxTdDSHng8Ss xj8keFvwdRYZ+8o3c8x/XePemwM1ganauvLHGyl34+KHPokyu6Q/lS5vx4TiI+p3hQ4X TtGwFS/BZRcLkycH5pKo6AVve/Mer5diXFAHBxDvA6Op5qL3QfOshCCZM16wueZP9Gf5 N+cQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j18si4451000jak.97.2021.06.16.20.16.17; Wed, 16 Jun 2021 20:16:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232685AbhFPTi0 (ORCPT + 99 others); Wed, 16 Jun 2021 15:38:26 -0400 Received: from mail-vk1-f175.google.com ([209.85.221.175]:45887 "EHLO mail-vk1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbhFPTi0 (ORCPT ); Wed, 16 Jun 2021 15:38:26 -0400 Received: by mail-vk1-f175.google.com with SMTP id az3so838869vkb.12; Wed, 16 Jun 2021 12:36:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XsbmcWdS/YIcLL6mMGFfj7bfGnV28eL04LNJ7iHjaEA=; b=B2TaLiYeyaPqkprl5UyTzZmJ4sspOtcRjPiFZjyHrilX/44isXVZZ1z9kM9W5fprKE /INT2rkLyIxqA20X2IMMkwOGVBtMUA+jadfrZuOG+ppI4IHeyb0lhDK4TWPdOJgiymn9 jtlVrDqh+I9/9OLoxmIVSnkapeqgPaWKYPfLyo3i1HPxXSVFREXqT6NdsEi2N1ev5aOD EkX1X1iX8NWdIN6gcayMPb17zsrimw2OR+PAXt/eCXVwVUZz02/0WHczuNM5zF1IPPog xa36g9GbpJe3n1qYppC4RDv4n2D+D2Q3a7TCkSQU/QRGHVUTcxGkh21wb7+9cCXYPJ14 HiMg== X-Gm-Message-State: AOAM531OcOda1ckXeepQB0T81ZAp+SI8AnsppZi2vYtBBM2Xp+S+lhX+ 6LXEh5g2hcOJT8LccBCaTuM4EPs57R12XhSH+nE= X-Received: by 2002:a1f:d8c3:: with SMTP id p186mr772309vkg.1.1623872178323; Wed, 16 Jun 2021 12:36:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Wed, 16 Jun 2021 21:36:07 +0200 Message-ID: Subject: Re: [PATCH 3/3] of: kexec: Always use FDT_PROP_INITRD_START and FDT_PROP_INITRD_END To: Rob Herring Cc: Frank Rowand , Marek Szyprowski , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Wed, Jun 16, 2021 at 7:14 PM Rob Herring wrote: > On Wed, Jun 16, 2021 at 3:27 AM Geert Uytterhoeven > wrote: > > Commit b30be4dc733e5067 ("of: Add a common kexec FDT setup function") > > introduced macros FDT_PROP_INITRD_* to refer to initrd properties, but > > didn't use them everywhere. Convert the remaining users from string > > literals to macros. > > I'm not really a fan of the defines, so if anything I'd get rid of Oh, as you authored that patch, I thought you liked them ;-) And I was thinking of moving them to a header file, so they can be used by other .c files, too... Upon closer inspection, I see you just copied them from arm64, which was not that visible due to commit ac10be5cdbfa8521 ("arm64: Use common of_kexec_alloc_and_setup_fdt()") being a separate commit... > them. But the bigger problem is what you brought to light with the > variable size. As I mentioned, we should refactor this and the fdt.c The number of cells to use for the initrd properties doesn't seem to be well-defined. drivers/of/fdt.c derives it from the length of the property, which more or less always works ("be strict when sending, be liberal when receiving"). Some code hardcodes it to 1 or 2. I suspect (didn't check) there's also code out there that uses the root number of cells? > code to have a common function to read the initrd start and end. What with code that needs to set the start and end? It needs to use what the receiving end will expect... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds