From: Christoph Lameter <cl@linux.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Tejun Heo <tj@kernel.org>,
akpm@linuxfoundation.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Linux-Arch <linux-arch@vger.kernel.org>,
Steven Rostedt <srostedt@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [guv v2 20/31] powerpc: Replace __get_cpu_var uses
Date: Tue, 27 Aug 2013 15:37:16 +0000 [thread overview]
Message-ID: <00000140c06bf6b1-9f28d658-680c-4ce8-a27b-62312a7ced6f-000000@email.amazonses.com> (raw)
In-Reply-To: <CAMuHMdUXSRQrPMYb3wH7RjH9J_L_yeXku=OfvZ79vc29c9cX7g@mail.gmail.com>
On Tue, 27 Aug 2013, Geert Uytterhoeven wrote:
> On Mon, Aug 26, 2013 at 10:44 PM, Christoph Lameter <cl@linux.com> wrote:
> > __get_cpu_var() is used for multiple purposes in the kernel source. One of them is
> > address calculation via the form &__get_cpu_var(x). This calculates the address for
> > the instance of the percpu variable of the current processor based on an offset.
> >
> > Others usage cases are for storing and retrieving data from the current processors percpu area.
>
> use cases
>
> > __get_cpu_var() always only does a address determination. However, store and retrieve operations
>
> an address
>
> > This patch converts __get_cpu_var into either and explicit address calculation using this_cpu_ptr()
>
> an explicit
>
> > 4. Retrieve the content of a percpu struct
> >
> > DEFINE_PER_CPU(struct mystruct, y);
> > struct mystruct x = __get_cpu_var(y);
> >
> > Converts to
> >
> > memcpy(this_cpu_ptr(&y), x, sizeof(x));
>
> Let's hope the actual code copies in the other direction ;-)
Ok fixed that as well.
next prev parent reply other threads:[~2013-08-27 15:42 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130826204351.725357339@linux.com>
2013-08-26 20:44 ` [guv v2 02/31] percpu: Make __verify_pcu_ptr handle per cpu pointers to arrays Christoph Lameter
2013-08-26 20:44 ` [guv v2 03/31] Coccinelle script for __get_cpu_var conversion Christoph Lameter
2013-08-26 20:44 ` [guv v2 04/31] net: Replace __get_cpu_var uses Christoph Lameter
2013-08-26 20:44 ` [guv v2 05/31] time: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 06/31] scheduler: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 08/31] tracing: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-28 19:48 ` Steven Rostedt
2013-08-29 3:44 ` Masami Hiramatsu
2013-08-29 3:44 ` Masami Hiramatsu
2013-08-29 16:35 ` Christoph Lameter
2013-08-30 7:00 ` Ingo Molnar
2013-08-26 20:44 ` [guv v2 09/31] block: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 07/31] mm: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 10/31] rcu: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 11/31] percpu: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 14/31] drivers: " Christoph Lameter
2013-08-26 20:44 ` [guv v2 12/31] watchdog: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 13/31] kernel misc: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 15/31] zcache/zsmalloc: " Christoph Lameter
2013-08-26 20:44 ` [guv v2 17/31] mips: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 18/31] s390: " Christoph Lameter
2013-08-28 6:27 ` Heiko Carstens
2013-08-26 20:44 ` [guv v2 16/31] x86: " Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 01/31] x86: Use this_cpu_inc/dec for debug registers Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 19/31] ia64: Replace __get_cpu_var uses Christoph Lameter
2013-08-26 20:44 ` Christoph Lameter
2013-08-26 20:44 ` [guv v2 20/31] powerpc: " Christoph Lameter
2013-08-27 8:44 ` Geert Uytterhoeven
2013-08-27 8:44 ` Geert Uytterhoeven
2013-08-27 15:37 ` Christoph Lameter [this message]
2013-08-26 20:44 ` [guv v2 21/31] sparc: " Christoph Lameter
2013-08-26 20:44 ` [guv v2 22/31] arm: " Christoph Lameter
2013-08-27 9:41 ` Catalin Marinas
2013-08-26 20:56 ` [guv v2 25/31] avr32: " Christoph Lameter
2013-08-27 6:58 ` Hans-Christian Egtvedt
2013-08-27 6:58 ` Hans-Christian Egtvedt
2013-08-26 20:56 ` [guv v2 29/31] parisc: " Christoph Lameter
2013-08-26 20:56 ` [guv v2 23/31] tile: " Christoph Lameter
2013-08-26 20:56 ` Christoph Lameter
2013-08-26 22:22 ` Chris Metcalf
2013-08-27 14:48 ` Christoph Lameter
2013-08-28 17:19 ` Chris Metcalf
2013-08-28 17:54 ` Christoph Lameter
2013-08-28 18:13 ` Chris Metcalf
2013-08-28 18:22 ` Christoph Lameter
2013-08-30 16:01 ` Chris Metcalf
2013-08-26 21:16 ` [guv v2 31/31] Remove __get_cpu_var and __raw_get_cpu_var macros Christoph Lameter
2013-08-26 21:16 ` [guv v2 24/31] blackfin: Replace __get_cpu_var uses Christoph Lameter
2013-08-26 21:16 ` [guv v2 26/31] alpha: Replace __get_cpu_var Christoph Lameter
2013-08-26 21:16 ` Christoph Lameter
2013-08-26 21:56 ` [guv v2 30/31] metag: Replace __get_cpu_var uses Christoph Lameter
2013-08-26 21:56 ` Christoph Lameter
2013-08-27 9:53 ` James Hogan
2013-08-26 21:56 ` [guv v2 28/31] arc: Replace __get_cpu_var uses throughout the kernel Christoph Lameter
[not found] ` <521C2A9F.3070400@synopsys.com>
[not found] ` <00000140c05d28b7-f0a2bc86-fe85-40f7-b627-32664cd616a4-000000@email.amazonses.com>
2013-08-28 4:24 ` Vineet Gupta
2013-08-28 13:46 ` Christoph Lameter
2013-08-26 21:56 ` [guv v2 27/31] sh: " Christoph Lameter
2013-09-02 21:35 ` [guv v2 04/31] net: Replace __get_cpu_var uses David Howells
2013-09-03 3:33 ` David Miller
2013-09-03 3:33 ` David Miller
2013-09-03 14:21 ` Christoph Lameter
2013-09-03 14:20 ` Christoph Lameter
2013-09-03 20:39 ` David Howells
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=00000140c06bf6b1-9f28d658-680c-4ce8-a27b-62312a7ced6f-000000@email.amazonses.com \
--to=cl@linux.com \
--cc=akpm@linuxfoundation.org \
--cc=benh@kernel.crashing.org \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=srostedt@redhat.com \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).