From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753478AbaBNU0M (ORCPT ); Fri, 14 Feb 2014 15:26:12 -0500 Received: from qmta04.emeryville.ca.mail.comcast.net ([76.96.30.40]:52766 "EHLO qmta04.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753286AbaBNUUU (ORCPT ); Fri, 14 Feb 2014 15:20:20 -0500 Message-Id: <20140214201907.446472726@linux.com> Date: Fri, 14 Feb 2014 14:19:14 -0600 From: Christoph Lameter To: Tejun Heo Cc: akpm@linuxfoundation.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Thomas Gleixner , David Daney Subject: [PATCH 33/48] MIPS: Replace __get_cpu_var uses in FPU emulator. References: <20140214201841.826179349@linux.com> Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=0001-MIPS-Replace-__get_cpu_var-uses-in-FPU-emulator.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Daney The use of __this_cpu_inc() requires a fundamental integer type, so change the type of all the counters to unsigned long, which is the same width they were before, but not wrapped in local_t. Signed-off-by: David Daney Signed-off-by: Christoph Lameter --- arch/mips/include/asm/fpu_emulator.h | 14 +++++++------- arch/mips/math-emu/cp1emu.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) Index: linux/arch/mips/include/asm/fpu_emulator.h =================================================================== --- linux.orig/arch/mips/include/asm/fpu_emulator.h 2014-02-03 13:25:55.311884622 -0600 +++ linux/arch/mips/include/asm/fpu_emulator.h 2014-02-03 13:25:55.311884622 -0600 @@ -30,12 +30,12 @@ #ifdef CONFIG_DEBUG_FS struct mips_fpu_emulator_stats { - local_t emulated; - local_t loads; - local_t stores; - local_t cp1ops; - local_t cp1xops; - local_t errors; + unsigned long emulated; + unsigned long loads; + unsigned long stores; + unsigned long cp1ops; + unsigned long cp1xops; + unsigned long errors; }; DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats); @@ -43,7 +43,7 @@ #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) Index: linux/arch/mips/math-emu/cp1emu.c =================================================================== --- linux.orig/arch/mips/math-emu/cp1emu.c 2014-02-03 13:25:55.311884622 -0600 +++ linux/arch/mips/math-emu/cp1emu.c 2014-02-03 13:25:55.311884622 -0600 @@ -2140,13 +2140,13 @@ static int fpuemu_stat_get(void *data, u64 *val) { int cpu; - unsigned long sum = 0; + u64 sum = 0; for_each_online_cpu(cpu) { struct mips_fpu_emulator_stats *ps; - local_t *pv; + unsigned long *pv; ps = &per_cpu(fpuemustats, cpu); pv = (void *)ps + (unsigned long)data; - sum += local_read(pv); + sum += *pv; } *val = sum; return 0;