public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] EFI iounpam fix for acpi_os_unmap_memory take two
@ 2006-02-21  0:16 Edgar Hucek
  0 siblings, 0 replies; 3+ messages in thread
From: Edgar Hucek @ 2006-02-21  0:16 UTC (permalink / raw)
  To: linux-acpi, linux-kernel

When EFI is enabled acpi_os_unmap_memory trys to unmap memory
which was not mapped by acpi_os_map_memory.

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);



^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: [PATCH 1/1] EFI iounpam fix for acpi_os_unmap_memory take two
@ 2006-02-21  1:26 Li, Shaohua
  2006-02-21 17:20 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Li, Shaohua @ 2006-02-21  1:26 UTC (permalink / raw)
  To: Edgar Hucek, linux-acpi, linux-kernel

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);


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-21 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-21  0:16 [PATCH 1/1] EFI iounpam fix for acpi_os_unmap_memory take two Edgar Hucek
  -- strict thread matches above, loose matches on Subject: below --
2006-02-21  1:26 Li, Shaohua
2006-02-21 17:20 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox