From patchwork Fri Aug 18 20:23:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13358314 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 2D979EE4992 for ; Fri, 18 Aug 2023 20:23:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 66AE6280066; Fri, 18 Aug 2023 16:23:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 619DF940012; Fri, 18 Aug 2023 16:23:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 50857280066; Fri, 18 Aug 2023 16:23:41 -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 41C19940012 for ; Fri, 18 Aug 2023 16:23:41 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 15973411B2 for ; Fri, 18 Aug 2023 20:23:41 +0000 (UTC) X-FDA: 81138351042.01.D860A58 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf20.hostedemail.com (Postfix) with ESMTP id 345161C0008 for ; Fri, 18 Aug 2023 20:23:38 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Ni7NRHRx; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1692390219; 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=sVojqgZC5Oa87bAeAa92zxKwzVUJMpto0yGZWvUp4SY=; b=MV5eUr+xj7b9qbdXEGjQiZD0xjNwCI8hNY6f6M9WxvybisWcDJqr9UF2QC6CPVyBLAwZ6F 3o9OHFxcZzYe/A2h+EJ2D9b4LBu/Ge0DjekKn6O9M9DIPivr67inQuEm5bfBDzJO53FLIE JIn870vLf/4pFrs2qZC/Ko0apq4OdHg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1692390219; a=rsa-sha256; cv=none; b=t4KkLs/lbMJIHNEdPq3VwbiatpUhqG/ceBmeLQEO+e2WXV0+HLQ0aW1oE3mpTrBdrq5W9L cPL29UGIt/SIhfoDtoHQvS9sz9VXqor429irj5L1mlxYDrZKuLVNaeTkL7I8DJkV373+IQ x6qv/N4cismVtUVJdln7pmAxtAFP1V0= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Ni7NRHRx; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none 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=sVojqgZC5Oa87bAeAa92zxKwzVUJMpto0yGZWvUp4SY=; b=Ni7NRHRx5b4t2IQB3qQ7Z/MJ+K rSPa32veDfubMM2LaVaFgaDZ9EG8WY7JCYvpiZd5wcDX3SJHlbcPS2R7PMoPQSRv7GMItrELodmcG 78UTPKkBQ/4W9BWT/7Bvn4kN4axTzsmjXtRn8QNlSoOMjvxZJY7FDrRL6VGJl4i7f7NNZGRSEuKdd ktnz/4HBjBdmapNOEB3mqZQhF8haDBsQN4X4RwHpt4w2DWfVj22IKjTVkVN9HSENKl6wAAS7e92SM BgkzDRvgln9Yn18HO5sw5HqewyrjfWuEEWNsSOcTYRmHHkNeC46ndMWYbw5iiN3q5HvChUV4xBEJ8 HfvWiwkw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qX60P-00BUiS-0x; Fri, 18 Aug 2023 20:23:37 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH v2 1/3] mm: Move PMD_ORDER to pgtable.h Date: Fri, 18 Aug 2023 21:23:33 +0100 Message-Id: <20230818202335.2739663-2-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230818202335.2739663-1-willy@infradead.org> References: <20230818202335.2739663-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 345161C0008 X-Rspam-User: X-Stat-Signature: ff56n4g6rkq7198h6xm6zdnkau9hbgo8 X-Rspamd-Server: rspam03 X-HE-Tag: 1692390218-534615 X-HE-Meta: U2FsdGVkX1+1fp1DEufO9t1JwW/ASICqwdIYPXv5pzOJoGaidCN8Mcdo+Tqj/THAmwsU6Y/yvUW7oOTDmEXcbY+S5CRbiWUoPjiHe0fQETzXYy3600slqJZQ+XvZKEk9Wmh+vTP/MGxy53J2tCNBqXEWTKyWNqLblE/dj3bY0+6WRWQ4o5fyI/xQHeWNG2zn/BCUnC3djREy+V9Q3cHeKTMFV7LDUz8jlUwsUVzx/OrxUgCwI9DWVmvtRC+szo0uP2URHixBnfdQfvtwgMOKmtpwKjKRW19YeCVEXCSORpVKUw1ESjOzCNvxjGeL659kbB35TIGoNp/WqI4srrwe3bScUDgtImLxJA3nGgvxgfAGu9rkOCnbvuyzqXhpklvVpmhn96Pg64DLEknoge7qL/2CMgodHKNBFPAtazphQHivV+SsnM06XTcK1nk85FrC4F09k0qh8H8EqdzfuqmU5PyTC5UPUYgqMYRtPHUK9Epr2JovAfP8xlDZTNw/ytoC6420EZ8EfOivlutVOffqKghysGuv9792udOgzPJ0ZK/+Ui9838cmyrqJFFFN0R3LAk3e2xrqHaYMvyhKKFSAuN8MY04uv9LpCwLw8I9ZXyd+uz4cSIX9WwM5rwH1uPp0UvC1bvNce8w8ir8iOK2CguP/j+Pxf31nY9yuUgiqIkKl4VQLR2QLkYhpPvvqPddaXwBE1i5FRHGNmDPjL+PYQP6v7C1oub/FM55ee2yBhmTmWaO90VeYIAYGynURrxcaN3UrcTEwxX/RnwSX3xIQa+HZVw5FM2TlageKYGKuPQGI0WHSmRLDab1s96RNwAaj5FciPisLKsxzNv9XCiZiVjEDy1evHiuY5D3YZ4IxHNvB+A75Tw2j7UQUd9vky3U5aEX95j42Y3h9ALuQL9Vp/Z3JRy1SfQA0RDJES0Qq/gH4t61JydGa0b4bECHnsQBXNTxyBMwQybxrDvwxLXc 3MqmGNB9 UGOboc+o1X8FYZCjuM1G+IddgfkV/2u2SGQWAFVWAm+zxammEUsp5g4MmPj+RensUDx1kmfhrv00dMXTZi1lVVKCNg5ln0eX3ZLCCHjQMeovMUICUCmioCZ06b7/iRcTcRjsqxK4OaPsQ0STspbrfG1vaQ3aBR6c8w7VVJOfrB/k3KMtpyiGKvW0jWB4+boSfyU+LaQzCJ9rQcNQahFXEypM+VEVNBZReTryt 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: Allow this to be used in generic code. Also add PUD_ORDER. Signed-off-by: Matthew Wilcox (Oracle) --- fs/dax.c | 3 --- include/linux/pgtable.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 906ecbd541a3..88bb13643117 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -49,9 +49,6 @@ static inline unsigned int pe_order(enum page_entry_size pe_size) #define PG_PMD_COLOUR ((PMD_SIZE >> PAGE_SHIFT) - 1) #define PG_PMD_NR (PMD_SIZE >> PAGE_SHIFT) -/* The order of a PMD entry */ -#define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT) - static wait_queue_head_t wait_table[DAX_WAIT_TABLE_ENTRIES]; static int __init init_dax_wait_table(void) diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index db4fe642b3e2..cb5c1fad1078 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -5,6 +5,9 @@ #include #include +#define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT) +#define PUD_ORDER (PUD_SHIFT - PAGE_SHIFT) + #ifndef __ASSEMBLY__ #ifdef CONFIG_MMU