public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Gerd Hoffmann <kraxel@suse.de>, Andi Kleen <ak@suse.de>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] x86_64: x86_64 version of the smp alternative patch.
Date: Tue, 27 Jun 2006 13:57:41 -0400	[thread overview]
Message-ID: <20060627175741.GF1280@redhat.com> (raw)
In-Reply-To: <200606261900.k5QJ0k9J028243@hera.kernel.org>

On Mon, Jun 26, 2006 at 07:00:46PM +0000, Linux Kernel wrote:
 > commit d167a51877e94dda73dd656c51f363502309f713
 > tree eb02c2974b61777f575dfdc07d4c2adf83bde434
 > parent 240cd6a80642da528bfa382ec2ae4e3cb8991ea7
 > author Gerd Hoffmann <kraxel@suse.de> Mon, 26 Jun 2006 13:56:16 +0200
 > committer Linus Torvalds <torvalds@g5.osdl.org> Tue, 27 Jun 2006 00:48:14 -0700
 > 
 > [PATCH] x86_64: x86_64 version of the smp alternative patch.
 > 
 > Changes are largely identical to the i386 version:
 > 
 >  * alternative #define are moved to the new alternative.h file.
 >  * one new elf section with pointers to the lock prefixes which can be
 >    nop'ed out for non-smp.
 >  * two new elf sections simliar to the "classic" alternatives to
 >    replace SMP code with simpler UP code.
 >  * fixup headers to use alternative.h instead of defining their own
 >    LOCK / LOCK_PREFIX macros.
 > 
 > The patch reuses the i386 version of the alternatives code to avoid code
 > duplication.  The code in alternatives.c was shuffled around a bit to
 > reduce the number of #ifdefs needed.  It also got some tweaks needed for
 > x86_64 (vsyscall page handling) and new features (noreplacement option
 > which was x86_64 only up to now).  Debug printk's are changed from
 > compile-time to runtime.

This has one behaviour slightly different to the i386 version however.
If you boot an SMP machine it does this..

SMP: Allowing 4 CPUs, 2 hotplug CPUs
Initializing CPU#0
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU0: Thermal monitoring enabled (TM1)
SMP alternatives: switching to UP code
..
SMP alternatives: switching to SMP code
Booting processor 1/2 APIC 0x1
Initializing CPU#1

Seems wasteful (and noisy) to be doing this twice during boot.

		Dave

-- 
http://www.codemonkey.org.uk

       reply	other threads:[~2006-06-27 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200606261900.k5QJ0k9J028243@hera.kernel.org>
2006-06-27 17:57 ` Dave Jones [this message]
2006-06-28  7:54   ` [PATCH] x86_64: x86_64 version of the smp alternative patch Gerd Hoffmann

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=20060627175741.GF1280@redhat.com \
    --to=davej@redhat.com \
    --cc=ak@suse.de \
    --cc=kraxel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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