diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-10-28 10:54:50 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-10-28 10:54:50 +0000 |
commit | a8b1845a784516e51266e9f33fc3fe5b1e2790d5 (patch) | |
tree | e057fa606799edf4f4fd4af58b5b351ead338549 /xen/arch/x86/oprofile | |
parent | 0a7e9c30b5554194b7b3c80ab751f13df0f7607f (diff) | |
download | xen-a8b1845a784516e51266e9f33fc3fe5b1e2790d5.tar.gz xen-a8b1845a784516e51266e9f33fc3fe5b1e2790d5.tar.bz2 xen-a8b1845a784516e51266e9f33fc3fe5b1e2790d5.zip |
Miscellaneous data placement adjustments
Make various data items const or __read_mostly where
possible/reasonable.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/oprofile')
-rw-r--r-- | xen/arch/x86/oprofile/nmi_int.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/oprofile/op_model_p4.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/oprofile/op_model_ppro.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c index e827e90e1e..98f66f66c5 100644 --- a/xen/arch/x86/oprofile/nmi_int.c +++ b/xen/arch/x86/oprofile/nmi_int.c @@ -29,7 +29,7 @@ struct op_counter_config counter_config[OP_MAX_COUNTER]; -static struct op_x86_model_spec const * model; +static struct op_x86_model_spec const *__read_mostly model; static struct op_msrs cpu_msrs[NR_CPUS]; static unsigned long saved_lvtpc[NR_CPUS]; diff --git a/xen/arch/x86/oprofile/op_model_p4.c b/xen/arch/x86/oprofile/op_model_p4.c index 54404fc860..b554a76f77 100644 --- a/xen/arch/x86/oprofile/op_model_p4.c +++ b/xen/arch/x86/oprofile/op_model_p4.c @@ -109,7 +109,7 @@ static int p4_unused_cccr[NUM_UNUSED_CCCRS] = { /* p4 event codes in libop/op_event.h are indices into this table. */ -static struct p4_event_binding p4_events[NUM_EVENTS] = { +static const struct p4_event_binding p4_events[NUM_EVENTS] = { { /* BRANCH_RETIRED */ 0x05, 0x06, @@ -485,7 +485,7 @@ static void pmc_setup_one_p4_counter(unsigned int ctr) unsigned int escr = 0; unsigned int high = 0; unsigned int counter_bit; - struct p4_event_binding *ev = NULL; + const struct p4_event_binding *ev = NULL; unsigned int stag; stag = get_stagger(); diff --git a/xen/arch/x86/oprofile/op_model_ppro.c b/xen/arch/x86/oprofile/op_model_ppro.c index 1e50345e9f..112824c14c 100644 --- a/xen/arch/x86/oprofile/op_model_ppro.c +++ b/xen/arch/x86/oprofile/op_model_ppro.c @@ -309,7 +309,7 @@ void arch_perfmon_setup_counters(void) op_ppro_spec.num_controls = num_counters; } -struct op_x86_model_spec op_ppro_spec = { +struct op_x86_model_spec __read_mostly op_ppro_spec = { .num_counters = 2, .num_controls = 2, .fill_in_addresses = &ppro_fill_in_addresses, @@ -324,7 +324,7 @@ struct op_x86_model_spec op_ppro_spec = { .save_msr = &ppro_save_msr }; -struct op_x86_model_spec op_arch_perfmon_spec = { +struct op_x86_model_spec __read_mostly op_arch_perfmon_spec = { /* num_counters/num_controls filled in at runtime */ .fill_in_addresses = &ppro_fill_in_addresses, .setup_ctrs = &ppro_setup_ctrs, |