From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E2B8C4332F for ; Sat, 17 Dec 2022 00:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229562AbiLQAmV (ORCPT ); Fri, 16 Dec 2022 19:42:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiLQAmU (ORCPT ); Fri, 16 Dec 2022 19:42:20 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5076E4081D for ; Fri, 16 Dec 2022 16:42:18 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id a16so5823254edb.9 for ; Fri, 16 Dec 2022 16:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rammhold-de.20210112.gappssmtp.com; s=20210112; h=message-id:date:references:in-reply-to:subject:mime-version:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=1QFKv2TWTiAAUJtUNn93KfAKVJcdR7iRnXXIRoZLyMw=; b=OTXV3ptGWNYqx2UGC2rImTpDTUqU+wDZrKWBdy/UNAoeJvPRPrVSz1tG1jGOl8Ce3e s6M+0zp3iE/xPvJ46gLuHDMM+X+dYn3oSIIkuoF8AqAxuwdnMf3jhdxb358LL+YJDcfS dZ7iY559N/VzN10NYUT2zpg7KukATI1WYLCO3n8YoWy1L2Vv1QLCrv12PzmH3hpdw7+S rHWJyzzNPFxdyh5dz4Jy/tuCgfdBOqEUZVKTu3jNQXrzZT20P3EidtaaPA+3wqG2iGvD h5s1tkyGIxQOWmtZwzxznuihpx9A3d7YWy8DoYbCcGpmaMmXppEFilwGAndn5ZPfW9CD gezQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:references:in-reply-to:subject:mime-version:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1QFKv2TWTiAAUJtUNn93KfAKVJcdR7iRnXXIRoZLyMw=; b=b9sB84ol3RD8k5goGaqvDD0TTB5QzqrCv9JzQPiTJ/hhNFSqVtnIInccRw6Zai38In Y4lhCEBVAeimduUfc0yCGaAuMwtgyGANRY5xW1kM45/NmMuqtWVhZe/BASTewaQmlbeD 4nUIytyNgyU1j4aoVu/WEUeuVzvTKb5QyOtlEi0HmsICzxSklsgRDhNX2PR/gDYzRppM 3XdLvosLE/xsTzlqXHD6Q8MxgxhAy3kqA/LyS48TRzbrhj9lFoBM4PjttzMUkMnlC3z5 RGeS6JQv1ywNUxjYdLhEhHXPsvGO8obED9VOMGTIaq1k04ua2C9lvUaNUEF9r7+FI9AH +5fw== X-Gm-Message-State: AFqh2kqBIwD9jXsRl0srZRkj86FTjbS5zSUrrGiSiQchAZ4ruylLVQWD /VFkMO3OdIFFWNTbHq0y1bm1XA== X-Google-Smtp-Source: AMrXdXuEXjxQv82egRwfXB6YAxYwW32Z33izAMO7cRGkThTOjWfh0A7Qji8VV9ypvbxJ6Vi/3fflkA== X-Received: by 2002:a50:ed81:0:b0:477:ff25:867a with SMTP id h1-20020a50ed81000000b00477ff25867amr97915edr.12.1671237736873; Fri, 16 Dec 2022 16:42:16 -0800 (PST) Received: from localhost ([2a00:e67:3f2:a:8c01:9c4e:459b:314f]) by smtp.gmail.com with ESMTPSA id j9-20020a1709066dc900b007ad84cf1346sm1379556ejt.110.2022.12.16.16.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 16:42:15 -0800 (PST) From: Andreas Rammhold To: Rob Herring Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, Frank Rowand , linux-kernel@vger.kernel.org, John Crispin , Thomas Bogendoerfer , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Frank Rowand MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [PATCH v4] of/fdt: Rework early_init_dt_scan_memory() to call directly In-Reply-To: <20211215150102.1303588-1-robh@kernel.org> References: <20211215150102.1303588-1-robh@kernel.org> Date: Sat, 17 Dec 2022 01:42:14 +0100 Message-ID: <87bko2x3mh.fsf@rammhold.de> Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Hi, I've just debugged an issue that I traced down to this commit. My mt7621 based board relies on the soc_info.mem_detect function for memblock init which is never being called again with this patch being applied. The code in the original patch as well was on 6.0 doesn't allow any of the other (fallback?) memory initialization code to run as early_init_dt_scan_memory() always returns 0. Was this an oversight in the implementation or are some follow-up patches missing? Perhaps the code just has to return a different value when it has found some blocks of memory that should be used? Andi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB8F4C4332F for ; Sat, 17 Dec 2022 01:12:13 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4NYnxm32SDz2xJN for ; Sat, 17 Dec 2022 12:12:12 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rammhold-de.20210112.gappssmtp.com header.i=@rammhold-de.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=OTXV3ptG; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=rammhold.de (client-ip=2a00:1450:4864:20::52d; helo=mail-ed1-x52d.google.com; envelope-from=andreas@rammhold.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rammhold-de.20210112.gappssmtp.com header.i=@rammhold-de.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=OTXV3ptG; dkim-atps=neutral Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4NYnHR3Y2yz2yRV for ; Sat, 17 Dec 2022 11:42:24 +1100 (AEDT) Received: by mail-ed1-x52d.google.com with SMTP id v8so5874000edi.3 for ; Fri, 16 Dec 2022 16:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rammhold-de.20210112.gappssmtp.com; s=20210112; h=message-id:date:references:in-reply-to:subject:mime-version:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=1QFKv2TWTiAAUJtUNn93KfAKVJcdR7iRnXXIRoZLyMw=; b=OTXV3ptGWNYqx2UGC2rImTpDTUqU+wDZrKWBdy/UNAoeJvPRPrVSz1tG1jGOl8Ce3e s6M+0zp3iE/xPvJ46gLuHDMM+X+dYn3oSIIkuoF8AqAxuwdnMf3jhdxb358LL+YJDcfS dZ7iY559N/VzN10NYUT2zpg7KukATI1WYLCO3n8YoWy1L2Vv1QLCrv12PzmH3hpdw7+S rHWJyzzNPFxdyh5dz4Jy/tuCgfdBOqEUZVKTu3jNQXrzZT20P3EidtaaPA+3wqG2iGvD h5s1tkyGIxQOWmtZwzxznuihpx9A3d7YWy8DoYbCcGpmaMmXppEFilwGAndn5ZPfW9CD gezQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:references:in-reply-to:subject:mime-version:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1QFKv2TWTiAAUJtUNn93KfAKVJcdR7iRnXXIRoZLyMw=; b=W8QzAoQkUSkmJCTHG9AVkoSnvvRZLdA+OcU6TBNizemgsZnBFYFdtXXTKPivXU7jv9 Ifq7RxWLUHeIftEvJ0A7XjkQpY+Jy9frpUAR3lwKrhzxVg+vSa47PyKw6IKPGZ1zSgPz XRAkHU9Cw2uO4w0nGTs4t58ylm4UJDZiYz4UF2q+p4AX7UUzXsU2qt7bGzBq1qrOC2oF r7NCFkFivOlXlGc8oIq8yRsCQV5CvsxfRD/wDbty/gMGl2cSVcJsLw6tbkVWf5umtfd+ qWu8tH9+Yzt53G7JbYrzF1gd1a13RqH5eNMEMGmfWZuxNrbH6QuMR0zRe5ko2lpadgY6 gj2Q== X-Gm-Message-State: AFqh2kry9podWJ/zhYaKa/7EMOn2Dko6UbmVGquYvE3Koi9hK6laaGW1 8EQeP+vfytNKOtsymJXosJQCRA== X-Google-Smtp-Source: AMrXdXuEXjxQv82egRwfXB6YAxYwW32Z33izAMO7cRGkThTOjWfh0A7Qji8VV9ypvbxJ6Vi/3fflkA== X-Received: by 2002:a50:ed81:0:b0:477:ff25:867a with SMTP id h1-20020a50ed81000000b00477ff25867amr97915edr.12.1671237736873; Fri, 16 Dec 2022 16:42:16 -0800 (PST) Received: from localhost ([2a00:e67:3f2:a:8c01:9c4e:459b:314f]) by smtp.gmail.com with ESMTPSA id j9-20020a1709066dc900b007ad84cf1346sm1379556ejt.110.2022.12.16.16.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 16:42:15 -0800 (PST) From: Andreas Rammhold To: Rob Herring MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [PATCH v4] of/fdt: Rework early_init_dt_scan_memory() to call directly In-Reply-To: <20211215150102.1303588-1-robh@kernel.org> References: <20211215150102.1303588-1-robh@kernel.org> Date: Sat, 17 Dec 2022 01:42:14 +0100 Message-ID: <87bko2x3mh.fsf@rammhold.de> X-Mailman-Approved-At: Sat, 17 Dec 2022 12:10:59 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Thomas Bogendoerfer , Frank Rowand , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , John Crispin , linuxppc-dev@lists.ozlabs.org, Frank Rowand Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi, I've just debugged an issue that I traced down to this commit. My mt7621 based board relies on the soc_info.mem_detect function for memblock init which is never being called again with this patch being applied. The code in the original patch as well was on 6.0 doesn't allow any of the other (fallback?) memory initialization code to run as early_init_dt_scan_memory() always returns 0. Was this an oversight in the implementation or are some follow-up patches missing? Perhaps the code just has to return a different value when it has found some blocks of memory that should be used? Andi