lkml.org 
[lkml]   [2008]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0 of 4] x86: some more patches

* Andi Kleen <ak@suse.de> wrote:

> > #define PHYSICAL_PAGE_MASK (PAGE_MASK & __PHYSICAL_MASK)
>
>
> I haven't tested yet, but we looked at that one earlier and I thought
> it was ok because
>
> #define __PHYSICAL_MASK _AT(phys_addr_t, (_AC(1,ULL) << __PHYSICAL_MASK_SHIFT) - 1)
>
> and
>
> typedef u64 phys_addr_t;
>
> for PAE. So the expression above should have been already 64bit.

no. The problem is that PAGE_MASK is:

#define PAGE_MASK (~(PAGE_SIZE-1))

#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)

that's u32 on PAE, and __PHYSICAL_MASK is u64. So PAGE_MASK gets
zero-extended to u64. So the combined mask:

#define PHYSICAL_PAGE_MASK (PAGE_MASK & __PHYSICAL_MASK)

has the high bits chopped off. Please try my patch.

(PHYSICAL_PAGE_MASK is broken too in the same way, i just fixed that in
my tree - but it's not used by anything on 32-bit PAE but by PAGE_MASK)

> So I would be surprised if the patch works.

try it ...

Ingo


\
 
 \ /
  Last update: 2008-01-16 15:57    [W:0.049 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site