lkml.org 
[lkml]   [2007]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
From
SubjectRe: kernel 2.6.23-rc6 hangs on Geode GX1
Date
Hi AMrco,

On Thursday 27 September 2007 16:44, Marco Tralli wrote:
> I have random hangs on kernel boot or after few minutes on a NatSemi Geode
> GX1 based PC-104 (from Advantech) using kernel 2.6.23-rc6. The system
> locks, no way to use SysRq key, no usefull logs.
>
> No problems using kernel 2.6.21 series that I was using before with same
> config options.
>
> I found that commenting out "geode_configure" call in
> arch/i386/kernel/cpu/cyrix.c the problem is fixed.
>
> I guess recent changes to cyrix.c that replace macros setCx86/getCx86 with
> inlined functions have now "activate" performance tricks in geode_configure
> code that previously were "inactive" due to wrong macro espansion. So not
> only "Suspend on Halt" function is enabled but also less or not documented
> geode tricks (incrementor margin, fast fpu, write-back) now broken on some
> GX1/GXm platform (maybe because of BIOS?)

Seems so.

> I can further investigate on what exact geode_configure part cause my
> hangs, but I suggest to make a config options to explicity enable Geode
> performance tricks only if requested (maybe using CONFIG_MGEODEGX1) .

That's my system:

root@morgan:~ uname -a
Linux morgan 2.6.22.8-cfs-v22-Igel316 #1 PREEMPT Wed Sep 26 15:09:46 CEST 2007 i586 unknown

root@morgan:~ cat /proc/cpuinfo
processor : 0
vendor_id : Geode by NSC
cpu family : 5
model : 9
model name : Geode(TM) Integrated Processor by National Semi
stepping : 2
cache size : 16 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu msr cx8 cmov mmx cxmmx
bogomips : 99.94
clflush size : 32

It runs stable on 5 different GX1 systems.

But I do not use a standard BIOS. I'm using LinuxBIOS instead. But I'm also using
these patches.

For documentation only:

Index: linux-2.6.22/arch/i386/kernel/cpu/cyrix.c
===================================================================
--- linux-2.6.22.orig/arch/i386/kernel/cpu/cyrix.c
+++ linux-2.6.22/arch/i386/kernel/cpu/cyrix.c
@@ -139,6 +139,23 @@ static void __cpuinit set_cx86_memwb(voi
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14 );
}

+/*
+ * Setup the chipset specific Performance Control Incrementer
+ *
+ * The Performance Control Incrementer seems to be a delay line to control data
+ * setup time for DRAM access or it controls jitter. Its setting depends on CPU
+ * and DRAM clock (CPU and DRAM clock are coupled through a simple clock
+ * divider. For a 300 MHz CPU the divider is 3.0 to get a DRAM clock of 100MHz)
+ * There is an application note how to setup it:
+ * "AMD Geode GX1 Processor Memory Timings for Maximum Performance."
+ * Values for various CPUs:
+ * 1-0 for processor speed 200...266MHz
+ * 1-1 for processor speed 300 and 333MHz
+ *
+ * Note: If your system runs unstable after setting new values here,
+ * try with other values or leave the value as the BIOS setup it.
+ * The setting depends also on physical layout!
+ */
static void __cpuinit set_cx86_inc(void)
{
unsigned char ccr3;

And here I'm using an incrementer value for my 300MHz CPU:

Index: linux-2.6.22/arch/i386/kernel/cpu/cyrix.c
===================================================================
--- linux-2.6.22.orig/arch/i386/kernel/cpu/cyrix.c
+++ linux-2.6.22/arch/i386/kernel/cpu/cyrix.c
@@ -169,7 +169,7 @@ static void __cpuinit set_cx86_inc(void)
setCx86(CX86_PCR1, getCx86(CX86_PCR1) | 0x02);
/* PCR0 -- Performance Control */
/* Incrementor Margin 10 */
- setCx86(CX86_PCR0, getCx86(CX86_PCR0) | 0x04);
+ setCx86(CX86_PCR0, getCx86(CX86_PCR0) | 0x05); /* 300MHz CPU */
setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
}

This should be done at runtime in relation to the real CPU clock.
Hope it helps
Juergen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-27 18:15    [from the cache]
©2003-2011 Jasper Spaans