Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
x86
lib
msr.c
Go to the documentation of this file.
1
#include <linux/module.h>
2
#include <
linux/preempt.h
>
3
#include <
asm/msr.h
>
4
5
struct
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
}
17
EXPORT_SYMBOL
(
msrs_alloc
);
18
19
void
msrs_free
(
struct
msr *msrs)
20
{
21
free_percpu
(msrs);
22
}
23
EXPORT_SYMBOL
(
msrs_free
);
Generated on Thu Jan 10 2013 13:20:54 for Linux Kernel by
1.8.2