Commit f2454a1a4b2aca38d3b7887619f43291d773c1ee

Authored by Jes Sorensen
Committed by Tony Luck
1 parent e803915000

[IA64] don't double >> PAGE_SHIFT pointer for /dev/kmem access

Don't PAGE_SHIFT pointer before handing it to virt_to_page() in
xlate_dev_kmem_ptr() as it results in a double shift.

Spotted by Bob Montgomery.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

include/asm-ia64/uaccess.h
... ... @@ -389,7 +389,7 @@
389 389 struct page *page;
390 390 char * ptr;
391 391  
392   - page = virt_to_page((unsigned long)p >> PAGE_SHIFT);
  392 + page = virt_to_page((unsigned long)p);
393 393 if (PageUncached(page))
394 394 ptr = (char *)__pa(p) + __IA64_UNCACHED_OFFSET;
395 395 else