Re: [PATCH] ACPI: Implement overriding of arbitrary ACPI tables via initrd

From: Yinghai Lu
Date: Fri Mar 23 2012 - 20:15:37 EST


On Fri, Mar 23, 2012 at 1:54 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
>> --- a/arch/x86/mm/init.c
>> +++ b/arch/x86/mm/init.c
>> @@ -391,6 +391,12 @@ void free_initrd_mem(unsigned long start, unsigned long end)
>>         *   - relocate_initrd()
>>         * So here We can do PAGE_ALIGN() safely to get partial page to be freed
>>         */
>> +#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE
>> +       if (acpi_initrd_offset)
>> +               free_init_pages("initrd memory", start - acpi_initrd_offset,
>> +                               PAGE_ALIGN(end));
>> +       else
>> +#endif
>
> table already get copied to allocated ram, So you don't need to keep
> the portion in initrd range.
>
>>        free_init_pages("initrd memory", start, PAGE_ALIGN(end));
>>  }

oh, i missed it. that is offset

change following would be more clean?

+#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE
+ /* offset back to free acpi tables */
+ if (acpi_initrd_offset)
+ start -= acpi_initrd_offset,
+#endif

Yinghai
--
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/