[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <86802c440809121031r3aa498deqec3ecef61bafd21c@mail.gmail.com>
Date: Fri, 12 Sep 2008 10:31:33 -0700
From: "Yinghai Lu" <yhlu.kernel@...il.com>
To: "Ingo Molnar" <mingo@...e.hu>
Cc: "Jeremy Fitzhardinge" <jeremy@...p.org>,
linux-kernel@...r.kernel.org,
"Thomas Gleixner" <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH 6 of 7] x86: use early_ioremap in __acpi_map_table
On Fri, Sep 12, 2008 at 2:49 AM, Ingo Molnar <mingo@...e.hu> wrote:
>
> * Jeremy Fitzhardinge <jeremy@...p.org> wrote:
>
>> Yinghai Lu wrote:
>> > void __iomem *__init_refok
>> > acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
>> > {
>> > if (phys > ULONG_MAX) {
>> > printk(KERN_ERR PREFIX "Cannot map memory that high\n");
>> > return NULL;
>> > }
>> > if (acpi_gbl_permanent_mmap)
>> > /*
>> > * ioremap checks to ensure this is in reserved space
>> > */
>> > return ioremap((unsigned long)phys, size);
>> > else
>> > return __acpi_map_table((unsigned long)phys, size);
>> > }
>> > EXPORT_SYMBOL_GPL(acpi_os_map_memory);
>> >
>> > void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
>> > {
>> > if (acpi_gbl_permanent_mmap) {
>> > iounmap(virt);
>> > }
>> > }
>> > EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
>> >
>> > just let acpi_os_unmap_memory to call __acpi_unmap_table...
>> >
>>
>> That was my first attempt. Unfortunately a lot of the acpi code seems
>> pretty sloppy about unmapping its tables, and basically relies on
>> __acpi_map_table's current behaviour of removing the previous mapping
>> when creating the new mapping.
>
> could we just emit a WARN_ON_ONCE() warning when we have to remove a
> previous mapping, so that the ACPI code can be fixed eventually?
could be some code is shared between early and permanent, and later
may not need unmap.
anyway those code need to be cleanup, to double check if some fix-map
is overwrited unexpected..
YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists