[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1196792415.6073.8.camel@localhost>
Date: Tue, 04 Dec 2007 10:20:15 -0800
From: Dave Hansen <haveblue@...ibm.com>
To: Joerg Roedel <joerg.roedel@....com>
Cc: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] x86_64: define all _PAGE_* in terms of _PAGE_BIT_*
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists