Can't boot in SMP with kernel 2.5.50 ia64
Hello,
Booting 2.5.50 with David's patch, it seems we can't boot in SMP on an ia64 machine. We get the message: SMP mode deactivated. Problem is due to smp_prepare_cpus() declaring max_cpus as "unsigned int" and testing against the -1 value.
Problem was not seen in 2.5.45 because max_cpus was initialized to UINT_MAX.
Boot in SMP is OK with the following patch:
arch/ia64/kernel/smpboot.c +1 -1
@@ -472,7 +472,7 @@* Cycle through the APs sending Wakeup IPIs to boot each. */ void __init -smp_prepare_cpus (unsigned int max_cpus) +smp_prepare_cpus (int max_cpus) {int boot_cpu_id =hard_smp_processor_id ();
include/linux/smp.h +1 -1
@@ -34,7 +34,7 @@/* * Prepare machine for booting other CPUs. */ -extern void smp_prepare_cpus (unsigned int max_cpus); +extern void smp_prepare_cpus (int max_cpus);/* * Bring a CPU up
Signature · 8 lines
Sincères salutations. _____________________________________________________________________ Xavier BRU BULL ISD/R&D/INTEL office: FREC B1-422 tel : +33 (0)4 76 29 77 45 http://www-frec.bull.fr fax : +33 (0)4 76 29 77 70 mailto:[email protected] addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE _____________________________________________________________________
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Xavier Bru
Xavier> Hello,
Xavier> Booting 2.5.50 with David's patch, it seems we can't boot in Xavier> SMP on an ia64 machine. We get the message: SMP mode Xavier> deactivated. Problem is due to smp_prepare_cpus() declaring Xavier> max_cpus as "unsigned int" and testing against the -1 value. Xavier> Problem was not seen in 2.5.45 because max_cpus was Xavier> initialized to UINT_MAX.
I think the test in smp_prepare_cpus() is bogus. I changed it to test just against 0 (as is done in the x86 version of smpboot.c).
--david
Quoted 11 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Xavier Bru
Xavier> Hello,
Xavier> Booting 2.5.50 with David's patch, it seems we can't boot in Xavier> SMP on an ia64 machine. We get the message: SMP mode Xavier> deactivated. Problem is due to
smp_prepare_cpus()declaring Xavier>max_cpusas "unsigned int" and testing against the -1 value. Xavier> Problem was not seen in 2.5.45 becausemax_cpuswas Xavier> initialized toUINT_MAX.
Quoted 4 lines
I think the test in
smp_prepare_cpus()is bogus. I changed it to test just against 0 (as is done in the x86 version ofsmpboot.c).--david
Hi David,
Thanks for answering my mail.
I just changed to "int" because I saw that max_cpus can be modified at boot time (maxcpus=...), and get_option() provides an int. I think this is why test was done against a negative or null value.
"Joyeux Noel et Bonne Annee a tous".
Signature · 8 lines
Sincères salutations. _____________________________________________________________________ Xavier BRU BULL ISD/R&D/INTEL office: FREC B1-422 tel : +33 (0)4 76 29 77 45 http://www-frec.bull.fr fax : +33 (0)4 76 29 77 70 mailto:[email protected] addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE _____________________________________________________________________