diff options
| author | Song Liu <[email protected]> | 2022-02-10 18:49:39 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2022-02-10 18:59:32 -0800 |
| commit | 4cc0991abd3954609a6929234bbb8c0fe7a0298d (patch) | |
| tree | 9a9dff60aa882a4b9775f5922b939fafdc82c78d /tools/perf/scripts/python | |
| parent | a5a358abbc392c7ad7b12a23c99e8602460b5804 (diff) | |
bpf: Fix bpf_prog_pack build for ppc64_defconfig
bpf_prog_pack causes build error with powerpc ppc64_defconfig:
kernel/bpf/core.c:830:23: error: variably modified 'bitmap' at file scope
830 | unsigned long bitmap[BITS_TO_LONGS(BPF_PROG_CHUNK_COUNT)];
| ^~~~~~
This is because the marco expands as:
unsigned long bitmap[((((((1UL) << (16 + __pte_index_size)) / (1 << 6))) \
+ ((sizeof(long) * 8)) - 1) / ((sizeof(long) * 8)))];
where __pte_index_size is a global variable.
Fix it by turning bitmap into a 0-length array.
Fixes: 57631054fae6 ("bpf: Introduce bpf_prog_pack allocator")
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions