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=-9.9 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 519CDC433E2 for ; Mon, 7 Sep 2020 22:16:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 537092177B for ; Mon, 7 Sep 2020 22:16:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rfNv3rGN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 537092177B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 632DC6B0002; Mon, 7 Sep 2020 18:16:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E3826B0037; Mon, 7 Sep 2020 18:16:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F9F96B0055; Mon, 7 Sep 2020 18:16:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 370696B0002 for ; Mon, 7 Sep 2020 18:16:18 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id F237D180AD806 for ; Mon, 7 Sep 2020 22:16:17 +0000 (UTC) X-FDA: 77237674794.01.tooth81_0a0fbf9270cf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id C111F100473C4 for ; Mon, 7 Sep 2020 22:16:17 +0000 (UTC) X-HE-Tag: tooth81_0a0fbf9270cf X-Filterd-Recvd-Size: 4165 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Mon, 7 Sep 2020 22:16:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=y+jndXsSFHSqkdem4tICzGKtUuWGOW1XPa7G3+KJdlo=; b=rfNv3rGN+fxmp1UzL9RAptIeKY H8JJ+Aq2w9k4kpGmAAi0ZBdPgm4sZ6r/aCJzWtz5bG4AYpNDBiznLIqWgt0Y3RuZY/T0F//bbA1iX nY42XhJoLePtzqeCA+Pu0PE22oXzgKyj2Nk8uwf7ZT+gfQlzmGyjx7Zxbn0xiUv6QyIr4L0jNzF3R Odp7tj2lWjJI+zGQpipKqjtCRfs7zpAfcggfaG4IQgex8Rb5YxWdA2XcixynkdsAzm9xoBYbGE2dQ tSxQXNpJCQSZoHw8IDAyXMALKjRUDIosTTymQRi1aaaPyp0pKdmAL3+SWWXmz714iIWvPPFlf3uif jYBIqbHw==; Received: from [2601:1c0:6280:3f0::1fce] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFPQh-0006JG-7l; Mon, 07 Sep 2020 22:16:03 +0000 Subject: Re: [PATCH] : provide stubs for MEMORY_ISOLATION not set (for Microblaze) To: Mike Rapoport Cc: LKML , Linux MM , Andrew Morton , Michal Nazarewicz , Wen Congyang , Michal Simek , Christoph Hellwig , kernel test robot References: <1f6b42e6-b6b5-40e3-92b4-77bd610d3e49@infradead.org> <20200907070511.GN424181@linux.ibm.com> From: Randy Dunlap Message-ID: <8a1a155a-50ac-170f-13b2-01123bfc396f@infradead.org> Date: Mon, 7 Sep 2020 15:15:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200907070511.GN424181@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: C111F100473C4 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 9/7/20 12:05 AM, Mike Rapoport wrote: > Hi Randy, > > On Sun, Sep 06, 2020 at 12:33:08PM -0700, Randy Dunlap wrote: >> From: Randy Dunlap >> >> Fix build errors in Microblaze when CONFIG_MEMORY_ISOLATION is not >> set/enabled by adding stubs for 3 missing functions. > > I've tried to follow Kconfig dependencies to see how could we have both > CONTIG_ALLOC=y and CONFIG_MEMORY_ISOLATION=n and I could not find how > was this possible. > > We have > > config CONTIG_ALLOC > def_bool (MEMORY_ISOLATION && COMPACTION) || CMA > > and > > config CMA > bool "Contiguous Memory Allocator" > depends on MMU > select MIGRATION > select MEMORY_ISOLATION > > and alloc_contig_range() is hidden behind '#ifdef CONFIG_CONTIG_ALLOC' > > In any rate, I think the better fix would be to update Kconfig > dependencies rather than add stubs for these functions. OK, working on that. Should have something soon. >> Fixes these build errors: >> >> gcc-9.3.0-nolibc/microblaze-linux/bin/microblaze-linux-ld: mm/page_alloc.o: in function `alloc_contig_range': >> (.text+0xa0c0): undefined reference to `start_isolate_page_range' >> gcc-9.3.0-nolibc/microblaze-linux/bin/microblaze-linux-ld: (.text+0xa2bc): undefined reference to `test_pages_isolated' >> gcc-9.3.0-nolibc/microblaze-linux/bin/microblaze-linux-ld: (.text+0xa378): undefined reference to `undo_isolate_page_range' >> >> Fixes: 0815f3d81d76 ("mm: page_isolation: MIGRATE_CMA isolation functions added") # v3.10 >> Fixes: b023f46813cd ("memory-hotplug: skip HWPoisoned page when offlining pages") # v3.10 >> Reported-by: kernel test robot >> Signed-off-by: Randy Dunlap >> Cc: Michal Nazarewicz >> Cc: Wen Congyang >> Cc: Michal Simek >> Cc: Christoph Hellwig >> Cc: Andrew Morton >> Cc: Mike Rapoport >> Cc: linux-mm@kvack.org >> --- >> include/linux/page-isolation.h | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) -- ~Randy