Pull bugzilla-5452 into release branch
[pandora-kernel.git] / drivers / acpi / tables.c
index a2bf25b..ed5e881 100644 (file)
@@ -37,7 +37,7 @@
 
 #define PREFIX                 "ACPI: "
 
-#define ACPI_MAX_TABLES                256
+#define ACPI_MAX_TABLES                128
 
 static char *acpi_table_signatures[ACPI_TABLE_COUNT] = {
        [ACPI_TABLE_UNKNOWN] = "????",
@@ -74,7 +74,7 @@ struct acpi_table_sdt {
 static unsigned long sdt_pa;   /* Physical Address */
 static unsigned long sdt_count;        /* Table count */
 
-static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES];
+static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata;
 
 void acpi_table_print(struct acpi_table_header *header, unsigned long phys_addr)
 {
@@ -282,8 +282,8 @@ acpi_get_table_header_early(enum acpi_table_id id,
 
        /* Map the DSDT header via the pointer in the FADT */
        if (id == ACPI_DSDT) {
-               struct fadt_descriptor_rev2 *fadt =
-                   (struct fadt_descriptor_rev2 *)*header;
+               struct fadt_descriptor *fadt =
+                   (struct fadt_descriptor *)*header;
 
                if (fadt->revision == 3 && fadt->Xdsdt) {
                        *header = (void *)__acpi_map_table(fadt->Xdsdt,
@@ -587,7 +587,8 @@ int __init acpi_table_init(void)
                return -ENODEV;
        }
 
-       rsdp = (struct acpi_table_rsdp *)__va(rsdp_phys);
+       rsdp = (struct acpi_table_rsdp *)__acpi_map_table(rsdp_phys,
+               sizeof(struct acpi_table_rsdp));
        if (!rsdp) {
                printk(KERN_WARNING PREFIX "Unable to map RSDP\n");
                return -ENODEV;