From patchwork Fri Jan 3 11:13:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 854862 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp8187613wrq; Fri, 3 Jan 2025 03:14:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXE0T5yTGjp9mhCSA3hSjD82sDGofnLy41vXNZxRTZfGUynUxM0Eqik/eBSSbZmz46srawNWg==@linaro.org X-Google-Smtp-Source: AGHT+IFQkaF+BGD5l3+ERwNpcEEtlrhYG3ApvHCiRZbhhnqvxnNcPj7F652jEbfuXQwmPDSu7JFG X-Received: by 2002:a17:907:3d86:b0:aa6:8e72:e50b with SMTP id a640c23a62f3a-aac3366a0c0mr5094539166b.56.1735902841145; Fri, 03 Jan 2025 03:14:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735902841; cv=none; d=google.com; s=arc-20240605; b=GAAWvMjRCuDHBxrZZg254XX7d9gIp+ZocbGjKoiNaEQj8itHfhKGInwvxb/Ekq0J5/ VDwd3+tqvziYjP9iIZGk0nuTb0zka3gSiKoiSC8I45erTjNir0gSQ0hy8KA1nGp78p8Z tF4t6Ii/mGx9tGrwsiQf6FviadpL3PGrUtOFYZoZACr4tmLbNUgmxWCvsqArPpTs/uzt 2Wskvf2/HreTJ+x3kqtLTod8G3FALpnTmGgjyBBR7AlpjRw2eiVlqMnWy9/0Ahn5LQNF dGARKzdRTNTuo9ozlJ80amWzBQiQO7jpioqKdvSqWfAKPZ1Wdv8h2RYFEjsWQwSxj0gQ 6kmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fqMtU8J8RTjUYL2gkNXl4sjSogDVUkn/i1sjdMFI5vU=; fh=7T9U8CxT8/pi4VxDQB+ogewXJ7jd6DKe4+xLsZpalAc=; b=Ua0KJt27FKxm5eyGP/CjkUNaG72C65oFdHmsAoC6en5uxqLOKLh0fPiuyo2gmbrk25 OqUI/aVNtToe7JBklThXSlUI/HsU4/mQaiJN+W+vH2hT6X/AlqW2XdGJ4N9uN5KYbdWb XJVHoIo4oPngMz/Q0ru+O1YBdBa3nhtRy6vitZCSh62HK/TcRHzal1FwJ9mWvbDRSo3f 8VCtwglCyYPUNpweQJYYV48LbYeTwCbh0+/DyYI5+4WGDZ60d55vjVQ2h4jzx6XpPvYA ThIML+qqnUdupAk/mZ9s/3KjLYtqhel69tXMIOrRh8akNWqZXNW/7XMktHJxKEwSItTn +4TA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xYnW5RnT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-aac0e8455fcsi1873091666b.215.2025.01.03.03.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2025 03:14:01 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xYnW5RnT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D429E8036D; Fri, 3 Jan 2025 12:13:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="xYnW5RnT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3046F8034E; Fri, 3 Jan 2025 12:13:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1647E80196 for ; Fri, 3 Jan 2025 12:13:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-43623f0c574so82842115e9.2 for ; Fri, 03 Jan 2025 03:13:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735902818; x=1736507618; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fqMtU8J8RTjUYL2gkNXl4sjSogDVUkn/i1sjdMFI5vU=; b=xYnW5RnT5EVcjSnXpC85d4PgAjl0+VfL4LDMwLYApdb7bsZ5Ay8GbugVzlCVyeSzno j8wo+9VE9jsOGnuWxUDVsIH/uzncbK2YpsMIXfQgi6vZvvj2zP4ei/2v/kDptRwQz01i oXPgMlLMuWriTEm+UXL0UFiTis65GE592Q0ODhmqgSiaE6B8Llxf/c3+iZ5ZnOyoH+ru c/f1tDdUis5ERjmPtbCr8qtw1EY7lD/SbhOIPA7mXAzdETC5WgIMFHqJbJxNWGOPcsLb 1fiPluQjdagGtj2CjSiz8SOM7DlPZJEIfO6zf5jQu6xKZVt1xGj9P6OB6nQlH3oPCO4q Ky6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735902818; x=1736507618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fqMtU8J8RTjUYL2gkNXl4sjSogDVUkn/i1sjdMFI5vU=; b=G4aVzJoFDvCuUISqAvqU5G1OGRMt3jwkQht+M7nUUtBqLzGQbr9SMXKxwC2D6PBr7p LLBSohTrL7baHvBgSidoi9ODnpeTQ9YPMKxJlLtgMQhGAJXX7iZAPIfCnXyF43B1cGFo fpUVcBs+mfVbAKy5mrNj8ztyalNGVtKd2pW0lHOdRmkvCFnu7tSA9M09MYKHdxVptT/G PQjNuTQeaHH3DcFMgL8ddr8IMayCVUr/wH/uX1jyAIDbGdIDtEJ+41fi3P0Zv8AeRbyS FbJ7725JfFhbT9eLo5fn0assBmaMsb9QkRF8WSdDeuqM3Lw4L4FYBpNYBcysNv5E6ORe zDlQ== X-Gm-Message-State: AOJu0Yz52NHz5corhO/pzwVwgSa3NJx39rks2rIElIFl0Gr894YFSxTk P7w9I60qgOd4u5JrSUjIpxK6a6aepHrwqkqf+pwzLoUkaf+tE2cikOL0khNFu9sDmCNZsMzrMxC FvKA= X-Gm-Gg: ASbGncvrCmCIoItm0FHqqMq32esPJpRJIytBGABUyz6jVkKRZ63QagLv/TjJ12Gz6ej VOYLjKtrf+WCN37ID7qeMrdpUMQbMyYAi43Plif+LWNkmnxT/AN4rhQKcJHXqUQicLm6km/USFr CZr1ZMt7jFxx85k/KcssKx5LdNHJVycr0Dogr+uuyy7gU5is2dvJdQVswCDpfCQ7p4EIYphNIJT BIhVNq0tsizVTqaDtIWK9TVIMLnkAInWj+oD08RgsCyN1hPrVc7vNDw7B4xIqDK1g== X-Received: by 2002:a05:600c:6a87:b0:434:f623:9fe3 with SMTP id 5b1f17b1804b1-4366fb8a411mr415625465e9.16.1735902818315; Fri, 03 Jan 2025 03:13:38 -0800 (PST) Received: from builder.. ([2a01:e0a:3cb:7bb0:af71:dfb2:66ef:80c3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656a0b361sm513138075e9.0.2025.01.03.03.13.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jan 2025 03:13:38 -0800 (PST) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Tom Rini , Simon Glass , Michal Simek , Jerome Forissier , Jonas Karlman , Devarsh Thakkar Subject: [PATCH v3 3/5] board_init_f_r(): use static calls Date: Fri, 3 Jan 2025 12:13:15 +0100 Message-ID: <18e378cd3cd3b9d5dd99d39d997d67b04921f182.1735896540.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Replace the init_sequence_f_r function array by direct calls. Signed-off-by: Jerome Forissier --- common/board_f.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index c2446ba344d..bd04a6eedcd 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1020,8 +1020,8 @@ void board_init_f(ulong boot_flags) /* * For now this code is only used on x86. * - * init_sequence_f_r is the list of init functions which are run when - * U-Boot is executing from Flash with a semi-limited 'C' environment. + * Run init functions which are run when U-Boot is executing from Flash with a + * semi-limited 'C' environment. * The following limitations must be considered when implementing an * '_f_r' function: * - 'static' variables are read-only @@ -1034,18 +1034,14 @@ void board_init_f(ulong boot_flags) * NOTE: At present only x86 uses this route, but it is intended that * all archs will move to this when generic relocation is implemented. */ -static const init_fnc_t init_sequence_f_r[] = { -#if !CONFIG_IS_ENABLED(X86_64) - init_cache_f_r, -#endif - - NULL, -}; +static void initcall_run_f_r(void) +{ + CONFIG_IS_ENABLED(X86_64, (INITCALL(init_cache_f_r);)) +} void board_init_f_r(void) { - if (initcall_run_list(init_sequence_f_r)) - hang(); + initcall_run_f_r(); /* * The pre-relocation drivers may be using memory that has now gone