Message ID | 20210115123730.381612-2-imbrenda@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix and improve the page allocator | expand |
On 1/15/21 1:37 PM, 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> > Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com> Reviewed-by: Janosch Frank <frankja@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__ > >
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__