Commit 62e4ac37 authored by Charles Jacobsen's avatar Charles Jacobsen Committed by Vikram Narayanan

Successful build with lcd_vmx_init and lcd_vmx_exit.

Added straight copy from old code of lcd_vmx_exit.

Shifted lcd_vmx_init and lcd_vmx_exit to
arch/x86/include/asm/lcd-vmx.h. Ideally, if we want
this to be arch-independent, probably want to change
header to asm/lcd.h, and routines to lcd_arch_init
and lcd_arch_exit, or something similar.
parent 7c05c7a0
#ifndef LCD_VMX_H
#define LCD_VMX_H
#include <asm/vmx.h>
#include <linux/spinlock.h>
struct lcd_vmx_vmcs_config {
......@@ -82,4 +83,7 @@ struct lcd_vmx {
} msr_autoload;
};
int lcd_vmx_init(void);
void lcd_vmx_exit(void);
#endif /* LCD_VMX_H */
......@@ -612,3 +612,10 @@ failed1:
free_page((unsigned long)msr_bitmap);
return ret;
}
void lcd_vmx_exit(void)
{
on_each_cpu(vmx_disable, NULL, 1);
vmx_free_vmxon_areas();
free_page((unsigned long)msr_bitmap);
}
......@@ -86,9 +86,6 @@ typedef struct lcd {
struct module *mod;
} lcd_t;
int lcd_vmx_init(void);
void lcd_vmx_exit(void);
int lcd_init_module(void __user * umod, unsigned long len, const char __user * uargs);
//int lcd_load_module(struct load_info *info, const char __user *uargs, int flags);
......
......@@ -6,6 +6,4 @@ ccflags-y += -Werror
obj-$(CONFIG_LCD) += core.o
$(info $(lcd-y))
lcd-y += arch/$(ARCH)/lcd/lcd-vmx.o
$(info $(lcd-y))
......@@ -14,7 +14,8 @@
#include <linux/compat.h>
#include <linux/fs.h>
#include <asm/uaccess.h>
#include <lcd/lcd.h>
#include <linux/lcd-domains.h>
#include <asm/lcd-vmx.h>
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("LCD driver");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment