Re: [PATCH 1/2] x86: ioremap: fix wrong physical address handling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matthew Wilcox
Date: Wednesday, June 16, 2010 - 7:50 pm

On Thu, Jun 17, 2010 at 10:30:06AM +0900, Kenji Kaneshige wrote:

I have a hard time understanding this change.  pfn is always a physical
address shifted by PAGE_SHIFT.  So a 32-bit pfn supports up to 44-bit
physical addresses.  Are your addresses above 44-bits?


I'd rather see PAGE_MASK fixed.  Would this work?

 #define PAGE_SIZE       (_AC(1,UL) << PAGE_SHIFT)
-#define PAGE_MASK       (~(PAGE_SIZE-1))
+#define PAGE_MASK       (~(PAGE_SIZE-1ULL))

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG][PATCH 0/2 (v.2)] x86: ioremap() problem in X86_32 PAE, Kenji Kaneshige, (Wed Jun 16, 6:28 pm)
[PATCH 2/2] x86: ioremap: fix normal ram range check, Kenji Kaneshige, (Wed Jun 16, 6:31 pm)
Re: [PATCH 1/2] x86: ioremap: fix wrong physical address h ..., Matthew Wilcox, (Wed Jun 16, 7:50 pm)
Re: [PATCH 1/2] x86: ioremap: fix wrong physical address h ..., Jeremy Fitzhardinge, (Thu Jun 17, 2:35 am)
Re: [PATCH 1/2] x86: ioremap: fix wrong physical address h ..., Jeremy Fitzhardinge, (Thu Jun 17, 2:38 am)
Re: [PATCH 1/2] x86: ioremap: fix wrong physical address h ..., Jeremy Fitzhardinge, (Thu Jul 8, 10:33 pm)
[tip:x86/mm] x86, pae: Fix handling of large physical addr ..., tip-bot for Kenji Ka ..., (Fri Jul 9, 11:31 am)
[tip:x86/mm] x86, ioremap: Fix normal ram range check, tip-bot for Kenji Ka ..., (Fri Jul 9, 11:31 am)