ia64/xen-unstable

changeset 15767:12be90e2f831

[IA64] Supress warning of __assign_domain_page().

On Tiger, the following memory region triggers a warning.
It seems a false-positive warning caused by c/s 13123:90db0f68b121.
so suppress the warning in such a case.

EFI memory descriptor
(XEN) mem07: type= 5, attr=0x8000000000000009, range=[0x00000000000c0000-0x0000000000100000) (0MB)
type = EFI_RUNTIME_SERVICES_CODE
attribute = EFI_MEMORY_RUNTIME | EFI_MEMORY_WB | EFI_MEMORY_UC

from /proc/iomem
000a0000-000fffff : PCI Bus 0000:00
000c0000-000fffff : reserved

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
author Alex Williamson <alex.williamson@hp.com>
date Thu Sep 06 09:05:26 2007 -0600 (2007-09-06)
parents 3cd445aecf59
children 4ffca478e2f7
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Tue Aug 28 12:30:31 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Thu Sep 06 09:05:26 2007 -0600
     1.3 @@ -868,15 +868,43 @@ int
     1.4      // dom0 tries to map real machine's I/O region, but failed.
     1.5      // It is very likely that dom0 doesn't boot correctly because
     1.6      // it can't access I/O. So complain here.
     1.7 -    if ((flags & ASSIGN_nocache) &&
     1.8 -        (pte_pfn(ret_pte) != (physaddr >> PAGE_SHIFT) ||
     1.9 -         !(pte_val(ret_pte) & _PAGE_MA_UC)))
    1.10 -        printk("%s:%d WARNING can't assign page domain 0x%p id %d\n"
    1.11 -               "\talready assigned pte_val 0x%016lx\n"
    1.12 -               "\tmpaddr 0x%016lx physaddr 0x%016lx flags 0x%lx\n",
    1.13 -               __func__, __LINE__,
    1.14 -               d, d->domain_id, pte_val(ret_pte),
    1.15 -               mpaddr, physaddr, flags);
    1.16 +    if (flags & ASSIGN_nocache) {
    1.17 +        int warn = 0;
    1.18 +
    1.19 +        if (pte_pfn(ret_pte) != (physaddr >> PAGE_SHIFT))
    1.20 +            warn = 1;
    1.21 +        else if (!(pte_val(ret_pte) & _PAGE_MA_UC)) {
    1.22 +            u32 type;
    1.23 +            u64 attr;
    1.24 +
    1.25 +            warn = 1;
    1.26 +
    1.27 +            /*
    1.28 +             * See
    1.29 +             * complete_dom0_memmap()
    1.30 +             * case EFI_RUNTIME_SERVICES_CODE:
    1.31 +             * case EFI_RUNTIME_SERVICES_DATA:
    1.32 +             * case EFI_ACPI_RECLAIM_MEMORY:
    1.33 +             * case EFI_ACPI_MEMORY_NVS:
    1.34 +             * case EFI_RESERVED_TYPE:
    1.35 +             * 
    1.36 +             * Currently only EFI_RUNTIME_SERVICES_CODE is found
    1.37 +             * so that we suppress only EFI_RUNTIME_SERVICES_CODE case.
    1.38 +             */
    1.39 +            type = efi_mem_type(physaddr);
    1.40 +            attr = efi_mem_attributes(physaddr);
    1.41 +            if (type == EFI_RUNTIME_SERVICES_CODE &&
    1.42 +                (attr & EFI_MEMORY_UC) && (attr & EFI_MEMORY_WB))
    1.43 +                warn = 0;
    1.44 +        }
    1.45 +        if (warn)
    1.46 +            printk("%s:%d WARNING can't assign page domain 0x%p id %d\n"
    1.47 +                   "\talready assigned pte_val 0x%016lx\n"
    1.48 +                   "\tmpaddr 0x%016lx physaddr 0x%016lx flags 0x%lx\n",
    1.49 +                   __func__, __LINE__,
    1.50 +                   d, d->domain_id, pte_val(ret_pte),
    1.51 +                   mpaddr, physaddr, flags);
    1.52 +    }
    1.53  
    1.54      return -EAGAIN;
    1.55  }