Skip to contentSkip to conversation

linux-next: build failure after merge of the tip tree

DISCUSSION Stephen Rothwell 3 participants 7 messages Apr 15, 2025 – Apr 28, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (native perf) failed like this:

diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory
In file included from util/amd-sample-raw.c:12:
tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory
10 | #include <asm/msr-index.h>

      |          ^~~~~~~~~~~~~~~~~

compilation terminated.

Maybe caused by commit

3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")
or associated commits?

This a native ppc build of perf.

I have used the tip tree from next-20250414 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 11 lines · On Tue, 15 Apr 2025 13:35:18 +1000 Stephen Rothwell <[email protected]>…

After merging the tip tree, today's linux-next build (native perf) failed like this:

diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory
In file included from util/amd-sample-raw.c:12:
tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory
10 | #include <asm/msr-index.h>

      |          ^~~~~~~~~~~~~~~~~

compilation terminated.

Quoted 8 lines

Maybe caused by commit

3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")
or associated commits?

This a native ppc build of perf.

I have used the tip tree from next-20250414 for today.

I am still getting is failure.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw

Hi all,

Quoted 15 lines · On Thu, 17 Apr 2025 13:49:59 +1000 Stephen Rothwell <[email protected]>…
Quoted 13 lines · On Tue, 15 Apr 2025 13:35:18 +1000 Stephen Rothwell <[email protected]>…

After merging the tip tree, today's linux-next build (native perf) failed like this:

diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory
In file included from util/amd-sample-raw.c:12:
tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory
10 | #include <asm/msr-index.h>

      |          ^~~~~~~~~~~~~~~~~

compilation terminated.

Maybe caused by commit

Quoted 8 lines
Quoted 6 lines

3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")
or associated commits?

This a native ppc build of perf.

I have used the tip tree from next-20250414 for today.

I am still getting is failure.

Anything happening with this?

This is a ppc64el build of perf on a ppc64el host.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 2 lines · Stephen Rothwell

Hi all,

Hi Ingo, Stephen.

Quoted 14 lines · On Thu, 17 Apr 2025 13:49:59 +1000 Stephen Rothwell <[email protected]>…
Quoted 13 lines · On Tue, 15 Apr 2025 13:35:18 +1000 Stephen Rothwell <[email protected]>…
Quoted 11 lines

After merging the tip tree, today's linux-next build (native perf) failed like this:

diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory
In file included from util/amd-sample-raw.c:12:
tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory

    10 | #include <asm/msr-index.h>
       |          ^~~~~~~~~~~~~~~~~

compilation terminated.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Maybe caused by commit

   3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")

or associated commits?

Even i am running into this error when building tools/perf on ppc64le. perf build works in 6.15-rc3, but failed with tip/master.

Did git bisect
good: [9c32cda43eb78f78c73aee4aa344b777714e259b] Linux 6.15-rc3
bad: [1a11b5b80f46e4dff0b21cb07efab43dee049d61] Merge branch into tip master: 'x86/sev'
...

# first bad commit: [3846389c03a8518884f09056611619bd1461ffc7] x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>

It isn't able to find the file after rename. I did the below hack so that ibs.h finds the msr-index.h Likely there is better way. for me, this helps to build tools/perf.

---

arch/x86/include/asm/amd/ibs.h +1 -1
index 3ee5903982c2..ac3a36fc08b1 100644
@@ -7,7 +7,7 @@
  * 55898 Rev 0.35 - Feb 5, 2021
  */
 
-#include <asm/msr-index.h>
+#include "../../asm/msr-index.h"
 
 /* IBS_OP_DATA2 DataSrc */
 #define IBS_DATA_SRC_LOC_CACHE                  2
#4 lore raw
Quoted 31 lines · Shrikanth Hegde
Quoted 1 line · Stephen Rothwell

Hi all,

Hi Ingo, Stephen.

Quoted 14 lines · On Thu, 17 Apr 2025 13:49:59 +1000 Stephen Rothwell <[email protected]>…
Quoted 13 lines · On Tue, 15 Apr 2025 13:35:18 +1000 Stephen Rothwell <[email protected]>…
Quoted 11 lines

After merging the tip tree, today's linux-next build (native perf) failed like this:

diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory
In file included from util/amd-sample-raw.c:12:
tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory
10 | #include <asm/msr-index.h>

      |          ^~~~~~~~~~~~~~~~~

compilation terminated.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Maybe caused by commit

3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")
or associated commits?

Quoted 8 lines

Even i am running into this error when building tools/perf on ppc64le. perf build works in 6.15-rc3, but failed with tip/master.

Did git bisect
good: [9c32cda43eb78f78c73aee4aa344b777714e259b] Linux 6.15-rc3
bad: [1a11b5b80f46e4dff0b21cb07efab43dee049d61] Merge branch into tip master: 'x86/sev'
...

