From: Mike Travis <travis@sgi.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, mingo@elte.hu, tglx@linutronix.de,
Christoph Lameter <clameter@sgi.com>,
Jack Steiner <steiner@sgi.com>
Subject: Re: 2.6.24 git2/mm1: cpu_to_node mapping to non-existant nodes causing boot failure
Date: Sat, 16 Feb 2008 16:23:44 -0800 [thread overview]
Message-ID: <47B77E90.5050809@sgi.com> (raw)
In-Reply-To: <20080215020208.GA6500@csn.ul.ie>
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
Mel Gorman wrote:
> If you send me patches to apply on top of 2.6.25-rc1, I'll give them a spin
> on the machine in question. Reverting didn't work out very well as there are
> too many collisions with patches that were applied later. I eventually got
> the machine booting but it only succeeds because it only brings up one core
> on each processor. The patch, which is pretty brain damaged is below in case
> it helps you guess what the real problem is. dmesg logs are attached of the
> vanilla failure with acpi=debug and the log with the patch applied showing
> "__cpu_up: bad cpu 1" and "__cpu_up: bad cpu3" (i.e. the second cores of
> each machine).
>
This should completely undo the change to 16 bit apic ids until we can figure
out the problem with the memory-less nodes. I checked it on both the numa
and non-numa x86_64 box.
Thanks,
Mike
[-- Attachment #2: undo-16-bit-apic --]
[-- Type: text/plain, Size: 3613 bytes --]
---
arch/x86/kernel/acpi/boot.c | 2 +-
arch/x86/kernel/apic_64.c | 2 +-
arch/x86/kernel/genapic_64.c | 4 ++--
arch/x86/kernel/mpparse_64.c | 6 +++---
arch/x86/mm/numa_64.c | 2 +-
include/asm-x86/smp_64.h | 7 ++++---
6 files changed, 12 insertions(+), 11 deletions(-)
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -558,7 +558,7 @@ EXPORT_SYMBOL(acpi_map_lsapic);
int acpi_unmap_lsapic(int cpu)
{
- per_cpu(x86_cpu_to_apicid, cpu) = -1;
+ per_cpu(x86_cpu_to_apicid, cpu) = BAD_APICID;
cpu_clear(cpu, cpu_present_map);
num_processors--;
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -1180,7 +1180,7 @@ __cpuinit int apic_is_clustered_box(void
{
int i, clusters, zeros;
unsigned id;
- u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
+ u8 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -25,10 +25,10 @@
#endif
/* which logical CPU number maps to which CPU (physical APIC ID) */
-u16 x86_cpu_to_apicid_init[NR_CPUS] __initdata
+u8 x86_cpu_to_apicid_init[NR_CPUS] __initdata
= { [0 ... NR_CPUS-1] = BAD_APICID };
void *x86_cpu_to_apicid_early_ptr;
-DEFINE_PER_CPU(u16, x86_cpu_to_apicid) = BAD_APICID;
+DEFINE_PER_CPU(u8, x86_cpu_to_apicid) = BAD_APICID;
EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
struct genapic __read_mostly *genapic = &apic_flat;
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -67,7 +67,7 @@ unsigned disabled_cpus __cpuinitdata;
/* Bitmask of physically existing CPUs */
physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE;
-u16 x86_bios_cpu_apicid_init[NR_CPUS] __initdata
+u8 x86_bios_cpu_apicid_init[NR_CPUS] __initdata
= { [0 ... NR_CPUS-1] = BAD_APICID };
void *x86_bios_cpu_apicid_early_ptr;
DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
@@ -130,8 +130,8 @@ static void __cpuinit MP_processor_info(
}
/* are we being called early in kernel startup? */
if (x86_cpu_to_apicid_early_ptr) {
- u16 *cpu_to_apicid = x86_cpu_to_apicid_early_ptr;
- u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
+ u8 *cpu_to_apicid = x86_cpu_to_apicid_early_ptr;
+ u8 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
cpu_to_apicid[cpu] = m->mpc_apicid;
bios_cpu_apicid[cpu] = m->mpc_apicid;
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -619,7 +619,7 @@ void __init init_cpu_to_node(void)
int i;
for (i = 0; i < NR_CPUS; i++) {
- u16 apicid = x86_cpu_to_apicid_init[i];
+ u8 apicid = x86_cpu_to_apicid_init[i];
if (apicid == BAD_APICID)
continue;
--- a/include/asm-x86/smp_64.h
+++ b/include/asm-x86/smp_64.h
@@ -26,15 +26,16 @@ extern void unlock_ipi_call_lock(void);
extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *),
void *info, int wait);
-extern u16 __initdata x86_cpu_to_apicid_init[];
-extern u16 __initdata x86_bios_cpu_apicid_init[];
+extern u8 __initdata x86_cpu_to_apicid_init[];
+extern u8 __initdata x86_bios_cpu_apicid_init[];
extern void *x86_cpu_to_apicid_early_ptr;
extern void *x86_bios_cpu_apicid_early_ptr;
+DECLARE_PER_CPU(u8, x86_cpu_to_apicid); /* physical ID */
+extern u8 bios_cpu_apicid[];
DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
DECLARE_PER_CPU(cpumask_t, cpu_core_map);
DECLARE_PER_CPU(u16, cpu_llc_id);
-DECLARE_PER_CPU(u16, x86_cpu_to_apicid);
DECLARE_PER_CPU(u16, x86_bios_cpu_apicid);
static inline int cpu_present_to_apicid(int mps_cpu)
next prev parent reply other threads:[~2008-02-17 0:23 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 1:16 2.6.24-mm1 Andrew Morton
2008-02-04 3:55 ` 2.6.24-mm1 Build Faliure on pgtable_32.c Kamalesh Babulal
2008-02-04 4:31 ` Balbir Singh
2008-02-04 7:36 ` 2.6.24-mm1 Ingo Molnar
2008-02-04 16:22 ` [PATCH] 2.6.24-mm1 section type conflict cleanup Kamalesh Babulal
2008-02-04 18:04 ` Sam Ravnborg
2008-02-05 4:49 ` Kamalesh Babulal
2008-02-04 20:29 ` 2.6.24-mm1: ppc32: too few arguments to function 'reserve_bootmem' Mariusz Kozlowski
2008-02-04 22:40 ` Andrew Morton
2008-02-05 13:00 ` Sergei Shtylyov
2008-02-05 13:25 ` Bernhard Walle
2008-02-04 21:56 ` 2.6.24-mm1: module params broken Hugh Dickins
2008-02-04 23:06 ` Andrew Morton
2008-02-05 0:06 ` Hugh Dickins
2008-02-05 0:16 ` Andrew Morton
2008-02-04 22:23 ` 2.6.24-mm1 - build error, AMD MCE using Intel ifdef'd log function Zan Lynx
2008-02-04 23:10 ` Andrew Morton
2008-02-04 22:32 ` 2.6.24-mm1 - Build failure at net/sched/cls_flow.c:598 Tilman Schmidt
2008-02-04 23:25 ` Andrew Morton
2008-02-05 7:24 ` Rami Rosen
2008-02-05 16:20 ` [-mm Patch] arch/um/kernel/mem.c: fix a shadowed variable WANG Cong
2008-02-05 16:25 ` [-mm Patch] arch/um/kernel/initrd.c: fix a missed conversion specifier WANG Cong
2008-02-05 16:59 ` Jeff Dike
2008-02-05 16:53 ` 2.6.24-mm1 Valdis.Kletnieks
2008-02-05 17:01 ` 2.6.24-mm1 Arjan van de Ven
2008-02-05 19:48 ` 2.6.24-mm1 Valdis.Kletnieks
2008-02-05 19:50 ` 2.6.24-mm1 Arjan van de Ven
2008-02-05 21:25 ` 2.6.24-mm1 Valdis.Kletnieks
2008-02-05 20:19 ` 2.6.24-mm1 Andrew Morton
2008-02-06 11:13 ` 2.6.24-mm1 KOSAKI Motohiro
2008-02-06 11:15 ` 2.6.24-mm1 Ingo Molnar
2008-02-06 11:19 ` 2.6.24-mm1 KOSAKI Motohiro
2008-02-13 17:52 ` 2.6.24 git2/mm1: cpu_to_node mapping to non-existant nodes causing boot failure Mel Gorman
2008-02-13 18:45 ` Mike Travis
2008-02-14 20:17 ` Mel Gorman
2008-02-14 20:41 ` Mike Travis
2008-02-15 2:02 ` Mel Gorman
2008-02-15 15:46 ` Mike Travis
2008-02-16 20:34 ` Mike Travis
2008-02-17 0:23 ` Mike Travis [this message]
2008-02-19 16:12 ` Mike Travis
2008-02-19 19:23 ` Mel Gorman
2008-02-19 19:29 ` Mike Travis
2008-02-27 6:29 ` Yinghai Lu
2008-02-27 14:37 ` Mike Travis
2008-02-27 17:25 ` Yinghai Lu
2008-02-28 15:42 ` Mel Gorman
2008-02-28 17:45 ` Yinghai Lu
2008-03-03 16:27 ` Mel Gorman
2008-03-03 17:45 ` Ingo Molnar
2008-03-03 18:56 ` Mel Gorman
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=47B77E90.5050809@sgi.com \
--to=travis@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=mingo@elte.hu \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
/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