[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ia64
Subject:    RE: pgprot_writecombine & shub 1.x
From:       "Luck, Tony" <tony.luck () intel ! com>
Date:       2005-01-19 22:00:42
Message-ID: B8E391BBE9FE384DAA4C5C003888BE6F02C33743 () scsmsx401 ! amr ! corp ! intel ! com
[Download RAW message or body]

>On Wednesday, January 19, 2005 10:04 am, David Mosberger wrote:
>> Adding new routines for supporting this sounds reasonable, 
>but I think
>> it needs to be added to linux/efi.h, since EFI isn't ia64-specific.
>
>Something like this then?  Works for my test cases.
>
>Add a new EFI memory map checking function called 
>efi_range_is_wc for checking 
>if address ranges can be mapped with the WC (write coalescing) 
>attribute.  
>Useful for fbmem, userspace PCI mapping, and other places where write 
>combining might be beneficial but unavailable.

+	for (i = 0; i < len; i++) {
+		unsigned long paddr = __pa(start + i);
+		if (!(efi_mem_attributes(paddr) & EFI_MEMORY_WC))
+			return 0;
+	}

More EFI ignorance on my part ... do you really have to check
each *byte* of the address range, or is there some larger unit
that you could step by?  It doesn't seem rational that this
attribute could change for anything less than cache line size.

-Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic