linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Olof Johansson <olof@lixom.net>,
	Paul Mackerras <paulus@samba.org>,
	anton@samba.org,
	Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	linux-ia64@vger.kernel.org,
	Linux Kernel Development <linux-kernel@vger.kernel.org>,
	Mike Travis <travis@sgi.com>,
	Linux/PPC Development <linuxppc-dev@ozlabs.org>,
	Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
	sparclinux@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [powerpc changes] Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
Date: Wed, 30 Jan 2008 22:25:58 +0100	[thread overview]
Message-ID: <20080130212558.GA12409@elte.hu> (raw)
In-Reply-To: <20080130191302.GA20008@lixom.net>


* Olof Johansson <olof@lixom.net> wrote:

> > could you try the full patchset that Travis has just sent and which 
> > i've put into x86.git, you can pull it from:
> 
> Looks ok for powerpc so far, I haven't gotten through all defconfigs 
> yet but the first ones that failed before build now. pasemi_defconfig 
> boots as well.

could the PowerPC maintainers please Ack the following patch (attached 
below):

  Subject: POWERPC: use generic per cpu
  From: travis@sgi.com

so that we can push this fix upstream ASAP?

	Ingo

--------------->
Subject: POWERPC: use generic per cpu
From: travis@sgi.com

Powerpc has a way to determine the address of the per cpu area of the
currently executing processor via the paca and the array of per cpu
offsets is avoided by looking up the per cpu area from the remote
paca's (copying x86_64).

Cc: Paul Mackerras <paulus@samba.org>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/asm-powerpc/percpu.h |   22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

Index: linux-x86.q/include/asm-powerpc/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-powerpc/percpu.h
+++ linux-x86.q/include/asm-powerpc/percpu.h
@@ -13,28 +13,12 @@
 #include <asm/paca.h>
 
 #define __per_cpu_offset(cpu) (paca[cpu].data_offset)
-#define __my_cpu_offset() get_paca()->data_offset
+#define __my_cpu_offset get_paca()->data_offset
 #define per_cpu_offset(x) (__per_cpu_offset(x))
 
-/* var is in discarded region: offset to particular copy we want */
-#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
-#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))
-#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, local_paca->data_offset))
+#endif /* CONFIG_SMP */
+#endif /* __powerpc64__ */
 
-extern void setup_per_cpu_areas(void);
-
-#else /* ! SMP */
-
-#define per_cpu(var, cpu)			(*((void)(cpu), &per_cpu__##var))
-#define __get_cpu_var(var)			per_cpu__##var
-#define __raw_get_cpu_var(var)			per_cpu__##var
-
-#endif	/* SMP */
-
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
-
-#else
 #include <asm-generic/percpu.h>
-#endif
 
 #endif /* _ASM_POWERPC_PERCPU_H_ */

  parent reply	other threads:[~2008-01-30 21:26 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200801301414.m0UEEgCC006371@hera.kernel.org>
2008-01-30 15:27 ` x86/non-x86: percpu, node ids, apic ids x86.git fixup Geert Uytterhoeven
2008-01-30 16:02   ` Mike Travis
2008-01-30 16:10     ` Ingo Molnar
2008-01-30 17:13       ` Luck, Tony
2008-01-30 18:06         ` Ingo Molnar
2008-01-30 18:20           ` Mike Travis
2008-01-30 18:31           ` Luck, Tony
2008-01-30 18:41             ` Mike Travis
2008-01-30 18:49             ` Ingo Molnar
2008-01-30 19:05               ` Ingo Molnar
2008-01-30 19:10               ` Luck, Tony
2008-01-30 19:13               ` Olof Johansson
2008-01-30 19:18                 ` Ingo Molnar
2008-01-30 21:25                 ` Ingo Molnar [this message]
2008-01-30 21:39                   ` [powerpc changes] " Olof Johansson
2008-01-30 21:56                   ` Geoff Levand
2008-01-30 21:18               ` Geoff Levand
2008-01-30 19:17             ` Mike Travis
2008-01-30 19:30               ` Ingo Molnar
2008-01-30 19:33               ` Luck, Tony
2008-01-30 19:46                 ` Ingo Molnar
2008-01-30 19:49                   ` Ingo Molnar
2008-01-30 20:00                   ` Luck, Tony
2008-01-30 20:02                     ` Ingo Molnar
2008-01-30 20:17                       ` Luck, Tony
2008-01-30 20:59                         ` Ingo Molnar
2008-01-30 21:15                           ` Luck, Tony
2008-01-30 21:20                             ` Ingo Molnar
2008-01-31  0:57                           ` Luck, Tony
2008-01-31  9:06                             ` Ingo Molnar
2008-01-31 18:34                               ` Luck, Tony
2008-01-31 23:28                                 ` Luck, Tony
2008-02-05 19:05                                 ` Luck, Tony
2008-01-31 10:47                 ` Adrian Bunk
2008-01-30 18:35           ` Olof Johansson

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=20080130212558.GA12409@elte.hu \
    --to=mingo@elte.hu \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=anton@samba.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    --cc=paulus@samba.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=travis@sgi.com \
    /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).