x86: mm: Move PAT only functions to mm/pat.c
authorThomas Gleixner <tglx@linutronix.de>
Sun, 16 Nov 2014 17:59:19 +0000 (18:59 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 16 Nov 2014 17:59:19 +0000 (18:59 +0100)
commit0dbcae884779fdf7e2239a97ac7488877f0693d9
treec220ca7af9542397538dcd0f288794b258739f8f
parent47591df505129c9774af6cca2debf283a6e56ed7
x86: mm: Move PAT only functions to mm/pat.c

Commit e00c8cc93c1a "x86: Use new cache mode type in memtype related
functions" broke the ARCH=um build.

 arch/x86/include/asm/cacheflush.h:67:36: error: return type is an incomplete type
 static inline enum page_cache_mode get_page_memtype(struct page *pg)

The reason is simple. get_page_memtype() and set_page_memtype()
require enum page_cache_mode now, which is defined in
asm/pgtable_types.h. UM does not include that file for obvious reasons.

The simple solution is to move that functions to arch/x86/mm/pat.c
where the only callsites of this are located. They should have been
there in the first place.

Fixes: e00c8cc93c1a "x86: Use new cache mode type in memtype related functions"
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Richard Weinberger <richard@nod.at>
arch/x86/include/asm/cacheflush.h
arch/x86/mm/pat.c