[patch] SMP alternatives: skip with UP kernels.

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

 



> Okay, thanks. Yes, I agree such would make sense.

Patch below.  It simply returns in case the tables are empty and nothing
is do to, thus avoids printing the confusing message.

cheers,

  Gerd

-- 
Gerd Hoffmann <[email protected]>
Erst mal heiraten, ein, zwei Kinder, und wenn alles läuft
geh' ich nach drei Jahren mit der Familie an die Börse.
http://www.suse.de/~kraxel/julika-dora.jpeg
Index: vanilla-2.6.17-rc3-mm1/arch/i386/kernel/alternative.c
===================================================================
--- vanilla-2.6.17-rc3-mm1.orig/arch/i386/kernel/alternative.c	2006-05-10 12:25:39.000000000 +0200
+++ vanilla-2.6.17-rc3-mm1/arch/i386/kernel/alternative.c	2006-05-10 15:00:10.000000000 +0200
@@ -349,6 +349,9 @@ void __init alternative_instructions(voi
 	smp_alt_once = 1;
 #endif
 
+	if (0 == (__smp_alt_end - __smp_alt_begin))
+		return; /* no tables, nothing to patch (UP kernel) */
+
 	if (smp_alt_once) {
 		if (1 == num_possible_cpus()) {
 			printk(KERN_INFO "SMP alternatives: switching to UP code\n");

[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