linux-mips
[Top] [All Lists]

Re: [PATCH 29/40] mips: Replace __get_cpu_var uses

To: Christoph Lameter <cl@linux.com>, Ralf Baechle <ralf@linux-mips.org>, linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH 29/40] mips: Replace __get_cpu_var uses
From: David Daney <ddaney.cavm@gmail.com>
Date: Thu, 19 Dec 2013 15:08:06 -0800
Cc: Tejun Heo <tj@kernel.org>, akpm@linuxfoundation.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=FjFuCrSroMnyLR+Rkzk9L/pg5HnmU99Ve6DE3BRYhzo=; b=xSmDbMY9804sLTUwzT3D64Qlkx9PhbNIoaWWjO2AXtNbsIF5Dz8IMfpuuIr1mpb7ZN 8JldL2Zb5yDaNn5FOwcxqEkDhL9fkySirg0dD1qk9AC+63Qh/xK2owUPisMjhivP4Yoq GkZAj1jFQhNIyk1r1nb89xznLaN2mLMu3lbwnjHQEIAt2xDOQ31M9NuwP1f+Jdgy3CR7 EJdvqSxmya9LiqoRAl6YylzCBpBm02vmUB/SPx9Ps8kmrr6ofM1a5+HFf/LW712Cmz1Q CoKX8Qij9tAPdJQRFGEdYnNemGM288H0JMNNfi05dAdBMqFfzS6Y6oyHYzJHIxSLE6AK F+1A==
In-reply-to: <alpine.DEB.2.10.1312191506370.17603@nuc>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20131219155015.443763038@linux.com> <20131219155033.834416420@linux.com> <52B330F3.4090603@gmail.com> <alpine.DEB.2.10.1312191506370.17603@nuc>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
This is a multi-part message in MIME format.
On 12/19/2013 01:10 PM, Christoph Lameter wrote:
On Thu, 19 Dec 2013, David Daney wrote:

16:07:58.244398747 -0600
@@ -43,7 +43,7 @@ DECLARE_PER_CPU(struct mips_fpu_emulator
   #define MIPS_FPU_EMU_INC_STATS(M)                                    \
   do {
\
        preempt_disable();                                              \
-       __local_inc(&__get_cpu_var(fpuemustats).M);                 \
+       __this_cpu_inc(fpuemustats.M);                                  \
        preempt_enable();                                               \
   } while (0)


Something seems to be incorrect in this bit.

Hrmm.. yes this is a local_t so the this_cpu_inc would not work unless
fpuemustats is defined differently.


See the attached patch.  Feel free to include it as part of your patch set.

I tested it on a 64-bit OCTEON system. I think it will work on 32-bit systems as well.

Use

__local_inc(this_cpu_ptr(fpuemustats.M);


No, I couldn't get various incantations of that to work either.

instead until then.


Attachment: 0001-MIPS-Replace-__get_cpu_var-uses-in-FPU-emulator.patch
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>