• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef _LINUX_PAGEMAP_H
16 #define _LINUX_PAGEMAP_H
17 
18 #include "asm/bug.h"
19 #include "asm/page.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif /* __cplusplus */
24 
25 #define COMPAT_PAGE_SHIFT        12
26 #define COMPAT_PAGE_CACHE_SHIFT  COMPAT_PAGE_SHIFT
27 #define COMPAT_PAGE_CACHE_SIZE   PAGE_SIZE
28 
29 #define PageLocked(page)    1
30 #define Page_Uptodate(page) 0
31 #define UnlockPage(page)
32 #define PAGE_BUG(page) BUG()
33 #define ClearPageUptodate(page)
34 #define SetPageError(page)
35 #define ClearPageError(page)
36 #define SetPageUptodate(page)
37 
38 #define PAGE_SHIFT  COMPAT_PAGE_SHIFT
39 #define PAGE_CACHE_SHIFT        COMPAT_PAGE_CACHE_SHIFT
40 #define PAGE_CACHE_SIZE         COMPAT_PAGE_CACHE_SIZE
41 
42 #ifdef __cplusplus
43 }
44 #endif /* __cplusplus */
45 
46 #endif /* _LINUX_PAGEMAP_H */
47