blob: ca6c228d5e62837be88984b652bb436949295d03 [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
Luis R. Rodriguezcb32edf2015-05-26 10:28:15 +02007bool pat_enabled(void);
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -07008extern void pat_init(void);
Borislav Petkov9cd25aa2015-06-04 18:55:10 +02009void pat_init_cache_modes(u64);
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -070010
11extern int reserve_memtype(u64 start, u64 end,
Juergen Grosse00c8cc2014-11-03 14:01:59 +010012 enum page_cache_mode req_pcm, enum page_cache_mode *ret_pcm);
venkatesh.pallipadi@intel.com2e5d9c82008-03-18 17:00:14 -070013extern int free_memtype(u64 start, u64 end);
14
Venkatesh Pallipadi7880f742009-02-24 17:35:13 -080015extern int kernel_map_sync_memtype(u64 base, unsigned long size,
Juergen Grossb14097b2014-11-03 14:01:58 +010016 enum page_cache_mode pcm);
Venkatesh Pallipadi7880f742009-02-24 17:35:13 -080017
Venkatesh Pallipadi9fd126b2009-07-10 09:57:34 -070018int io_reserve_memtype(resource_size_t start, resource_size_t end,
Juergen Gross49a3b3c2014-11-03 14:01:54 +010019 enum page_cache_mode *pcm);
Venkatesh Pallipadi9fd126b2009-07-10 09:57:34 -070020
21void io_free_memtype(resource_size_t start, resource_size_t end);
22
H. Peter Anvin1965aae2008-10-22 22:26:29 -070023#endif /* _ASM_X86_PAT_H */