[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130828195415.GP6617@n2100.arm.linux.org.uk>
Date: Wed, 28 Aug 2013 20:54:15 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Christoph Lameter <cl@...ux.com>
Cc: Tejun Heo <tj@...nel.org>, akpm@...uxfoundation.org,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>, linux-arch@...r.kernel.org,
Steven Rostedt <srostedt@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [gcv v3 27/35] arm: Replace __get_cpu_var uses
On Wed, Aug 28, 2013 at 07:48:23PM +0000, Christoph Lameter wrote:
> 3. Retrieve the content of the current processors instance of a per cpu variable.
>
> DEFINE_PER_CPU(int, u);
Shouldn't this be 'y' ?
> int x = __get_cpu_var(y)
>
> Converts to
>
> int x = __this_cpu_read(y);
>
>
> 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(&x), y, sizeof(x));
Are you sure this one's correct? Isn't 'y' the per-cpu variable?
Even though I don't see any in this patch, it's probably a good thing to
get the patch description correct.
I think you need Will Deacon's ack for this, but I think he's away for
a while.
--
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