From patchwork Tue Mar 22 21:47:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A211CC433F5 for ; Tue, 22 Mar 2022 21:47:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D6706B0196; Tue, 22 Mar 2022 17:47:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3849B6B0197; Tue, 22 Mar 2022 17:47:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 274786B0198; Tue, 22 Mar 2022 17:47:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 159B96B0196 for ; Tue, 22 Mar 2022 17:47:59 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E43AB243A2 for ; Tue, 22 Mar 2022 21:47:58 +0000 (UTC) X-FDA: 79273360236.10.F714FCC Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf22.hostedemail.com (Postfix) with ESMTP id 7D603C0017 for ; Tue, 22 Mar 2022 21:47:58 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6A31BB81DC9; Tue, 22 Mar 2022 21:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F77BC340F5; Tue, 22 Mar 2022 21:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985676; bh=DXWMWCtNqcjsmwVePQKE6A5+0n6p7w3U86+C8RQt9xA=; h=Date:To:From:In-Reply-To:Subject:From; b=q0IGxVA6vcDdJWR2L0f3dFsHSfX7Hvo8bjNjdTPNDQau3QGOJm9W5K5I8fHAYpfie diQaShq61vT023NC2P8bbU2hAXOl19HKxqufL9rsIFDltnt1cQK6Cx7G3hswh70xN4 YUVTQyTmbZwB/S4qazYx/Pw8b1Z9u//NPdQPfiLQ= Date: Tue, 22 Mar 2022 14:47:55 -0700 To: willy@infradead.org,mgorman@techsingularity.net,david@redhat.com,vbabka@suse.cz,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 185/227] mm/early_ioremap: declare early_memremap_pgprot_adjust() Message-Id: <20220322214756.0F77BC340F5@smtp.kernel.org> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7D603C0017 X-Stat-Signature: 7swp78jr7bd7fcwfpg9yooxcwoeokdms X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=q0IGxVA6; dmarc=none; spf=pass (imf22.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1647985678-251010 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: Vlastimil Babka Subject: mm/early_ioremap: declare early_memremap_pgprot_adjust() The mm/ directory can almost fully be built with W=1, which would help in local development. One remaining issue is missing prototype for early_memremap_pgprot_adjust(). Thus add a declaration for this function. Use mm/internal.h instead of asm/early_ioremap.h to avoid missing type definitions and unnecessary exposure. Link: https://lkml.kernel.org/r/20220314165724.16071-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Mel Gorman Cc: Matthew Wilcox Cc: David Hildenbrand Signed-off-by: Andrew Morton --- mm/early_ioremap.c | 1 + mm/internal.h | 6 ++++++ 2 files changed, 7 insertions(+) --- a/mm/early_ioremap.c~mm-early_ioremap-declare-early_memremap_pgprot_adjust +++ a/mm/early_ioremap.c @@ -17,6 +17,7 @@ #include #include #include +#include "internal.h" #ifdef CONFIG_MMU static int early_ioremap_debug __initdata; --- a/mm/internal.h~mm-early_ioremap-declare-early_memremap_pgprot_adjust +++ a/mm/internal.h @@ -155,6 +155,12 @@ extern unsigned long highest_memmap_pfn; #define MAX_RECLAIM_RETRIES 16 /* + * in mm/early_ioremap.c + */ +pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr, + unsigned long size, pgprot_t prot); + +/* * in mm/vmscan.c: */ extern int isolate_lru_page(struct page *page);