Commit 64edb05e authored by Linus Torvalds's avatar Linus Torvalds

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
parents 10ee08b7 9f57bd4d
...@@ -1023,9 +1023,11 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr) ...@@ -1023,9 +1023,11 @@ phys_addr_t per_cpu_ptr_to_phys(void *addr)
if (!is_vmalloc_addr(addr)) if (!is_vmalloc_addr(addr))
return __pa(addr); return __pa(addr);
else else
return page_to_phys(vmalloc_to_page(addr)); return page_to_phys(vmalloc_to_page(addr)) +
offset_in_page(addr);
} else } else
return page_to_phys(pcpu_addr_to_page(addr)); return page_to_phys(pcpu_addr_to_page(addr)) +
offset_in_page(addr);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment