Message ID | 75b434c52f386c6078cd4fa7b92ed826d95d033f.1736221254.git-series.apopple@nvidia.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 9337AE77197 for <linux-mm@archiver.kernel.org>; Tue, 7 Jan 2025 03:46:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 252FD8D0002; Mon, 6 Jan 2025 22:46:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 203258D0001; Mon, 6 Jan 2025 22:46:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 02E0C8D0002; Mon, 6 Jan 2025 22:46:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D4FDE8D0001 for <linux-mm@kvack.org>; Mon, 6 Jan 2025 22:46:53 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8E98F1605D2 for <linux-mm@kvack.org>; Tue, 7 Jan 2025 03:46:53 +0000 (UTC) X-FDA: 82979269506.19.2FC6BF5 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2063.outbound.protection.outlook.com [40.107.223.63]) by imf24.hostedemail.com (Postfix) with ESMTP id BC2A418000A for <linux-mm@kvack.org>; Tue, 7 Jan 2025 03:46:50 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b="kc9guk5/"; spf=pass (imf24.hostedemail.com: domain of apopple@nvidia.com designates 40.107.223.63 as permitted sender) smtp.mailfrom=apopple@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736221610; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MDlQUB0aqP2xs6wtosFzyl65rMLf5s6Je3RoskpfjSc=; b=1tehZAlDzPoQwq83E5cUSdUgvOGE7+Ay5Hn1cMiTv6XM4oZ9PZrRit6wQZWlA3S4jroSll K2eUbw3pU+8AXccjck1cGvOLHu9l3J/nE1yIad7RfaXz8lb7OLtTMRVJQ9v4PevuBAG7pj aNTXqKp9bz3mhpEas03fgK0y2LwQzQY= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b="kc9guk5/"; spf=pass (imf24.hostedemail.com: domain of apopple@nvidia.com designates 40.107.223.63 as permitted sender) smtp.mailfrom=apopple@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1736221610; a=rsa-sha256; cv=pass; b=g6yDwwn17+FCeD8v4vrGeARdoxNmHMZexQlEkJkEVTkuFmXNyPcIZkfzc0UcFbRrCCkGTB 9dbdRV7TWGrm5FhTVIGsRXURi4BE9cCr2XUlsxWG8fuJixL19tG5a/78x2Xal5JoYCLCsm 0AuxEPbwmlP48yLgM8yoLud3z7/6NLE= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RwZIbQdp5RCxfrYxaWkxTx6WprxAnRTYCP5DCtcqMk7RJjuumaGhvcmT4s9if8muWE+sa25NZVbieQDjFvGMVUhY54c1+E7SL4LGiCH8m4iAUc4HCz/TcvRcrEL7AYQ5IXo3OOVCE/fZlk6Dm5UntRUy8Se2amI2BU0gC/Hp/LqjHdFppMOMD3eX6R/owjqhiV0noVW4bnTgWj5mwLZA508B9f1OaYixh7hvxpM0YvGnRZ2D5qVAcqktTHEZ42sc3TGGW1JiAdZhwJo0PxrKoyQkG8OCBP8ImAFWbe3ucNZLDFjuDmD4EFV/Ei6VejBWVj90CFOwWmjLToGp2m4bUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MDlQUB0aqP2xs6wtosFzyl65rMLf5s6Je3RoskpfjSc=; b=quQPkSr5XEocmUfzxOJPYTF1iFljHlltE0wSVKIw++vzdwjwhBrfQibCxDOArdhion86X3ZaTJxxXtDmKp7GiDAZjU8ffKBZu3VIuGReKW0ntBi3NsIMU1qqMfsUmLaf7MMcVt0v01WhFC9PYMMCG7+kq5Mn609M0j7g5pK5Y+MQejuWggT+IJnnJXDz5JG8osB28Z9r1a5rcvQWszN/SY+OrLAslRnoHpF1Gbv+MKLA/uwXGNOx1ijTabXSYOCySe95MPgfcYqApflIuO3EgJRI0QDAnmnsOO71NV3+QibWTp/1jWf5rnQ46/kphwXDwLIhBO0dY4zbDPQ+bYRXGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MDlQUB0aqP2xs6wtosFzyl65rMLf5s6Je3RoskpfjSc=; b=kc9guk5/hZlOibp8zY4AWPq/qVuK51V/I/1c6BZ2IjL+1Ut/P/eqsBCRliBTPzneleIb5c9sxKK43jPWyOOTePZEUdjWEo8BlJ0fo3USSEB7c/FRA+ZwSBrsp0dOkF1tyBb5BllXmXRGDgwnjA/cGGdcS8kG05cVmHqO/LfWVfn/kC+F/Flvl3S8+64QJ+G25qHySDCghLGx4b1VXbrCo5Yxf4Bj62BPpM1o7sMeOeXpNtmlHxVFJhqjsfUJkBFJGNWWzFpM7dxjbuqgWTVeuoJxnNwOVQAWcHDmjRwI7M6swnpohoNgy0U3s7A2TlYyygV31wzwx2fQwiuBepVIDQ== Received: from DS0PR12MB7726.namprd12.prod.outlook.com (2603:10b6:8:130::6) by CY5PR12MB6129.namprd12.prod.outlook.com (2603:10b6:930:27::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8314.15; Tue, 7 Jan 2025 03:44:15 +0000 Received: from DS0PR12MB7726.namprd12.prod.outlook.com ([fe80::953f:2f80:90c5:67fe]) by DS0PR12MB7726.namprd12.prod.outlook.com ([fe80::953f:2f80:90c5:67fe%6]) with mapi id 15.20.8314.015; Tue, 7 Jan 2025 03:44:15 +0000 From: Alistair Popple <apopple@nvidia.com> To: akpm@linux-foundation.org, dan.j.williams@intel.com, linux-mm@kvack.org Cc: Alistair Popple <apopple@nvidia.com>, lina@asahilina.net, zhang.lyra@gmail.com, gerald.schaefer@linux.ibm.com, vishal.l.verma@intel.com, dave.jiang@intel.com, logang@deltatee.com, bhelgaas@google.com, jack@suse.cz, jgg@ziepe.ca, catalin.marinas@arm.com, will@kernel.org, mpe@ellerman.id.au, npiggin@gmail.com, dave.hansen@linux.intel.com, ira.weiny@intel.com, willy@infradead.org, djwong@kernel.org, tytso@mit.edu, linmiaohe@huawei.com, david@redhat.com, peterx@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, jhubbard@nvidia.com, hch@lst.de, david@fromorbit.com Subject: [PATCH v5 17/25] memremap: Add is_devdax_page() and is_fsdax_page() helpers Date: Tue, 7 Jan 2025 14:42:33 +1100 Message-ID: <75b434c52f386c6078cd4fa7b92ed826d95d033f.1736221254.git-series.apopple@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <cover.425da7c4e76c2749d0ad1734f972b06114e02d52.1736221254.git-series.apopple@nvidia.com> References: <cover.425da7c4e76c2749d0ad1734f972b06114e02d52.1736221254.git-series.apopple@nvidia.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SY8PR01CA0024.ausprd01.prod.outlook.com (2603:10c6:10:29c::26) To DS0PR12MB7726.namprd12.prod.outlook.com (2603:10b6:8:130::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR12MB7726:EE_|CY5PR12MB6129:EE_ X-MS-Office365-Filtering-Correlation-Id: e3c9396b-df7f-44ba-a9fc-08dd2ecd8e68 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: 40Lsq17uE6APPjBzJ8OCiwNg0CXlJtYGz+ju9/1rezjFBB1dJgYP5UOZZsQkH0Ea10qMVfZdY97w3JvXsUvKEcOoeCDvvjlMmgc2iOsXcwA8zGz1deTXeTqeLJ3X0wHcuAYixMei4/5+QjedHUMdcij9rQLCOB+e+ODJpn4h8GeCRZmMHX9E+rfQf52BBShVPnyAP56y6vIr4lEyprPC0zunjBYOaWESxAQ66EbyHLXtuDkburdQatmXYdnskxz0QoQoXdFw2O4u4Okx7vP8pHC8tU2JvUPALW7UQ4z2szisEapG+SVBsj66/JrlCB/bJ73EoguS9j6h347iO2jVzcvDocyv0i1ulUFm3XT1p7WAtsJv+V9l2Qk8Z8u4jBWytHitMbSvSU3N1FLQjDlpCmACxgVDAmcownNuYMVeZ1NNJJ4NloKgx5l+vD+1ZGSAZmt6mlMy6XvszpwrK471kddqj2ztMnkH3YcMCkkgcep84R37O1kuEIw13NKy1OGBokjETmge8h34qaE77KkwNk63RTh3bTaJINL7u5o0qcTC5Ie80j08rZa2TwnvW4cbo08+N2FjihJ9/i9JsGvnOYsxqg4DOtFSBh2l4iZ4awrmxVV6fzd2zBm77JKS/k21bHFlPuXsOpClP4Sq3yqrdPhrv/xkEClYfI8cwJN/i+0U9r80ouGJTNoBuG53rHi0XVb7ejE+EgNt6WYYih3zfGWaPi11sm/RfR/nbKrrnw96gD6ft8YsvcOckiw7OtX7lHn0fkHFlelq5h7aySG6usNH7YDNdfn48+kNLOOzVZWHckvAvRo/U57wyrTJkC5BOskg4vUcJrn5nmF2VMbi24HewRT/VxEbKfzrZJRjAVCElm5tAbzrNX//8Zbl3zr2afMMacFRCv+/zC4Pmxi0M0nb1vxYPGXBgSbneYjj69CbOyAcv+UQqTfsy2cEjNIg1DVVYlemIKBXE52k9Z0dzlMi+MRLmvSv+64And1nAXwaZVD5uetw0Rlno6DAcO5f2FLFe9JE5CzlXdlauYv206JC4MUSeJAgsYFct6mVkzWDNL28tnNdMoumSuqFoLX5AJ1DDfO3W3TQtHnL/+ZYHNMbCcDYIBXAAG/rq/azQOmlJtqjY9SyFoFcXuQ+VD0ae14knRmn0awoWvMjWia80zK88Kmk3cTs1nb8Kb8gu6vjK0sTaBmeJoODd/kfOK1PIN+XIec7LiEw0gDA7Bz/tjhlMPCNE00OzN8uzHLfxSJWWHe1b+VQ/paC4rkALvBNgsFgTo4pCfTTFx+6pY+pqG4tJ9J0bffn4hXFIbmEXxV6FrpsNSKObfKG4uwN/dYp5ddT3KlskbL7ltzWCLT7+eliFrxDMc6Yo7TstOlzwPrwsUlG66zF/iMBzJnbgiFN X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB7726.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UnGyL12rj15VjNDWBHl4Kk69ftlMWD42QSRWiVv0pIOoVk2arj7GHxhjf4e7LIVo0y97iox8rjIMW4iGgrorBnmP3ucKZ11CFkR4sg+7fv+KVg51Qio/t3MiGXGo2eMMXUqjf+lF15gbiDDHurXtUo0XfEpIck56lLjXFVNSGKY+GSkyxUMOH3dij3pBC7Btq5HFYPtcx3xMCudgzFGwHDoj8dwVOh/Guy2FzLp7eRF/BQA862+epwThOKvcD6tksy2AQAodn6enM6HIwTJ1g6gTSns5WQR6Q8yfR2YvVcRsrYvaMy43xJQ7xgmT86l9Zmmn1ZuxWN7nZdyujKGn05qz1vn7Q0u8kK7QY9JwzYPRXhnfgyFDIihKNO1tCE3bzTpugpWPfgQ2bP6mxg9jDptlZLjn0bGU+JuSYr/GExvZsODthq57u9Rn4+S51N6K47EH7MuqIkD4/gao4tBFc8K4WHYYXKtx7qv68Uc8cQFPo/zNTxrSRrHLHAT5LQCaGl/lZGipvYXoYTN9EAZBm02BZW0wKUj9ymP9hg83vL2qTWjM78DcVXzbB92mX+6mkWCaQWtu0JuDGYNOHASwRAtETuQBxpD9iKj0bim+r0aXDWcenSZAZondyGsyKEFLSKksVZ9fxAtQBgyeiSb/sK85vwIOz6iHIgLOAfceObBdlNO6g1/E4LgYFF080ol430PYU+8Vfb2syzLuMSnP+DOwW8+Yh3c8jdGeuKYDWWSy2mWjNeUw0Q9FpQG92iPZRYEG8Zo6RoSny1rjcV05fOHWjN/SVOr0br4DYQpZmt//ujKMVFTFQ1oruF+/UtgBeBXRo0gywAI0pn6ztGw9Wmj0pQXkvbqTMtF5MXl0X5/4e1oA9IubSjqKzAJ8tZH+KXWIlQfGm2QMdsEgo5pYFCFWZUeDVf9EqKIHQ8fy6Rz9JBJQJpcI+5Wy3MeG7sIDsDJb8ysH3X9mGaGdbEVvjTxlq6CQIUNkcI52Gz0CxmUKdGI3XRoV3/x2wfXQ1NvKhK//rijFfin8AHknS4VjqCVBJQLJth3lxcITyiYVfvrOFq3MnwXyBjNYXKBI79EvIw6BHJge/1JYya5oRQ83hzygepe36KF7WIVyx3DwHuXIyhYvgxOqylL+oVlSE4Y7FJNude2I+JHU3iWS1QHGtLEa0G4y/ZhEUzGqVoChbL1hjxJ22KlRSimZV3seEP7iriqxQJb4mGexcaaBhcN+JPA/Kb+Mh+4a9Yo0E/zPMtTDpc7d7v7vCZ+zXfXGMF2dOQSz5yKchJPqDaVstFDuJfECMks5RKdKegFh9hpQGD1ZbZU+Gd4ea79gBC8f2F4b9wwJMhWihNlEpEfZq2Mn/EThvc903UyDA2jR399Fj/2Zd+ugETf3CnTXQc1i1o7sVAQCkZHnkyNhYdR0vMLI8ZffQJnyoiJ3EgV8f1ds6/Z7bivU5zmST5fN9HB8/HaI8f+wh/0YUcz1mzBf35WsGZjdPPfm/MRCB8tpS2PbMeIJESBGoSOfZR6+8Mzojb1NmZZpUGrl7EH6rhjwl46rLoo2Xkqp+7wmurwjhUReRyubgEbMLoP2Eey3n3T+0Ijv X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3c9396b-df7f-44ba-a9fc-08dd2ecd8e68 X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB7726.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2025 03:44:15.0611 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DL5qzyf/U5xZcgLjgRd/PgT9UPEgjoG1WTGfwQBfn/j83sU/By6AvXBeHZRyySbFJd9zGk4IU6XrKQc/2N92Bg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6129 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: BC2A418000A X-Rspam-User: X-Stat-Signature: 17rfbgcmienamt9y68ryf93tikowinqf X-HE-Tag: 1736221610-453728 X-HE-Meta: U2FsdGVkX19f/qykP9ZZVMgXoqZBJPWKwmeDfABy1ephhwXYgfccp1TAm55Qffsdyb5LvME3t93Q+d+9ql1XyMlnvN5kIq26AZcVt8yMAPIcsG4JwvqnYkv2Lgfxpv/FgFA1euKzdjqL+Ah7rxE1M6vULTiQ45/FhmZ9k3jOqwiliom/lFlKFVqkXDHdVCQrN4SW9+2lEjrF9FVDCgmrj816P6vASBGsRUKxxPcXwpgFcJHvNQniPoQn4O0I6f2hLRPVhf24FIcVEJ2gw6Z7qF4zkT+Kq8zk6v2STWchDOETWfe5jTSjmAg8RuziuDdTE2dVWb5ELGAuPYKIpC9/Uj7thGxQFVL+oxkY5bPDKo2ka/j81VMxE52hfrxY6Q+niA4+7XwNEmkg4uOZfDHX0ohvCyswXAI2BK6vDq7iseWDqkxCzanDu7h8fYE+Lgu0EZJgkgqojXcRMOkxMXFO0hD2b2CYIh/Dw32QgPho/BehTcObzHnnYLph/T9ecm/gyBpTGL6puuaPiA42twM3tQi2w1A3WR+lcbslYeCc0eQ6q82vNEwourZxzdIKznMD/aH9R3YGU3WnxKb5MCJXPXXps00qvnX4eFUGUpK68ta3O4I2wdhexmPyotAUqroZ+7+WZ623uNh8b+PMNkXDA30i04DdWMMHDuATUKHrPic5LiTz/6gOs65gOSCarApwtje67/HiAzMPkIAQpLfHH/s2gVEdf063DDFSi6rsKBVzZuEgFBaYfqHQjZJDvvVxYPkjhT6gaMepmO7JfNZuqI69XPtWkbyTo3/r8RAPMLjWJTaTqfsj3TqxfKkhI67nkNiuDL2nSWCDyIngYvuMF/9TcXN7lB/AIdjogwKmt1keWzP+rpoOElDvEqMcHZta5uc/dUIh0kRGpMrpF2jfmk0/RagC9C+4+BL+h66wVw325Qx2XndnJWL2E1YCPmO2AHpHCZYoHMkl255O5qj byfvIiBz J/OW1XgUWQtsi/NUz0QBveueTYFUxclRDz5wxGvofAXfnPdX2XoGOCfFDw55MzO80zdbCK/DEYK/yhyIyOEOxu++jLElLFkYkFtRsmBHN5S9HhtgujjjrOlEsuFizhgkbsc16/X9+FOXiF7qguyd52o8f+oeXmFXzvgONlHSYa3nXevzmn/tAtM2jSwARF4WjT7z4HnIFi4Z7RFT0AJSup2KxCh5vPFQDU+3blJKPPKLnNSxnqt2S4kDqka6oB+c7tfbO1pLb4OZNr4o6b2VItRJ164TdaxlcVszXWmOOYgBiT57XPPIj0FcUW/yhe2ukcjNU3h2JvfDYMKm9KU/A+DNhUPeexLCyup3zDBs5iFcY8y+YS/tDkVt8B9mX1m2T+VQubuQ51uGDKar7bM+Ec79OFxZKY1lJfglTOJT5hV6rMt0iTVY7S52C/p9n3mrCHv4jWjgDnigFNjjvHx7rQVdJs9MFdx4UqyPzkmHCGtoRqvQ= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
fs/dax: Fix ZONE_DEVICE page reference counts
|
expand
|
diff --git a/include/linux/memremap.h b/include/linux/memremap.h index 0256a42..54e8b57 100644 --- a/include/linux/memremap.h +++ b/include/linux/memremap.h @@ -187,6 +187,28 @@ static inline bool folio_is_device_coherent(const struct folio *folio) return is_device_coherent_page(&folio->page); } +static inline bool is_fsdax_page(const struct page *page) +{ + return is_zone_device_page(page) && + page_pgmap(page)->type == MEMORY_DEVICE_FS_DAX; +} + +static inline bool folio_is_fsdax(const struct folio *folio) +{ + return is_fsdax_page(&folio->page); +} + +static inline bool is_devdax_page(const struct page *page) +{ + return is_zone_device_page(page) && + page_pgmap(page)->type == MEMORY_DEVICE_GENERIC; +} + +static inline bool folio_is_devdax(const struct folio *folio) +{ + return is_devdax_page(&folio->page); +} + #ifdef CONFIG_ZONE_DEVICE void zone_device_page_init(struct page *page); void *memremap_pages(struct dev_pagemap *pgmap, int nid);