diff for duplicates of <52B37C56.7090302@gmail.com> diff --git a/a/2.txt b/N1/2.txt index 8b13789..090029f 100644 --- a/a/2.txt +++ b/N1/2.txt @@ -1 +1,70 @@ +>From cc9590cf4d75cf7fd36a58be132d35fbbe536a64 Mon Sep 17 00:00:00 2001 +From: David Daney <david.daney@cavium.com> +Date: Thu, 19 Dec 2013 14:00:17 -0800 +Subject: [PATCH] MIPS: Replace __get_cpu_var uses in FPU emulator. +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> +--- + arch/mips/include/asm/fpu_emulator.h | 14 +++++++------- + arch/mips/math-emu/cp1emu.c | 6 +++--- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/arch/mips/include/asm/fpu_emulator.h b/arch/mips/include/asm/fpu_emulator.h +index 2abb587..619fa5f 100644 +--- a/arch/mips/include/asm/fpu_emulator.h ++++ b/arch/mips/include/asm/fpu_emulator.h +@@ -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 @@ 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) + +diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c +index efe0088..b853d05 100644 +--- a/arch/mips/math-emu/cp1emu.c ++++ b/arch/mips/math-emu/cp1emu.c +@@ -2110,13 +2110,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; +-- +1.7.11.7 diff --git a/a/content_digest b/N1/content_digest index ad23ffd..e287cc5 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -55,5 +55,75 @@ "\01:2\0" "fn\00001-MIPS-Replace-__get_cpu_var-uses-in-FPU-emulator.patch\0" "b\0" + ">From cc9590cf4d75cf7fd36a58be132d35fbbe536a64 Mon Sep 17 00:00:00 2001\n" + "From: David Daney <david.daney@cavium.com>\n" + "Date: Thu, 19 Dec 2013 14:00:17 -0800\n" + "Subject: [PATCH] MIPS: Replace __get_cpu_var uses in FPU emulator.\n" + "\n" + "The use of __this_cpu_inc() requires a fundamental integer type, so\n" + "change the type of all the counters to unsigned long, which is the\n" + "same width they were before, but not wrapped in local_t.\n" + "\n" + "Signed-off-by: David Daney <david.daney@cavium.com>\n" + "---\n" + " arch/mips/include/asm/fpu_emulator.h | 14 +++++++-------\n" + " arch/mips/math-emu/cp1emu.c | 6 +++---\n" + " 2 files changed, 10 insertions(+), 10 deletions(-)\n" + "\n" + "diff --git a/arch/mips/include/asm/fpu_emulator.h b/arch/mips/include/asm/fpu_emulator.h\n" + "index 2abb587..619fa5f 100644\n" + "--- a/arch/mips/include/asm/fpu_emulator.h\n" + "+++ b/arch/mips/include/asm/fpu_emulator.h\n" + "@@ -30,12 +30,12 @@\n" + " #ifdef CONFIG_DEBUG_FS\n" + " \n" + " struct mips_fpu_emulator_stats {\n" + "-\tlocal_t emulated;\n" + "-\tlocal_t loads;\n" + "-\tlocal_t stores;\n" + "-\tlocal_t cp1ops;\n" + "-\tlocal_t cp1xops;\n" + "-\tlocal_t errors;\n" + "+\tunsigned long emulated;\n" + "+\tunsigned long loads;\n" + "+\tunsigned long stores;\n" + "+\tunsigned long cp1ops;\n" + "+\tunsigned long cp1xops;\n" + "+\tunsigned long errors;\n" + " };\n" + " \n" + " DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);\n" + "@@ -43,7 +43,7 @@ DECLARE_PER_CPU(struct mips_fpu_emulator_stats, fpuemustats);\n" + " #define MIPS_FPU_EMU_INC_STATS(M)\t\t\t\t\t\\\n" + " do {\t\t\t\t\t\t\t\t\t\\\n" + " \tpreempt_disable();\t\t\t\t\t\t\\\n" + "-\t__local_inc(&__get_cpu_var(fpuemustats).M);\t\t\t\\\n" + "+\t__this_cpu_inc(fpuemustats.M);\t\t\t\t\t\\\n" + " \tpreempt_enable();\t\t\t\t\t\t\\\n" + " } while (0)\n" + " \n" + "diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c\n" + "index efe0088..b853d05 100644\n" + "--- a/arch/mips/math-emu/cp1emu.c\n" + "+++ b/arch/mips/math-emu/cp1emu.c\n" + "@@ -2110,13 +2110,13 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,\n" + " static int fpuemu_stat_get(void *data, u64 *val)\n" + " {\n" + " \tint cpu;\n" + "-\tunsigned long sum = 0;\n" + "+\tu64 sum = 0;\n" + " \tfor_each_online_cpu(cpu) {\n" + " \t\tstruct mips_fpu_emulator_stats *ps;\n" + "-\t\tlocal_t *pv;\n" + "+\t\tunsigned long *pv;\n" + " \t\tps = &per_cpu(fpuemustats, cpu);\n" + " \t\tpv = (void *)ps + (unsigned long)data;\n" + "-\t\tsum += local_read(pv);\n" + "+\t\tsum += *pv;\n" + " \t}\n" + " \t*val = sum;\n" + " \treturn 0;\n" + "-- \n" + 1.7.11.7 -9016990596fe6f9e80cf4d338763477107c247bb572597e873a5ab3b59b0401f +4c91ab1e849be22a5b64d33f8944059f568ce70353c374d65a3356d4d130f199
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.