Re: [Part1 PATCH v5 07/22] x86, ACPI: Store override acpi tablesphys addr in cpio files info array

From: Tejun Heo
Date: Mon Jun 17 2013 - 19:52:25 EST

On Thu, Jun 13, 2013 at 09:02:54PM +0800, Tang Chen wrote:
> From: Yinghai Lu <yinghai@xxxxxxxxxx>
> This patch introduces a file_pos struct to store physaddr. And then changes
> acpi_initrd_files[] to file_pos type. Then store physaddr of ACPI tables
> in acpi_initrd_files[].
> For finding, we will find ACPI tables with physaddr during 32bit flat mode
> in head_32.S, because at that time we don't need to setup page table to
> access initrd.
> For copying, we could use early_ioremap() with physaddr directly before
> memory mapping is set.
> To keep 32bit and 64bit platforms consistent, use phys_addr for all.

Also, how about something like the following?

Subject: x86, ACPI: introduce a new struct to store phys_addr of acpi override tables

ACPI initrd override table handling has been recently broken into two
functions - acpi_initrd_override_find() and
acpi_initrd_override_copy(). The former function currently stores the
virtual addresses and sizes of the found override tables in an array
of struct cpio_data for the latter function.

To make NUMA information available earlier during boot,
acpi_initrd_override_find() will be used much earlier - on 32bit, from
head_32.S before linear address translation is set up, which will make
it impossible to use the virtual addresses of the tables.

This patch introduces a new struct - file_pos - which records
phys_addr and size of a memory area, and replaces the cpio_data array
with it so that acpi_initrd_override_find() can record the phys_addrs
of the override tables instead of virtual addresses. This will allow
using the function before the linear address is set up.

acpi_initrd_override_copy() now accesses the override tables using
early_ioremap() on the stored phys_addrs.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at