blob: 8f8eebdca7d4cadc249405e8a0c50108e34edc3b [file] [log] [blame]
Alexey Dobriyanb077ffb2007-02-16 01:48:11 -08001#include <linux/module.h>
2#include <linux/preempt.h>
Alexey Dobriyanb077ffb2007-02-16 01:48:11 -08003#include <asm/msr.h>
4
Borislav Petkov50542252009-12-11 18:14:40 +01005struct msr *msrs_alloc(void)
6{
7 struct msr *msrs = NULL;
8
9 msrs = alloc_percpu(struct msr);
10 if (!msrs) {
11 pr_warning("%s: error allocating msrs\n", __func__);
12 return NULL;
13 }
14
15 return msrs;
16}
17EXPORT_SYMBOL(msrs_alloc);
18
19void msrs_free(struct msr *msrs)
20{
21 free_percpu(msrs);
22}
23EXPORT_SYMBOL(msrs_free);