Re: [kvm-unit-tests PATCH v8 08/12] x86: Cleanup PAGE_* constants

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

 



On Mon, Jun 06, 2016 at 05:21:23PM +0200, Paolo Bonzini wrote:
> > diff --git a/lib/x86/asm/page.h b/lib/x86/asm/page.h
> > index d4580b40f5e8..916462d758ac 100644
> > --- a/lib/x86/asm/page.h
> > +++ b/lib/x86/asm/page.h
> > @@ -7,7 +7,14 @@
> >   */
> >  
> >  
> > -#define PAGE_SIZE	4096ul
> > +#include <linux/const.h>
> 
> No linux/ includes here, but you can just use the existing
> 
> #define PAGE_SIZE	4096ul
> 
> definition.

We have page constants defined this way for every other arch:

lib/arm/asm/page.h
lib/arm64/asm/page.h
lib/asm-generic/page.h (covers ppc64)

Why not to bring x86 in line also?

Thanks!

> Paolo
> 
> > +
> > +#define PAGE_SHIFT	12
> > +#define PAGE_SIZE	(_AC(1,UL) << PAGE_SHIFT)
> > +#define PAGE_MASK	(~(PAGE_SIZE-1))
> > +
> > +#ifndef __ASSEMBLY__
> > +
> >  #ifdef __x86_64__
> >  #define LARGE_PAGE_SIZE	(512 * PAGE_SIZE)
> >  #else
> > @@ -30,4 +37,5 @@
> >  #define	PGDIR_MASK	1023
> >  #endif
> >  
> > +#endif /* !__ASSEMBLY__ */
> >  #endif
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux