ia64/xen-unstable

changeset 15142:2372c3fbf7d2

[IA64] Cleanup warnings for UC accesses to UC|WB pages

This patch cleanup the following warning.

(XEN) mm.c:497:d0 Warning: UC to WB for mpaddr=xxxxxxxx

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author Alex Williamson <alex.williamson@hp.com>
date Fri May 25 09:38:09 2007 -0600 (2007-05-25)
parents 0e5c0cde23b1
children e54da168363a
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Fri May 25 09:33:01 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Fri May 25 09:38:09 2007 -0600
     1.3 @@ -498,9 +498,22 @@ u64 translate_domain_pte(u64 pteval, u64
     1.4  			   This can happen when domU tries to touch i/o
     1.5  			   port space.  Also prevents possible address
     1.6  			   aliasing issues.  */
     1.7 -			if (!(mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE))
     1.8 -				gdprintk(XENLOG_WARNING, "Warning: UC to WB "
     1.9 -				         "for mpaddr=%lx\n", mpaddr);
    1.10 +			if (!(mpaddr - IO_PORTS_PADDR < IO_PORTS_SIZE)) {
    1.11 +				u64 ucwb;
    1.12 +				
    1.13 +				/*
    1.14 +				 * If dom0 page has both UC & WB attributes
    1.15 +				 * don't warn about attempted UC access.
    1.16 +				 */
    1.17 +				ucwb = efi_mem_attribute(mpaddr, PAGE_SIZE);
    1.18 +				ucwb &= EFI_MEMORY_UC | EFI_MEMORY_WB;
    1.19 +				ucwb ^= EFI_MEMORY_UC | EFI_MEMORY_WB;
    1.20 +
    1.21 +				if (d != dom0 || ucwb != 0)
    1.22 +					gdprintk(XENLOG_WARNING, "Warning: UC"
    1.23 +						 " to WB for mpaddr=%lx\n",
    1.24 +						 mpaddr);
    1.25 +			}
    1.26  			pteval = (pteval & ~_PAGE_MA_MASK) | _PAGE_MA_WB;
    1.27  		}
    1.28  		break;