Skip to contentSkip to conversation

The parisc SMP boot problem

parisc-linux Kyle McMartin 3 participants 4 messages Feb 18, 2007 – Feb 24, 2007 3 messages not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · James Bottomley

After a bit more of an analysis of our changesets (I concluded it must have been something we introduced). This is the source of the SMP boot hang on 2.6.20-rcX:

commit 01a9fa750904beed08814364fcbd7039eca8ec71

Author: Randolph <[email protected]>
Date:   Mon Dec 11 16:07:51 2006 -0800

Optimize TLB flush on SMP systems

Quoted 8 lines

As predicted, the reason it passed all the tests at the time it was introduced is that because of the piggin bug, we were only scheduling on a single CPU, and so the SMP piece of this wasn't truly tested.

Reverting this patch allows ioz to boot correctly.

Ok. I'll revert it in the for-linus tree as well.

Any idea what was wrong with it?

Cheers,
Kyle
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#6 lore raw
In reply to a message not in the archive
Quoted 1 line

Reverting this patch allows ioz to boot correctly.

With the patch reverted, I was also able to boot successfully an SMP kernel on what was ior for the first time ;)

Thanks,
Dave

Signature · 6 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
#5 lore raw
In reply to a message not in the archive
Quoted 6 lines · James Bottomley
Quoted 1 line · Kyle McMartin

Any idea what was wrong with it?

Not yet ... the fact that everything goes OK for a while then hangs implies there's some issue with handling the SID wrap around, but I can't pinpoint it yet.

OK, it turns out it was much simpler. The SMP distributed load_context() changes %sr3 and %cr8. However, in an interrupt all of the space registers are saved and restored, so, even though the routine changes %sr3, it gets changed back on the rfi after the IPI completes.

I think this is the fix. Although, it strikes me that no interrupt should be mucking with the space registers, so it's probably safe not to save or restore any of them.

James

include/asm-parisc/assembly.h +2 -2
index 5587f00..6c4d126 100644
@@ -435,7 +435,7 @@
 	SAVE_SP  (%sr0, PT_SR0 (\regs))
 	SAVE_SP  (%sr1, PT_SR1 (\regs))
 	SAVE_SP  (%sr2, PT_SR2 (\regs))
-	SAVE_SP  (%sr3, PT_SR3 (\regs))
+;	SAVE_SP  (%sr3, PT_SR3 (\regs))
 	SAVE_SP  (%sr4, PT_SR4 (\regs))
 	SAVE_SP  (%sr5, PT_SR5 (\regs))
 	SAVE_SP  (%sr6, PT_SR6 (\regs))
@@ -475,7 +475,7 @@
 	REST_SP  (%sr0, PT_SR0 (\regs))
 	REST_SP  (%sr1, PT_SR1 (\regs))
 	REST_SP  (%sr2, PT_SR2 (\regs))
-	REST_SP  (%sr3, PT_SR3 (\regs))
+;	REST_SP  (%sr3, PT_SR3 (\regs))
 	REST_SP  (%sr4, PT_SR4 (\regs))
 	REST_SP  (%sr5, PT_SR5 (\regs))
 	REST_SP  (%sr6, PT_SR6 (\regs))

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux