Skip to contentSkip to conversation

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

PATCH Stephen Rothwell 2 participants 2 messages Mar 20, 2025

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

Hi all,

After merging the kvm-arm tree, today's linux-next build (arm64 defconfig) failed like this:

arch/arm64/kernel/cpu_errata.c: In function 'has_impdef_pmuv3':
arch/arm64/kernel/cpu_errata.c:279:38: error: passing argument 1 of 'is_midr_in_range_list' makes pointer from integer without a cast [-Wint-conversion]

  279 |         return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
      |                                      ^~~~~~~~~~~~~~~
      |                                      |
      |                                      u32 {aka unsigned int}
arch/arm64/kernel/cpu_errata.c:47:53: note: expected 'const struct midr_range *' but argument is of type 'u32' {aka 'unsigned int'}
   47 | bool is_midr_in_range_list(struct midr_range const *ranges)
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
arch/arm64/kernel/cpu_errata.c:279:16: error: too many arguments to function 'is_midr_in_range_list'
  279 |         return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
      |                ^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/cpu_errata.c:47:6: note: declared here
   47 | bool is_midr_in_range_list(struct midr_range const *ranges)
      |      ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

1f561ad4b8f5 ("Merge branch 'kvm-arm64/pv-cpuid' into new-next")

The merge missed fixing up this instance from commit

e1231aacb065 ("arm64: Enable IMP DEF PMUv3 traps on Apple M*")

I have applied the following patch for today (but this should go into the kvm-arm tree (perhaps squashed into the above merge).

From: Stephen Rothwell <[email protected]>
Date: Thu, 20 Mar 2025 20:24:04 +1100
Subject: [PATCH] fix up for "Merge branch 'kvm-arm64/pv-cpuid' into new-next"

interacting with "arm64: Enable IMP DEF PMUv3 traps on Apple M*"

---
 arch/arm64/kernel/cpu_errata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/cpu_errata.c +1 -1
index caac9e10a5bb..b55f5f705750 100644
@@ -276,7 +276,7 @@ static bool has_impdef_pmuv3(const struct arm64_cpu_capabilities *entry, int sco
 	if (pmuver != ID_AA64DFR0_EL1_PMUVer_IMP_DEF)
 		return false;
 
-	return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
+	return is_midr_in_range_list(impdef_pmuv3_cpus);
 }
 
 static void cpu_enable_impdef_pmuv3_traps(const struct arm64_cpu_capabilities *__unused)
Signature · 5 lines
2.45.2

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi,

Quoted 23 lines · Stephen Rothwell

Hi all,

After merging the kvm-arm tree, today's linux-next build (arm64 defconfig) failed like this:

arch/arm64/kernel/cpu_errata.c: In function 'has_impdef_pmuv3':
arch/arm64/kernel/cpu_errata.c:279:38: error: passing argument 1 of 'is_midr_in_range_list' makes pointer from integer without a cast [-Wint-conversion]

  279 |         return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
      |                                      ^~~~~~~~~~~~~~~
      |                                      |
      |                                      u32 {aka unsigned int}
arch/arm64/kernel/cpu_errata.c:47:53: note: expected 'const struct midr_range *' but argument is of type 'u32' {aka 'unsigned int'}
   47 | bool is_midr_in_range_list(struct midr_range const *ranges)
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
arch/arm64/kernel/cpu_errata.c:279:16: error: too many arguments to function 'is_midr_in_range_list'
  279 |         return is_midr_in_range_list(read_cpuid_id(), impdef_pmuv3_cpus);
      |                ^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/cpu_errata.c:47:6: note: declared here
   47 | bool is_midr_in_range_list(struct midr_range const *ranges)
      |      ^~~~~~~~~~~~~~~~~~~~~

Caused by commit

Quoted 8 lines

1f561ad4b8f5 ("Merge branch 'kvm-arm64/pv-cpuid' into new-next")

The merge missed fixing up this instance from commit

e1231aacb065 ("arm64: Enable IMP DEF PMUv3 traps on Apple M*")

I have applied the following patch for today (but this should go into the kvm-arm tree (perhaps squashed into the above merge).

Thanks Stephen for the fix. Looks like I forgot to push /next when I pushed out the tag, addressing now.

Thanks,
Oliver