Skip to contentSkip to conversation

powerpc/hugetlbfs: Export HPAGE_SHIFT

PATCH Applied Oliver O'Halloran 3 participants 4 messages Jun 30, 2017 – Jul 3, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/hugetlbfs: Export HPAGE_SHIFT

Export it so it can be referenced inside a module.

---
 arch/powerpc/mm/hugetlbpage.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/mm/hugetlbpage.c +1 -0
index ceeab69cf7fc..96293560f294 100644
@@ -34,6 +34,7 @@
 #define PAGE_SHIFT_16G	34
 
 unsigned int HPAGE_SHIFT;
+EXPORT_SYMBOL(HPAGE_SHIFT);
 
 /*
  * Tracks gpages after the device tree is scanned and before the
Signature · 1 line
2.9.4
#1 lore raw
Quoted 12 lines · Oliver O'Halloran

Export it so it can be referenced inside a module.

---
 arch/powerpc/mm/hugetlbpage.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/mm/hugetlbpage.c +0 -0
index ceeab69cf7fc..96293560f294 100644

arch/powerpc/mm/hugetlbpage.c line 37

Quoted 4 lines
arch/powerpc/mm/hugetlbpage.c +1 -0
@@ -34,6 +34,7 @@
 #define PAGE_SHIFT_16G	34
 
 unsigned int HPAGE_SHIFT;
+EXPORT_SYMBOL(HPAGE_SHIFT);

Why would you need this in a driver ? This represents the default HugeTLB page size.

author
#2 lore raw
Quoted 15 lines · Anshuman Khandual
Quoted 14 lines · Oliver O'Halloran

Export it so it can be referenced inside a module.

---
 arch/powerpc/mm/hugetlbpage.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/mm/hugetlbpage.c +0 -0
index ceeab69cf7fc..96293560f294 100644
@@ -34,6 +34,7 @@
 #define PAGE_SHIFT_16G       34
 
Quoted 5 lines

arch/powerpc/mm/hugetlbpage.c line 37

Quoted 2 lines
arch/powerpc/mm/hugetlbpage.c +1 -0
 unsigned int HPAGE_SHIFT;
+EXPORT_SYMBOL(HPAGE_SHIFT);

Why would you need this in a driver ? This represents the default HugeTLB page size.

Libnvdimm uses HPAGE_SIZE for a few things that it probably shouldn't. I have sent a fix for libnvdimm, but that hasn't been merged yet and this was breaking mpe's -next builds in the mean time. I agree it's kind of bad, but we needed ZONE_DEVICE support to be in 4.13.

Oliver