Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1773458rda; Tue, 24 Oct 2023 02:55:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSrvX71xvz1ad3e6e/SgyrpMrxOqyL/8Sbunqy/OriJlk0V2JYJZUoW6A1i6RYSXNIp3kC X-Received: by 2002:a17:903:2288:b0:1c6:e1d:8be0 with SMTP id b8-20020a170903228800b001c60e1d8be0mr17905668plh.2.1698141350343; Tue, 24 Oct 2023 02:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698141350; cv=none; d=google.com; s=arc-20160816; b=kgHxLB5X3D8zKBhL1HIvbkjbUHkhcCYGV1ickZLUHVXV8sPowm6+CF8FXRJD4K0yzK oc9fklcu6rWYgNc93w43hiXpcUEwuUfOJ5WwsWHnqj0jDf4v5XzYiYN5ofR+TnTnlvRy OkDoMZ34DThH6QygKUk70t8znIhrUL1OLLtQmYhweN6zmFE8ImMxxkw0ZGyQaxMgW7F6 8ZTYFn8ozktBQTMGeY/9DezUtTB4tgWDYggEftbKNRWWzle1P1rY9JDyJ9vTesDfE4+4 HA2IA7iEicZcKyrHI/Crb/ZlXutY3JPnH9o69V9GCixA7uaqDz9RJwKIGI4XrCRv/ZiH 3uVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=+BBtvqX0nc2PCog7KZHoxvRAiIKwDoLh3Wa4hxwfWmE=; fh=cyaoAA+ZWnqabDPRd5ZQ6oD1FibAz1YpZ6LML06xgrk=; b=XM80Zrw1uuWT5td0u621G0saGNVXjtLkxhFJtB2pI8QllRCyk96kLK9fPO00lYbkWf yl41WCsbioKXsYTtNXBoLrmDi9iYE//3VArYpNA9YIIL1wAPvDGtH/ieAf86FofZ1COW rz/hblkSemnl8MZMdRQUohc0xXRiFNZ8dk/TsyRAL8OpedmKPKIo3KsMOfa5FAA2MGES JyxwHxiyOqKh0K+dTVVZ/XJ5vBHl56lK2OwK9ZkjwhqtAB33JnMwn6rJpfORM0CyJ6MU 6wAk5brr3S401fsCZEnrZnIuLXFXzb/xOPQTYXkMG4YE4LvGk6YN38ddfDcjghJTG/bP Sclw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 2-20020a170902c14200b001ca1b6f296fsi8082939plj.239.2023.10.24.02.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:55:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B755F808A8C3; Tue, 24 Oct 2023 02:55:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234201AbjJXJz1 (ORCPT + 99 others); Tue, 24 Oct 2023 05:55:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233988AbjJXJzZ (ORCPT ); Tue, 24 Oct 2023 05:55:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC9A0C1; Tue, 24 Oct 2023 02:55:22 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13200C433C7; Tue, 24 Oct 2023 09:55:20 +0000 (UTC) Date: Tue, 24 Oct 2023 10:55:18 +0100 From: Catalin Marinas To: Stephen Rothwell Cc: Will Deacon , Linux Kernel Mailing List , Linux Next Mailing List , Ard Biesheuvel Subject: Re: linux-next: build warning after merge of the arm64 tree Message-ID: References: <20231024172409.7b519868@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231024172409.7b519868@canb.auug.org.au> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 24 Oct 2023 02:55:38 -0700 (PDT) + Ard On Tue, Oct 24, 2023 at 05:24:09PM +1100, Stephen Rothwell wrote: > After merging the arm64 tree, today's linux-next build (arm64 defconfig) > produced this warning: > > WARNING: modpost: vmlinux: section mismatch in reference: __pi_$x+0x38 (section: .text) -> __pi_map_range (section: .init.text) > > I don't know what caused this. For some reason, building linux-next doesn't inline all the functions in the map_range.c file and we end up with some of them in different sections. I didn't get this when building the arm64 for-next/core separately. My fix (I'll push it to the arm64 branch): diff --git a/arch/arm64/kernel/pi/map_kernel.c b/arch/arm64/kernel/pi/map_kernel.c index be7caf07bfa7..e07f3ece5430 100644 --- a/arch/arm64/kernel/pi/map_kernel.c +++ b/arch/arm64/kernel/pi/map_kernel.c @@ -20,17 +20,17 @@ extern const u8 __eh_frame_start[], __eh_frame_end[]; extern void idmap_cpu_replace_ttbr1(void *pgdir); -static void map_segment(pgd_t *pg_dir, u64 *pgd, u64 va_offset, - void *start, void *end, pgprot_t prot, - bool may_use_cont, int root_level) +static void __init map_segment(pgd_t *pg_dir, u64 *pgd, u64 va_offset, + void *start, void *end, pgprot_t prot, + bool may_use_cont, int root_level) { map_range(pgd, ((u64)start + va_offset) & ~PAGE_OFFSET, ((u64)end + va_offset) & ~PAGE_OFFSET, (u64)start, prot, root_level, (pte_t *)pg_dir, may_use_cont, 0); } -static void unmap_segment(pgd_t *pg_dir, u64 va_offset, void *start, - void *end, int root_level) +static void __init unmap_segment(pgd_t *pg_dir, u64 va_offset, void *start, + void *end, int root_level) { map_segment(pg_dir, NULL, va_offset, start, end, __pgprot(0), false, root_level); @@ -205,7 +205,7 @@ static void __init remap_idmap_for_lpa2(void) memset(init_pg_dir, 0, (u64)init_pg_end - (u64)init_pg_dir); } -static void map_fdt(u64 fdt) +static void __init map_fdt(u64 fdt) { static u8 ptes[INIT_IDMAP_FDT_SIZE] __initdata __aligned(PAGE_SIZE); u64 efdt = fdt + MAX_FDT_SIZE; -- Catalin