mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-20 14:16:02 +00:00
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
This commit is contained in:
commit
64edb05e3c
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue