1
0
Fork 0

[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>
hifive-unleashed-5.1
Jes Sorensen 2006-10-25 05:49:53 -04:00 committed by Tony Luck
parent e803915000
commit f2454a1a4b
1 changed files with 1 additions and 1 deletions

View File

@ -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