blob: 91bc4ba95f919e90c3a398469f2dd52ca40e3cdd [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_PAT_H
2#define _ASM_X86_PAT_H
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -07003
4#include <linux/types.h>
Jeremy Fitzhardingea964e332009-03-04 17:14:30 -08005#include <asm/pgtable_types.h>
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -07006
Thomas Gleixner8d4a4302008-05-08 09:18:43 +02007#ifdef CONFIG_X86_PAT
Andreas Herrmann499f8f82008-06-10 16:06:21 +02008extern int pat_enabled;
Thomas Gleixner8d4a4302008-05-08 09:18:43 +02009#else
Andreas Herrmann499f8f82008-06-10 16:06:21 +020010static const int pat_enabled;
Thomas Gleixner8d4a4302008-05-08 09:18:43 +020011#endif
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -070012
13extern void pat_init(void);
Juergen Grossbd809af2014-11-03 14:02:03 +010014void pat_init_cache_modes(void);
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -070015
16extern int reserve_memtype(u64 start, u64 end,
Juergen Grosse00c8cc2014-11-03 14:01:59 +010017 enum page_cache_mode req_pcm, enum page_cache_mode *ret_pcm);
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -070018extern int free_memtype(u64 start, u64 end);
19
Venkatesh Pallipadi7880f742009-02-24 17:35:13 -080020extern int kernel_map_sync_memtype(u64 base, unsigned long size,
Juergen Grossb14097b2014-11-03 14:01:58 +010021 enum page_cache_mode pcm);
Venkatesh Pallipadi7880f742009-02-24 17:35:13 -080022
Venkatesh Pallipadi9fd126bc2009-07-10 09:57:34 -070023int io_reserve_memtype(resource_size_t start, resource_size_t end,
Juergen Gross49a3b3c2014-11-03 14:01:54 +010024 enum page_cache_mode *pcm);
Venkatesh Pallipadi9fd126bc2009-07-10 09:57:34 -070025
26void io_free_memtype(resource_size_t start, resource_size_t end);
27
H. Peter Anvin1965aae2008-10-22 22:26:29 -070028#endif /* _ASM_X86_PAT_H */