2007-02-16 17:48:11 +08:00
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/preempt.h>
|
|
|
|
#include <asm/msr.h>
|
|
|
|
|
2009-12-12 01:14:40 +08:00
|
|
|
struct msr *msrs_alloc(void)
|
|
|
|
{
|
|
|
|
struct msr *msrs = NULL;
|
|
|
|
|
|
|
|
msrs = alloc_percpu(struct msr);
|
|
|
|
if (!msrs) {
|
|
|
|
pr_warning("%s: error allocating msrs\n", __func__);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return msrs;
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(msrs_alloc);
|
|
|
|
|
|
|
|
void msrs_free(struct msr *msrs)
|
|
|
|
{
|
|
|
|
free_percpu(msrs);
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(msrs_free);
|