PATCH: [Fwd: PROBLEM: Kernel 2.6.16 fails to boot on API CS20]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

About two weeks ago I sent Richard Henderson the attached email detailing a problem with the 2.6.16 kernel booting on my dual processor Alpha system. Today I was able to track down the problem to the call to topology_cpu_callback() in drivers/base/topology.c--specifically, in that function the call to get_cpu_sysdev() is returning NULL. I have tracked down the reason and created a small patch that solves the problem on my system. Basically for the Alpha architecture, register_cpu is never being called, so get_cpu_sysdev() has nothing to return. Using ppc_init() in arch/ppc/kernel/setup.c, I created a similiar function for the Alpha architecture that just registers the CPU devices. Attached are two versions of the patch: one against 2.6.16.1 and the other against 2.6.17-rc1.

Regards,
Brian Uhrain
--- linux-2.6.16.1/arch/alpha/kernel/setup.c.old	2006-04-05 13:01:38.585051580 +0100
+++ linux-2.6.16.1/arch/alpha/kernel/setup.c	2006-04-05 13:02:24.412099456 +0100
@@ -24,6 +24,7 @@
 #include <linux/config.h>	/* CONFIG_ALPHA_LCA etc */
 #include <linux/mc146818rtc.h>
 #include <linux/console.h>
+#include <linux/cpu.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/string.h>
@@ -477,6 +478,22 @@
 #undef PFN_PHYS
 #undef PFN_MAX
 
+static struct cpu cpu_devices[NR_CPUS];
+
+int __init alpha_init(void)
+{
+	int i;
+
+	/* register CPU devices */
+	for (i = 0; i < NR_CPUS; i++)
+		if (cpu_possible(i))
+			register_cpu(&cpu_devices[i], i, NULL);
+
+	return 0;
+}
+
+arch_initcall(alpha_init);
+
 void __init
 setup_arch(char **cmdline_p)
 {
--- linux-2.6.17-rc1/arch/alpha/kernel/setup.c.old	2006-04-05 12:52:25.636715545 +0100
+++ linux-2.6.17-rc1/arch/alpha/kernel/setup.c	2006-04-05 12:53:01.645504167 +0100
@@ -24,6 +24,7 @@
 #include <linux/config.h>	/* CONFIG_ALPHA_LCA etc */
 #include <linux/mc146818rtc.h>
 #include <linux/console.h>
+#include <linux/cpu.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/string.h>
@@ -471,6 +472,21 @@
 	return 0;
 }
 
