mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 03:57:27 +07:00
bd809af16e
Update the translation tables from cache mode to pgprot values according to the PAT settings. This enables changing the cache attributes of a PAT index in just one place without having to change at the users side. With this change it is possible to use the same kernel with different PAT configurations, e.g. supporting Xen. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Toshi Kani <toshi.kani@hp.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: stefan.bader@canonical.com Cc: xen-devel@lists.xensource.com Cc: ville.syrjala@linux.intel.com Cc: david.vrabel@citrix.com Cc: jbeulich@suse.com Cc: plagnioj@jcrosoft.com Cc: tomi.valkeinen@ti.com Cc: bhelgaas@google.com Link: http://lkml.kernel.org/r/1415019724-4317-18-git-send-email-jgross@suse.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
29 lines
702 B
C
29 lines
702 B
C
#ifndef _ASM_X86_PAT_H
|
|
#define _ASM_X86_PAT_H
|
|
|
|
#include <linux/types.h>
|
|
#include <asm/pgtable_types.h>
|
|
|
|
#ifdef CONFIG_X86_PAT
|
|
extern int pat_enabled;
|
|
#else
|
|
static const int pat_enabled;
|
|
#endif
|
|
|
|
extern void pat_init(void);
|
|
void pat_init_cache_modes(void);
|
|
|
|
extern int reserve_memtype(u64 start, u64 end,
|
|
enum page_cache_mode req_pcm, enum page_cache_mode *ret_pcm);
|
|
extern int free_memtype(u64 start, u64 end);
|
|
|
|
extern int kernel_map_sync_memtype(u64 base, unsigned long size,
|
|
enum page_cache_mode pcm);
|
|
|
|
int io_reserve_memtype(resource_size_t start, resource_size_t end,
|
|
enum page_cache_mode *pcm);
|
|
|
|
void io_free_memtype(resource_size_t start, resource_size_t end);
|
|
|
|
#endif /* _ASM_X86_PAT_H */
|