Re: linux-next: build failure after merge of the arm-perf tree

From: Will Deacon
Date: Wed Dec 13 2023 - 05:56:36 EST


On Wed, Dec 13, 2023 at 10:15:25AM +0000, James Clark wrote:
> On 13/12/2023 09:30, Will Deacon wrote:
> > On Wed, Dec 13, 2023 at 10:09:31AM +1100, Stephen Rothwell wrote:
> >> After merging the arm-perf tree, today's linux-next build (x86_64
> >> allmodconfig) failed like this:
> >>
> >> In file included from drivers/perf/arm_dmc620_pmu.c:26:
> >> include/linux/perf/arm_pmu.h:15:10: fatal error: asm/cputype.h: No such file or directory
> >> 15 | #include <asm/cputype.h>
> >> | ^~~~~~~~~~~~~~~
> >
> > Damn, I tested with allnoconfig, defconfig and allmodconfig before I pushed,
> > but only for ARCH=arm64. Thanks for reporting this.
> >
> >> I can't easily tell what caused this - possibly commit
> >>
> >> a5f4ca68f348 ("perf/arm_dmc620: Remove duplicate format attribute #defines")
> >>
> >> I have used the arm-perf and arm64 trees from next-20231212 for today
> >> (since the arm64 tree merged the arm-perf tree).
> >
> > That looks likely. I'll try reverting it and see if it resolves the problem
> > locally.
> >
>
> Oops sorry about that, I didn't expect that change to break the x86
> build so I didn't test it there, but it's because of CONFIG_COMPILE_TEST.

No problem, these things happen!

> a5f4ca68f348 is the offending commit, and reverting it would fix it (it
> was just a tidyup). But this change below also works. That include was
> to build ARM_PMU_PROBE which is only used in perf_event_v6.c (and v7)
> which both already include asm/cputype.h. Although maybe that would be a
> bit of a hack.
>
> diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h
> index 337f01674b38..a4876b1c481a 100644
> --- a/include/linux/perf/arm_pmu.h
> +++ b/include/linux/perf/arm_pmu.h
> @@ -12,7 +12,6 @@
> #include <linux/perf_event.h>
> #include <linux/platform_device.h>
> #include <linux/sysfs.h>
> -#include <asm/cputype.h>
>
> #ifdef CONFIG_ARM_PMU

I agree that this feels like a bit of a bodge, so I'll revert for now and
maybe we can revisit things later.

Cheers,

Will