]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/book3e: get rid of #include <generated/compile.h>
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 4 Jun 2022 08:50:50 +0000 (17:50 +0900)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Jun 2022 00:23:33 +0000 (10:23 +1000)
commita027e01a394d62f78a61e48f69f3bab0c2530f7f
tree3f7e64c441dd4223241513ec2ff8a853c84157bb
parentaf6ed97ca3fac36e242eca460e5a7d0c7819b1b2
powerpc/book3e: get rid of #include <generated/compile.h>

You cannot include <generated/compile.h> here because it is generated
in init/Makefile but there is no guarantee that it happens before
arch/powerpc/mm/nohash/kaslr_booke.c is compiled for parallel builds.

The places where you can reliably include <generated/compile.h> are:

  - init/          (because init/Makefile can specify the dependency)
  - arch/*/boot/   (because it is compiled after vmlinux)

Commit a67bd23054c1 ("hexagon: get rid of #include <generated/compile.h>")
fixed the last breakage at that time, but powerpc re-added this.

<generated/compile.h> was unneeded because 'build_str' is almost the
same as 'linux_banner' defined in init/version.c

Let's copy the solution from MIPS.
(get_random_boot() in arch/mips/kernel/relocate.c)

Fixes: 8a5ee36df29a ("powerpc/fsl_booke/32: randomize the kernel image offset")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220604085050.4078927-1-masahiroy@kernel.org
arch/powerpc/mm/nohash/kaslr_booke.c