mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
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:
parent
03fc2da63b
commit
76e9f0ee52
3 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ static inline pfn_t pfn_to_pfn_t(unsigned long pfn)
|
|||
return __pfn_to_pfn_t(pfn, 0);
|
||||
}
|
||||
|
||||
extern pfn_t phys_to_pfn_t(dma_addr_t addr, unsigned long flags);
|
||||
extern pfn_t phys_to_pfn_t(phys_addr_t addr, unsigned long flags);
|
||||
|
||||
static inline bool pfn_t_has_page(pfn_t pfn)
|
||||
{
|
||||
|
|
@ -48,7 +48,7 @@ static inline struct page *pfn_t_to_page(pfn_t pfn)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline dma_addr_t pfn_t_to_phys(pfn_t pfn)
|
||||
static inline phys_addr_t pfn_t_to_phys(pfn_t pfn)
|
||||
{
|
||||
return PFN_PHYS(pfn_t_to_pfn(pfn));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue