linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] don't use alloc_bootmem in drivers/acpi/table.c
@ 2003-09-09 20:11 Jesse Barnes
  0 siblings, 0 replies; only message in thread
From: Jesse Barnes @ 2003-09-09 20:11 UTC (permalink / raw)
  To: andrew.grover, linux-kernel

Some platforms use the ACPI tables to find memory, so using
alloc_bootmem there won't work.

Thanks,
Jesse


diff -Nru a/drivers/acpi/tables.c b/drivers/acpi/tables.c
--- a/drivers/acpi/tables.c	Tue Sep  9 10:24:34 2003
+++ b/drivers/acpi/tables.c	Tue Sep  9 10:24:34 2003
@@ -69,7 +69,8 @@
 
 static unsigned long		sdt_pa;		/* Physical Address */
 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
 acpi_table_print (
@@ -425,12 +426,6 @@
 			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++)
 			sdt_entry[i].pa = (unsigned long) mapped_xsdt->entry[i];
 	}
@@ -475,12 +470,6 @@
 			printk(KERN_WARNING PREFIX "Truncated %lu RSDT entries\n",
 				(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++)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-09 20:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-09 20:11 [PATCH] don't use alloc_bootmem in drivers/acpi/table.c Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).