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

From: Shrikanth Hegde <[email-masked]>
Date: Tue, 22 Apr 2025 15:26:39 +0530

On 4/22/25 12:05, Stephen Rothwell wrote:
> Hi all,

Hi Ingo, Stephen.

> On Thu, 17 Apr 2025 13:49:59 +1000 Stephen Rothwell <[email-masked]> wrote:
>>
>> On Tue, 15 Apr 2025 13:35:18 +1000 Stephen Rothwell <[email-masked]> wrote:
>>>
>>> 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?
>>>

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.

---

diff --git a/arch/x86/include/asm/amd/ibs.h b/arch/x86/include/asm/amd/ibs.h
index 3ee5903982c2..ac3a36fc08b1 100644
--- a/arch/x86/include/asm/amd/ibs.h
+++ b/arch/x86/include/asm/amd/ibs.h
@@ -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