Commit 867c7cd4 authored by Linux Patches Robot's avatar Linux Patches Robot Committed by Tomasz Nowicki
Browse files

UPSTREAM: buildid: reduce header file dependencies for module



The vmlinux decompressor code intentionally has only a limited set of
included header files, but this started running into a build failure
because of the bitmap logic needing linux/errno.h:

In file included from include/linux/cpumask.h:12,
                 from include/linux/mm_types_task.h:14,
                 from include/linux/mm_types.h:5,
                 from include/linux/buildid.h:5,
                 from include/linux/module.h:14,
                 from arch/arm/boot/compressed/../../../../lib/lz4/lz4_decompress.c:39,
                 from arch/arm/boot/compressed/../../../../lib/decompress_unlz4.c:10,
                 from arch/arm/boot/compressed/decompress.c:60:
include/linux/bitmap.h: In function 'bitmap_allocate_region':
include/linux/bitmap.h:527:25: error: 'EBUSY' undeclared (first use in this function)
  527 |                 return -EBUSY;
      |                         ^~~~~
include/linux/bitmap.h:527:25: note: each undeclared identifier is reported only once for each function it appears in
include/linux/bitmap.h: In function 'bitmap_find_free_region':
include/linux/bitmap.h:554:17: error: 'ENOMEM' undeclared (first use in this function)
  554 |         return -ENOMEM;
      |                 ^~~~~~

This is easily avoided by changing linux/buildid.h to no longer depend on
linux/mm_types.h, a header that pulls in a huge number of indirect dependencies.

Fixes: b9c957f554442 ("bitmap: move bitmap_*_region() functions to bitmap.h")
Fixes: bd7525da ("bpf: Move stack_map_get_build_id into lib")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
(cherry picked from commit bdcb37a5)

BUG=b:336854404
TEST=build kernel 6.6 with USE=gcov

Signed-off-by: default avatarLinux Patches Robot <linux-patches-robot@chromeos-missing-patches.google.com.iam.gserviceaccount.com>
Change-Id: I06918ba7846bb5ad1cd4708f98c82a5e9f9129ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5909012


Reviewed-by: default avatarSean Paul <sean@poorly.run>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarMateusz Urbańczyk <urbanczyk@google.com>
parent fe84829e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment