[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130828062737.GA10394@osiris>
Date: Wed, 28 Aug 2013 08:27:37 +0200
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: Christoph Lameter <cl@...ux.com>
Cc: Tejun Heo <tj@...nel.org>, akpm@...uxfoundation.org,
Martin Schwidefsky <schwidefsky@...ibm.com>,
linux390@...ibm.com, linux-arch@...r.kernel.org,
Steven Rostedt <srostedt@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [guv v2 18/31] s390: Replace __get_cpu_var uses
On Mon, Aug 26, 2013 at 08:44:40PM +0000, Christoph Lameter 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.
> 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));
That's wrong (destination and source should be exchanged).
However your patch looks good.
Acked-by: Heiko Carstens <heiko.carstens@...ibm.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists