Skip to content

Commit

Permalink
[IA64] don't double >> PAGE_SHIFT pointer for /dev/kmem access
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jes Sorensen authored and Tony Luck committed Oct 26, 2006
1 parent e803915 commit f2454a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-ia64/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ xlate_dev_kmem_ptr (char * p)
struct page *page;
char * ptr;

page = virt_to_page((unsigned long)p >> PAGE_SHIFT);
page = virt_to_page((unsigned long)p);
if (PageUncached(page))
ptr = (char *)__pa(p) + __IA64_UNCACHED_OFFSET;
else
Expand Down

0 comments on commit f2454a1

Please sign in to comment.