Skip to contentSkip to conversation

build failure of next-20220817 for amdgpu

DISCUSSION Sudip Mukherjee (Codethink) 4 participants 8 messages Aug 17, 2022 – Aug 19, 2022

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

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

I will be happy to test any patch or provide any extra log if needed.

--
Regards
Sudip

#1 lore raw
Quoted 10 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

Thanks. I don't see that symbol in the driver at all. Not sure where it is coming from.

Alex

Quoted 6 lines

I will be happy to test any patch or provide any extra log if needed.

--
Regards
Sudip

#2 lore raw
Quoted 8 lines · Alex Deucher
Quoted 6 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

Quoted 8 lines
Quoted 4 lines

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

Thanks. I don't see that symbol in the driver at all. Not sure where it is coming from.

It's powerpc only.

Sudip, is it non-CONFIG_SMP by any chance?

Quoted 8 lines
Quoted 8 lines

I will be happy to test any patch or provide any extra log if needed.

--
Regards
Sudip

Signature · 1 line
~Randy
#3 lore raw
Quoted 17 lines · Randy Dunlap
Quoted 13 lines · Alex Deucher
Quoted 10 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

Quoted 7 lines
Quoted 3 lines

Thanks. I don't see that symbol in the driver at all. Not sure where it is coming from.

It's powerpc only.

Sudip, is it non-CONFIG_SMP by any chance?

Ohhh.. really sorry for the incomplete report. I should not try to mail while travelling.

The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y.

Signature · 2 lines
Regards
Sudip
#4 lore raw
Quoted 22 lines · Sudip Mukherjee
Quoted 21 lines · Randy Dunlap
Quoted 16 lines · Alex Deucher
Quoted 10 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

Thanks. I don't see that symbol in the driver at all. Not sure where it is coming from.

Quoted 8 lines
Quoted 3 lines

It's powerpc only.

Sudip, is it non-CONFIG_SMP by any chance?

Ohhh.. really sorry for the incomplete report. I should not try to mail while travelling.

The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y.

OK, I see that also, but it doesn't make any sense (to me).

I did 'objdump' on the code file (amdgpu.o) and it's listed as undefined but there are no code references to it.

Signature · 1 line
~Randy
#5 lore raw

Re: build failure of next-20220817 for amdgpu due to 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core")

Quoted 33 lines · Randy Dunlap
Quoted 29 lines · Sudip Mukherjee
Quoted 17 lines · Randy Dunlap
Quoted 13 lines · Alex Deucher
Quoted 10 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

Quoted 7 lines
Quoted 3 lines

Thanks. I don't see that symbol in the driver at all. Not sure where it is coming from.

It's powerpc only.

Sudip, is it non-CONFIG_SMP by any chance?

Ohhh.. really sorry for the incomplete report. I should not try to mail while travelling.

Quoted 6 lines
Quoted 1 line

The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y.

OK, I see that also, but it doesn't make any sense (to me).

I did 'objdump' on the code file (amdgpu.o) and it's listed as undefined but there are no code references to it.

cpu_smt_mask() is called by drivers/gpu/drm/amd/amdkfd/kfd_device.c. and cpu_smt_mask() is an inline function in arch/powerpc/include/asm/smp.h which is doing "return per_cpu(cpu_smallcore_map, cpu);"

So, the offending commit is 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core").

Signature · 2 lines
Regards
Sudip
#6 lore raw

Re: build failure of next-20220817 for amdgpu due to 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core")

Hi--

Quoted 41 lines · Sudip Mukherjee
Quoted 33 lines · Randy Dunlap
Quoted 29 lines · Sudip Mukherjee
Quoted 17 lines · Randy Dunlap
Quoted 13 lines · Alex Deucher
Quoted 10 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

Quoted 7 lines
Quoted 3 lines

Thanks. I don't see that symbol in the driver at all. Not sure where it is coming from.

It's powerpc only.

Sudip, is it non-CONFIG_SMP by any chance?

