1#ifndef _ASM_X86_CACHEFLUSH_H
2#define _ASM_X86_CACHEFLUSH_H
3
4
5#include <asm-generic/cacheflush.h>
6#include <asm/special_insns.h>
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
36int _set_memory_uc(unsigned long addr, int numpages);
37int _set_memory_wc(unsigned long addr, int numpages);
38int _set_memory_wt(unsigned long addr, int numpages);
39int _set_memory_wb(unsigned long addr, int numpages);
40int set_memory_uc(unsigned long addr, int numpages);
41int set_memory_wc(unsigned long addr, int numpages);
42int set_memory_wt(unsigned long addr, int numpages);
43int set_memory_wb(unsigned long addr, int numpages);
44int set_memory_x(unsigned long addr, int numpages);
45int set_memory_nx(unsigned long addr, int numpages);
46int set_memory_ro(unsigned long addr, int numpages);
47int set_memory_rw(unsigned long addr, int numpages);
48int set_memory_np(unsigned long addr, int numpages);
49int set_memory_4k(unsigned long addr, int numpages);
50
51int set_memory_array_uc(unsigned long *addr, int addrinarray);
52int set_memory_array_wc(unsigned long *addr, int addrinarray);
53int set_memory_array_wt(unsigned long *addr, int addrinarray);
54int set_memory_array_wb(unsigned long *addr, int addrinarray);
55
56int set_pages_array_uc(struct page **pages, int addrinarray);
57int set_pages_array_wc(struct page **pages, int addrinarray);
58int set_pages_array_wt(struct page **pages, int addrinarray);
59int set_pages_array_wb(struct page **pages, int addrinarray);
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81int set_pages_uc(struct page *page, int numpages);
82int set_pages_wb(struct page *page, int numpages);
83int set_pages_x(struct page *page, int numpages);
84int set_pages_nx(struct page *page, int numpages);
85int set_pages_ro(struct page *page, int numpages);
86int set_pages_rw(struct page *page, int numpages);
87
88
89void clflush_cache_range(void *addr, unsigned int size);
90
91#define mmio_flush_range(addr, size) clflush_cache_range(addr, size)
92
93extern const int rodata_test_data;
94extern int kernel_set_to_readonly;
95void set_kernel_text_rw(void);
96void set_kernel_text_ro(void);
97
98#ifdef CONFIG_DEBUG_RODATA_TEST
99int rodata_test(void);
100#else
101static inline int rodata_test(void)
102{
103 return 0;
104}
105#endif
106
107#endif
108