]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] i386: srat on non-acpi hw fix
authorMagnus Damm <magnus@valinux.co.jp>
Sun, 30 Oct 2005 22:59:48 +0000 (14:59 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:13 +0000 (17:37 -0800)
This patch adds a check for the return value of acpi_find_root_pointer().
Without this patch systems without ACPI support such as QEMU crashes when
booting a NUMA kernel with CONFIG_ACPI_SRAT=y.

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/srat.c

index 516bf5653b0266ea1f4beb9258bd6577c0b3e6ab..8de658db814624b012cf31cd387d461cf1605686 100644 (file)
@@ -327,7 +327,12 @@ int __init get_memcfg_from_srat(void)
        int tables = 0;
        int i = 0;
 
-       acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, rsdp_address);
+       if (ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING,
+                                               rsdp_address))) {
+               printk("%s: System description tables not found\n",
+                      __FUNCTION__);
+               goto out_err;
+       }
 
        if (rsdp_address->pointer_type == ACPI_PHYSICAL_POINTER) {
                printk("%s: assigning address to rsdp\n", __FUNCTION__);