Skip to contentSkip to conversation

sparc32: smp fixes

PATCH Applied Bob Breuer 3 participants 8 messages Jun 11, 2006 – Jun 20, 2006

lore
Share & tools
lore

Bob Breuer

author
#0 lore raw

cover sparc32: smp fixes

Here's a set of patches to get sparc32 caught back up to the moving SMP target:
1 - add topology_init
2 - setup cpu_possible_map
3 - add missing rw can_lock macros
4 - mark smp init functions as cpuinit

I have tested these successfully with 2.6.17-rc5. With 2x SuperSPARC-II, I can rebuild the kernel with "make -j6" while running the SMP kernel. I've verified that UP still builds and runs. No luck yet with dual hyperSPARC's, but it will fully boot when restricted to just one.

Bob

#1 lore raw

From: Bob Breuer <[email protected]>
Date: Sun, 11 Jun 2006 01:15:00 -0500

Quoted 7 lines

Here's a set of patches to get sparc32 caught back up to the moving SMP target:
1 - add topology_init
2 - setup cpu_possible_map
3 - add missing rw can_lock macros
4 - mark smp init functions as cpuinit

Quoted 5 lines

I have tested these successfully with 2.6.17-rc5. With 2x SuperSPARC-II, I can rebuild the kernel with "make -j6" while running the SMP kernel. I've verified that UP still builds and runs. No luck yet with dual hyperSPARC's, but it will fully boot when restricted to just one.

Thanks Bob, I'll try to integrate these over the weekend.

#2 lore raw
In reply to Bob Breuer

Hi,

Quoted 8 lines · Bob Breuer

Here's a set of patches to get sparc32 caught back up to the moving SMP target:
1 - add topology_init
2 - setup cpu_possible_map
3 - add missing rw can_lock macros
4 - mark smp init functions as cpuinit

I have tested these successfully with 2.6.17-rc5.

Your patches apply correctly to rc6 as well.

However, when trying to compile natively rc6 with your patches, with either GCC 4.1.1 or 4.0.4 (from Debian unstable), I get an ICE:

CC kernel/sched.o
kernel/sched.c: In function 'effective_prio':
kernel/sched.c:659: internal compiler error: in choose_multiplier, at expmed.c:3269

What compiler and what platform do you use to compile the kernel? Has anyone experienced similar problems?

Thanks,
Ludovic.

author
#3 lore raw
In reply to Bob Breuer
Quoted 9 lines · Ludovic Courtès

However, when trying to compile natively rc6 with your patches, with either GCC 4.1.1 or 4.0.4 (from Debian unstable), I get an ICE:

CC kernel/sched.o
kernel/sched.c: In function 'effective_prio':
kernel/sched.c:659: internal compiler error: in choose_multiplier, at expmed.c:3269

What compiler and what platform do you use to compile the kernel? Has anyone experienced similar problems?

That's strange, I didn't touch kernel/sched.c, but I did modify a couple of sparc specific header files. Can you narrow down which patch broke it for you?

I compiled it both with gcc 3.3.4 and 3.4.2 from Aurora, specifically:
gcc version 3.3.4 20040623 (Red Hat 3.3.4-2)
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)

Bob

#4 lore raw
In reply to Bob Breuer

Hi,

2 days, 18 hours, 3 minutes, 4 seconds ago,

Quoted 11 lines · Bob Breuer
Quoted 9 lines · Ludovic Courtès

However, when trying to compile natively rc6 with your patches, with either GCC 4.1.1 or 4.0.4 (from Debian unstable), I get an ICE:

CC kernel/sched.o
kernel/sched.c: In function 'effective_prio':
kernel/sched.c:659: internal compiler error: in choose_multiplier, at expmed.c:3269

What compiler and what platform do you use to compile the kernel? Has anyone experienced similar problems?

Quoted 7 lines

That's strange, I didn't touch kernel/sched.c, but I did modify a couple of sparc specific header files. Can you narrow down which patch broke it for you?

I compiled it both with gcc 3.3.4 and 3.4.2 from Aurora, specifically:
gcc version 3.3.4 20040623 (Red Hat 3.3.4-2)
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)

Using GCC 3.4.6 (from Debian sid) fixes the problem.

However, the resulting kernel hangs right after the "Booting Linux..." message. Unfortunately, I might have a few objects compiled with 4.x in the middle of those compiled with 3.4.6. Is this likely to cause troubles?

In the meantime, could you make SMP images available? Then I could spend my CPU time compiling natively, which would be more useful.

Thanks,
Ludovic.

#5 lore raw
In reply to Bob Breuer

From: Ludovic Courtès <[email protected]>
Date: Wed, 14 Jun 2006 19:35:26 +0200

Quoted 4 lines

However, the resulting kernel hangs right after the "Booting Linux..." message. Unfortunately, I might have a few objects compiled with 4.x in the middle of those compiled with 3.4.6. Is this likely to cause troubles?

Absolutely. Changing the compiler changes many defines use in
the build, via include/linux/compiler.h, and this can even change data structure layout.

#6 lore raw
In reply to Bob Breuer

Hi,

5 days, 2 hours, 52 minutes, 18 seconds ago,

Quoted 1 line · Ludovic Courtès

Using GCC 3.4.6 (from Debian sid) fixes the problem.

Actually it doesn't. For some reason, I now hit the following ICE with 3.4.6 (Debian's `gcc-3.4', version 3.4.6-2) systematically:

CC fs/proc/proc_misc.o
CC fs/dnotify.o
distcc[13671] ERROR: compile /home/ludo/.ccache/proc_misc.tmp.cheetah.13656.i on localhost failed fs/proc/proc_misc.c: In function `uptime_read_proc':
fs/proc/proc_misc.c:109: internal compiler error: in choose_multiplier, at expmed.c:2738 Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.

I finally used 3.3.6 to built the whole kernel and I don't hit any ICE there. Is anybody building SPARC kernels with 3.4 or 4.x?

Quoted 2 lines

However, the resulting kernel hangs right after the "Booting Linux..." message.

The kernel (once cleanly recompiled with 3.3.6) still hangs at the same point, whether there are one or two CPUs in the machine.

I guess I should try to selectively revert some of the SMP patches in order to try to find out what's causing this. Any advice about how to proceed?

Thanks,
Ludovic.

author
#7 lore raw
In reply to Bob Breuer
Quoted 4 lines · Ludovic Courtès

Hi,

5 days, 2 hours, 52 minutes, 18 seconds ago,
Ludovic Courtès wrote:

Quoted 8 lines
Quoted 1 line

Using GCC 3.4.6 (from Debian sid) fixes the problem.

Actually it doesn't. For some reason, I now hit the following ICE with 3.4.6 (Debian's `gcc-3.4', version 3.4.6-2) systematically:

CC fs/proc/proc_misc.o
CC fs/dnotify.o
distcc[13671] ERROR: compile

    ^^^^^^

Jumping through extra hoops here? Or in other words, is there any chance that distcc may cause problems?

Quoted 8 lines

I finally used 3.3.6 to built the whole kernel and I don't hit any ICE there. Is anybody building SPARC kernels with 3.4 or 4.x?

Quoted 2 lines

However, the resulting kernel hangs right after the "Booting Linux..." message.

The kernel (once cleanly recompiled with 3.3.6) still hangs at the same point, whether there are one or two CPUs in the machine.

I've put my SMP kernel image up at: http://user.mc.net/~breuerr/sparc/
if you want to give it a try. No initrd needed, and it's a pretty trimmed down config, but it works for me. The config and patch to recreate it are also there.

Bob