linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>, Jeremy Fitzhardinge <jeremy@goop.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch 3/3] x86_64: Make the x86_32 percpu operations usable on x86_64
Date: Fri, 30 Nov 2007 12:07:50 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0711301205190.2340@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20071130064400.054191278@sgi.com>

The following fix is needed for UP (did not have time to do proper 
testing, some people will get mad at me if I do not get into a vacation 
mode now, be back on the 13th of December):

Fix UP setup

The __per_cpu_start offset is still needed in a UP configuration. There we 
do not relocate the percpu area. So we must subtract __per_cpu_start in
setup64.c. It will be zero if the percpu area is relocated.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
 arch/x86/kernel/setup64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.24-rc3-mm2/arch/x86/kernel/setup64.c
===================================================================
--- linux-2.6.24-rc3-mm2.orig/arch/x86/kernel/setup64.c	2007-11-30 11:41:23.989455039 -0800
+++ linux-2.6.24-rc3-mm2/arch/x86/kernel/setup64.c	2007-11-30 11:41:47.497905579 -0800
@@ -115,7 +115,7 @@ void __init setup_per_cpu_areas(void)
 		/* Relocate the pda */
 		memcpy(ptr, cpu_pda(i), sizeof(struct x8664_pda));
 		cpu_pda(i) = (struct x8664_pda *)ptr;
-		cpu_pda(i)->data_offset = (unsigned long)ptr;
+		cpu_pda(i)->data_offset = ptr - __per_cpu_start;
 	}
 	/* Fix up pda for this processor .... */
 	pda_init(0);

  reply	other threads:[~2007-11-30 20:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-30  6:43 [patch 0/3] Per cpu relocation to ZERO and x86_32 percpu ops on x86_64 Christoph Lameter
2007-11-30  6:43 ` [patch 1/3] Percpu infrastructure to rebase the per cpu area to 0UL Christoph Lameter
2007-12-02  3:04   ` Rusty Russell
2007-12-02  3:13   ` Rusty Russell
2007-11-30  6:43 ` [patch 2/3] X86_64: Declare pda as per cpu data thereby moving it into the cpu area Christoph Lameter
2007-11-30  6:43 ` [patch 3/3] x86_64: Make the x86_32 percpu operations usable on x86_64 Christoph Lameter
2007-11-30 20:07   ` Christoph Lameter [this message]
2007-11-30 11:24 ` [patch 0/3] Per cpu relocation to ZERO and x86_32 percpu ops " Ingo Molnar
2007-11-30 11:26   ` Ingo Molnar
2007-11-30 17:08     ` Christoph Lameter
2007-11-30 17:19     ` Christoph Lameter
2007-11-30 18:00       ` Ingo Molnar
2007-11-30 18:24         ` Christoph Lameter
2007-11-30 18:35           ` Ingo Molnar
2007-11-30 18:47             ` Christoph Lameter
2007-11-30 19:45               ` Ingo Molnar
2007-11-30 19:59                 ` Christoph Lameter
2007-11-30 20:06                   ` Ingo Molnar
2007-11-30 20:09                     ` Christoph Lameter
2007-11-30 20:26                   ` Ingo Molnar
2007-11-30 20:43                     ` Ingo Molnar
2007-11-30 18:41           ` Ingo Molnar
2007-11-30 18:43             ` Christoph Lameter

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=Pine.LNX.4.64.0711301205190.2340@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=ak@suse.de \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).