Ohhh.. really sorry for the incomplete report. I should not try to mail while travelling.

Quoted 6 lines
Quoted 1 line

The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y.

OK, I see that also, but it doesn't make any sense (to me).

I did 'objdump' on the code file (amdgpu.o) and it's listed as undefined but there are no code references to it.

Quoted 7 lines

cpu_smt_mask() is called by drivers/gpu/drm/amd/amdkfd/kfd_device.c. and cpu_smt_mask() is an inline function in arch/powerpc/include/asm/smp.h which is doing "return per_cpu(cpu_smallcore_map, cpu);"

So, the offending commit is 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core").

Thanks for digging that up.

It just needs to have that symbol exported I think. This builds cleanly now.
I can submit it or one of the AMD gfx developers can do so.

---
 arch/powerpc/kernel/smp.c |    1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kernel/smp.c +1 -0
@@ -86,6 +86,7 @@ DEFINE_PER_CPU(cpumask_var_t, cpu_core_m
 static DEFINE_PER_CPU(cpumask_var_t, cpu_coregroup_map);
 
 EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
+EXPORT_PER_CPU_SYMBOL(cpu_smallcore_map);
 EXPORT_PER_CPU_SYMBOL(cpu_l2_cache_map);
 EXPORT_PER_CPU_SYMBOL(cpu_core_map);
 EXPORT_SYMBOL_GPL(has_big_cores);
Signature · 1 line
~Randy
#7 lore raw

Re: build failure of next-20220817 for amdgpu due to 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core")

Quoted 39 lines · Randy Dunlap

Hi--

Quoted 36 lines · Sudip Mukherjee
Quoted 22 lines · Randy Dunlap
Quoted 20 lines · Sudip Mukherjee
Quoted 19 lines · Randy Dunlap
Quoted 7 lines · Alex Deucher
Quoted 5 lines · Sudip Mukherjee (Codethink)

Hi All,

Not sure if it has been reported, build of next-20220817 fails with the error:

Quoted 7 lines
Quoted 4 lines

ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Trying to do a git bisect to find out the offending commit.

Thanks. I don't see that symbol in the driver at all. Not sure where it is coming from.

It's powerpc only.

Sudip, is it non-CONFIG_SMP by any chance?

Quoted 8 lines
Quoted 4 lines

Ohhh.. really sorry for the incomplete report. I should not try to mail while travelling.

The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y.

OK, I see that also, but it doesn't make any sense (to me).

I did 'objdump' on the code file (amdgpu.o) and it's listed as undefined but there are no code references to it.

cpu_smt_mask() is called by drivers/gpu/drm/amd/amdkfd/kfd_device.c. and cpu_smt_mask() is an inline function in arch/powerpc/include/asm/smp.h which is doing "return per_cpu(cpu_smallcore_map, cpu);"

Quoted 7 lines
Quoted 2 lines

So, the offending commit is 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core").

Thanks for digging that up.

It just needs to have that symbol exported I think. This builds cleanly now.
I can submit it or one of the AMD gfx developers can do so.

I'm not sure where I would need to submit this. And I'm not familiar with Powerpc code at all. I'm OK if you submit this wherever it needs to go.

Thanks,
  Felix

Quoted 18 lines

---
  arch/powerpc/kernel/smp.c |    1 +
  1 file changed, 1 insertion(+)
arch/powerpc/kernel/smp.c +1 -0
@@ -86,6 +86,7 @@ DEFINE_PER_CPU(cpumask_var_t, cpu_core_m
  static DEFINE_PER_CPU(cpumask_var_t, cpu_coregroup_map);
 
  EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
+EXPORT_PER_CPU_SYMBOL(cpu_smallcore_map);
  EXPORT_PER_CPU_SYMBOL(cpu_l2_cache_map);
  EXPORT_PER_CPU_SYMBOL(cpu_core_map);
  EXPORT_SYMBOL_GPL(has_big_cores);