From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: linux-ia64@vger.kernel.org, tony.luck@intel.com,
linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] remove empty node at boot time
Date: Mon, 10 Jul 2006 14:19:03 +0900 [thread overview]
Message-ID: <20060710141903.424ba3db.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <200607092038.41053.bjorn.helgaas@hp.com>
On Sun, 9 Jul 2006 20:38:40 -0600
Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> setup_arch
> acpi_numa_init
> acpi_numa_arch_fixup
> acpi_online_node_fixup (test available_cpus)
> ...
> acpi_boot_init
> acpi_table_parse_madt(..., acpi_parse_lsapic, ...)
> acpi_parse_lsapic (increment available_cpus)
>
> Note that we test available_cpus in acpi_online_node_fixup()
> before we increment it in acpi_parse_lsapic(), so the inner
> loop is never executed.
>
Could you try this patch ? (against 2.6.18-rc1)
I think this is very straightforward fix. booted well with my box and NUMA
emulation environment.
if SRAT had "present" bit, I'm happy ;(
Thanks,
-Kame
empty-node-fix-fix.patch
empty-node-fix.patch uses lsapic information to detect cpu. But it has a
problem with cpu-only-node because lsapic information is not parsed before SRAT.
This patch moves parsing lsapic information before SRAT. By this, we can get
information of avilable cpus in early time.
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
arch/ia64/kernel/acpi.c | 21 +++++++++++++++------
arch/ia64/kernel/setup.c | 3 +++
2 files changed, 18 insertions(+), 6 deletions(-)
Index: linux-2.6.18-rc1/arch/ia64/kernel/acpi.c
===================================================================
--- linux-2.6.18-rc1.orig/arch/ia64/kernel/acpi.c 2006-07-10 14:00:16.000000000 +0900
+++ linux-2.6.18-rc1/arch/ia64/kernel/acpi.c 2006-07-10 14:00:38.000000000 +0900
@@ -650,9 +650,12 @@
return rsdp_phys;
}
-int __init acpi_boot_init(void)
+static int madt_is_available __initdata;
+/*
+ * check LSAPIC in early phase, to detect available cpus.
+ */
+void __init ia64_acpi_madt_early_init(void)
{
-
/*
* MADT
* ----
@@ -663,9 +666,9 @@
if (acpi_table_parse(ACPI_APIC, acpi_parse_madt) < 1) {
printk(KERN_ERR PREFIX "Can't find MADT\n");
- goto skip_madt;
+ return;
}
-
+ madt_is_available = 1;
/* Local APIC */
if (acpi_table_parse_madt
@@ -682,8 +685,14 @@
< 0)
printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n");
- /* I/O APIC */
+ return;
+}
+int __init acpi_boot_init(void)
+{
+ if (!madt_is_available)
+ goto skip_madt;
+ /* IO-APIC */
if (acpi_table_parse_madt
(ACPI_MADT_IOSAPIC, acpi_parse_iosapic, NR_IOSAPICS) < 1)
printk(KERN_ERR PREFIX
@@ -704,8 +713,8 @@
if (acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, 0) < 0)
printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
- skip_madt:
+skip_madt:
/*
* FADT says whether a legacy keyboard controller is present.
* The FADT also contains an SCI_INT line, by which the system
Index: linux-2.6.18-rc1/arch/ia64/kernel/setup.c
===================================================================
--- linux-2.6.18-rc1.orig/arch/ia64/kernel/setup.c 2006-07-10 14:00:16.000000000 +0900
+++ linux-2.6.18-rc1/arch/ia64/kernel/setup.c 2006-07-10 14:00:38.000000000 +0900
@@ -71,6 +71,7 @@
#endif
extern void ia64_setup_printk_clock(void);
+extern int ia64_acpi_madt_early_init(void);
DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info);
DEFINE_PER_CPU(unsigned long, local_per_cpu_offset);
@@ -422,6 +423,8 @@
#ifdef CONFIG_ACPI
/* Initialize the ACPI boot-time table parser */
acpi_table_init();
+ /* read ACPI table */
+ ia64_acpi_madt_early_init();
# ifdef CONFIG_ACPI_NUMA
acpi_numa_init();
# endif
next prev parent reply other threads:[~2006-07-10 5:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 11:04 KAMEZAWA Hiroyuki
2006-07-07 23:26 ` Bjorn Helgaas
2006-07-10 0:34 ` KAMEZAWA Hiroyuki
2006-07-10 2:38 ` Bjorn Helgaas
2006-07-10 3:29 ` KAMEZAWA Hiroyuki
2006-07-10 5:19 ` KAMEZAWA Hiroyuki [this message]
2006-07-10 17:03 ` Bjorn Helgaas
2006-07-11 6:55 ` KAMEZAWA Hiroyuki
2006-07-11 15:37 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060710141903.424ba3db.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®