Skip to contentSkip to conversation

linux-next: build failure after merge of the akpm-current tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Aug 14, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Andrew,

After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:

In file included from include/linux/sched.h:27:0,
from arch/sparc/kernel/asm-offsets.c:13:
include/linux/mm_types.h:371:22: error: 'HUGE_MAX_HSTATE' undeclared here (not in a function)

  atomic_long_t count[HUGE_MAX_HSTATE];
                      ^

Caused by commit

04f4eaa95082 ("mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status")

I have reverted that patch (and the following fix patch:

f26cf7b29291 ("mm-hugetlb-proc-add-hugetlbpages-field-to-proc-pid-status-fix")

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw
Quoted 10 lines · Stephen Rothwell

Hi Andrew,

After merging the akpm tree, today's linux-next build (sparc64 defconfig) failed like this:

In file included from include/linux/sched.h:27:0,
from arch/sparc/kernel/asm-offsets.c:13:
include/linux/mm_types.h:371:22: error: 'HUGE_MAX_HSTATE' undeclared here (not in a function)

  atomic_long_t count[HUGE_MAX_HSTATE];
                      ^

Thank you for the report,

I'm suggesting the following diff as a fix. And I'm fine for these patches to be excluded until the fix is merged to mmotm.

Thanks,
Naoya Horiguchi
---

include/linux/hugetlb.h +0 -4
index 64aa4db01f48..99ea2c651106 100644
@@ -330,10 +330,6 @@ int __init alloc_bootmem_huge_page(struct hstate *h);
 void __init hugetlb_add_hstate(unsigned order);
 struct hstate *size_to_hstate(unsigned long size);
 
-#ifndef HUGE_MAX_HSTATE
-#define HUGE_MAX_HSTATE 1
-#endif
-
 extern struct hstate hstates[HUGE_MAX_HSTATE];
 extern unsigned int default_hstate_idx;
 
include/linux/mm_types.h +4 -0
index e95c5fe1eb7d..27333cdb8b46 100644
@@ -365,6 +365,10 @@ struct mm_rss_stat {
 };
 
 #ifdef CONFIG_HUGETLB_PAGE
+
+#ifndef HUGE_MAX_HSTATE
+#define HUGE_MAX_HSTATE	1
+#endif
 struct hugetlb_usage {
 	atomic_long_t count[HUGE_MAX_HSTATE];
 };
Quoted 8 lines

Caused by commit

04f4eaa95082 ("mm: hugetlb: proc: add HugetlbPages field to /proc/PID/status")

I have reverted that patch (and the following fix patch:

f26cf7b29291 ("mm-hugetlb-proc-add-hugetlbpages-field-to-proc-pid-status-fix")