linux-next: build failure after merge of the mm tree
Subsystems (2)
Hi all,
After merging the mm tree, today's linux-next build (powerpc_ppc64_defconfig) failed like this:
In file included from include/trace/trace_events.h:27,
from include/trace/define_trace.h:102,
from fs/xfs/xfs_trace.h:4428,
from fs/xfs/xfs_trace.c:45:
include/linux/pgtable.h:8:25: error: initializer element is not constant
8 | #define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)
| ^include/trace/stages/init.h:20:31: note: in definition of macro 'TRACE_DEFINE_ENUM'
20 | .eval_value = a \
| ^fs/xfs/./xfs_trace.h:805:19: note: in expansion of macro 'PMD_ORDER'
805 | TRACE_DEFINE_ENUM(PMD_ORDER);
| ^~~~~~~~~
include/linux/pgtable.h:8:25: note: (near initialization for '__TRACE_SYSTEM_PMD_ORDER.eval_value')
8 | #define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)
| ^include/trace/stages/init.h:20:31: note: in definition of macro 'TRACE_DEFINE_ENUM'
20 | .eval_value = a \
| ^fs/xfs/./xfs_trace.h:805:19: note: in expansion of macro 'PMD_ORDER'
805 | TRACE_DEFINE_ENUM(PMD_ORDER);
| ^~~~~~~~~
include/linux/pgtable.h:9:25: error: initializer element is not constant
9 | #define PUD_ORDER (PUD_SHIFT - PAGE_SHIFT)
| ^include/trace/stages/init.h:20:31: note: in definition of macro 'TRACE_DEFINE_ENUM'
20 | .eval_value = a \
| ^fs/xfs/./xfs_trace.h:806:19: note: in expansion of macro 'PUD_ORDER'
806 | TRACE_DEFINE_ENUM(PUD_ORDER);
| ^~~~~~~~~
include/linux/pgtable.h:9:25: note: (near initialization for '__TRACE_SYSTEM_PUD_ORDER.eval_value')
9 | #define PUD_ORDER (PUD_SHIFT - PAGE_SHIFT)
| ^include/trace/stages/init.h:20:31: note: in definition of macro 'TRACE_DEFINE_ENUM'
20 | .eval_value = a \
| ^fs/xfs/./xfs_trace.h:806:19: note: in expansion of macro 'PUD_ORDER'
806 | TRACE_DEFINE_ENUM(PUD_ORDER);
| ^~~~~~~~~
fs/xfs/./xfs_trace.h: In function 'trace_raw_output_xfs_filemap_fault':
include/linux/pgtable.h:8:25: error: initializer element is not constant
8 | #define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)
| ^include/trace/trace_events.h:203:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
203 | trace_event_printf(iter, print); \
| ^~~~~include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'
45 | PARAMS(print)); \
| ^~~~~~
fs/xfs/./xfs_trace.h:811:1: note: in expansion of macro 'TRACE_EVENT'
811 | TRACE_EVENT(xfs_filemap_fault,
| ^~~~~~~~~~~
fs/xfs/./xfs_trace.h:826:9: note: in expansion of macro 'TP_printk'
826 | TP_printk("dev %d:%d ino 0x%llx %s write_fault %d",
| ^~~~~~~~~
fs/xfs/./xfs_trace.h:829:19: note: in expansion of macro '__print_symbolic'
829 | __print_symbolic(__entry->order,
| ^~~~~~~~~~~~~~~~
fs/xfs/./xfs_trace.h:831:27: note: in expansion of macro 'PMD_ORDER'
831 | { PMD_ORDER, "PMD" },
| ^~~~~~~~~
include/linux/pgtable.h:8:25: note: (near initialization for 'symbols[1].mask')
8 | #define PMD_ORDER (PMD_SHIFT - PAGE_SHIFT)
| ^include/trace/trace_events.h:203:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
203 | trace_event_printf(iter, print); \
| ^~~~~include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'
45 | PARAMS(print)); \
| ^~~~~~
fs/xfs/./xfs_trace.h:811:1: note: in expansion of macro 'TRACE_EVENT'
811 | TRACE_EVENT(xfs_filemap_fault,
| ^~~~~~~~~~~
fs/xfs/./xfs_trace.h:826:9: note: in expansion of macro 'TP_printk'
826 | TP_printk("dev %d:%d ino 0x%llx %s write_fault %d",
| ^~~~~~~~~
fs/xfs/./xfs_trace.h:829:19: note: in expansion of macro '__print_symbolic'
829 | __print_symbolic(__entry->order,
| ^~~~~~~~~~~~~~~~
fs/xfs/./xfs_trace.h:831:27: note: in expansion of macro 'PMD_ORDER'
831 | { PMD_ORDER, "PMD" },
| ^~~~~~~~~
include/linux/pgtable.h:9:25: error: initializer element is not constant
9 | #define PUD_ORDER (PUD_SHIFT - PAGE_SHIFT)
| ^include/trace/trace_events.h:203:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
203 | trace_event_printf(iter, print); \
| ^~~~~include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'
45 | PARAMS(print)); \
| ^~~~~~
fs/xfs/./xfs_trace.h:811:1: note: in expansion of macro 'TRACE_EVENT'
811 | TRACE_EVENT(xfs_filemap_fault,
| ^~~~~~~~~~~
fs/xfs/./xfs_trace.h:826:9: note: in expansion of macro 'TP_printk'
826 | TP_printk("dev %d:%d ino 0x%llx %s write_fault %d",
| ^~~~~~~~~
fs/xfs/./xfs_trace.h:829:19: note: in expansion of macro '__print_symbolic'
829 | __print_symbolic(__entry->order,
| ^~~~~~~~~~~~~~~~
fs/xfs/./xfs_trace.h:832:27: note: in expansion of macro 'PUD_ORDER'
832 | { PUD_ORDER, "PUD" }),
| ^~~~~~~~~
include/linux/pgtable.h:9:25: note: (near initialization for 'symbols[2].mask')
9 | #define PUD_ORDER (PUD_SHIFT - PAGE_SHIFT)
| ^include/trace/trace_events.h:203:34: note: in definition of macro 'DECLARE_EVENT_CLASS'
203 | trace_event_printf(iter, print); \
| ^~~~~include/trace/trace_events.h:45:30: note: in expansion of macro 'PARAMS'
45 | PARAMS(print)); \
| ^~~~~~
fs/xfs/./xfs_trace.h:811:1: note: in expansion of macro 'TRACE_EVENT'
811 | TRACE_EVENT(xfs_filemap_fault,
| ^~~~~~~~~~~
fs/xfs/./xfs_trace.h:826:9: note: in expansion of macro 'TP_printk'
826 | TP_printk("dev %d:%d ino 0x%llx %s write_fault %d",
| ^~~~~~~~~
fs/xfs/./xfs_trace.h:829:19: note: in expansion of macro '__print_symbolic'
829 | __print_symbolic(__entry->order,
| ^~~~~~~~~~~~~~~~
fs/xfs/./xfs_trace.h:832:27: note: in expansion of macro 'PUD_ORDER'
832 | { PUD_ORDER, "PUD" }),
| ^~~~~~~~~Caused by commit
b8088235e872 ("mm: remove enum page_entry_size")
I have reverted that commit for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 6 lines · Stephen Rothwell
In file included from
include/trace/trace_events.h:27,from include/trace/define_trace.h:102, from fs/xfs/xfs_trace.h:4428, from fs/xfs/xfs_trace.c:45:
include/linux/pgtable.h:8:25: error: initializer element is not constant
8 | #definePMD_ORDER(PMD_SHIFT-PAGE_SHIFT)
Ummm. PowerPC doesn't have a compile-time constant PMD size?
arch/powerpc/include/asm/book3s/64/pgtable.h:#define PMD_SHIFT (PAGE_SHIFT + PTE_INDEX_SIZE) arch/powerpc/include/asm/book3s/64/pgtable.h:#define PTE_INDEX_SIZE __pte_index_size
That's really annoying. I'll try to work around it.
Hi Matthew,
Quoted 10 lines · On Tue, 22 Aug 2023 02:11:44 +0100 Matthew Wilcox <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
In file included from
include/trace/trace_events.h:27,from include/trace/define_trace.h:102, from fs/xfs/xfs_trace.h:4428, from fs/xfs/xfs_trace.c:45:
include/linux/pgtable.h:8:25: error: initializer element is not constant
8 | #definePMD_ORDER(PMD_SHIFT-PAGE_SHIFT)Ummm. PowerPC doesn't have a compile-time constant PMD size?
Yeah, you are not the first (or probably the last) to be caught by that.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 12 lines · Stephen Rothwell
Hi Matthew,
Quoted 9 lines · On Tue, 22 Aug 2023 02:11:44 +0100 Matthew Wilcox <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
In file included from
include/trace/trace_events.h:27,from include/trace/define_trace.h:102, from fs/xfs/xfs_trace.h:4428, from fs/xfs/xfs_trace.c:45:
include/linux/pgtable.h:8:25: error: initializer element is not constant
8 | #definePMD_ORDER(PMD_SHIFT-PAGE_SHIFT)
Quoted 3 lines
Quoted 1 line
Ummm. PowerPC doesn't have a compile-time constant PMD size?
Yeah, you are not the first (or probably the last) to be caught by that.
I think this will do the trick. Any comments?
fs/xfs/xfs_trace.h +2 -14
@@ -796,15 +796,6 @@ DEFINE_INODE_EVENT(xfs_inode_reclaiming);DEFINE_INODE_EVENT (xfs_inode_set_need_inactive);DEFINE_INODE_EVENT (xfs_inode_inactivating); -/* -* ftrace's __print_symbolic requires that all enum values be wrapped in the -* TRACE_DEFINE_ENUM macro so that the enum value can be encoded in the ftrace -* ring buffer. Somehow this was only worth mentioning in the ftrace sample -* code. -*/ -TRACE_DEFINE_ENUM (PMD_ORDER ); -TRACE_DEFINE_ENUM (PUD_ORDER ); -TRACE_DEFINE_ENUM (XFS_REFC_DOMAIN_SHARED );TRACE_DEFINE_ENUM (XFS_REFC_DOMAIN_COW );
@@ -823,13 +814,10 @@ TRACE_EVENT(xfs_filemap_fault, __entry->order = order; __entry->write_fault = write_fault; ), -TP_printk ("dev %d:%d ino 0x%llx %s write_fault %d" , +TP_printk ("dev %d:%d ino 0x%llx order:%u write_fault %d" ,MAJOR (__entry->dev),MINOR (__entry->dev), __entry->ino, -__print_symbolic (__entry->order, - { 0, "PTE" }, - { PMD_ORDER, "PMD" }, - { PUD_ORDER, "PUD" }), + __entry->order, __entry->write_fault) )
Quoted 24 lines · Matthew Wilcox
Quoted 12 lines · Stephen Rothwell
Hi Matthew,
Quoted 9 lines · On Tue, 22 Aug 2023 02:11:44 +0100 Matthew Wilcox <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
In file included from
include/trace/trace_events.h:27,from include/trace/define_trace.h:102, from fs/xfs/xfs_trace.h:4428, from fs/xfs/xfs_trace.c:45:
include/linux/pgtable.h:8:25: error: initializer element is not constant
8 | #definePMD_ORDER(PMD_SHIFT-PAGE_SHIFT)Quoted 3 lines
Quoted 1 line
Ummm. PowerPC doesn't have a compile-time constant PMD size?
Yeah, you are not the first (or probably the last) to be caught by that.
I think this will do the trick. Any comments?
fs/xfs/xfs_trace.h +0
-0
fs/xfs/xfs_trace.h DEFINE_INODE_EVENT(xfs_inode_reclaiming); · line 804
Quoted 9 lines
fs/xfs/xfs_trace.h +0
-6@@ -796,15 +796,6 @@ DEFINE_INODE_EVENT(xfs_inode_reclaiming);DEFINE_INODE_EVENT (xfs_inode_set_need_inactive);DEFINE_INODE_EVENT (xfs_inode_inactivating); -/* -* ftrace's __print_symbolic requires that all enum values be wrapped in the -* TRACE_DEFINE_ENUM macro so that the enum value can be encoded in the ftrace -* ring buffer. Somehow this was only worth mentioning in the ftrace sample -* code. -*/
Please leave this ^^^ comment, because the need for TRACE_DEFINE_ENUM to make enums work in tracepoints is not at all obvious.
fs/xfs/xfs_trace.h TRACE_EVENT(xfs_filemap_fault, · line 817
Quoted 12 lines
fs/xfs/xfs_trace.h +1
-4-TRACE_DEFINE_ENUM (PMD_ORDER ); -TRACE_DEFINE_ENUM (PUD_ORDER ); -TRACE_DEFINE_ENUM (XFS_REFC_DOMAIN_SHARED );TRACE_DEFINE_ENUM (XFS_REFC_DOMAIN_COW );@@ -823,13 +814,10 @@ TRACE_EVENT(xfs_filemap_fault, __entry->order = order; __entry->write_fault = write_fault; ), - TP_printk("dev %d:%d ino 0x%llx %s write_fault %d", + TP_printk("dev %d:%d ino 0x%llx order:%u write_fault %d",
"order %u" to match the (non dev_t) style of the rest of the xfs tracepoints.
--D
Quoted 12 lines
fs/xfs/xfs_trace.h +1
-4MAJOR (__entry->dev),MINOR (__entry->dev), __entry->ino, -__print_symbolic (__entry->order, - { 0, "PTE" }, - { PMD_ORDER, "PMD" }, - { PUD_ORDER, "PUD" }), + __entry->order, __entry->write_fault) )
Quoted 9 lines · Matthew Wilcox
Quoted 6 lines · Stephen Rothwell
In file included from
include/trace/trace_events.h:27,from include/trace/define_trace.h:102, from fs/xfs/xfs_trace.h:4428, from fs/xfs/xfs_trace.c:45:
include/linux/pgtable.h:8:25: error: initializer element is not constant
8 | #definePMD_ORDER(PMD_SHIFT-PAGE_SHIFT)Ummm. PowerPC doesn't have a compile-time constant PMD size?
Yeah. The joys of supporting two MMUs with different supported page sizes in a single kernel binary.
Quoted 4 lines
arch/powerpc/include/asm/book3s/64/pgtable.h:#define
PMD_SHIFT(PAGE_SHIFT+PTE_INDEX_SIZE) arch/powerpc/include/asm/book3s/64/pgtable.h:#definePTE_INDEX_SIZE__pte_index_sizeThat's really annoying. I'll try to work around it.
Sorry, thanks.
cheers
Quoted 5 lines · Darrick J. Wong
Please leave this ^^^ comment, because the need for
TRACE_DEFINE_ENUMto make enums work in tracepoints is not at all obvious."order %u" to match the (non
dev_t) style of the rest of the xfs tracepoints.
ACK, thanks.
Andrew, please add this -fix patch for "mm: Remove enum page_entry_size".
fs/xfs/xfs_trace.h +2 -8
@@ -802,9 +802,6 @@ DEFINE_INODE_EVENT(xfs_inode_inactivating);* ring buffer. Somehow this was only worth mentioning in the ftrace sample * code. */ -TRACE_DEFINE_ENUM (PMD_ORDER ); -TRACE_DEFINE_ENUM (PUD_ORDER ); -TRACE_DEFINE_ENUM (XFS_REFC_DOMAIN_SHARED );TRACE_DEFINE_ENUM (XFS_REFC_DOMAIN_COW );
@@ -823,13 +820,10 @@ TRACE_EVENT(xfs_filemap_fault, __entry->order = order; __entry->write_fault = write_fault; ), -TP_printk ("dev %d:%d ino 0x%llx %s write_fault %d" , +TP_printk ("dev %d:%d ino 0x%llx order %u write_fault %d" ,MAJOR (__entry->dev),MINOR (__entry->dev), __entry->ino, -__print_symbolic (__entry->order, - { 0, "PTE" }, - { PMD_ORDER, "PMD" }, - { PUD_ORDER, "PUD" }), + __entry->order, __entry->write_fault) )