# first bad commit: [3846389c03a8518884f09056611619bd1461ffc7] x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>

Before this commit, msr-index.h was present in tools/arch/x86/include/asm/msr-index.h amd-ibs.h was present in tools/arch/x86/include/asm/amd-ibs.h

From amd-ibs.h , it picks mss-index.h from :

# grep msr-index tools/arch/x86/include/asm/amd-ibs.h
#include "msr-index.h”

After the commit,
make initial logs shows missing “tools/arch/x86/include/asm/amd/ibs.h”

# make
  BUILD:   Doing 'make -j24' parallel build
diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory                                   
Warning: Kernel ABI header differences:
  diff -u tools/include/uapi/linux/bits.h include/uapi/linux/bits.h
  diff -u tools/include/linux/bits.h include/linux/bits.h
  diff -u tools/include/vdso/unaligned.h include/vdso/unaligned.h
  diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
  diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
  diff -u tools/arch/x86/include/asm/amd/ibs.h arch/x86/include/asm/amd/ibs.h
  diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h

Build failure here is:

In file included from util/amd-sample-raw.c:12:0:
/root/bug/tip/tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory

 #include <asm/msr-index.h>
          ^~~~~~~~~~~~~~~~~

compilation terminated.

To fix, this needs change to add tools/arch/x86/include/asm/amd/ibs.h and also update the msr-index.h like below:

tools/arch/x86/include/asm/amd/ibs.h +1 -0
index 3ee5903982c2..bcca5dcb9148 100644
@@ -7,7 +7,7 @@
  * 55898 Rev 0.35 - Feb 5, 2021
  */
  -#include <asm/msr-index.h>
+#include <../msr-index.h>
   /* IBS_OP_DATA2 DataSrc */
 #define IBS_DATA_SRC_LOC_CACHE                  2
 

Similar change was done for tools/arch/x86/include/asm/amd-ibs.h as well. Reference commit below:

commit dde994dd54fbf84f8fd14230de3477d552e42470

Author: Kim Phillips <[email protected]>
Date:   Tue Aug 17 17:15:08 2021 -0500

perf report: Add tools/arch/x86/include/asm/amd-ibs.h
This is a tools/-side patch for the patch that adds the original copy
of the IBS header file, in arch/x86/include/asm/.
We also add an entry to check-headers.sh, so future changes continue
to be copied.
Committer notes:
Had to add this
-#include <asm/msr-index.h>
+#include "msr-index.h"
And change the check-headers.sh entry to ignore this line when diffing
with the original kernel header.

Shirkanth, Stephen, Venkat

I will be sending a separate fix patch for this.

Thanks
Athira

Quoted 18 lines

It isn't able to find the file after rename. I did the below hack so that ibs.h finds the msr-index.h Likely there is better way. for me, this helps to build tools/perf.

---

arch/x86/include/asm/amd/ibs.h +1 -1
index 3ee5903982c2..ac3a36fc08b1 100644
@@ -7,7 +7,7 @@
 * 55898 Rev 0.35 - Feb 5, 2021
 */
-#include <asm/msr-index.h>
+#include "../../asm/msr-index.h"
 /* IBS_OP_DATA2 DataSrc */
 #define IBS_DATA_SRC_LOC_CACHE                  2
#5 lore raw
Quoted 67 lines · Athira Rajeev
Quoted 32 lines · Shrikanth Hegde
Quoted 1 line · Stephen Rothwell

Hi all,

Hi Ingo, Stephen.

Quoted 14 lines · On Thu, 17 Apr 2025 13:49:59 +1000 Stephen Rothwell <[email protected]>…
Quoted 13 lines · On Tue, 15 Apr 2025 13:35:18 +1000 Stephen Rothwell <[email protected]>…
Quoted 11 lines

After merging the tip tree, today's linux-next build (native perf) failed like this:

diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory
In file included from util/amd-sample-raw.c:12:
tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory
10 | #include <asm/msr-index.h>

     |          ^~~~~~~~~~~~~~~~~

compilation terminated.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Maybe caused by commit

3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")
or associated commits?

Quoted 8 lines

Even i am running into this error when building tools/perf on ppc64le. perf build works in 6.15-rc3, but failed with tip/master.

Did git bisect
good: [9c32cda43eb78f78c73aee4aa344b777714e259b] Linux 6.15-rc3
bad: [1a11b5b80f46e4dff0b21cb07efab43dee049d61] Merge branch into tip master: 'x86/sev'
...

# first bad commit: [3846389c03a8518884f09056611619bd1461ffc7] x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>

Before this commit, msr-index.h was present in tools/arch/x86/include/asm/msr-index.h amd-ibs.h was present in tools/arch/x86/include/asm/amd-ibs.h

