2017-01-08 12:13:18 +03:00
|
|
|
#ifndef _LINUX_PAGE_H
|
|
|
|
#define _LINUX_PAGE_H
|
|
|
|
|
|
|
|
#include <sys/user.h>
|
|
|
|
|
|
|
|
struct page;
|
|
|
|
|
2018-05-10 10:57:37 +03:00
|
|
|
#ifndef PAGE_SIZE
|
|
|
|
|
|
|
|
#define PAGE_SIZE 4096UL
|
|
|
|
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2021-07-23 02:30:21 +03:00
|
|
|
#ifndef PAGE_SHIFT
|
|
|
|
#define PAGE_SHIFT 12
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2016-10-04 06:22:17 +03:00
|
|
|
#define virt_to_page(p) \
|
|
|
|
((struct page *) (((unsigned long) (p)) & PAGE_MASK))
|
|
|
|
#define offset_in_page(p) ((unsigned long) (p) & ~PAGE_MASK)
|
|
|
|
|
|
|
|
#define page_address(p) ((void *) (p))
|
2017-01-08 12:13:18 +03:00
|
|
|
|
|
|
|
#define kmap_atomic(page) page_address(page)
|
|
|
|
#define kunmap_atomic(addr) do {} while (0)
|
|
|
|
|
2023-08-12 05:22:59 +03:00
|
|
|
#define kmap_local_page(page) page_address(page)
|
|
|
|
#define kunmap_local(addr) do {} while (0)
|
|
|
|
|
2020-11-07 19:26:00 +03:00
|
|
|
#define PageHighMem(page) false
|
|
|
|
|
2017-01-08 12:13:18 +03:00
|
|
|
static const char zero_page[PAGE_SIZE];
|
|
|
|
|
|
|
|
#define ZERO_PAGE(o) ((struct page *) &zero_page[0])
|
|
|
|
|
|
|
|
#endif /* _LINUX_PAGE_H */
|