Re: [PATCH 1/1] EFI iounpam fix for acpi_os_unmap_memory

From: Andrew Morton
Date: Tue Feb 21 2006 - 01:02:27 EST


Edgar Hucek <hostmaster@xxxxxxxxxx> wrote:
>
> When EFI is enabled acpi_os_unmap_memory trys to unmap memory
> which was not mapped by acpi_os_map_memory.

Your email client replaces tabs with spaces and wordwraps things.

The patch could be cleaned up a bit..

Matt, ACPi people: please ack or nack asap.



From: Edgar Hucek <hostmaster@xxxxxxxxxx>

When EFI is enabled acpi_os_unmap_memory t] rys to unmap memory
which was not mapped by acpi_os_map_memory.

Signed-off-by: Edgar Hucek <hostmaster@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

drivers/acpi/osl.c | 4 ++++
1 files changed, 4 insertions(+)

diff -puN drivers/acpi/osl.c~efi-iounpam-fix-for-acpi_os_unmap_memory drivers/acpi/osl.c
--- devel/drivers/acpi/osl.c~efi-iounpam-fix-for-acpi_os_unmap_memory 2006-02-20 21:55:48.000000000 -0800
+++ devel-akpm/drivers/acpi/osl.c 2006-02-20 21:58:36.000000000 -0800
@@ -208,6 +208,10 @@ EXPORT_SYMBOL_GPL(acpi_os_map_memory);

void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
{
+ /* Don't unmap memory which was not mapped by acpi_os_map_memory */
+ if (efi_enabled &&
+ (efi_mem_attributes(virt_to_phys(virt)) & EFI_MEMORY_WB))
+ return;
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/