/* Change the memory type for the physial address range in kernel identity mapping space if that range is a part of identity map.  */
int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags)
/* Change the memory type for the physial address range in kernel identity mapping space if that range is a part of identity map.  */
int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags)
{
	unsigned long id_sz;
	if (base >= __pa(high_memory))
		return 0;
	id_sz = (__pa(high_memory) < base + size) ?
				__pa(high_memory) - base :
				size;
	if (ioremap_change_attr((unsigned long)__va(base), id_sz, flags) < 0) {
		printk(KERN_INFO
			"%s:%d ioremap_change_attr failed %s "
			"for %Lx-%Lx\n",
			current->comm, current->pid,
			cattr_name(flags),
			base, (unsigned long long)(base + size));
		return -EINVAL;
	}
	return 0;
}