From: Andrew Morton <akpm@osdl.org>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: mingo@elte.hu, neilb@cse.unsw.edu.au, linux-kernel@vger.kernel.org
Subject: Re: 2.6.4-mm1 - 4g patch breaks when X86_4G not selected
Date: Mon, 15 Mar 2004 14:41:03 -0800 [thread overview]
Message-ID: <20040315144103.7e349f5f.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0403151210110.28447@montezuma.fsmlabs.com>
Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>
> On Mon, 15 Mar 2004, Ingo Molnar wrote:
>
> >
> > * Neil Brown <neilb@cse.unsw.edu.au> wrote:
> >
> > > And it turns out it was spot on. Applying 4g-2.6.0-test2-mm2-A5.patch
> > > (on top of preceding -mm1 patches) causes my server not to boot.
> >
> > weird. 2.6.4-mm2 boots fine here (both 4g and non-4g). Could you send me
> > your .config?
> >
> > (btw., 2.6.4-mm2 needs the attached trivial fix to compile.)
>
> Yes actually it is scrogged, but i'm sceptical as to whether it is 4G/4G,
> here is a broken configuration.
Manfred found and fixed one bug, but that was newly added in mm2.
DEBUG_PAGEALLOC switches to nopentium mode: otherwise a change_page_attr
could cause a split of a 4 MB page, which could cause a gfp which might
deadlock.
Two parts of the cpu initialization cannot be done early: the f00f bug
workaround needs a working paging setup, and loops_per_jiffies is only
initialized after the timer is running. And everything in setup_arch instead
of before start_kernel: The first printk line should be the "Linux verion xy"
line from start_kernel.
---
25-akpm/arch/i386/kernel/cpu/common.c | 40 ++++++++++++++++++++++------------
25-akpm/arch/i386/kernel/setup.c | 3 --
25-akpm/include/asm-i386/processor.h | 2 -
3 files changed, 29 insertions(+), 16 deletions(-)
diff -puN arch/i386/kernel/cpu/common.c~early-x86-cpu-detection-fix arch/i386/kernel/cpu/common.c
--- 25/arch/i386/kernel/cpu/common.c~early-x86-cpu-detection-fix 2004-03-15 11:36:05.144371392 -0800
+++ 25-akpm/arch/i386/kernel/cpu/common.c 2004-03-15 11:36:05.149370632 -0800
@@ -234,7 +234,7 @@ void __init generic_identify(struct cpui
if ( (xlvl & 0xffff0000) == 0x80000000 ) {
if ( xlvl >= 0x80000001 )
c->x86_capability[1] = cpuid_edx(0x80000001);
- if ( xlvl >= 0x80000004)
+ if ( xlvl >= 0x80000004 )
get_model_name(c); /* Default name */
}
}
@@ -263,18 +263,22 @@ static int __init x86_serial_nr_setup(ch
}
__setup("serialnumber", x86_serial_nr_setup);
-void __init early_identify_cpu(struct cpuinfo_x86 *c)
+/*
+ * This does the hard work of actually picking apart the CPU stuff...
+ */
+void __init identify_cpu(struct cpuinfo_x86 *c)
{
- c->loops_per_jiffy = loops_per_jiffy;
+ int i;
+
c->x86_cache_size = -1;
c->x86_vendor = X86_VENDOR_UNKNOWN;
c->cpuid_level = -1; /* CPUID not detected */
c->x86_model = c->x86_mask = 0; /* So far unknown... */
c->x86_vendor_id[0] = '\0'; /* Unset */
c->x86_model_id[0] = '\0'; /* Unset */
- c->x86_clflush_size = 32;
memset(&c->x86_capability, 0, sizeof c->x86_capability);
+ c->x86_clflush_size = 0;
if (!have_cpuid_p()) {
/* First of all, decide if this is a 486 or higher */
/* It's a 486 if we can modify the AC flag */
@@ -285,16 +289,14 @@ void __init early_identify_cpu(struct cp
}
generic_identify(c);
-}
-
-/*
- * This does the hard work of actually picking apart the CPU stuff...
- */
-void __init identify_cpu(struct cpuinfo_x86 *c)
-{
- int i;
- early_identify_cpu(c);
+ if (!c->x86_clflush_size) {
+ /* No cache line size autodetected - manual estimate: */
+ if (c->x86 <= 4)
+ c->x86_clflush_size = 16;
+ else
+ c->x86_clflush_size = 32;
+ }
printk(KERN_DEBUG "CPU: After generic identify, caps: %08lx %08lx %08lx %08lx\n",
c->x86_capability[0],
@@ -382,7 +384,19 @@ void __init identify_cpu(struct cpuinfo_
#ifdef CONFIG_X86_MCE
mcheck_init(c);
#endif
+ late_identify_cpu(c);
+}
+
+void __init late_identify_cpu(struct cpuinfo_x86 *c)
+{
+ /*
+ * The timer is not yet running when identify cpu is called for the
+ * first cpu - check_bugs() calls late_identify_cpu and transfers
+ * loops_per_jiffy from calibrate_delay into the cpu data area.
+ */
+ c->loops_per_jiffy = loops_per_jiffy;
}
+
/*
* Perform early boot up checks for a valid TSC. See arch/i386/kernel/time.c
*/
diff -puN arch/i386/kernel/setup.c~early-x86-cpu-detection-fix arch/i386/kernel/setup.c
--- 25/arch/i386/kernel/setup.c~early-x86-cpu-detection-fix 2004-03-15 11:36:05.145371240 -0800
+++ 25-akpm/arch/i386/kernel/setup.c 2004-03-15 11:36:05.150370480 -0800
@@ -1124,6 +1124,7 @@ void __init setup_arch(char **cmdline_p)
max_low_pfn = setup_memory();
+ identify_cpu(&boot_cpu_data);
/*
* NOTE: before this point _nobody_ is allowed to allocate
* any memory using the bootmem allocator.
@@ -1149,8 +1150,6 @@ void __init setup_arch(char **cmdline_p)
dmi_scan_machine();
- early_identify_cpu(&boot_cpu_data);
-
#ifdef CONFIG_X86_GENERICARCH
generic_apic_probe(*cmdline_p);
#endif
diff -puN include/asm-i386/processor.h~early-x86-cpu-detection-fix include/asm-i386/processor.h
--- 25/include/asm-i386/processor.h~early-x86-cpu-detection-fix 2004-03-15 11:36:05.147370936 -0800
+++ 25-akpm/include/asm-i386/processor.h 2004-03-15 11:36:05.151370328 -0800
@@ -98,6 +98,7 @@ extern struct cpuinfo_x86 cpu_data[];
extern char ignore_fpu_irq;
extern void identify_cpu(struct cpuinfo_x86 *);
+extern void late_identify_cpu(struct cpuinfo_x86 *c);
extern void print_cpu_info(struct cpuinfo_x86 *);
extern void dodgy_tsc(void);
@@ -653,6 +654,5 @@ extern void select_idle_routine(const st
#endif
#define cache_line_size() (boot_cpu_data.x86_clflush_size)
-extern void early_identify_cpu(struct cpuinfo_x86 *c);
#endif /* __ASM_I386_PROCESSOR_H */
_
next prev parent reply other threads:[~2004-03-15 22:39 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-11 7:31 2.6.4-mm1 Andrew Morton
2004-03-11 8:26 ` 2.6.4-mm1 Jens Axboe
2004-03-11 8:30 ` 2.6.4-mm1 Andrew Morton
2004-03-11 9:34 ` 2.6.4-mm1 Matthias Urlichs
2004-03-11 9:17 ` 2.6.4-mm1 Mickael Marchand
2004-03-11 11:06 ` 2.6.4-mm1 Andrew Morton
2004-03-11 11:22 ` 2.6.4-mm1 Anton Blanchard
2004-03-11 12:23 ` 2.6.4-mm1 Mickael Marchand
2004-03-11 13:40 ` 2.6.4-mm1 jlnance
2004-03-11 19:25 ` 2.6.4-mm1 Mike Fedyk
2004-03-11 22:22 ` 2.6.4-mm1 Andrew Morton
2004-03-11 13:49 ` 2.6.4-mm1 Anton Blanchard
2004-03-11 23:29 ` 2.6.4-mm1 Nick Piggin
2004-03-12 2:03 ` 2.6.4-mm1 Nick Piggin
2004-03-12 2:12 ` 2.6.4-mm1 Anton Blanchard
2004-03-12 5:11 ` 2.6.4-mm1 Anton Blanchard
2004-03-11 13:52 ` 2.6.4-mm1 Anton Blanchard
2004-03-11 15:23 ` 2.6.4-mm1 William Lee Irwin III
2004-03-11 15:54 ` 2.6.4-mm1 William Lee Irwin III
2004-03-11 17:06 ` 2.6.4-mm1 Redeeman
2004-03-11 17:53 ` 2.6.4-mm1 Norberto Bensa
2004-03-11 18:09 ` 2.6.4-mm1 Andrew Morton
2004-03-11 18:14 ` 2.6.4-mm1 Redeeman
2004-03-11 18:46 ` 2.6.4-mm1 Andrew Morton
2004-03-11 20:58 ` 2.6.4-mm1 Redeeman
2004-03-11 21:10 ` 2.6.4-mm1 Redeeman
2004-03-11 18:22 ` 2.6.4-mm1 Norberto Bensa
2004-03-11 20:29 ` 2.6.4-mm1 Felipe Alfaro Solana
2004-03-11 17:56 ` 2.6.4-mm1 boot Richard A Nelson
2004-03-12 20:08 ` swsusp (Re: 2.6.4-mm1 boot) Pavel Machek
2004-03-11 20:23 ` 2.6.4-mm1: modular quota needs unknown symbol Adrian Bunk
2004-03-12 8:51 ` Marc-Christian Petersen
2004-03-15 11:02 ` Jan Kara
2004-03-11 20:31 ` 2.6.4-mm1: unknown symbols cauased by remove-more-KERNEL_SYSCALLS.patch Adrian Bunk
2004-03-12 9:14 ` Arnd Bergmann
2004-03-12 9:29 ` Andrew Morton
2004-03-12 9:35 ` Arnd Bergmann
2004-03-12 9:48 ` Andrew Morton
2004-03-12 10:08 ` Dave Jones
2004-03-13 20:25 ` Francois Romieu
2004-03-12 10:11 ` Arjan van de Ven
2004-03-12 19:42 ` 2.6.4-mm1: unknown symbols cauased byremove-more-KERNEL_SYSCALLS.patch Adrian Bunk
2004-03-12 19:45 ` Arjan van de Ven
2004-03-12 1:03 ` 2.6.4-mm1 Neil Brown
2004-03-12 1:22 ` 2.6.4-mm1 Andrew Morton
2004-03-12 5:48 ` 2.6.4-mm1 Neil Brown
2004-03-12 7:50 ` 2.6.4-mm1 Andrew Morton
2004-03-13 10:25 ` 2.6.4-mm1 Neil Brown
2004-03-15 1:46 ` 2.6.4-mm1 - 4g patch breaks when X86_4G not selected Neil Brown
2004-03-15 8:09 ` Ingo Molnar
2004-03-15 22:19 ` Zwane Mwaikambo
2004-03-15 22:41 ` Andrew Morton [this message]
2004-03-15 9:19 ` Ingo Molnar
2004-03-16 1:35 ` Neil Brown
2004-03-16 4:52 ` Andrew Morton
2004-03-16 5:03 ` Neil Brown
2004-03-16 7:23 ` Ingo Molnar
2004-03-16 7:28 ` Andrew Morton
2004-03-16 7:24 ` Ingo Molnar
2004-04-04 9:07 ` [PATCH][2.6-mm] setup_identity_mappings depends on zone init Zwane Mwaikambo
2004-04-04 9:27 ` William Lee Irwin III
2004-03-12 9:04 ` 2.6.4-mm1 Helge Hafting
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=20040315144103.7e349f5f.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=neilb@cse.unsw.edu.au \
--cc=zwane@linuxpower.ca \
/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;
as well as URLs for NNTP newsgroup(s).