/* Does intersection of PAT memory type and MTRR memory type and returns the resulting memory type as PAT understands it. (Type in pat and mtrr will not have same value) The intersection is based on "Effective Memory Type" tables in IA-32 SDM vol 3a  */
static unsigned long pat_x_mtrr_type(u64 start, u64 end, unsigned long req_type)
/* Does intersection of PAT memory type and MTRR memory type and returns the resulting memory type as PAT understands it. (Type in pat and mtrr will not have same value) The intersection is based on "Effective Memory Type" tables in IA-32 SDM vol 3a  */
static unsigned long pat_x_mtrr_type(u64 start, u64 end, unsigned long req_type)
{
	if (req_type == _PAGE_CACHE_WB) {
		u8 mtrr_type;
		mtrr_type = mtrr_type_lookup(start, end);
		if (mtrr_type != MTRR_TYPE_WRBACK)
			return _PAGE_CACHE_UC_MINUS;
		return _PAGE_CACHE_WB;
	}
	return req_type;
}