blob: 58f3a0aa1d4786101c395e39c1b34b9db7bb4c6c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* Public domain. */
#ifndef _ASM_PGTABLE_H
#define _ASM_PGTABLE_H
#include <machine/pmap.h>
#include <machine/pte.h>
#include <linux/types.h>
#define pgprot_val(v) (v)
#define PAGE_KERNEL 0
#define PAGE_KERNEL_IO 0
static inline pgprot_t
pgprot_writecombine(pgprot_t prot)
{
#if PMAP_WC != 0
return prot | PMAP_WC;
#else
return prot | PMAP_NOCACHE;
#endif
}
static inline pgprot_t
pgprot_noncached(pgprot_t prot)
{
#if PMAP_DEVICE != 0
return prot | PMAP_DEVICE;
#else
return prot | PMAP_NOCACHE;
#endif
}
#if defined(__i386__) || defined(__amd64__)
#define _PAGE_PRESENT PG_V
#define _PAGE_RW PG_RW
#define _PAGE_PAT PG_PAT
#define _PAGE_PWT PG_WT
#define _PAGE_PCD PG_N
#endif
#endif
|