From patchwork Tue Aug 20 14:36:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea della Porta X-Patchwork-Id: 13770259 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 23D0EC531DC for ; Tue, 20 Aug 2024 14:39:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rh2Q70Yw8J0M3uUvlLdvsQJ7GpaTom9Aupmo76o5wP8=; b=rZF0lJR5oFJAE799dBj8xgcbGF mJPa1WoU0zNXBdu/IzjAA/loyeOoCmTX3cK0M1fXsEfGWQ+hycY3Qf9JA9WkXt74N5NPiMhSjSWcZ 29BB9lcs3KgEQqiLQq1w/wkrL5JKy8ofPgh59ebmIoBHMszAj0+Nu4WM3JuOYB7/VqpCchifX5rrE NXjkG6OvxbwEqk7ly8s6sGG1l6rzvdxOuCmrw6bFRiWMKiGIMi81bCFDD0rkgDOaLIFtlOGq+uP1Z k+K0LzW+CD4dhk378WyVfOPGRqf2KJyT7BtrKeg8f27tjNANBreIM64Mxef/RhZYvoY2ak3MSqMfr yy/cynlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgQ1N-00000005b84-3ZdA; Tue, 20 Aug 2024 14:39:41 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgPy6-00000005ZxC-2oOI for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 14:36:23 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a8643a6bd55so137761866b.3 for ; Tue, 20 Aug 2024 07:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1724164577; x=1724769377; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=rh2Q70Yw8J0M3uUvlLdvsQJ7GpaTom9Aupmo76o5wP8=; b=IcgSuPHp2YDchzPVF8BJ43kVV+NtLjVruE4pcHyoLqi81ByacdFjQUoDInnmiKysu9 Mp0I3Y2M7IW1M3wNy/FabHkBlXzjlFSzTc/veT9gfsWNJMpJ+j0JBZzA9GAKJ8hSvxDS Q/ZAfkAOGnpYlA19WoKU8UFYaBbpoWxeB67Qg5WtBbPMO6XShU5nLfwsjzTsES+0odUk 9bsnR9nTF6sErnSS+zEUHPdaj8KBDWncsb8L0UpzawiB+aQBrHZQC1WV+kLehoeiu6i6 s6nRRvYzzUf5S+zV4xOA9WIIeOROSpKgbBXNa60CgXHuCUMOalHEGTC63kXwmEx5IMJA Q/nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724164577; x=1724769377; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rh2Q70Yw8J0M3uUvlLdvsQJ7GpaTom9Aupmo76o5wP8=; b=Nihr++6LtVUe4G5o3DES+dIASqaTbB5bHAiU9fRszwAG0lT5act7KbPXgh/eda5to5 eohfFLVI+K9seaxqTqLlzwDsd8f2HCoSpF2w6iRmOSuiIqG2h1g3/hXYtr11f3A/v4uB RE/Y8IUMKsyKSwc2T8cGhuh0GiCe3aqCC+22xH4mdNbr5FcFh2TYNmXwPsxfn4lW4ldb Pa5kjY86qXybmjqezd0UdnETLVgiRNhi4wSPgnTu61S35kB1+ZTXpAiZ7wTxRXyuhusn l+lYnzqa7BZW9LK5fxVu4IIaT1maeodwDtk18i7FXsv6ENEDtqg0YPByVRin3ek7ZgrW diDQ== X-Forwarded-Encrypted: i=1; AJvYcCW6bTkaH9hPc59FQYqXAO4GJz8juZSW+Z+qSvyesdo5N8KNPMaTH8362WQEZbvesYx8yPkqlKHL7WENWCSRjqYT0bCyN0LSuy+XvZKfmwm6ndzfTaQ= X-Gm-Message-State: AOJu0YxiKhIsZFkt7qvIygfXWdlXiwxbDGTQiKNe7WOBbFmGYAk+n9wX wQRupyaDcmGMwI8IU/ouSzzIhiFCYWwXg8sm3JL2lpw+lSdiFeySIvEsoKz1li0= X-Google-Smtp-Source: AGHT+IEGycq7Zes7rT7OOvl2flOQqrkeiAZAc96Hg1g64tQ+uh8+RnXT78ievbR0WEcFfugVqWJabQ== X-Received: by 2002:a17:906:d7cb:b0:a7a:c256:3cf with SMTP id a640c23a62f3a-a839292f3fdmr1084910466b.24.1724164576436; Tue, 20 Aug 2024 07:36:16 -0700 (PDT) Received: from localhost ([87.13.33.30]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a83839355f5sm766076166b.106.2024.08.20.07.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 07:36:16 -0700 (PDT) From: Andrea della Porta To: Andrea della Porta , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Linus Walleij , Catalin Marinas , Will Deacon , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nicolas Ferre , Claudiu Beznea , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Saravana Kannan , Bjorn Helgaas , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Lee Jones , Andrew Lunn , Stefan Wahren Subject: [PATCH 05/11] vmlinux.lds.h: Preserve DTB sections from being discarded after init Date: Tue, 20 Aug 2024 16:36:07 +0200 Message-ID: <12d0909b1612fb6d2caa42b4fda5e5ae63d623a3.1724159867.git.andrea.porta@suse.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_073618_843494_953FCF5D X-CRM114-Status: GOOD ( 15.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The special section .dtb.init.rodata contains dtb and dtbo compiled as objects inside the kernel and ends up in .init.data sectiion that will be discarded early after the init phase. This is a problem for builtin drivers that apply dtb overlay at runtime since this happens later (e.g. during bus enumeration) and also for modules that should be able to do it dynamically during runtime. Move the dtb section to .data. Signed-off-by: Andrea della Porta --- include/asm-generic/vmlinux.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index ad6afc5c4918..3ae9097774b0 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -365,6 +365,7 @@ TRACE_PRINTKS() \ BPF_RAW_TP() \ TRACEPOINT_STR() \ + KERNEL_DTB() \ KUNIT_TABLE() /* @@ -683,7 +684,6 @@ TIMER_OF_TABLES() \ CPU_METHOD_OF_TABLES() \ CPUIDLE_METHOD_OF_TABLES() \ - KERNEL_DTB() \ IRQCHIP_OF_MATCH_TABLE() \ ACPI_PROBE_TABLE(irqchip) \ ACPI_PROBE_TABLE(timer) \