Skip to content

Commit

Permalink
libnvdimm, pfn: fix ARCH=alpha allmodconfig build failure
Browse files Browse the repository at this point in the history
I had relied on the kbuild robot for cross build coverage, however it
only builds alpha_defconfig.  Switch from HPAGE_SIZE to PMD_SIZE, which
is more widely defined.

Fixes: 658922e ("libnvdimm, pfn: fix memmap reservation sizing")
Cc: <stable@vger.kernel.org>
Reported-by: Guenter Roeck <guenter@roeck-us.net>
Tested-by: Guenter Roeck <guenter@roeck-us.net>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
djbw committed May 6, 2016
1 parent 2eea658 commit 1b8d2af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/nvdimm/pmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)

/*
* vmemmap_populate_hugepages() allocates the memmap array in
* HPAGE_SIZE chunks.
* PMD_SIZE chunks.
*/
memmap_size = ALIGN(64 * npfns, HPAGE_SIZE);
memmap_size = ALIGN(64 * npfns, PMD_SIZE);
offset = ALIGN(start + SZ_8K + memmap_size, nd_pfn->align)
- start;
} else if (nd_pfn->mode == PFN_MODE_RAM)
Expand Down

0 comments on commit 1b8d2af

Please sign in to comment.