Commit 6c849a8e authored by Len Brown's avatar Len Brown

[ACPI] avoid alloc_bootmem() for accessing ACPI tables

some platforms use ACPI tables to find memory (Jesse Barnes)
parent 0951a832
...@@ -69,7 +69,8 @@ struct acpi_table_sdt { ...@@ -69,7 +69,8 @@ struct acpi_table_sdt {
static unsigned long sdt_pa; /* Physical Address */ static unsigned long sdt_pa; /* Physical Address */
static unsigned long sdt_count; /* Table count */ static unsigned long sdt_count; /* Table count */
static struct acpi_table_sdt *sdt_entry;
static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES];
void void
acpi_table_print ( acpi_table_print (
...@@ -418,12 +419,6 @@ acpi_table_get_sdt ( ...@@ -418,12 +419,6 @@ acpi_table_get_sdt (
sdt_count = ACPI_MAX_TABLES; sdt_count = ACPI_MAX_TABLES;
} }
sdt_entry = alloc_bootmem(sdt_count * sizeof(struct acpi_table_sdt));
if (!sdt_entry) {
printk(KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n");
return -ENOMEM;
}
for (i = 0; i < sdt_count; i++) for (i = 0; i < sdt_count; i++)
sdt_entry[i].pa = (unsigned long) mapped_xsdt->entry[i]; sdt_entry[i].pa = (unsigned long) mapped_xsdt->entry[i];
} }
...@@ -470,12 +465,6 @@ acpi_table_get_sdt ( ...@@ -470,12 +465,6 @@ acpi_table_get_sdt (
sdt_count = ACPI_MAX_TABLES; sdt_count = ACPI_MAX_TABLES;
} }
sdt_entry = alloc_bootmem(sdt_count * sizeof(struct acpi_table_sdt));
if (!sdt_entry) {
printk(KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n");
return -ENOMEM;
}
for (i = 0; i < sdt_count; i++) for (i = 0; i < sdt_count; i++)
sdt_entry[i].pa = (unsigned long) mapped_rsdt->entry[i]; sdt_entry[i].pa = (unsigned long) mapped_rsdt->entry[i];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment