public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Edgar Hucek <hostmaster@ed-soft.at>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Matt Domsch <Matt_Domsch@dell.com>
Subject: Re: [PATCH 1/1] EFI iounpam fix for acpi_os_unmap_memory
Date: Mon, 20 Feb 2006 22:02:19 -0800	[thread overview]
Message-ID: <20060220220219.6d82366a.akpm@osdl.org> (raw)
In-Reply-To: <43FA5293.4070807@ed-soft.at>

Edgar Hucek <hostmaster@ed-soft.at> 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@ed-soft.at>

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@ed-soft.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

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


  reply	other threads:[~2006-02-21  6:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-20 23:36 [PATCH 1/1] EFI iounpam fix for acpi_os_unmap_memory Edgar Hucek
2006-02-21  6:02 ` Andrew Morton [this message]
2006-02-21 14:15   ` Andi Kleen
2006-02-21 20:59     ` Andrew Morton
2006-02-21 21:09       ` Andi Kleen
2006-02-22  6:50         ` Stelian Pop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060220220219.6d82366a.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Matt_Domsch@dell.com \
    --cc=hostmaster@ed-soft.at \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox