]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
x86/oprofile: Remove const qualifier from struct op_x86_model_spec
authorRobert Richter <robert.richter@amd.com>
Thu, 9 Jul 2009 13:12:35 +0000 (15:12 +0200)
committerRobert Richter <robert.richter@amd.com>
Mon, 20 Jul 2009 14:43:20 +0000 (16:43 +0200)
This patch removes the const qualifier from struct
op_x86_model_spec to make model parameters changable.

Signed-off-by: Robert Richter <robert.richter@amd.com>
arch/x86/oprofile/nmi_int.c
arch/x86/oprofile/op_model_amd.c
arch/x86/oprofile/op_model_p4.c
arch/x86/oprofile/op_model_ppro.c
arch/x86/oprofile/op_x86_model.h

index 998c7dca31e7639169b1a79a38ffe665524b161b..826f391b4229695a2b36f6d0483dceba7028bc40 100644 (file)
@@ -27,7 +27,7 @@
 #include "op_counter.h"
 #include "op_x86_model.h"
 
-static struct op_x86_model_spec const *model;
+static struct op_x86_model_spec *model;
 static DEFINE_PER_CPU(struct op_msrs, cpu_msrs);
 static DEFINE_PER_CPU(unsigned long, saved_lvtpc);
 
@@ -542,7 +542,7 @@ module_param_call(cpu_type, force_cpu_type, NULL, NULL, 0);
 static int __init ppro_init(char **cpu_type)
 {
        __u8 cpu_model = boot_cpu_data.x86_model;
-       struct op_x86_model_spec const *spec = &op_ppro_spec;   /* default */
+       struct op_x86_model_spec *spec = &op_ppro_spec; /* default */
 
        if (force_arch_perfmon && cpu_has_arch_perfmon)
                return 0;
index 644980f03924d929795c88552d790e93d89e18e3..39604b429d695802fd01d2cae897a3510ec407c4 100644 (file)
@@ -526,7 +526,7 @@ static void op_amd_exit(void) {}
 
 #endif /* CONFIG_OPROFILE_IBS */
 
-struct op_x86_model_spec const op_amd_spec = {
+struct op_x86_model_spec op_amd_spec = {
        .num_counters           = NUM_COUNTERS,
        .num_controls           = NUM_CONTROLS,
        .num_virt_counters      = NUM_VIRT_COUNTERS,
index 65b9237cde8beb4f95ddc2e531b3c7e315a4c93d..40df028d0d91209cd2c1af8b1db20427d7ff996c 100644 (file)
@@ -695,7 +695,7 @@ static void p4_shutdown(struct op_msrs const * const msrs)
 
 
 #ifdef CONFIG_SMP
-struct op_x86_model_spec const op_p4_ht2_spec = {
+struct op_x86_model_spec op_p4_ht2_spec = {
        .num_counters           = NUM_COUNTERS_HT2,
        .num_controls           = NUM_CONTROLS_HT2,
        .num_virt_counters      = NUM_COUNTERS_HT2,
@@ -709,7 +709,7 @@ struct op_x86_model_spec const op_p4_ht2_spec = {
 };
 #endif
 
-struct op_x86_model_spec const op_p4_spec = {
+struct op_x86_model_spec op_p4_spec = {
        .num_counters           = NUM_COUNTERS_NON_HT,
        .num_controls           = NUM_CONTROLS_NON_HT,
        .num_virt_counters      = NUM_COUNTERS_NON_HT,
index 098cbca5c0b0ff60db3e4f279b7b0506c13ffc99..659f3b6f86fbd038eb2c0d6e794d9a43a0999738 100644 (file)
@@ -203,7 +203,7 @@ static void ppro_shutdown(struct op_msrs const * const msrs)
 }
 
 
-struct op_x86_model_spec const op_ppro_spec = {
+struct op_x86_model_spec op_ppro_spec = {
        .num_counters           = 2,
        .num_controls           = 2,
        .num_virt_counters      = 2,
index e874dc3565aef12b13ab8e279e8f755c63c8babd..0c886fa0369cb20f7934bc75726f4650a1f4ab9e 100644 (file)
@@ -62,10 +62,10 @@ extern u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
                           struct op_counter_config *counter_config);
 extern int op_x86_phys_to_virt(int phys);
 
-extern struct op_x86_model_spec const op_ppro_spec;
-extern struct op_x86_model_spec const op_p4_spec;
-extern struct op_x86_model_spec const op_p4_ht2_spec;
-extern struct op_x86_model_spec const op_amd_spec;
+extern struct op_x86_model_spec op_ppro_spec;
+extern struct op_x86_model_spec op_p4_spec;
+extern struct op_x86_model_spec op_p4_ht2_spec;
+extern struct op_x86_model_spec op_amd_spec;
 extern struct op_x86_model_spec op_arch_perfmon_spec;
 
 #endif /* OP_X86_MODEL_H */