From amd-ibs.h , it picks mss-index.h from :

# grep msr-index tools/arch/x86/include/asm/amd-ibs.h
#include "msr-index.h”

After the commit,
make initial logs shows missing “tools/arch/x86/include/asm/amd/ibs.h”

# make
 BUILD:   Doing 'make -j24' parallel build
diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory                                   
Warning: Kernel ABI header differences:
 diff -u tools/include/uapi/linux/bits.h include/uapi/linux/bits.h
 diff -u tools/include/linux/bits.h include/linux/bits.h
 diff -u tools/include/vdso/unaligned.h include/vdso/unaligned.h
 diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
 diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
 diff -u tools/arch/x86/include/asm/amd/ibs.h arch/x86/include/asm/amd/ibs.h
 diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
Quoted 7 lines

Build failure here is:

In file included from util/amd-sample-raw.c:12:0:
/root/bug/tip/tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory

#include <asm/msr-index.h>
         ^~~~~~~~~~~~~~~~~

compilation terminated.

Hi,

Posted the fix in mailing here: https://lore.kernel.org/linux-perf-users/[email protected]/T/#u
Please share feedback if it fixes the compilation issue.

Thanks
Athira

Quoted 59 lines

To fix, this needs change to add tools/arch/x86/include/asm/amd/ibs.h and also update the msr-index.h like below:

tools/arch/x86/include/asm/amd/ibs.h +1 -0
index 3ee5903982c2..bcca5dcb9148 100644
@@ -7,7 +7,7 @@
 * 55898 Rev 0.35 - Feb 5, 2021
 */
 -#include <asm/msr-index.h>
+#include <../msr-index.h>
  /* IBS_OP_DATA2 DataSrc */
 #define IBS_DATA_SRC_LOC_CACHE                  2
 

Similar change was done for tools/arch/x86/include/asm/amd-ibs.h as well. Reference commit below:

commit dde994dd54fbf84f8fd14230de3477d552e42470

Author: Kim Phillips <[email protected]>
Date:   Tue Aug 17 17:15:08 2021 -0500

perf report: Add tools/arch/x86/include/asm/amd-ibs.h
This is a tools/-side patch for the patch that adds the original copy
of the IBS header file, in arch/x86/include/asm/.
We also add an entry to check-headers.sh, so future changes continue
to be copied.
Committer notes:
Had to add this
-#include <asm/msr-index.h>
+#include "msr-index.h"
And change the check-headers.sh entry to ignore this line when diffing
with the original kernel header.

Shirkanth, Stephen, Venkat

I will be sending a separate fix patch for this.

Thanks
Athira

Quoted 18 lines

It isn't able to find the file after rename. I did the below hack so that ibs.h finds the msr-index.h Likely there is better way. for me, this helps to build tools/perf.

---

arch/x86/include/asm/amd/ibs.h +1 -1
index 3ee5903982c2..ac3a36fc08b1 100644
@@ -7,7 +7,7 @@
 * 55898 Rev 0.35 - Feb 5, 2021
 */
-#include <asm/msr-index.h>
+#include "../../asm/msr-index.h"
 /* IBS_OP_DATA2 DataSrc */
 #define IBS_DATA_SRC_LOC_CACHE                  2
#6 lore raw

Hi all,

Quoted 21 lines · On Thu, 24 Apr 2025 22:03:05 +0530 Athira Rajeev <[email protected]> wrote:
Quoted 21 lines · Athira Rajeev
Quoted 19 lines · Shrikanth Hegde
Quoted 14 lines · Stephen Rothwell
Quoted 13 lines · On Thu, 17 Apr 2025 13:49:59 +1000 Stephen Rothwell <[email protected]>…
Quoted 11 lines · On Tue, 15 Apr 2025 13:35:18 +1000 Stephen Rothwell <[email protected]>…

After merging the tip tree, today's linux-next build (native perf) failed like this:

diff: tools/arch/x86/include/asm/amd/ibs.h: No such file or directory
In file included from util/amd-sample-raw.c:12:
tools/include/../../arch/x86/include/asm/amd/ibs.h:10:10: fatal error: asm/msr-index.h: No such file or directory
10 | #include <asm/msr-index.h>

     |          ^~~~~~~~~~~~~~~~~

compilation terminated.

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Maybe caused by commit

3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")
or associated commits?

Posted the fix in mailing here: https://lore.kernel.org/linux-perf-users/[email protected]/T/#u
Please share feedback if it fixes the compilation issue.

OK, so to progress things ...

Just reverting the changes to tools/perf in commit

3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")

Allows perf to build again on ppc64el (and gets rid of the warning), so is that a reasonable thing to do - and leave the tools perf update to the perf guys?

If so, can that partial revert be added to the tip tree, please?

Signature · 2 lines
Cheers,
Stephen Rothwell