mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Gerd Hoffman <kraxel@suse.de>
Subject: [patch -mm4] x86 SMP alternatives: update X86_FEATURE_UP on cpu0
Date: Fri, 3 Feb 2006 02:30:59 -0500	[thread overview]
Message-ID: <200602030234_MC3-1-B77D-3328@compuserve.com> (raw)

When cpu hotplug is enabled, the x86 feature "up" is always shown
for CPU 0 in /proc/cpuinfo.  Update CPU 0 when updating
boot_cpu_data so they stay in sync.  Also, get some definitions
from header files.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>

--- 2.6.16-rc1-mm4-386.orig/arch/i386/kernel/alternative.c
+++ 2.6.16-rc1-mm4-386/arch/i386/kernel/alternative.c
@@ -2,6 +2,7 @@
 #include <linux/spinlock.h>
 #include <linux/list.h>
 #include <asm/alternative.h>
+#include <asm/sections.h>
 
 #define DEBUG 0
 #if DEBUG
@@ -71,7 +72,6 @@ extern struct alt_instr __alt_instructio
 extern struct alt_instr __smp_alt_instructions[], __smp_alt_instructions_end[];
 extern u8 *__smp_locks[], *__smp_locks_end[];
 
-extern u8 _text[], _etext[];
 extern u8 __smp_alt_begin[], __smp_alt_end[];
 
 
@@ -264,6 +264,7 @@ void alternatives_smp_switch(int smp)
 	if (smp) {
 		printk(KERN_INFO "SMP alternatives: switching to SMP code\n");
 		clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability);
+		clear_bit(X86_FEATURE_UP, cpu_data[0].x86_capability);
 		alternatives_smp_apply(__smp_alt_instructions,
 				       __smp_alt_instructions_end);
 		list_for_each_entry(mod, &smp_alt_modules, next)
@@ -272,6 +273,7 @@ void alternatives_smp_switch(int smp)
 	} else {
 		printk(KERN_INFO "SMP alternatives: switching to UP code\n");
 		set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability);
+		set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability);
 		apply_alternatives(__smp_alt_instructions,
 				   __smp_alt_instructions_end);
 		list_for_each_entry(mod, &smp_alt_modules, next)
@@ -301,6 +303,7 @@ void __init alternative_instructions(voi
 		if (1 == num_possible_cpus()) {
 			printk(KERN_INFO "SMP alternatives: switching to UP code\n");
 			set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability);
+			set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability);
 			apply_alternatives(__smp_alt_instructions,
 					   __smp_alt_instructions_end);
 			alternatives_smp_unlock(__smp_locks, __smp_locks_end,
-- 
Chuck

                 reply	other threads:[~2006-02-03  8:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200602030234_MC3-1-B77D-3328@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=kraxel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®