1*783d3ff6SMartin Matuska /* 2*783d3ff6SMartin Matuska * CDDL HEADER START 3*783d3ff6SMartin Matuska * 4*783d3ff6SMartin Matuska * The contents of this file are subject to the terms of the 5*783d3ff6SMartin Matuska * Common Development and Distribution License (the "License"). 6*783d3ff6SMartin Matuska * You may not use this file except in compliance with the License. 7*783d3ff6SMartin Matuska * 8*783d3ff6SMartin Matuska * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*783d3ff6SMartin Matuska * or https://opensource.org/licenses/CDDL-1.0. 10*783d3ff6SMartin Matuska * See the License for the specific language governing permissions 11*783d3ff6SMartin Matuska * and limitations under the License. 12*783d3ff6SMartin Matuska * 13*783d3ff6SMartin Matuska * When distributing Covered Code, include this CDDL HEADER in each 14*783d3ff6SMartin Matuska * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*783d3ff6SMartin Matuska * If applicable, add the following below this CDDL HEADER, with the 16*783d3ff6SMartin Matuska * fields enclosed by brackets "[]" replaced with your own identifying 17*783d3ff6SMartin Matuska * information: Portions Copyright [yyyy] [name of copyright owner] 18*783d3ff6SMartin Matuska * 19*783d3ff6SMartin Matuska * CDDL HEADER END 20*783d3ff6SMartin Matuska */ 21*783d3ff6SMartin Matuska 22*783d3ff6SMartin Matuska /* 23*783d3ff6SMartin Matuska * Copyright (c) 2023, 2024, Klara Inc. 24*783d3ff6SMartin Matuska */ 25*783d3ff6SMartin Matuska 26*783d3ff6SMartin Matuska #ifndef _ZFS_MM_COMPAT_H 27*783d3ff6SMartin Matuska #define _ZFS_MM_COMPAT_H 28*783d3ff6SMartin Matuska 29*783d3ff6SMartin Matuska #include <linux/mm.h> 30*783d3ff6SMartin Matuska 31*783d3ff6SMartin Matuska /* 5.4 introduced page_size(). Older kernels can use a trivial macro instead */ 32*783d3ff6SMartin Matuska #ifndef HAVE_MM_PAGE_SIZE 33*783d3ff6SMartin Matuska #define page_size(p) ((unsigned long)(PAGE_SIZE << compound_order(p))) 34*783d3ff6SMartin Matuska #endif 35*783d3ff6SMartin Matuska 36*783d3ff6SMartin Matuska #endif /* _ZFS_MM_COMPAT_H */ 37