x86: clean up AMD Fam10 xenoprof IBS code
PATCH 1/1 x86: clean up AMD Fam10 xenoprof IBS code
Arrange for (almost) no code to be generated for x86-32, where the functionality is disabled anyway. Properly __init-annotate the code. Remove some pointless bits.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/oprofile/nmi_int.c +1 -1
@@ -431,7 +431,7 @@ static int __init nmi_init(void)case 0x10 : model = &op_athlon_spec; cpu_type ="x86-64/family10" ; - ibs_caps =ibs_init (); +ibs_init ();break ;case 0x11 : model = &op_athlon_spec;
xen/arch/x86/oprofile/op_model_athlon.c +23 -28
134 lines not on this page · raw message
xen/include/asm-x86/xenoprof.h +6 -1
@@ -48,8 +48,13 @@ struct vcpu;struct cpu_user_regs ;/* AMD IBS support */ -u32 ibs_init (void ); +#ifdef CONFIG_X86_64 +void ibs_init (void );extern u32 ibs_caps; +#else +static inline void ibs_init (void ) {} +#define ibs_caps 0 +#endif int xenoprofile_get_mode (struct vcpu *v,struct cpu_user_regs *const regs);
Arrange for (almost) no code to be generated for x86-32, where the functionality is disabled anyway. Properly __init-annotate the code. Remove some pointless bits.
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/oprofile/nmi_int.c +1 -1
@@ -431,7 +431,7 @@ static int __init nmi_init(void)case 0x10 : model = &op_athlon_spec; cpu_type ="x86-64/family10" ; - ibs_caps =ibs_init (); +ibs_init ();break ;case 0x11 : model = &op_athlon_spec;
xen/arch/x86/oprofile/op_model_athlon.c +23 -28
134 lines not on this page · raw message
xen/include/asm-x86/xenoprof.h +6 -1
@@ -48,8 +48,13 @@ struct vcpu;struct cpu_user_regs ;/* AMD IBS support */ -u32 ibs_init (void ); +#ifdef CONFIG_X86_64 +void ibs_init (void );extern u32 ibs_caps; +#else +static inline void ibs_init (void ) {} +#define ibs_caps 0 +#endif int xenoprofile_get_mode (struct vcpu *v,struct cpu_user_regs *const regs);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel