From patchwork Fri Sep 15 17:28:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13387301 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 11D06EED619 for ; Fri, 15 Sep 2023 17:28:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 80E586B035E; Fri, 15 Sep 2023 13:28:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 76ED86B035F; Fri, 15 Sep 2023 13:28:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 635466B0360; Fri, 15 Sep 2023 13:28:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 550606B035E for ; Fri, 15 Sep 2023 13:28:43 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 27C57C067D for ; Fri, 15 Sep 2023 17:28:43 +0000 (UTC) X-FDA: 81239516526.13.02B94BC Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id 8A8DF140028 for ; Fri, 15 Sep 2023 17:28:41 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=KELzHD3j; dmarc=none; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694798921; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2i/sXmSR7Ozo56DuBZMs0VNeeLRw22KLzNAbjpObZmM=; b=kqz6+FWdrsx1f+ZSB0Bmi6sHXn1fyhMefPAe3O6Hk0P3o5weWIEU68Ccz+Ox7EOsBzQTDI CHBDKGGIqf946Oa1EMsyrJcwqcmygA/xQosGcUL5wsr3ulGWOq9nX6rphuOUNzwFReQaH6 dyY0/lCoHqSRC7UtaI/yCegDd4QR4po= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=KELzHD3j; dmarc=none; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694798921; a=rsa-sha256; cv=none; b=B11qqr3tkN7sWDCFvXv0n3LX4t75AmfLzvJIfDx97eGSkLYo+MydlmQVBOzpSPesNrSgB6 /+tuu+xazHqCNvcNImblkrXdH+B4je53t6/pmLGPTNu/5odYmvBOd+jutZMnzAsVIEi8O9 gYdgd85dpwQYV0if1N0Jx0R3bv0Lju8= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=2i/sXmSR7Ozo56DuBZMs0VNeeLRw22KLzNAbjpObZmM=; b=KELzHD3jhsEdbC0d5YQRPhCjCb VXnx6bRq+99LdZHQQA64VkBwEU6daG4JCKk8gA+OETsEyFUXnPD5mBRFgyTQd2djDc5LpjoOQFNug awAryetTdBr2gj6hS8M/Ad9FUcpBVzNZ4zoWL+ApESxKeOX88cQBlP44ZsxzHjfm2qUt8guLGTFMX yqHwEJJjW6qnTFr43xwhyHmLW73hZvZ43fr0JNeRn20U8zNfM3/sxxSfA6SQXqj8qIqSj53+bKFxY Cfk7UHweI7D5BusCRJi97CiZ6RAqsxnbpohzp522AsxMtrVMe9IXIrlpuuIsM40xtC18vSpZcbwvc EVNbgyEQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qhCcI-00B2xr-Ge; Fri, 15 Sep 2023 17:28:30 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Claudio Imbrenda , linux-s390@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 1/3] mm: Use arch_make_folio_accessible() in gup_pte_range() Date: Fri, 15 Sep 2023 18:28:26 +0100 Message-Id: <20230915172829.2632994-2-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230915172829.2632994-1-willy@infradead.org> References: <20230915172829.2632994-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8A8DF140028 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: dmj3kxjaog8r98ktcnmqpstsjb8jhuo9 X-HE-Tag: 1694798921-48015 X-HE-Meta: U2FsdGVkX18zb7hLTlGOa2a8zPq5/IjAHPm17ddHWUOzZqePbrrnK0THDwoqUUCG8+xDZo24S2oIaIzRlozHDHWmYVKafaqMUjgrxJfuSdr+q5Wv+EIFYRO4UYU7KHTrBavCRp4Ah3EXIcWJ/+08HcBmX909cYsdw6mP0xbIBangP1ciwwfUZUU0+4iZAVgmfgyM2PXi7HUAMGZF8+X1BM6qMyuKf8TK65S2Bh10z+Vf/yZQyq/wLMQgAySp9vlTEPGZo0nzFgK9lrNVBMlr5dF07EBOChoF5FAftQk6/b2iOeFELkee3VQ4LnHA+oTQtelCDS9ThfwcFR1Dacqay47gYLxuzTwlm3mrPd0Q/lQgN3uBrBffIqBesuTshl/ff3wNCPaDREfzMYgogACTt4e06e11WDUMHpGBGpOwkmBLSmgh1fVdJFsxF0xqo787vS+Jdn0oNuXzBtYwo3Gvcg2tYhkMo84JVxZIwkiqCEhv5K+QHmrzP1YYfQQvdQcIu5g+zJwmbD3rhXo58Jph6caQbO38hmfF6427V3I4tlfzNl5vBXcnMgmqukSY0l12IAv3TJtWOjslvv+PCOwlngHSnwhJxurAR9hXxqDID5FI0+FsrSJezwqLEBh7pVStPi4YxZNmsr7J+90m1TSU46u7BC/oBqNd1lpygPI4QXYGc4ChT+Z0PFyWRyxd5XPYG5gOsp8XcX9RCqms6+L2sTnsPorywAiFL+9xNX6B8XEL4mhhA30HmReYXt8SPFW44TCUqZmMK1gDpx02X7pjLOsrFvjXt/niu8Ufqdofe6XeKuPsUiMlMB6iIXASBLlNgyajXivPi0lAUDFP7ijryDUXHyjFgPkfh0UNf6pqsCaHKpxnyajecPUS6/GJzpVnsdrE3cnFOX7FEouj7IqD366ArIxNzQ88DJwP+FNyVyj6dO2P+GkaBKrp7xH/3cnxD/DJkAcVCulGGITETKP clo3HNXJ a+J0xTZqmC+VSfDGcy+DSKWHvVXUEQ+2+/PPmN35AXhgmPRpUltTXHg2MmqEeTu7aifwjpaRPNmYGqqgEn2RgmTApuzEsYKkkI/DZBIoK6vYLHi+MHp0Crip7wp81GIcw+bTLI0ZOwgmbiaYM1E4vopYXVxXmTjrdNZ6xrOXCIQ3NKgJVoQWRYbpv8ac9XmfwudLqiibKThyeF/xJuZobTyTqrul206nkuF07ScH4umuMxlJUE7nWfcFpzQ== 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: This function already uses folios, so convert the arch_make_page_accessible() call to arch_make_folio_accessible(). Signed-off-by: Matthew Wilcox (Oracle) --- mm/gup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 2f8a2d89fde1..ab8a0ebc728e 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2622,13 +2622,13 @@ static int gup_pte_range(pmd_t pmd, pmd_t *pmdp, unsigned long addr, } /* - * We need to make the page accessible if and only if we are + * We need to make the folio accessible if and only if we are * going to access its content (the FOLL_PIN case). Please * see Documentation/core-api/pin_user_pages.rst for * details. */ if (flags & FOLL_PIN) { - ret = arch_make_page_accessible(page); + ret = arch_make_folio_accessible(folio); if (ret) { gup_put_folio(folio, 1, flags); goto pte_unmap;