Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp17961pxj; Wed, 16 Jun 2021 19:01:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXqHS5ZqUuyYfLyEjWVhmBk1dNwKyFiaty/wXB5srMrqV+31eYMC9pfzpnH1DD8rmupTmz X-Received: by 2002:a50:d943:: with SMTP id u3mr3357775edj.175.1623895270626; Wed, 16 Jun 2021 19:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623895270; cv=none; d=google.com; s=arc-20160816; b=RftfvFe7eUdU0mdZFM8f/CC9R13sSBRYZSrvvibMSq/z6UQs7IglfkNuG/oxLe+pmp 36LhpWeBGJs8mol7cfGouQFTj606+yDxhH7fIBet91O8Oa+V4NZ5x89QUfHWvgEbjEuy ifvYhrG7K1CbPWIOPaGRH/ciWAXmz/KV0EBqN3MKKNBUSCW1rqDqO4Vz/XQGiJ8UokSz eRv5fAU3tFFjnao0t8vewRcq/Hi2BvIFEFzPaoCDNzhfCRbVRLaqQzkS8WI6VAXb3IZI f4YRRJyx/MWBXPoUFVhl3g9m4prFrlH0yZILzKvpzX1S+GcoclxdEHxpUJJYTrpiNpbj Tt8w== 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:dkim-signature; bh=IxTrbS4Vi1Y2JQcW33PsNgpO80cJl0hENqU+spUakag=; b=rJmqCCr3Ize3jxRQ8XzAOpaj0HBHLF1Swwbxk1JZEfob1VyrUc/UM6DPQQLo2JFg0p ArKBT7aJEwTYgeil/gJ73FpHHitiX9jRrY4drHGKssfmuSdMqaZ/faZC0xUfmJk0grsp JRuZjaZ/i+c1o2G7udqgt5yjRkRWvPWRm4yCsBEoIhUvm+HqhdMDVMdGbxtoLj9Bzq6P CYicJqe/lihUWLyaQbOKmw8VCfl9VvB+0hkAodcqumZeL3adi2bnyXEDMTbwjCqnfYb7 F2bhtWE7HceuPY8GgUM/PTfeeUpsAd/Q2IVuQmdD+J8FKVsOvqhu30Y6QOHnQsBhSWJB +OMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R9U24BhA; 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 p12si3847935eds.509.2021.06.16.19.00.48; Wed, 16 Jun 2021 19:01:10 -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=R9U24BhA; 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 S232920AbhFPTvW (ORCPT + 99 others); Wed, 16 Jun 2021 15:51:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:54952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbhFPTvV (ORCPT ); Wed, 16 Jun 2021 15:51:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 12F616023C; Wed, 16 Jun 2021 19:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623872955; bh=V1c2oiAhwllBJsNOnuqfRkhRhp5+LBGbB0+KsLMNU/0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=R9U24BhAP23w2lxorpjvSW1AiTl1cuQV57e/XTSTt6eB7dX7K6+W7FR8L4Sj4YVmG 8g2Ovj/iap75GwocVdPhYt7itWUvYkq+8J5r0Ltfhwrts4SPflHY79G4w0TMg7zeYq GMWjM/wy44NIhv43TGk1SDyt+1/4mX5wUiZSxD+sCKBtoYh76A2ypK0JA+V7BJ/ysu N+rxow+953YocxQeB41BBL+QFMiv2pLpblGHyYIAMimgvlGA0DboAQP6Qwf7t84n+2 +n+4PhN2k4BDre0/Lj2B85UTHNfwSQufmVAkqe4ZFrvlncHJQFKtzlCvs6e/nKFOL+ rQYavdKh+u9bA== Received: by mail-ej1-f45.google.com with SMTP id ho18so5706700ejc.8; Wed, 16 Jun 2021 12:49:14 -0700 (PDT) X-Gm-Message-State: AOAM530V49dna3kF5QyEJ/9vbVspdg+WuexvJlgZTWTDTpLuAG2sW4JQ K56Ck8LoGBC2QNcvWRcS1Jegdhsq7sPoA+QoqA== X-Received: by 2002:a17:906:9419:: with SMTP id q25mr1173382ejx.341.1623872953640; Wed, 16 Jun 2021 12:49:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rob Herring Date: Wed, 16 Jun 2021 13:49:01 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] of: kexec: Always use FDT_PROP_INITRD_START and FDT_PROP_INITRD_END To: Geert Uytterhoeven 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 On Wed, Jun 16, 2021 at 1:36 PM Geert Uytterhoeven wrote: > > 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... That all was largely a 'this is what you need to implement' review. > > 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. The not well defined ship has sailed, so we need to support either. > I suspect (didn't > check) there's also code out there that uses the root number of cells? Given it's a single value, there's not really any need to do that. Unlike some of the kexec properties which combine the start and length for example. > > code to have a common function to read the initrd start and end. > > What with code that needs to set the start and end? I'm not sure we can consolidate that as those are mostly in early arch boot code. > It needs to use what the receiving end will expect... That should be fine given fdt.c is flexible already. Rob