Skip to content

Commit

Permalink
Merge branch 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/tj/percpu

* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu: fix per_cpu_ptr_to_phys() handling of non-page-aligned addresses
  • Loading branch information
Linus Torvalds committed Dec 19, 2011
2 parents 10ee08b + 9f57bd4 commit 64edb05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,9 +1023,11 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr)
if (!is_vmalloc_addr(addr))
return __pa(addr);
else
return page_to_phys(vmalloc_to_page(addr));
return page_to_phys(vmalloc_to_page(addr)) +
offset_in_page(addr);
} else
return page_to_phys(pcpu_addr_to_page(addr));
return page_to_phys(pcpu_addr_to_page(addr)) +
offset_in_page(addr);
}

/**
Expand Down

0 comments on commit 64edb05

Please sign in to comment.