Re: [PATCH 1/3] x86_64: define all _PAGE_* in terms of _PAGE_BIT_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-12-04 at 16:23 +0100, Joerg Roedel wrote:
> 
> -#define _PAGE_FILE     0x040   /* nonlinear file mapping, saved PTE;
> unset:swap */
> -#define _PAGE_GLOBAL   0x100   /* Global TLB entry */
> +#define _PAGE_PRESENT  (_AC(1, UL)<<_PAGE_BIT_PRESENT)
> +#define _PAGE_RW       (_AC(1, UL)<<_PAGE_BIT_RW)
> +#define _PAGE_USER     (_AC(1, UL)<<_PAGE_BIT_USER)
> +#define _PAGE_PWT      (_AC(1, UL)<<_PAGE_BIT_PWT)
> +#define _PAGE_PCD      (_AC(1, UL)<<_PAGE_BIT_PCD)
> +#define _PAGE_ACCESSED (_AC(1, UL)<<_PAGE_BIT_ACCESSED)
> +#define _PAGE_DIRTY    (_AC(1, UL)<<_PAGE_BIT_DIRTY)
> +/* 2MB page */
> +#define _PAGE_PSE      (_AC(1, UL)<<_PAGE_BIT_PSE)
> +/* nonlinear file mapping, saved PTE; unset:swap */
> +#define _PAGE_FILE     (_AC(1, UL)<<_PAGE_BIT_FILE)
> +/* Global TLB entry */
> +#define _PAGE_GLOBAL   (_AC(1, UL)<<_PAGE_BIT_GLOBAL) 

Since you're defining these as macros anyway now and doing it
repetitively, could you make them a wee bit prettier?

Say something like:

#define _PAGE_MASK(x)	(_AC(1, UL)<<(x))

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux