From patchwork Sun Sep 6 19:33:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11759703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CAE8E618 for ; Sun, 6 Sep 2020 19:33:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 31247208B3 for ; Sun, 6 Sep 2020 19:33:34 +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="M/d59Iyt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31247208B3 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 C64896B0003; Sun, 6 Sep 2020 15:33:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C15856B0037; Sun, 6 Sep 2020 15:33:33 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2E6D6B0055; Sun, 6 Sep 2020 15:33:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 9DDEC6B0003 for ; Sun, 6 Sep 2020 15:33:33 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5B29B180AD806 for ; Sun, 6 Sep 2020 19:33:33 +0000 (UTC) X-FDA: 77233635906.24.dock31_1e0d70b270c6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 3498C1A4A5 for ; Sun, 6 Sep 2020 19:33:33 +0000 (UTC) X-Spam-Summary: 1,0,0,1ecf3b9e12aa4dcc,d41d8cd98f00b204,rdunlap@infradead.org,,RULES_HIT:41:152:355:379:800:854:960:973:988:989:1260:1277:1311:1313:1314:1345:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3352:3867:3870:3871:4321:4605:5007:6261:6653:7576:7875:7903:10004:10400:11026:11233:11473:11658:11914:12043:12296:12297:12438:12517:12519:12555:12679:12760:12895:12986:13069:13221:13229:13255:13311:13357:13846:13848:14093:14096:14097:14181:14394:14721:21080:21433:21451:21627:21939:21990:30054:30064,0,RBL:205.233.59.134:@infradead.org:.lbl8.mailshell.net-64.201.201.201 62.8.55.100;04yrra97fu97hz765gtizk5nxpk91ycgxwk5ccibdw1gzrixaixzzpzxtpfensk.5febak9ocifpibq5nftffxu6kjkn6foxk7t5omsnr6pyzqpx54ueewofxobf4ma.4-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: dock31_1e0d70b270c6 X-Filterd-Recvd-Size: 3793 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Sun, 6 Sep 2020 19:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=GbMNrkLBxGmNSVmZdqvsvL+gwMutalvbb1INFje9QKQ=; b=M/d59IytXM0oQwpJsuioibpx+G JdOQuOdeWKI1hPzNl2vg7Oo58qEooKKWr3WQAgELONs3Qx6WzqQjS8xPOL71//MmivEsFyQ2Y2UXv s+5RPJzgL1tRNM1oaPY7774rTQKly1oKa6jlJ/gpZAf60GRVK/lh1exGG3EEOjTMbHxAfa6oAI8Wb 619XizF4SdSAuwHwOxuMcVZeHEJdk7o5QeesCCL+MUVx4uUgMmC9f0CgHSOampVtGNE9SkXaqkFFl xfs1s2VawYiMpY2p9TbhK/O9nAvLO4ZVmoFR1wiWEKGlk4dI3ilpZS8JSnnYkMIlAVU/dtuCDdj+n FIrOMdgQ==; Received: from [2601:1c0:6280:3f0::19c2] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kF0PZ-0002sU-R6; Sun, 06 Sep 2020 19:33:14 +0000 To: LKML , Linux MM , Andrew Morton Cc: Michal Nazarewicz , Wen Congyang , Michal Simek , Christoph Hellwig , Mike Rapoport , kernel test robot From: Randy Dunlap Subject: [PATCH] : provide stubs for MEMORY_ISOLATION not set (for Microblaze) Message-ID: <1f6b42e6-b6b5-40e3-92b4-77bd610d3e49@infradead.org> Date: Sun, 6 Sep 2020 12:33:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 Content-Language: en-US X-Rspamd-Queue-Id: 3498C1A4A5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: From: Randy Dunlap Fix build errors in Microblaze when CONFIG_MEMORY_ISOLATION is not set/enabled by adding stubs for 3 missing functions. 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(+) --- linux-next-20200903.orig/include/linux/page-isolation.h +++ linux-next-20200903/include/linux/page-isolation.h @@ -28,6 +28,22 @@ static inline bool is_migrate_isolate(in { return false; } +static inline int test_pages_isolated(unsigned long start_pfn, + unsigned long end_pfn, int isol_flags) +{ + return 0; +} +static inline int +start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, + unsigned migratetype, int flags) +{ + return 0; +} +static inline void +undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, + unsigned migratetype) +{ +} #endif #define MEMORY_OFFLINE 0x1