From patchwork Wed Aug 14 15:44:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13763658 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 75787C52D7D for ; Wed, 14 Aug 2024 15:44:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC9386B0089; Wed, 14 Aug 2024 11:44:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ADA056B008A; Wed, 14 Aug 2024 11:44:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B7816B008C; Wed, 14 Aug 2024 11:44:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 671DA6B0089 for ; Wed, 14 Aug 2024 11:44:39 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 25CC2A0FE7 for ; Wed, 14 Aug 2024 15:44:39 +0000 (UTC) X-FDA: 82451273478.22.2C5CE6B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id 8C2BC12001F for ; Wed, 14 Aug 2024 15:44:37 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=eHUARuZI; dmarc=none; spf=none (imf29.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=1723650219; a=rsa-sha256; cv=none; b=m30u7VhmDUi/dhe0Od+j61dhiSsGXAbrnQZAWBNS/LkfsgWoNVSlbZ5lR9KWrkH5oz/fdr gbK+WBDonDm0qoOGg7b4V8vDcPaC3v3yUCPuvJHOb4i1d63V8nQZmImdmldGDahPSS4m2s TZXkQjlzRiIF8ukoKzVJWPyNCGIFRgU= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=eHUARuZI; dmarc=none; spf=none (imf29.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=1723650219; 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=RiQi1xwu7xn6bnJpfQHAtVQLm2/6ihErCEfVj9tkBvo=; b=TVeMKtbohFtn3EfOxsVM4OMDFW+jTngBkIIh+WwgYpY5wFePj6XMYA5kUKwcmKKSvxh8fb li3rYCMpvxp5JpXc7t4M4zJQCEaCwzWWu6Xnu5c8czUVVt3dETK8+GQKL42TL3BUUPQ8yj PGfg5uVzOcACqikxNr9jPgqi+6/qKCA= 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=RiQi1xwu7xn6bnJpfQHAtVQLm2/6ihErCEfVj9tkBvo=; b=eHUARuZI/k2Siw5xMucTFO1tFs 05neo4SYQKbnin4Egz7zuBogKPG7eGd9qUe7d4gppGr4IWqI61e9aBFE0AMunOrIKk369OGVndms1 9RaI4Kvd8Hw6ZxPySlCYJ9s5YkPUOWlsq11SKMfD40O2Q9Ik/HDtitTLPVqcHmFnclYyvmjKD+7Ct oF+1Ux/f0lDn/OUtQAziz0DQupDEF0WHKsIVzAN5EUjXqCZhBKwAr1Oqn2ubs+PYN6cGLQYDKbgha LK0VRLXkQXOb7gRUbIOhFqZMEhlXSt6QSbUkVgKguotrrcms4P06UNwWnMMeMAk8rfvoAYzYdVEN1 1vZAwaZw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1seGAs-00000000gHU-1YgC; Wed, 14 Aug 2024 15:44:34 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org, linux-arch@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , linux-s390@vger.kernel.org, linux-um@lists.infradead.org, x86@kernel.org Subject: [PATCH 4/5] s390: Remove custom definition of mk_pte() Date: Wed, 14 Aug 2024 16:44:24 +0100 Message-ID: <20240814154427.162475-5-willy@infradead.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240814154427.162475-1-willy@infradead.org> References: <20240814154427.162475-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8C2BC12001F X-Stat-Signature: k8668sqiohk9k9xcq3hbhek3zhj1r8w5 X-Rspam-User: X-HE-Tag: 1723650277-134520 X-HE-Meta: U2FsdGVkX1/aXTb1Mr/TfR4HGk4m+RS6UmXYydywDQyt+8BaPmLs6o1RgdW34p3YS6jjimLFhw0JVimbrS3GAWhJIENAbeW18PAPb+4DQBIAJ/Ab8WG0BIwjoPHBulvsAD1s8j8Ir0L2vRHlSKRtmHWVidAsvcBDArNvsG+o3Wuak3C2322wLpkm7jR+J+rc5jDVvw8eOpAg2PtthLDVrE9LBwVOmkkdpJ/N9Ql0IZFTrpHIaQDi93E0VEpmQPNGrIVbeSMf9rZ7q+KI3rdW2ToxmF+AK4BSNo5s1eSDEH0/vDSKYcsKti0ClV/He62By/CDn1qrsOmNadjVvopk4s7BexAQP0XKV399G1/xba4+Cyy6rCVKy9OSG2hS+I1Qni0D7fYuKUxBChhN9S3RCDfS1r968Es+RMo0XgqrmzBTmCBLgackDkGA393nb/VR/4Mv4QMhfQEaS5cS3DgJzrwyqZvAg8MWcbzbd1Tu2mjrIAt3SXC0Fk9cxpwc7lDd4pVo4ERO6hdkPl5rThBg0pbXah5tFXfPQLADkLeM2UloNWQkhxgG1U/KJzKAuPoILFzI+CT7c6LJ3G3Gxh9IqGUAIMYvtkelx2Im5J75OBe1looVYEYh/+XzMWJOp+koBO2llGtVg4vpBgxtb4UfnHWtFas6U2Qt56S2wuk1F3gZQSsj7yZwn0SROIDmUP/Ky8sSqL6T25zpE9HdMa1if/YQWOzF2EFZLFBdmjgkrb0Ffkc1lC+5kOTzW+5/GxmvnXW5Q+f80/5Zq81oqJ/40D0ZrJAXXr881qkISOjABYHj2WjUR/Qe4S/YtGT+k3GVpKYzPReGgYzt447AE1JEYO3LMPGEK7pCGWpayC/SrTA72iFTiH3Gzy6FN/bzlIlbRejqDNKuupeILgYRDBhrIPkr9QswJ11v/1inyExKkzaCwC/UOKTCPdKir55s1sQyMVw+F1JCufVKWUJIdxm nh+Lst3m L1scqA8NuUgpmHwM4kfWIQj5wJuqQANTfIkW8uqOcI49614+bKIKDGV0Q0x7gMpWSPtUaTkWtjdz633zoAqBezu/nh6x8fY3S561A7r7cuGNBY07o51+66WYaTf9kr4FN/OC2fQx/U1sOZzUH87UC4+HUOr74b1Uwx4Rv+nGIaSLPO/VR8hNpWZ/j3G+zJgsbgcnsmTgA5DoSd6/DCWi8F2xno/ZpMWL7vGVeQhN6leVrt2SPVlr9UxNZ6k7Sb5juxXcd 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: List-Subscribe: List-Unsubscribe: I believe the test for PageDirty() is no longer needed. The commit adding it was abf09bed3cce with the rationale that this avoided faults for tmpfs and shmem pages. shmem does not mark newly allocated folios as dirty since 2016 (commit 75edd345e8ed) so this test has been ineffective since then. Signed-off-by: Matthew Wilcox (Oracle) --- arch/s390/include/asm/pgtable.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 6a21d947a687..1bb7f33394d0 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -1413,17 +1413,6 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) return pte_mkyoung(__pte); } -static inline pte_t mk_pte(struct page *page, pgprot_t pgprot) -{ - unsigned long physpage = page_to_phys(page); - pte_t __pte = mk_pte_phys(physpage, pgprot); - - if (pte_write(__pte) && PageDirty(page)) - __pte = pte_mkdirty(__pte); - return __pte; -} -#define mk_pte mk_pte - #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) #define p4d_index(address) (((address) >> P4D_SHIFT) & (PTRS_PER_P4D-1)) #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1))