[MIPS] Fix modpost warning: Rename op_model_xxx to op_model_xxx_ops. The modpost uses a whitelist for commonly used suffix on checking the section mismatch. Adding "_ops" suffix to op_modex_xxx get rid of this modpost warning. WARNING: arch/mips/oprofile/oprofile.o - Section mismatch: reference to .init.text: from .data after 'op_model_mipsxx' (at offset 0x528)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by Atsushi Nemoto and committed by Ralf Baechle 1acf1ca7 5ee82350

+21 -21
+4 -4
arch/mips/oprofile/common.c
··· 14 15 #include "op_impl.h" 16 17 - extern struct op_mips_model op_model_mipsxx __attribute__((weak)); 18 - extern struct op_mips_model op_model_rm9000 __attribute__((weak)); 19 20 static struct op_mips_model *model; 21 ··· 83 case CPU_74K: 84 case CPU_SB1: 85 case CPU_SB1A: 86 - lmodel = &op_model_mipsxx; 87 break; 88 89 case CPU_RM9000: 90 - lmodel = &op_model_rm9000; 91 break; 92 }; 93
··· 14 15 #include "op_impl.h" 16 17 + extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak)); 18 + extern struct op_mips_model op_model_rm9000_ops __attribute__((weak)); 19 20 static struct op_mips_model *model; 21 ··· 83 case CPU_74K: 84 case CPU_SB1: 85 case CPU_SB1A: 86 + lmodel = &op_model_mipsxx_ops; 87 break; 88 89 case CPU_RM9000: 90 + lmodel = &op_model_rm9000_ops; 91 break; 92 }; 93
+16 -16
arch/mips/oprofile/op_model_mipsxx.c
··· 23 24 #define M_COUNTER_OVERFLOW (1UL << 31) 25 26 - struct op_mips_model op_model_mipsxx; 27 28 static struct mipsxx_register_config { 29 unsigned int control[4]; ··· 34 35 static void mipsxx_reg_setup(struct op_counter_config *ctr) 36 { 37 - unsigned int counters = op_model_mipsxx.num_counters; 38 int i; 39 40 /* Compute the performance counter control word. */ ··· 62 63 static void mipsxx_cpu_setup (void *args) 64 { 65 - unsigned int counters = op_model_mipsxx.num_counters; 66 67 switch (counters) { 68 case 4: ··· 83 /* Start all counters on current CPU */ 84 static void mipsxx_cpu_start(void *args) 85 { 86 - unsigned int counters = op_model_mipsxx.num_counters; 87 88 switch (counters) { 89 case 4: ··· 100 /* Stop all counters on current CPU */ 101 static void mipsxx_cpu_stop(void *args) 102 { 103 - unsigned int counters = op_model_mipsxx.num_counters; 104 105 switch (counters) { 106 case 4: ··· 116 117 static int mipsxx_perfcount_handler(struct pt_regs *regs) 118 { 119 - unsigned int counters = op_model_mipsxx.num_counters; 120 unsigned int control; 121 unsigned int counter; 122 int handled = 0; ··· 187 188 reset_counters(counters); 189 190 - op_model_mipsxx.num_counters = counters; 191 switch (current_cpu_data.cputype) { 192 case CPU_20KC: 193 - op_model_mipsxx.cpu_type = "mips/20K"; 194 break; 195 196 case CPU_24K: 197 - op_model_mipsxx.cpu_type = "mips/24K"; 198 break; 199 200 case CPU_25KF: 201 - op_model_mipsxx.cpu_type = "mips/25K"; 202 break; 203 204 #ifndef CONFIG_SMP 205 case CPU_34K: 206 - op_model_mipsxx.cpu_type = "mips/34K"; 207 break; 208 209 case CPU_74K: 210 - op_model_mipsxx.cpu_type = "mips/74K"; 211 break; 212 #endif 213 214 case CPU_5KC: 215 - op_model_mipsxx.cpu_type = "mips/5K"; 216 break; 217 218 case CPU_SB1: 219 case CPU_SB1A: 220 - op_model_mipsxx.cpu_type = "mips/sb1"; 221 break; 222 223 default: ··· 233 234 static void mipsxx_exit(void) 235 { 236 - reset_counters(op_model_mipsxx.num_counters); 237 238 perf_irq = null_perf_irq; 239 } 240 241 - struct op_mips_model op_model_mipsxx = { 242 .reg_setup = mipsxx_reg_setup, 243 .cpu_setup = mipsxx_cpu_setup, 244 .init = mipsxx_init,
··· 23 24 #define M_COUNTER_OVERFLOW (1UL << 31) 25 26 + struct op_mips_model op_model_mipsxx_ops; 27 28 static struct mipsxx_register_config { 29 unsigned int control[4]; ··· 34 35 static void mipsxx_reg_setup(struct op_counter_config *ctr) 36 { 37 + unsigned int counters = op_model_mipsxx_ops.num_counters; 38 int i; 39 40 /* Compute the performance counter control word. */ ··· 62 63 static void mipsxx_cpu_setup (void *args) 64 { 65 + unsigned int counters = op_model_mipsxx_ops.num_counters; 66 67 switch (counters) { 68 case 4: ··· 83 /* Start all counters on current CPU */ 84 static void mipsxx_cpu_start(void *args) 85 { 86 + unsigned int counters = op_model_mipsxx_ops.num_counters; 87 88 switch (counters) { 89 case 4: ··· 100 /* Stop all counters on current CPU */ 101 static void mipsxx_cpu_stop(void *args) 102 { 103 + unsigned int counters = op_model_mipsxx_ops.num_counters; 104 105 switch (counters) { 106 case 4: ··· 116 117 static int mipsxx_perfcount_handler(struct pt_regs *regs) 118 { 119 + unsigned int counters = op_model_mipsxx_ops.num_counters; 120 unsigned int control; 121 unsigned int counter; 122 int handled = 0; ··· 187 188 reset_counters(counters); 189 190 + op_model_mipsxx_ops.num_counters = counters; 191 switch (current_cpu_data.cputype) { 192 case CPU_20KC: 193 + op_model_mipsxx_ops.cpu_type = "mips/20K"; 194 break; 195 196 case CPU_24K: 197 + op_model_mipsxx_ops.cpu_type = "mips/24K"; 198 break; 199 200 case CPU_25KF: 201 + op_model_mipsxx_ops.cpu_type = "mips/25K"; 202 break; 203 204 #ifndef CONFIG_SMP 205 case CPU_34K: 206 + op_model_mipsxx_ops.cpu_type = "mips/34K"; 207 break; 208 209 case CPU_74K: 210 + op_model_mipsxx_ops.cpu_type = "mips/74K"; 211 break; 212 #endif 213 214 case CPU_5KC: 215 + op_model_mipsxx_ops.cpu_type = "mips/5K"; 216 break; 217 218 case CPU_SB1: 219 case CPU_SB1A: 220 + op_model_mipsxx_ops.cpu_type = "mips/sb1"; 221 break; 222 223 default: ··· 233 234 static void mipsxx_exit(void) 235 { 236 + reset_counters(op_model_mipsxx_ops.num_counters); 237 238 perf_irq = null_perf_irq; 239 } 240 241 + struct op_mips_model op_model_mipsxx_ops = { 242 .reg_setup = mipsxx_reg_setup, 243 .cpu_setup = mipsxx_cpu_setup, 244 .init = mipsxx_init,
+1 -1
arch/mips/oprofile/op_model_rm9000.c
··· 126 free_irq(rm9000_perfcount_irq, NULL); 127 } 128 129 - struct op_mips_model op_model_rm9000 = { 130 .reg_setup = rm9000_reg_setup, 131 .cpu_setup = rm9000_cpu_setup, 132 .init = rm9000_init,
··· 126 free_irq(rm9000_perfcount_irq, NULL); 127 } 128 129 + struct op_mips_model op_model_rm9000_ops = { 130 .reg_setup = rm9000_reg_setup, 131 .cpu_setup = rm9000_cpu_setup, 132 .init = rm9000_init,