On Wed, May 01, 2019 at 10:55:32PM -0700, Dan Williams wrote: > Up-level the local section size and mask from kernel/memremap.c to > global definitions. These will be used by the new sub-section hotplug > support. > > Cc: Michal Hocko <[email protected]> > Cc: Vlastimil Babka <[email protected]> > Cc: Jérôme Glisse <[email protected]> > Cc: Logan Gunthorpe <[email protected]> > Signed-off-by: Dan Williams <[email protected]> > --- > include/linux/mmzone.h | 2 ++ > kernel/memremap.c | 10 ++++------ > mm/hmm.c | 2 -- > 3 files changed, 6 insertions(+), 8 deletions(-) > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index f0bbd85dc19a..6726fc175b51 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -1134,6 +1134,8 @@ static inline unsigned long early_pfn_to_nid(unsigned > long pfn) > * PFN_SECTION_SHIFT pfn to/from section number > */ > #define PA_SECTION_SHIFT (SECTION_SIZE_BITS) > +#define PA_SECTION_SIZE (1UL << PA_SECTION_SHIFT) > +#define PA_SECTION_MASK (~(PA_SECTION_SIZE-1))
As discussed here [1], we do not need the new PA_SECTION_MASK if we work with pfns/pages directly, so I'd drop it if you go that way. Besides that: Reviewed-by: Oscar Salvador <[email protected]> [1] https://patchwork.kernel.org/patch/10926047/ -- Oscar Salvador SUSE L3 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
