fix arm64 build with lack of __cpu_logical_map exported
PATCH 1/1 fix arm64 build with lack of __cpu_logical_map exported
Currently Linus's tree fails with the following build error on arm64 makeallmodconfig:
ERROR: modpost: "__cpu_logical_map" [drivers/cpufreq/tegra194-cpufreq.ko] undefined!
Seems that kernel.ci also notices this for the past 2 days:
https://lore.kernel.org/r/[email protected] https://lore.kernel.org/r/[email protected]
Fix this up by just exporting the symbol. Don't know if it's the "right" fix, but it solves the build error for my machines.
arch/arm64/kernel/setup.c +1 -0
@@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regions(void)arch_initcall (reserve_memblock_reserved_regions);u64 __cpu_logical_map[NR_CPUS ] = { [0 ...NR_CPUS -1 ] =INVALID_HWID }; +EXPORT_SYMBOL_GPL (__cpu_logical_map); void __init __no_sanitize_address setup_arch(char **cmdline_p) {
Catalin Marinas
maintainerHi Greg,
arch/arm64/kernel/setup.c static int __init reserve_memblock_reserved_regions(void) · line 278
Quoted 9 lines · Greg Kroah-Hartman
arch/arm64/kernel/setup.c +1
-0@@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regions(void)arch_initcall (reserve_memblock_reserved_regions);u64 __cpu_logical_map[NR_CPUS ] = { [0 ...NR_CPUS -1 ] =INVALID_HWID }; +EXPORT_SYMBOL_GPL (__cpu_logical_map);
This was still under discussion, Sudeep preferring an alternative in the driver:
http://lkml.kernel.org/r/20200727172744.GD8003@bogus
http://lkml.kernel.org/r/20200724131059.GB6521@bogus
Sumit came with a new diff inline that fixes the driver instead of exporting the __cpu_logical_map.
https://lore.kernel.org/linux-arm-kernel/[email protected]/
Sumit, Sudeep, is the above diff sufficient and can it go upstream?
Thanks.
Signature · 1 line
Catalin
Quoted 16 lines · Catalin Marinas
Hi Greg,
arch/arm64/kernel/setup.c static int __init reserve_memblock_reserved_regions(void) · line 278
Quoted 9 lines · Greg Kroah-Hartman
arch/arm64/kernel/setup.c +1
-0@@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regions(void)arch_initcall (reserve_memblock_reserved_regions);u64 __cpu_logical_map[NR_CPUS ] = { [0 ...NR_CPUS -1 ] =INVALID_HWID }; +EXPORT_SYMBOL_GPL (__cpu_logical_map);This was still under discussion, Sudeep preferring an alternative in the driver:
Quoted 7 lines
http://lkml.kernel.org/r/20200727172744.GD8003@bogus
http://lkml.kernel.org/r/20200724131059.GB6521@bogusSumit came with a new diff inline that fixes the driver instead of exporting the
__cpu_logical_map.
Ok, but having a broken tree is not nice, how did this survive linux-next testing?
Quoted 1 line
Sumit, Sudeep, is the above diff sufficient and can it go upstream?
Note that MIPS already export this symbol, so perhaps the drivers that need it on that platform should also be fixed the same way?
thanks,
greg k-h
Catalin Marinas
maintainerQuoted 18 lines · Greg Kroah-Hartman
Quoted 17 lines · Catalin Marinas
arch/arm64/kernel/setup.c static int __init reserve_memblock_reserved_regions(void) · line 278
Quoted 9 lines · Greg Kroah-Hartman
arch/arm64/kernel/setup.c +1
-0@@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regions(void)arch_initcall (reserve_memblock_reserved_regions);u64 __cpu_logical_map[NR_CPUS ] = { [0 ...NR_CPUS -1 ] =INVALID_HWID }; +EXPORT_SYMBOL_GPL (__cpu_logical_map);This was still under discussion, Sudeep preferring an alternative in the driver:
http://lkml.kernel.org/r/20200727172744.GD8003@bogus
http://lkml.kernel.org/r/20200724131059.GB6521@bogus
Quoted 7 lines
Quoted 4 lines
Sumit came with a new diff inline that fixes the driver instead of exporting the
__cpu_logical_map.Ok, but having a broken tree is not nice, how did this survive linux-next testing?
I guess defconfig worked ok since tegra194-cpufreq is not a module so we didn't bother much. The fault was reported for allmodconfig but the discussion didn't conclude.
Quoted 4 lines
Quoted 1 line
Sumit, Sudeep, is the above diff sufficient and can it go upstream?
Note that MIPS already export this symbol, so perhaps the drivers that need it on that platform should also be fixed the same way?
I push Kefeng's patch to the arm64 for-next/core branch which exports cpu_logical_map() as a function. We can revert it later is the Tegra driver is fixed.
I'll send Linus a pull request in a bit, once I finish testing the branch.
Signature · 1 line
Catalin
Quoted 36 lines · Catalin Marinas
Quoted 18 lines · Greg Kroah-Hartman
Quoted 17 lines · Catalin Marinas
arch/arm64/kernel/setup.c static int __init reserve_memblock_reserved_regions(void) · line 278
Quoted 9 lines · Greg Kroah-Hartman
arch/arm64/kernel/setup.c +1
-0@@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regions(void)arch_initcall (reserve_memblock_reserved_regions);u64 __cpu_logical_map[NR_CPUS ] = { [0 ...NR_CPUS -1 ] =INVALID_HWID }; +EXPORT_SYMBOL_GPL (__cpu_logical_map);This was still under discussion, Sudeep preferring an alternative in the driver:
http://lkml.kernel.org/r/20200727172744.GD8003@bogus
http://lkml.kernel.org/r/20200724131059.GB6521@bogusQuoted 7 lines
Quoted 4 lines
Sumit came with a new diff inline that fixes the driver instead of exporting the
__cpu_logical_map.Ok, but having a broken tree is not nice, how did this survive linux-next testing?
I guess defconfig worked ok since tegra194-cpufreq is not a module so we didn't bother much. The fault was reported for allmodconfig but the discussion didn't conclude.
Quoted 4 lines
Quoted 1 line
Sumit, Sudeep, is the above diff sufficient and can it go upstream?
Note that MIPS already export this symbol, so perhaps the drivers that need it on that platform should also be fixed the same way?
Quoted 6 lines
I push Kefeng's patch to the arm64 for-next/core branch which exports
cpu_logical_map()as a function. We can revert it later is the Tegra driver is fixed.I'll send Linus a pull request in a bit, once I finish testing the branch.
Thanks, I see it's now in Linus's tree so all should be good.
Now to figure out the arm32 build mess...
greg k-h
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Catalin,
Quoted 19 lines · Catalin Marinas
Hi Greg,
arch/arm64/kernel/setup.c static int __init reserve_memblock_reserved_regions(void) · line 278
Quoted 9 lines · Greg Kroah-Hartman
arch/arm64/kernel/setup.c +1
-0@@ -275,6 +275,7 @@ static int __init reserve_memblock_reserved_regions(void)arch_initcall (reserve_memblock_reserved_regions);u64 __cpu_logical_map[NR_CPUS ] = { [0 ...NR_CPUS -1 ] =INVALID_HWID }; +EXPORT_SYMBOL_GPL (__cpu_logical_map);This was still under discussion, Sudeep preferring an alternative in the driver:
http://lkml.kernel.org/r/20200727172744.GD8003@bogus
http://lkml.kernel.org/r/20200724131059.GB6521@bogus
Quoted 7 lines
Sumit came with a new diff inline that fixes the driver instead of exporting the
__cpu_logical_map.https://lore.kernel.org/linux-arm-kernel/[email protected]/
Sumit, Sudeep, is the above diff sufficient and can it go upstream?
Yes I prefer the above in above thread. I will reply on that thread. Sorry for missing, been a week.
Signature · 2 lines
Regards, Sudeep