提交 d02dc27d 编写于 作者: H Hanjun Guo 提交者: Rafael J. Wysocki

ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()

acpi_map_lsapic() will allocate a logical CPU number and map it to
physical CPU id (such as APIC id) for the hot-added CPU, it will also
do some mapping for NUMA node id and etc, acpi_unmap_lsapic() will
do the reverse.

We can see that the name of the function is a little bit confusing and
arch (IA64) dependent so rename them as acpi_(un)map_cpu() to make arch
agnostic and explicit.
Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 af8f3f51
...@@ -893,13 +893,13 @@ static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) ...@@ -893,13 +893,13 @@ static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu)
} }
/* wrapper to silence section mismatch warning */ /* wrapper to silence section mismatch warning */
int __ref acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) int __ref acpi_map_cpu(acpi_handle handle, int physid, int *pcpu)
{ {
return _acpi_map_lsapic(handle, physid, pcpu); return _acpi_map_lsapic(handle, physid, pcpu);
} }
EXPORT_SYMBOL(acpi_map_lsapic); EXPORT_SYMBOL(acpi_map_cpu);
int acpi_unmap_lsapic(int cpu) int acpi_unmap_cpu(int cpu)
{ {
ia64_cpu_to_sapicid[cpu] = -1; ia64_cpu_to_sapicid[cpu] = -1;
set_cpu_present(cpu, false); set_cpu_present(cpu, false);
...@@ -910,8 +910,7 @@ int acpi_unmap_lsapic(int cpu) ...@@ -910,8 +910,7 @@ int acpi_unmap_lsapic(int cpu)
return (0); return (0);
} }
EXPORT_SYMBOL(acpi_unmap_cpu);
EXPORT_SYMBOL(acpi_unmap_lsapic);
#endif /* CONFIG_ACPI_HOTPLUG_CPU */ #endif /* CONFIG_ACPI_HOTPLUG_CPU */
#ifdef CONFIG_ACPI_NUMA #ifdef CONFIG_ACPI_NUMA
......
...@@ -750,13 +750,13 @@ static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) ...@@ -750,13 +750,13 @@ static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu)
} }
/* wrapper to silence section mismatch warning */ /* wrapper to silence section mismatch warning */
int __ref acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu) int __ref acpi_map_cpu(acpi_handle handle, int physid, int *pcpu)
{ {
return _acpi_map_lsapic(handle, physid, pcpu); return _acpi_map_lsapic(handle, physid, pcpu);
} }
EXPORT_SYMBOL(acpi_map_lsapic); EXPORT_SYMBOL(acpi_map_cpu);
int acpi_unmap_lsapic(int cpu) int acpi_unmap_cpu(int cpu)
{ {
#ifdef CONFIG_ACPI_NUMA #ifdef CONFIG_ACPI_NUMA
set_apicid_to_node(per_cpu(x86_cpu_to_apicid, cpu), NUMA_NO_NODE); set_apicid_to_node(per_cpu(x86_cpu_to_apicid, cpu), NUMA_NO_NODE);
...@@ -768,8 +768,7 @@ int acpi_unmap_lsapic(int cpu) ...@@ -768,8 +768,7 @@ int acpi_unmap_lsapic(int cpu)
return (0); return (0);
} }
EXPORT_SYMBOL(acpi_unmap_cpu);
EXPORT_SYMBOL(acpi_unmap_lsapic);
#endif /* CONFIG_ACPI_HOTPLUG_CPU */ #endif /* CONFIG_ACPI_HOTPLUG_CPU */
int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
......
...@@ -180,13 +180,13 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr) ...@@ -180,13 +180,13 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr)
cpu_maps_update_begin(); cpu_maps_update_begin();
cpu_hotplug_begin(); cpu_hotplug_begin();
ret = acpi_map_lsapic(pr->handle, pr->phys_id, &pr->id); ret = acpi_map_cpu(pr->handle, pr->phys_id, &pr->id);
if (ret) if (ret)
goto out; goto out;
ret = arch_register_cpu(pr->id); ret = arch_register_cpu(pr->id);
if (ret) { if (ret) {
acpi_unmap_lsapic(pr->id); acpi_unmap_cpu(pr->id);
goto out; goto out;
} }
...@@ -461,7 +461,7 @@ static void acpi_processor_remove(struct acpi_device *device) ...@@ -461,7 +461,7 @@ static void acpi_processor_remove(struct acpi_device *device)
/* Remove the CPU. */ /* Remove the CPU. */
arch_unregister_cpu(pr->id); arch_unregister_cpu(pr->id);
acpi_unmap_lsapic(pr->id); acpi_unmap_cpu(pr->id);
cpu_hotplug_done(); cpu_hotplug_done();
cpu_maps_update_done(); cpu_maps_update_done();
......
...@@ -147,8 +147,8 @@ void acpi_numa_arch_fixup(void); ...@@ -147,8 +147,8 @@ void acpi_numa_arch_fixup(void);
#ifdef CONFIG_ACPI_HOTPLUG_CPU #ifdef CONFIG_ACPI_HOTPLUG_CPU
/* Arch dependent functions for cpu hotplug support */ /* Arch dependent functions for cpu hotplug support */
int acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu); int acpi_map_cpu(acpi_handle handle, int physid, int *pcpu);
int acpi_unmap_lsapic(int cpu); int acpi_unmap_cpu(int cpu);
#endif /* CONFIG_ACPI_HOTPLUG_CPU */ #endif /* CONFIG_ACPI_HOTPLUG_CPU */
int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册