Commit dc012014 authored by Thierry Reding's avatar Thierry Reding

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: default avatarThierry Reding <treding@nvidia.com>
parent 2e0fa0c9
...@@ -365,15 +365,15 @@ ia64_done_with_exception (struct pt_regs *regs) ...@@ -365,15 +365,15 @@ ia64_done_with_exception (struct pt_regs *regs)
} }
#define ARCH_HAS_TRANSLATE_MEM_PTR 1 #define ARCH_HAS_TRANSLATE_MEM_PTR 1
static __inline__ char * static __inline__ void *
xlate_dev_mem_ptr (unsigned long p) xlate_dev_mem_ptr(phys_addr_t p)
{ {
struct page *page; struct page *page;
char * ptr; void *ptr;
page = pfn_to_page(p >> PAGE_SHIFT); page = pfn_to_page(p >> PAGE_SHIFT);
if (PageUncached(page)) if (PageUncached(page))
ptr = (char *)p + __IA64_UNCACHED_OFFSET; ptr = (void *)p + __IA64_UNCACHED_OFFSET;
else else
ptr = __va(p); ptr = __va(p);
...@@ -383,15 +383,15 @@ xlate_dev_mem_ptr (unsigned long p) ...@@ -383,15 +383,15 @@ xlate_dev_mem_ptr (unsigned long p)
/* /*
* Convert a virtual cached kernel memory pointer to an uncached pointer * Convert a virtual cached kernel memory pointer to an uncached pointer
*/ */
static __inline__ char * static __inline__ void *
xlate_dev_kmem_ptr (char * p) xlate_dev_kmem_ptr(void *p)
{ {
struct page *page; struct page *page;
char * ptr; void *ptr;
page = virt_to_page((unsigned long)p); page = virt_to_page((unsigned long)p);
if (PageUncached(page)) if (PageUncached(page))
ptr = (char *)__pa(p) + __IA64_UNCACHED_OFFSET; ptr = (void *)__pa(p) + __IA64_UNCACHED_OFFSET;
else else
ptr = p; ptr = p;
......
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