acpi/x86: introduce __apci_map_table, v4
to prevent wrongly overwriting fixmap that still want to use. ACPI used to rely on low mappings being all linearly mapped and grew a habit: it never really unmapped certain kinds of tables after use. This can cause problems - for example the hypothetical case when some spurious access still references it. v2: remove prev_map and prev_size in __apci_map_table v3: let acpi_os_unmap_memory() call early_iounmap too, so remove extral calling to early_acpi_os_unmap_memory v4: fix typo in one acpi_get_table_with_size calling Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -144,6 +144,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address where,
|
||||
acpi_size length);
|
||||
|
||||
void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
|
||||
void early_acpi_os_unmap_memory(void __iomem * virt, acpi_size size);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
acpi_status
|
||||
|
||||
@@ -130,6 +130,10 @@ acpi_get_table_header(acpi_string signature,
|
||||
struct acpi_table_header *out_table_header);
|
||||
|
||||
acpi_status
|
||||
acpi_get_table_with_size(acpi_string signature,
|
||||
u32 instance, struct acpi_table_header **out_table,
|
||||
acpi_size *tbl_size);
|
||||
acpi_status
|
||||
acpi_get_table(acpi_string signature,
|
||||
u32 instance, struct acpi_table_header **out_table);
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table);
|
||||
typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
|
||||
|
||||
char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
|
||||
void __init __acpi_unmap_table(char *map, unsigned long size);
|
||||
int early_acpi_boot_init(void);
|
||||
int acpi_boot_init (void);
|
||||
int acpi_boot_table_init (void);
|
||||
|
||||
Reference in New Issue
Block a user