2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00

- Fix tegra194-cpufreq module build failure caused __cpu_logical_map

not exported.
 
 - Improve fixed_addresses comment regarding the fixmap buffer sizes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAl8vB4EACgkQa9axLQDI
 XvE34xAArDxskJ8/CtZXTVtePJBydqmzikF5Su7G4USvGVw8AYmLuKIyPd+HzlHD
 tC0GGGDn4VAm9zFAr3wU07heaVNENZajvw1s7esDtdVEw030gsrm4YwqfMM/e9HR
 RB6rg3YktC1KaYwoM7cz9HMjnlUeWzjSnb3jKgxhgcC5TXFWlYJNOPVT2atI8I9i
 JmxKfUH2h8mig97zChWGeWjkB2vWGeSe4qOj+EIAVazbN++b03HYi04A8vJcjZS3
 gRiG6AzCddHWNfidxlygSvevc6rmqybTjGxwTja2WKHuGNaVUDAFlg6LV+sseQPg
 JpxD52kQv0j/dgtJ6udfhSrKL4y6dYHETr+yLdWfjcPx3bkpIMoM9UfIDsbEigNo
 HBZe0Im5l7QUO0ZG7fgkgbVbJGvfQau2y3VQdD/9QI7IcW2C2xfcoNhcd+5FX2b3
 8LRRnk/XY38yaS/w/XvRyr6d6R9+K77UfEnXSCFwXS4HpR+IJzH1PwWtaPhTQ0+k
 aH3iikyymDPoOCt6GwewmirBasqqkrDABbUQxoHtYsL0yeFwXAw2TJXfjh1GMq+z
 38EU1BITJ3vVO6NeE8qOJ4H9pSYuo6Mp1z3XqAZ7RfgE/9jFDGmbo0oYzApdEvYB
 99rV/yDyTluZ2xOrkYiyCAmJAt44tpfTdjXS0/iMqfT5i/YOJWU=
 =2nNf
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Fix tegra194-cpufreq module build failure caused by __cpu_logical_map
   not being exported.

 - Improve fixed_addresses comment regarding the fixmap buffer sizes.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: Fix __cpu_logical_map undefined issue
  arm64/fixmap: make notes of fixed_addresses more precisely
This commit is contained in:
Linus Torvalds 2020-08-08 14:16:12 -07:00
commit 06a81c1c7d
4 changed files with 19 additions and 9 deletions

View File

@ -28,10 +28,9 @@
* compile time, but to set the physical address only * compile time, but to set the physical address only
* in the boot process. * in the boot process.
* *
* These 'compile-time allocated' memory buffers are * Each enum increment in these 'compile-time allocated'
* page-sized. Use set_fixmap(idx,phys) to associate * memory buffers is page-sized. Use set_fixmap(idx,phys)
* physical memory with fixmap indices. * to associate physical memory with a fixmap index.
*
*/ */
enum fixed_addresses { enum fixed_addresses {
FIX_HOLE, FIX_HOLE,

View File

@ -46,7 +46,12 @@ DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);
* Logical CPU mapping. * Logical CPU mapping.
*/ */
extern u64 __cpu_logical_map[NR_CPUS]; extern u64 __cpu_logical_map[NR_CPUS];
#define cpu_logical_map(cpu) __cpu_logical_map[cpu] extern u64 cpu_logical_map(int cpu);
static inline void set_cpu_logical_map(int cpu, u64 hwid)
{
__cpu_logical_map[cpu] = hwid;
}
struct seq_file; struct seq_file;

View File

@ -85,7 +85,7 @@ u64 __cacheline_aligned boot_args[4];
void __init smp_setup_processor_id(void) void __init smp_setup_processor_id(void)
{ {
u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK;
cpu_logical_map(0) = mpidr; set_cpu_logical_map(0, mpidr);
/* /*
* clear __my_cpu_offset on boot CPU to avoid hang caused by * clear __my_cpu_offset on boot CPU to avoid hang caused by
@ -276,6 +276,12 @@ arch_initcall(reserve_memblock_reserved_regions);
u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID }; u64 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = INVALID_HWID };
u64 cpu_logical_map(int cpu)
{
return __cpu_logical_map[cpu];
}
EXPORT_SYMBOL_GPL(cpu_logical_map);
void __init __no_sanitize_address setup_arch(char **cmdline_p) void __init __no_sanitize_address setup_arch(char **cmdline_p)
{ {
init_mm.start_code = (unsigned long) _text; init_mm.start_code = (unsigned long) _text;

View File

@ -566,7 +566,7 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
return; return;
/* map the logical cpu id to cpu MPIDR */ /* map the logical cpu id to cpu MPIDR */
cpu_logical_map(cpu_count) = hwid; set_cpu_logical_map(cpu_count, hwid);
cpu_madt_gicc[cpu_count] = *processor; cpu_madt_gicc[cpu_count] = *processor;
@ -680,7 +680,7 @@ static void __init of_parse_and_init_cpus(void)
goto next; goto next;
pr_debug("cpu logical map 0x%llx\n", hwid); pr_debug("cpu logical map 0x%llx\n", hwid);
cpu_logical_map(cpu_count) = hwid; set_cpu_logical_map(cpu_count, hwid);
early_map_cpu_to_node(cpu_count, of_node_to_nid(dn)); early_map_cpu_to_node(cpu_count, of_node_to_nid(dn));
next: next:
@ -721,7 +721,7 @@ void __init smp_init_cpus(void)
for (i = 1; i < nr_cpu_ids; i++) { for (i = 1; i < nr_cpu_ids; i++) {
if (cpu_logical_map(i) != INVALID_HWID) { if (cpu_logical_map(i) != INVALID_HWID) {
if (smp_cpu_setup(i)) if (smp_cpu_setup(i))
cpu_logical_map(i) = INVALID_HWID; set_cpu_logical_map(i, INVALID_HWID);
} }
} }
} }