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 X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15242C433F5 for ; Thu, 16 Sep 2021 19:57:03 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30B3360F38 for ; Thu, 16 Sep 2021 19:57:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 30B3360F38 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE7988314A; Thu, 16 Sep 2021 21:56:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 8115B8314B; Thu, 16 Sep 2021 21:56:58 +0200 (CEST) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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 9763C82E03 for ; Thu, 16 Sep 2021 21:56:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qt1-f175.google.com with SMTP id j13so1860314qtq.6 for ; Thu, 16 Sep 2021 12:56:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=IrLxBEYoJP5nKFnqz1SxBPT0uNlfceGJAzyHVtLG+Ms=; b=Al0A/Ie0dCsgsOfAPFha8o5uWyD54bPtFBWmQH5gA32EqMp73dl4wHFM904geobIBf gYXakFvZUqHerznqJuG7qgn3JZXP1+PZGPo8OOZPrkkqJcDa4882oayj/bie81lAHodf jTlOp2OhH4odiOWnyFz/LRXiTooUhMu4xySX5KUdTx/ljf3jEHdQEzD0Vcm+yK8Ihp8v tCuEC64tIPysYxhIAKbhQhwONQHYIlDfdtquOBrY0ysYIW5RPshZ4Zvf8l2Nj6RPNUAg 0okV1plIEZaoyHw3xai03iWon/tFTMqaT3ux2cTmRR2CT4UouycW71f9GU9sDltAHU6C Ph1w== X-Gm-Message-State: AOAM531zGu1ZVwML3Z9jrpNpAQqTx7oASoMudgdsZbMQv43qvTVFec8u QwTRWgd6vH2xz22hVVW9V1Rw/zuEeg== X-Google-Smtp-Source: ABdhPJzIEGloULSa9TyBjs/3jbP2kgP7MlxxaY1Sq8bUZa4//3TN5/2H3sNsGGzkiG69838/zFEegw== X-Received: by 2002:a05:622a:174d:: with SMTP id l13mr6781842qtk.56.1631822212755; Thu, 16 Sep 2021 12:56:52 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-d880-4580-a9ce-9f2f.res6.spectrum.com. [2603:6081:7b01:cbda:d880:4580:a9ce:9f2f]) by smtp.gmail.com with ESMTPSA id j26sm3110442qki.26.2021.09.16.12.56.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 12:56:52 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 1/1] powerpc: Drop version_string placement optimization Date: Thu, 16 Sep 2021 15:56:48 -0400 Message-Id: <20210916195648.9424-1-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210802131838.21097-8-pali@kernel.org> References: <20210802131838.21097-8-pali@kernel.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean As explained by Wolfgang, historically PowerPC would do a number of things to hand-optimize placement of the binary on NOR flash in order to maximize utilization of very scarce resources. These days, we simply aren't optimizing our binary layout for NOR flash placement and it's quite likely this wasn't working as intended. Furthermore, this level of optimization makes it difficult to have version_string be a global, instead of a weak and overridden value, and so make more progress on reproducible builds, which is a current concern. Move to having PowerPC no longer store version_string in the early part of text so that it might be part of the first page of NOR and instead use the same declaration everyone else does. Link: https://lore.kernel.org/r/96716.1629798400@gemini.denx.de/ Signed-off-by: Tom Rini --- arch/powerpc/cpu/mpc83xx/start.S | 7 ------- arch/powerpc/cpu/mpc85xx/start.S | 5 ----- arch/powerpc/cpu/mpc8xx/start.S | 4 ---- 3 files changed, 16 deletions(-) diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S index 9da22ce486a9..c4953df4a271 100644 --- a/arch/powerpc/cpu/mpc83xx/start.S +++ b/arch/powerpc/cpu/mpc83xx/start.S @@ -13,7 +13,6 @@ #include #include #include -#include #define CONFIG_83XX 1 /* needed for Linux kernel header files*/ @@ -92,12 +91,6 @@ */ .long 0x27051956 /* U-Boot Magic Number */ - .globl version_string -version_string: - .ascii U_BOOT_VERSION_STRING, "\0" - - .align 2 - .globl enable_addr_trans enable_addr_trans: /* enable address translation */ diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index f41e82ad189f..aca31b24c079 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -1138,11 +1137,7 @@ switch_as: .globl _start _start: .long 0x27051956 /* U-BOOT Magic Number */ - .globl version_string -version_string: - .ascii U_BOOT_VERSION_STRING, "\0" - .align 4 .globl _start_cont _start_cont: /* Setup the stack in initial RAM,could be L2-as-SRAM or L1 dcache*/ diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S index ed735cdee005..0ebb7b33a8bc 100644 --- a/arch/powerpc/cpu/mpc8xx/start.S +++ b/arch/powerpc/cpu/mpc8xx/start.S @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -62,9 +61,6 @@ */ .text .long 0x27051956 /* U-Boot Magic Number */ - .globl version_string -version_string: - .ascii U_BOOT_VERSION_STRING, "\0" . = EXC_OFF_SYS_RESET .globl _start -- 2.17.1