1f9f848faSopenharmony_ci/*- 2f9f848faSopenharmony_ci * Copyright (c) 2020 The FreeBSD Foundation 3f9f848faSopenharmony_ci * 4f9f848faSopenharmony_ci * This software was developed by Emmanuel Vadot under sponsorship 5f9f848faSopenharmony_ci * from the FreeBSD Foundation. 6f9f848faSopenharmony_ci * 7f9f848faSopenharmony_ci * Redistribution and use in source and binary forms, with or without 8f9f848faSopenharmony_ci * modification, are permitted provided that the following conditions 9f9f848faSopenharmony_ci * are met: 10f9f848faSopenharmony_ci * 1. Redistributions of source code must retain the above copyright 11f9f848faSopenharmony_ci * notice, this list of conditions and the following disclaimer. 12f9f848faSopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright 13f9f848faSopenharmony_ci * notice, this list of conditions and the following disclaimer in the 14f9f848faSopenharmony_ci * documentation and/or other materials provided with the distribution. 15f9f848faSopenharmony_ci * 16f9f848faSopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17f9f848faSopenharmony_ci * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18f9f848faSopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19f9f848faSopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20f9f848faSopenharmony_ci * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21f9f848faSopenharmony_ci * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22f9f848faSopenharmony_ci * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23f9f848faSopenharmony_ci * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24f9f848faSopenharmony_ci * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25f9f848faSopenharmony_ci * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26f9f848faSopenharmony_ci * SUCH DAMAGE. 27f9f848faSopenharmony_ci */ 28f9f848faSopenharmony_ci#ifndef __LINUX_PAGEMAP_H__ 29f9f848faSopenharmony_ci#define __LINUX_PAGEMAP_H__ 30f9f848faSopenharmony_ci 31f9f848faSopenharmony_ci#include "asm/page.h" 32f9f848faSopenharmony_ci 33f9f848faSopenharmony_ci#ifdef __cplusplus 34f9f848faSopenharmony_ci#if __cplusplus 35f9f848faSopenharmony_ciextern "C" { 36f9f848faSopenharmony_ci#endif /* __cplusplus */ 37f9f848faSopenharmony_ci#endif /* __cplusplus */ 38f9f848faSopenharmony_ci 39f9f848faSopenharmony_ci#define COMPAT_PAGE_SHIFT 12 40f9f848faSopenharmony_ci#define COMPAT_PAGE_CACHE_SHIFT COMPAT_PAGE_SHIFT 41f9f848faSopenharmony_ci#define COMPAT_PAGE_CACHE_SIZE PAGE_SIZE 42f9f848faSopenharmony_ci 43f9f848faSopenharmony_ci#define PageLocked(page) 1 44f9f848faSopenharmony_ci#define Page_Uptodate(page) 0 45f9f848faSopenharmony_ci#define UnlockPage(page) 46f9f848faSopenharmony_ci#define PAGE_BUG(page) BUG() 47f9f848faSopenharmony_ci#define ClearPageUptodate(page) 48f9f848faSopenharmony_ci#define SetPageError(page) 49f9f848faSopenharmony_ci#define ClearPageError(page) 50f9f848faSopenharmony_ci#define SetPageUptodate(page) 51f9f848faSopenharmony_ci 52f9f848faSopenharmony_ci#define PAGE_CACHE_SHIFT COMPAT_PAGE_CACHE_SHIFT 53f9f848faSopenharmony_ci#define PAGE_CACHE_SIZE COMPAT_PAGE_CACHE_SIZE 54f9f848faSopenharmony_ci 55f9f848faSopenharmony_ci#ifdef __cplusplus 56f9f848faSopenharmony_ci#if __cplusplus 57f9f848faSopenharmony_ci} 58f9f848faSopenharmony_ci#endif /* __cplusplus */ 59f9f848faSopenharmony_ci#endif /* __cplusplus */ 60f9f848faSopenharmony_ci 61f9f848faSopenharmony_ci#endif /* __LINUX_PAGEMAP_H__ */ 62