Re: [PATCH RFC 3/7] x86: clean up asm-x86/page*.h

2007-11-08 Thread Jeremy Fitzhardinge
Glauber de Oliveira Costa wrote: > Not exactly. > for the native_ functions, there's room for code sharing. > native_pgd_val, and native_pte_val seem to be the same, for at least > pae and x86_64. > As for the typedefs, the same thing can be done. Much like you did in > paravirt.h, just split out

Re: [PATCH RFC 3/7] x86: clean up asm-x86/page*.h

2007-11-08 Thread Glauber de Oliveira Costa
On Nov 8, 2007 6:59 PM, Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: > Glauber de Oliveira Costa wrote: > > On Nov 7, 2007 11:50 PM, Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: > > > >> +#define PAGETABLE_LEVELS 3 > >> + > >> +typedef u64pteval_t; > >> +typedef u64pmdval_t; > >>

Re: [PATCH RFC 3/7] x86: clean up asm-x86/page*.h

2007-11-08 Thread Jeremy Fitzhardinge
Glauber de Oliveira Costa wrote: > On Nov 7, 2007 11:50 PM, Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: > >> +#define PAGETABLE_LEVELS 3 >> + >> +typedef u64pteval_t; >> +typedef u64pmdval_t; >> +typedef u64pudval_t; >> +typedef u64pgdval_t; >> + >> > > >> -stati

Re: [PATCH RFC 3/7] x86: clean up asm-x86/page*.h

2007-11-08 Thread Glauber de Oliveira Costa
On Nov 7, 2007 11:50 PM, Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: > +#define PAGETABLE_LEVELS 3 > + > +typedef u64pteval_t; > +typedef u64pmdval_t; > +typedef u64pudval_t; > +typedef u64pgdval_t; > + > -static inline unsigned long long native_pgd_val(pgd_t pgd) > +stati

[PATCH RFC 3/7] x86: clean up asm-x86/page*.h

2007-11-07 Thread Jeremy Fitzhardinge
Unify common definitions in page*.h. To simplify other code, I added typedefs for the value of pte/pmd/pud/pgd values, so they can be used symbolically elsewhere without needing to have lots of 32/64/PAE tests. Also, add PAGETABLE_LEVELS define so that other definitions can test for it directly r