diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-19 15:13:36 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-19 15:13:36 -0800 |
commit | 64edb05e3c7497c21496a2bafbdbac453f2a9155 (patch) | |
tree | ce90013eec444b843ce3de1e05f6470773a4c83b | |
parent | 10ee08b7570dde2bac77d3f96eca2ce630a32b49 (diff) | |
parent | 9f57bd4d6dc69a4e3bf43044fa00fcd24dd363e3 (diff) | |
download | op-kernel-dev-64edb05e3c7497c21496a2bafbdbac453f2a9155.zip op-kernel-dev-64edb05e3c7497c21496a2bafbdbac453f2a9155.tar.gz |
Merge branch 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/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
-rw-r--r-- | mm/percpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index 3bb810a..716eb4a 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -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); } /** |