x86, pat: Use page flags to track memtypes of RAM pages
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Fri, 10 Jul 2009 16:57:38 +0000 (09:57 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 26 Aug 2009 22:41:24 +0000 (15:41 -0700)
commitf58417409603d62f2eb23db4d2cf6853d84a1698
tree0668a6c4ebeda74217e00b2f8918982ae329efb6
parent46cf98cdaef5471926010b5bddf84c44ec177fdd
x86, pat: Use page flags to track memtypes of RAM pages

Change reserve_ram_pages_type and free_ram_pages_type to use 2 page
flags to track UC_MINUS, WC, WB and default types. Previous RAM tracking
just tracked WB or NonWB, which was not complete and did not allow
tracking of RAM fully and there was no way to get the actual type
reserved by looking at the page flags.

We use the memtype_lock spinlock for atomicity in dealing with
memtype tracking in struct page.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/include/asm/cacheflush.h
arch/x86/mm/pat.c