Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1895792rda; Tue, 24 Oct 2023 06:42:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjMbrtbdnxuiztoZOnICfnuyjiOnUFnKbC6kN5PEb0OK70/emwcKQbF/6JRzIKSTHIOomO X-Received: by 2002:a05:6871:725:b0:1ea:85a:db2e with SMTP id f37-20020a056871072500b001ea085adb2emr14710442oap.45.1698154970625; Tue, 24 Oct 2023 06:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698154970; cv=none; d=google.com; s=arc-20160816; b=ZlyrnRjLeqmM/WoES53ydg3fYg5W+x2u0OKVbVSaapFuhkXgshESd1vu8UU7JOr3hb NriFaKBX2nAonHgXyyahdt6oWuA/eXKqSk4AV+TLJ5Yi1oDA8WuB35zjr5r2Jtt8vvJH WtUoqPlCrzOx3QcNnPnxHA+h+Ky5scz3A7op0+OVJK1PgdhGvbo9/d+UqFEwKhan2PdM XooKPCI3sij2JHKi8GgmqgNfCK63oTV/w6f5k8UcRB1d1CDboLsNhJCD06MZsVx6asAE 96SKbxkRUob8ZMUJQwGSRWXukLQAIZhrooUsKV0X4dxbzs0Qj3F+KtPQAqhx8IrMXXFn Mx3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=AGSNH64KKNsUl3ixbNNzaPHrLSt50sqObK1lxL9viK8=; fh=hDiTZJvfkm2/sgaQZuhdYRXir0qtTDM0hU2zXBAoJhY=; b=AEzp6p7XY25FdCJOfR6DAOI4KpTBl98Gf8TwbOYufzXKR6dJ4oC9OCwWsrTqROgZjI t2lKImEpU7LOjnNoAQ47mK/2zYaBT6gEd8m5gh+ZaJSbR7yjlIpqiLgjP2lU3xt3IGw2 RpZBwj1xkCZyC+iX+sMjtBLPZloIfX1ryT8gY9mnYtrTzPerpYMWpXduXQfWIy8UY8BU mMqG6whF1o3sAeUffxqhtlS+jf3AtQa0+KVJHxVKaXrE6oDQFpJpX85nMr/KUzDCIGSb /1azYAbTAD7jPtOJmHSEewb0qi4tsHOkBLuRox0d67/ML/f8ldwtl0vdKNvBxQQ2PZMn A2Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RnVNYQAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bx31-20020a056a02051f00b005ace065e529si9006269pgb.333.2023.10.24.06.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 06:42:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RnVNYQAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 36B5A80A49A5; Tue, 24 Oct 2023 06:42:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234451AbjJXNmh (ORCPT + 99 others); Tue, 24 Oct 2023 09:42:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234210AbjJXNmg (ORCPT ); Tue, 24 Oct 2023 09:42:36 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F1B293; Tue, 24 Oct 2023 06:42:34 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD88BC433C9; Tue, 24 Oct 2023 13:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698154953; bh=oLUw4HUETYTag/q+WgmsddbpnNeeKsiPxomQx+RAhQo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RnVNYQASnBUCi7hrFCOBYE/zVGD6T5aLyP0YOtluyOSHUDBMjO2GQu/0+y1MIfN0K n9VVgaDU9jzdbNbLpfX7HnKPBdXM5rG8SdSWUUpYWHCqIWGYtZ7pUH1D8HveLn1GT2 YG94zDB63VHZiWgZiDxBKcMzX1muHDi1uhAKZY28iWx2WJ7IqNrliPV7rxjmSgFm5A iLCkvGGUKLb3YjgvSQqiKD+jTKIxFMJDdx4ZeMurfFBRUzOiFfSCWoYmlgtK0rkJTP tN/jgZCG5uzzA8wPz4Y+HXk4vuNGBjXVS4UARSn1QKZ7niibfBgPI7E8KV9DXTop5l KCQxKWcsmOHkg== Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-507bd644a96so6624926e87.3; Tue, 24 Oct 2023 06:42:33 -0700 (PDT) X-Gm-Message-State: AOJu0YwGPyNVrjj5iwVeR/RTFIlBujVuqNSNukX/CN/qI1e+ieB6DxGE OT2kVgDPZ/1BNhMZtJPVoXkF39U5VXDjUm3P4F8= X-Received: by 2002:ac2:5333:0:b0:502:d743:9fc4 with SMTP id f19-20020ac25333000000b00502d7439fc4mr8948350lfh.37.1698154951976; Tue, 24 Oct 2023 06:42:31 -0700 (PDT) MIME-Version: 1.0 References: <20231024172409.7b519868@canb.auug.org.au> In-Reply-To: From: Ard Biesheuvel Date: Tue, 24 Oct 2023 15:42:20 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: linux-next: build warning after merge of the arm64 tree To: Catalin Marinas Cc: Stephen Rothwell , Will Deacon , Linux Kernel Mailing List , Linux Next Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 24 Oct 2023 06:42:48 -0700 (PDT) On Tue, 24 Oct 2023 at 11:55, Catalin Marinas wrote: > > + 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. > Strange, I never ran into this before. I guess commit 24cc769d70d8bda055a028aa6a is implicated in this, if we run into more trouble like this i'll look whether we can bring that logic back in some way. The fix looks fine to me. > 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; >