phys_to_pfn_t: use phys_addr_t
A dma_addr_t is potentially smaller than a phys_addr_t on some archs. Don't truncate the address when doing the pfn conversion. Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Reported-by: Matthew Wilcox <willy@linux.intel.com> [willy: fix pfn_t_to_phys as well] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -113,7 +113,7 @@ void *__wrap_devm_memremap_pages(struct device *dev, struct resource *res,
|
||||
}
|
||||
EXPORT_SYMBOL(__wrap_devm_memremap_pages);
|
||||
|
||||
pfn_t __wrap_phys_to_pfn_t(dma_addr_t addr, unsigned long flags)
|
||||
pfn_t __wrap_phys_to_pfn_t(phys_addr_t addr, unsigned long flags)
|
||||
{
|
||||
struct nfit_test_resource *nfit_res = get_nfit_res(addr);
|
||||
|
||||
|
Reference in New Issue
Block a user