diff mbox

[6/9] x86/mtrr: drop unused mtrr_ops struct

Message ID 1471390109-10407-7-git-send-email-cardoe@cardoe.com (mailing list archive)
State New, archived
Headers show

Commit Message

Douglas Goldstein Aug. 16, 2016, 11:28 p.m. UTC
There are no users of the mtrr_ops struct or any of the callers on it so
drop those.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 xen/arch/x86/cpu/mtrr/generic.c | 12 ------------
 xen/arch/x86/cpu/mtrr/mtrr.h    | 23 -----------------------
 2 files changed, 35 deletions(-)

Comments

Jan Beulich Aug. 17, 2016, 1:19 p.m. UTC | #1
>>> On 17.08.16 at 01:28, <cardoe@cardoe.com> wrote:
> There are no users of the mtrr_ops struct or any of the callers on it so
> drop those.
> 
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox

Patch

diff --git a/xen/arch/x86/cpu/mtrr/generic.c b/xen/arch/x86/cpu/mtrr/generic.c
index 45d4def..1d67035 100644
--- a/xen/arch/x86/cpu/mtrr/generic.c
+++ b/xen/arch/x86/cpu/mtrr/generic.c
@@ -560,15 +560,3 @@  int positive_have_wrcomb(void)
 {
 	return 1;
 }
-
-/* generic structure...
- */
-const struct mtrr_ops generic_mtrr_ops = {
-	.use_intel_if      = 1,
-	.set_all	   = mtrr_generic_set_all,
-	.get               = mtrr_generic_get,
-	.get_free_region   = mtrr_generic_get_free_region,
-	.set               = mtrr_generic_set,
-	.validate_add_page = mtrr_generic_validate_add_page,
-	.have_wrcomb       = mtrr_generic_have_wrcomb,
-};
diff --git a/xen/arch/x86/cpu/mtrr/mtrr.h b/xen/arch/x86/cpu/mtrr/mtrr.h
index 25f4867..9391fc5 100644
--- a/xen/arch/x86/cpu/mtrr/mtrr.h
+++ b/xen/arch/x86/cpu/mtrr/mtrr.h
@@ -11,24 +11,6 @@ 
 #define MTRR_CHANGE_MASK_VARIABLE  0x02
 #define MTRR_CHANGE_MASK_DEFTYPE   0x04
 
-
-struct mtrr_ops {
-	u32	vendor;
-	u32	use_intel_if;
-//	void	(*init)(void);
-	void	(*set)(unsigned int reg, unsigned long base,
-		       unsigned long size, mtrr_type type);
-	void	(*set_all)(void);
-
-	void	(*get)(unsigned int reg, unsigned long *base,
-		       unsigned long *size, mtrr_type * type);
-	int	(*get_free_region)(unsigned long base, unsigned long size,
-				   int replace_reg);
-	int	(*validate_add_page)(unsigned long base, unsigned long size,
-				     unsigned int type);
-	int	(*have_wrcomb)(void);
-};
-
 void mtrr_generic_get(unsigned int reg, unsigned long *base,
         unsigned long *size, mtrr_type *type);
 int mtrr_generic_get_free_region(unsigned long base, unsigned long size,
@@ -40,8 +22,6 @@  void mtrr_generic_set(unsigned int reg, unsigned long base,
         unsigned long size, mtrr_type type);
 int mtrr_generic_have_wrcomb(void);
 
-extern const struct mtrr_ops generic_mtrr_ops;
-
 extern int positive_have_wrcomb(void);
 
 /* library functions for processor-specific routines */
@@ -58,10 +38,7 @@  void set_mtrr_prepare_save(struct set_mtrr_context *ctxt);
 
 void get_mtrr_state(void);
 
-extern void set_mtrr_ops(const struct mtrr_ops *);
-
 extern u64 size_or_mask, size_and_mask;
-extern const struct mtrr_ops *mtrr_if;
 
 extern unsigned int num_var_ranges;