lkml.org 
[lkml]   [2006]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH 1/1] EFI iounpam fix for acpi_os_unmap_memory take two
Date
From
Hi,
>
>When EFI is enabled acpi_os_unmap_memory trys to unmap memory
>which was not mapped by acpi_os_map_memory.
Yes, this could solve you problem at hand, but I wonder why we should
always use ioremap in acpi_os_map_memory. It's ACPI tables or pci memory
bar, ioremap should be safe to me.

Thanks,
Shaohua

>
>Signed-off-by: Edgar Hucek <hostmaster@ed-soft.at>
>
>diff -uNr linux-2.6.16-rc4.orig/drivers/acpi/osl.c linux-2.6.16-
>rc4/drivers/acpi/osl.c
>--- linux-2.6.16-rc4.orig/drivers/acpi/osl.c 2006-02-19
>18:48:58.000000000 +0100
>+++ linux-2.6.16-rc4/drivers/acpi/osl.c 2006-02-20 15:31:44.000000000
+0100
>@@ -208,7 +208,13 @@
>
> void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
> {
>- iounmap(virt);
>+ if(efi_enabled) {
>+ if (!(EFI_MEMORY_WB &
>efi_mem_attributes(virt_to_phys(virt)))) {
>+ iounmap(virt);
>+ }
>+ } else {
>+ iounmap(virt);
>+ }
> }
> EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-21 02:30    [W:0.058 / U:1.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site