Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356925
b: refs/heads/master
c: ed55705
h: refs/heads/master
i:
  356923: fb7a7d9
v: v3
  • Loading branch information
Marcelo Tosatti committed Feb 19, 2013
1 parent ec36a7f commit ff77c98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 899f7b26bc4549cd5da8ac7688ed7e9d017f21b5
refs/heads/master: ed55705dd5008b408c48a8459b8b34b01f3de985
11 changes: 6 additions & 5 deletions trunk/arch/x86/kernel/kvmclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ static void kvm_shutdown(void)
void __init kvmclock_init(void)
{
unsigned long mem;
int size;

size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS);

if (!kvm_para_available())
return;
Expand All @@ -231,16 +234,14 @@ void __init kvmclock_init(void)
printk(KERN_INFO "kvm-clock: Using msrs %x and %x",
msr_kvm_system_time, msr_kvm_wall_clock);

mem = memblock_alloc(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS,
PAGE_SIZE);
mem = memblock_alloc(size, PAGE_SIZE);
if (!mem)
return;
hv_clock = __va(mem);

if (kvm_register_clock("boot clock")) {
hv_clock = NULL;
memblock_free(mem,
sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS);
memblock_free(mem, size);
return;
}
pv_time_ops.sched_clock = kvm_clock_read;
Expand Down Expand Up @@ -275,7 +276,7 @@ int __init kvm_setup_vsyscall_timeinfo(void)
struct pvclock_vcpu_time_info *vcpu_time;
unsigned int size;

size = sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS;
size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS);

preempt_disable();
cpu = smp_processor_id();
Expand Down

0 comments on commit ff77c98

Please sign in to comment.