Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp816240imm; Wed, 8 Aug 2018 06:18:00 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyU36Iaojl2C0Nf7LrgKyAlEt3KqxPG2a8qrclCNYaRIrrQQ3tP5mYTkq9ep2/QXzvgPcsj X-Received: by 2002:a62:a6db:: with SMTP id r88-v6mr2970772pfl.60.1533734280277; Wed, 08 Aug 2018 06:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533734280; cv=none; d=google.com; s=arc-20160816; b=HwwJbsmsUpFP2qqhRng1xh2Nf0JAoaZYE+C7eF85sz6722k7fCV67xmfI8ijn7phsk Qevh/tHFx6SoVWTZpjo/d8KVlNv8DO4WB2HsBwmoFHr4C062aX/PpyfRdzcxCYguwheD ME+2H36uwyrVxEQUcf4JDy274p7PnhGfvOErKmSVIk5KlJa51sVWL103AViRmUhFpecW lv9MUIxL3xzrPxKIVoWITxmNj1ToUse8nk/0J6W06JoQ7uXc0jqKaWlPpx8Jj8a5dpTf 0NU/Q7LEboU1YseMUS6sot4It1a2dL1gqQer63tXvKtfd4Wl7iZWMCeCy4h/8j3YSzz7 wwnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=zc7kvhS3M7N1qbe7eHzX9A+WKsJB5gTI/XyevVXFyIw=; b=ITL12HohUXPQcNzAJe/OKsOPwNbNBMyT2NC70cCVnnCCkfY9b8bTsfk2/kUyT804R8 KyjkxM7eX7peIozcqd0YGWei8VvHN+itW159uaji/Iok4CXYsf7/APvuLrSfIzTMi/et BR8Q690fSj2ExZZ2eegenz+tZ0TfA+cFOrgL4mVOIym/GuNCB55fqFIZWXm6zVhVIoeN QcGMZYKUsH425D86YFcHf5FA3e+FWFH6uJBRh43Qvz6kAIser4I06t8V9ECzYkBrrNQv pTNst5lqIiiVJA9nxfzM+KvgVsbN2P6CUeMjz0vxxqA05BrDWGqApUMfRf42kHRCbY1Y qcvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6-v6si3395084plt.179.2018.08.08.06.17.44; Wed, 08 Aug 2018 06:18:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727248AbeHHPgA (ORCPT + 99 others); Wed, 8 Aug 2018 11:36:00 -0400 Received: from ozlabs.org ([203.11.71.1]:51221 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727078AbeHHPgA (ORCPT ); Wed, 8 Aug 2018 11:36:00 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 41lsN34l38z9s0n; Wed, 8 Aug 2018 23:16:19 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: Andrew Morton , Geert Uytterhoeven Cc: Linux Kernel Mailing List , Dan Williams , linuxppc-dev , "npiggin\@gmail.com" Subject: Re: Build regressions/improvements in v4.17-rc1 In-Reply-To: <87lg9hb12y.fsf@concordia.ellerman.id.au> References: <1523884165-17044-1-git-send-email-geert@linux-m68k.org> <20180806155440.9dcb271a3b075bd964aec60f@linux-foundation.org> <87lg9hb12y.fsf@concordia.ellerman.id.au> Date: Wed, 08 Aug 2018 23:16:16 +1000 Message-ID: <87d0utati7.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michael Ellerman writes: > Andrew Morton writes: >> On Mon, 6 Aug 2018 12:39:21 +0200 Geert Uytterhoeven wrote: >> >>> CC Dan, Michael, AKPM, powerpc >>> >>> On Mon, Apr 16, 2018 at 3:10 PM Geert Uytterhoeven wrote: >>> > Below is the list of build error/warning regressions/improvements in >>> > v4.17-rc1[1] compared to v4.16[2]. >>> >>> I'd like to point your attention to: >>> >>> > + warning: vmlinux.o(.text+0x376518): Section mismatch in reference from the function .devm_memremap_pages() to the function .meminit.text:.arch_add_memory(): => N/A >>> > + warning: vmlinux.o(.text+0x376d64): Section mismatch in reference from the function .devm_memremap_pages_release() to the function .meminit.text:.arch_remove_memory(): => N/A >> >> hm. Dan isn't around at present so we're on our own with this one. >> >> x86 doesn't put arch_add_memory and arch_remove_memory into __meminit. >> x86 does >> >> #ifdef CONFIG_MEMORY_HOTPLUG >> int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, >> bool want_memblock) >> { >> ... >> >> >> So I guess powerpc should do that as well? > > But we only recently added it to fix a section mismatch warning: > > WARNING: vmlinux.o(.text+0x6da88): Section mismatch in reference from the function .arch_add_memory() to the function .meminit.text:.create_section_mapping() > The function .arch_add_memory() references > the function __meminit .create_section_mapping(). > This is often because .arch_add_memory lacks a __meminit > annotation or the annotation of .create_section_mapping is wrong. > > > I think the problem is that the section mismatch logic isn't able to > cope with __meminit's changing semantics. > > When CONFIG_MEMORY_HOTPLUG=y references from .text to .meminit.text > should be allowed, because they're just folded in together in the linker > script. > > When CONFIG_MEMORY_HOTPLUG=n references from .text to .meminit.text > should NOT be allowed, because .meminit.text becomes .init.text and will > be freed. > > I don't see anything in the section mismatch logic to cope with that > difference. > > It looks like __meminit is saving us about 1K on powerpc, so I'm > strongly inclined to just remove it entirely from arch/powerpc. Gah that doesn't work. Our arch routines call things in mm/ that are __meminit, so we have to mark our code __meminit too, otherwise we get a section mismatch warning. cheers