+static struct cpu cpu_devices[NR_CPUS];
+
+int __init alpha_init(void)
+{
+	int i;
+
+	/* register CPU devices */
+	for_each_possible_cpu(i)
+		register_cpu(&cpu_devices[i], i, NULL);
+
+	return 0;
+}
+
+arch_initcall(alpha_init);
+
 void __init
 setup_arch(char **cmdline_p)
 {
--- Begin Message ---
Hi,

When trying to boot a 2.6.16 kernel (kernel.org sources with the only patch being for Reiser4 FS support), the kernel dies on bootup on my dual-processor Alpha system, with the error "Unable to handle kernel paging request at virtual address 0000000000000058". The system is an API CS20 with 2 833MHz 21264b processors and 1 GB of RAM (8 x 128 MB). I have attached all of the output from the serial console, including the error message, along with a gzipped version of the .config used to compile the kernel and the output of "lspci -vvv". Looking at the kernel output prior to the kernel panic, I noticed it only activated one processor even though it probed two.

Here is the output of the ver_linux script:

mantheren:/usr/src/linux-2.6.16# sh ./scripts/ver_linux
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

Linux mantheren 2.6.15.6-mantheren #1 SMP Tue Mar 7 09:03:30 GMT 2006 alpha unknown unknown GNU/Linux

Gnu C                  4.1.0
Gnu make               3.80
binutils               2.16.91.0.7
util-linux             2.13-pre7
mount                  2.13-pre7
module-init-tools      3.3-pre1
e2fsprogs              1.38
reiserfsprogs          3.6.19
reiser4progs           1.0.5
xfsprogs               2.7.3
Linux C Library        2.3.6
Dynamic linker (ldd)   2.3.6
Procps                 3.2.6
Net-tools              1.60
Kbd                    83:
Sh-utils               5.2.1
udev                   087
Modules Loaded alim15x3 snd_usb_audio sg snd_pcm snd_timer snd_page_alloc generic snd_usb_lib snd_rawmidi snd_hwdep snd sr_mod cdrom ide_core soundcore e100 mii i2c_ali1535 i2c_ali15x3 zd1211 i2c_dev i2c_core


And of /proc/cpuinfo:
cpu                     : Alpha
cpu model               : EV68AL
cpu variation           : 7
cpu revision            : 0
cpu serial number       :
system type             : Tsunami
system variation        : Clipper
system revision         : 0
system serial number    :
cycle frequency [Hz]    : 833333333
timer frequency [Hz]    : 1024.00
page size [bytes]       : 8192
phys. address bits      : 44
max. addr. space #      : 255
BogoMIPS                : 1657.40
kernel unaligned acc    : 963348 (pc=fffffc0000447340,va=fffffc003f8ddff2)
user unaligned acc      : 0 (pc=0,va=0)
platform string         : API CS20D 833 MHz
cpus detected           : 2
cpus active             : 2
cpu active mask         : 0000000000000003
L1 Icache               : 64K, 2-way, 64b line
L1 Dcache               : 64K, 2-way, 64b line
L2 cache                : 4096K, 1-way, 64b line
L3 cache                : n/a

If you need any other information or would like me to test anything, please let me know.

Regards,
Brian Uhrain

P.S. The system is running a home-brew "distro" with everything compiled from scratch, and running a 2.6.15.6 kernel it has not given any problems even through recompiles of all of the installed software (glibc through firefox).
aboot> 2
aboot: loading compressed vmlinux-custom.gz...
aboot: zero-filling 132648 bytes at 0xfffffc0000764710
aboot: starting kernel vmlinux-custom.gz with arguments root=/dev/sda2 console=ttyS0 console=tty0
Linux version 2.6.16-mantheren (root@mantheren) (gcc version 4.1.0) #1 SMP Mon Mar 20 23:11:35 GMT 6
Booting on Tsunami variation Clipper using machine vector Clipper from SRM
Major Options: SMP EV67 LEGACY_START VERBOSE_MCHECK MAGIC_SYSRQ
Command line: root=/dev/sda2 console=ttyS0 console=tty0
memcluster 0, usage 1, start        0, end      256
memcluster 1, usage 0, start      256, end   130981
memcluster 2, usage 1, start   130981, end   131072
freeing pages 256:384
freeing pages 965:130981
reserving pages 965:967
4096K Bcache detected; load hit latency 18 cycles, load miss latency 164 cycles
SMP: 2 CPUs probed -- cpu_present_mask = 1
Built 1 zonelists
Kernel command line: root=/dev/sda2 console=ttyS0 console=tty0
PID hash table entries: 4096 (order: 12, 131072 bytes)
Using epoch = 2000
Console: colour VGA+ 80x25
Dentry cache hash table entries: 262144 (order: 8, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 7, 1048576 bytes)
Memory: 1027944k/1047848k available (3258k kernel code, 17200k reserved, 395k data, 144k init)
Mount-cache hash table entries: 512
SMP starting up secondaries.
Brought up 1 CPUs
SMP: Total of 1 processors activated (1646.17 BogoMIPS).
migration_cost=0
NET: Registered protocol family 16
PCI quirk: region 7e20-7e3f claimed by ali7101 SMB
Linux Plug and Play Support v0.97 (c) Adam Belay
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
TC classifier action (bugs to [email protected] cc [email protected])
srm_env: version 0.0.5 loaded successfully
Loading Reiser4. See www.namesys.com for a description of Reiser4.
SGI XFS with large block/inode numbers, no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Activating ISA DMA hang workarounds.
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
rtc: SRM (post-2000) epoch (2000) detected
Real Time Clock Driver v1.12ac
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Unable to handle kernel paging request at virtual address 0000000000000058
CPU 0 swapper(1): Oops 0
pc = [<fffffc00003cdbb8>]  ra = [<fffffc00006ee128>]  ps = 0000    Not tainted
pc is at sysfs_create_group+0x28/0x160
ra is at topology_cpu_callback+0x68/0xc0
v0 = 0000000000000000  t0 = 0000000000000000  t1 = 0000000000000001
t2 = 0000000000000001  t3 = fffffc003fd73170  t4 = fffffc003fd730c8
t5 = fffffc003fd730c8  t6 = 0000000000000002  t7 = fffffc0000244000
s0 = 0000000000000001  s1 = fffffc0000764828  s2 = fffffc0000722b00
s3 = fffffc000071f048  s4 = fffffc00006f4fb8  s5 = fffffc0000652b00
s6 = fffffc0000652b00
a0 = 0000000000000010  a1 = fffffc000071f048  a2 = 0000000000000000
a3 = 0000000000008080  a4 = 0000000000000004  a5 = 0000000000000000
t8 = 0000000000000001  t9 = fffffc000063c2a0  t10= fffffc00006f70c0
t11= 0000000000000004  pv = fffffc00003cdb90  at = 0000000000000000
gp = fffffc0000762b00  sp = fffffc0000247df8
Trace:
[<fffffc00003102b8>] init+0x198/0x5c0
[<fffffc0000311868>] kernel_thread+0x28/0x90

Code: b75e0000  47f1040c  b53e0008  b55e0010  b57e0018  e6000043 <a4300048> e4200041
Kernel panic - not syncing: Attempted to kill init!

Attachment: config.gz
Description: application/gzip

Attachment: pci-devs.txt.gz
Description: application/gzip


--- End Message ---

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux