Skip to content

Commit

Permalink
x86/kvm: Make parse_no_xxx __init for kvm
Browse files Browse the repository at this point in the history
The early_param() is only called during kernel initialization, So Linux
marks the functions of it with __init macro to save memory.

But it forgot to mark the parse_no_kvmapf/stealacc/kvmclock_vsyscall,
So, Make them __init as well.

Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Juergen Gross <[email protected]>
Cc: [email protected]
Signed-off-by: Dou Liyang <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
douliyang authored and bonzini committed Feb 24, 2018
1 parent fe2a302 commit afdc3f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/x86/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

static int kvmapf = 1;

static int parse_no_kvmapf(char *arg)
static int __init parse_no_kvmapf(char *arg)
{
kvmapf = 0;
return 0;
Expand All @@ -58,7 +58,7 @@ static int parse_no_kvmapf(char *arg)
early_param("no-kvmapf", parse_no_kvmapf);

static int steal_acc = 1;
static int parse_no_stealacc(char *arg)
static int __init parse_no_stealacc(char *arg)
{
steal_acc = 0;
return 0;
Expand All @@ -67,7 +67,7 @@ static int parse_no_stealacc(char *arg)
early_param("no-steal-acc", parse_no_stealacc);

static int kvmclock_vsyscall = 1;
static int parse_no_kvmclock_vsyscall(char *arg)
static int __init parse_no_kvmclock_vsyscall(char *arg)
{
kvmclock_vsyscall = 0;
return 0;
Expand Down

0 comments on commit afdc3f5

Please sign in to comment.