aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/include/asm/uaccess.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-07-28 11:05:31 -0400
committerThierry Reding <treding@nvidia.com>2014-11-10 09:59:21 -0500
commitdc01201476ec9d62e81c0ee181531bccd8b007ff (patch)
treef34840bd28fdb020a4f4ac3d11ce1c73662d1271 /arch/ia64/include/asm/uaccess.h
parent2e0fa0c95393f51ed356b351d66a37a82f867dc6 (diff)
Change xlate_dev_{kmem,mem}_ptr() prototypes
xlate_dev_mem_ptr() is used to convert a physical address to an uncached kernel virtual address mapping, so make it use phys_addr_t as type for the physical address and return void * for the kernel virtual address. xlate_dev_kmem_ptr() converts a cached kernel virtual address mapping to an uncached kernel virtual address mapping, so make it use void * for both the input parameter and return value. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'arch/ia64/include/asm/uaccess.h')
-rw-r--r--arch/ia64/include/asm/uaccess.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/ia64/include/asm/uaccess.h b/arch/ia64/include/asm/uaccess.h
index 449c8c0fa2bd..103bedc59644 100644
--- a/arch/ia64/include/asm/uaccess.h
+++ b/arch/ia64/include/asm/uaccess.h
@@ -365,15 +365,15 @@ ia64_done_with_exception (struct pt_regs *regs)
365} 365}
366 366
367#define ARCH_HAS_TRANSLATE_MEM_PTR 1 367#define ARCH_HAS_TRANSLATE_MEM_PTR 1
368static __inline__ char * 368static __inline__ void *
369xlate_dev_mem_ptr (unsigned long p) 369xlate_dev_mem_ptr(phys_addr_t p)
370{ 370{
371 struct page *page; 371 struct page *page;
372 char * ptr; 372 void *ptr;
373 373
374 page = pfn_to_page(p >> PAGE_SHIFT); 374 page = pfn_to_page(p >> PAGE_SHIFT);
375 if (PageUncached(page)) 375 if (PageUncached(page))
376 ptr = (char *)p + __IA64_UNCACHED_OFFSET; 376 ptr = (void *)p + __IA64_UNCACHED_OFFSET;
377 else 377 else
378 ptr = __va(p); 378 ptr = __va(p);
379 379
@@ -383,15 +383,15 @@ xlate_dev_mem_ptr (unsigned long p)
383/* 383/*
384 * Convert a virtual cached kernel memory pointer to an uncached pointer 384 * Convert a virtual cached kernel memory pointer to an uncached pointer
385 */ 385 */
386static __inline__ char * 386static __inline__ void *
387xlate_dev_kmem_ptr (char * p) 387xlate_dev_kmem_ptr(void *p)
388{ 388{
389 struct page *page; 389 struct page *page;
390 char * ptr; 390 void *ptr;
391 391
392 page = virt_to_page((unsigned long)p); 392 page = virt_to_page((unsigned long)p);
393 if (PageUncached(page)) 393 if (PageUncached(page))
394 ptr = (char *)__pa(p) + __IA64_UNCACHED_OFFSET; 394 ptr = (void *)__pa(p) + __IA64_UNCACHED_OFFSET;
395 else 395 else
396 ptr = p; 396 ptr = p;
397 397