]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mips: replace __get_cpu_var uses in FPU emulator.
authorDavid Daney <david.daney@cavium.com>
Thu, 6 Mar 2014 00:05:28 +0000 (11:05 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Mar 2014 07:13:49 +0000 (18:13 +1100)
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 <david.daney@cavium.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/mips/include/asm/fpu_emulator.h
arch/mips/math-emu/cp1emu.c

index 2abb587d5ab40fd41aa950d1987d5f854f60e531..619fa5fc06992ec3e21bb913b746002fe2feb242 100644 (file)
 #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 @@ DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);
 #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 71a697c9d385b855fda6629a2bb786be5d1e4b1a..fc566acc950f2f14a1c0f27633db26c5a06899ae 100644 (file)
@@ -2166,13 +2166,13 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
 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;