From: Jes Sorensen Date: Wed, 25 Oct 2006 09:49:53 +0000 (-0400) Subject: [IA64] don't double >> PAGE_SHIFT pointer for /dev/kmem access X-Git-Tag: v2.6.19-rc5~88^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2454a1a4b2aca38d3b7887619f43291d773c1ee;p=linux-2.6 [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 Signed-off-by: Tony Luck --- diff --git a/include/asm-ia64/uaccess.h b/include/asm-ia64/uaccess.h index 9adb51211c..449c8c0fa2 100644 --- a/include/asm-ia64/uaccess.h +++ b/include/asm-ia64/uaccess.h @@ -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