Message ID | 20201216201200.255172-2-imbrenda@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix and improve the page allocator | expand |
On 16/12/2020 21.11, Claudio Imbrenda wrote: > Bring x86 in line with the other architectures and include the generic header > at asm-generic/page.h . > This provides the macros PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, virt_to_pfn, and > pfn_to_virt. > > Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> > --- > lib/x86/asm/page.h | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/lib/x86/asm/page.h b/lib/x86/asm/page.h > index 1359eb7..2cf8881 100644 > --- a/lib/x86/asm/page.h > +++ b/lib/x86/asm/page.h > @@ -13,9 +13,7 @@ > typedef unsigned long pteval_t; > typedef unsigned long pgd_t; > > -#define PAGE_SHIFT 12 > -#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) > -#define PAGE_MASK (~(PAGE_SIZE-1)) > +#include <asm-generic/page.h> > > #ifndef __ASSEMBLY__ > > Reviewed-by: Thomas Huth <thuth@redhat.com>
diff --git a/lib/x86/asm/page.h b/lib/x86/asm/page.h index 1359eb7..2cf8881 100644 --- a/lib/x86/asm/page.h +++ b/lib/x86/asm/page.h @@ -13,9 +13,7 @@ typedef unsigned long pteval_t; typedef unsigned long pgd_t; -#define PAGE_SHIFT 12 -#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) +#include <asm-generic/page.h> #ifndef __ASSEMBLY__
Bring x86 in line with the other architectures and include the generic header at asm-generic/page.h . This provides the macros PAGE_SHIFT, PAGE_SIZE, PAGE_MASK, virt_to_pfn, and pfn_to_virt. Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> --- lib/x86/asm/page.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)