Commit efc7508c authored by Alex Chiang's avatar Alex Chiang Committed by Tony Luck

[IA64] Avoid overflowing ia64_cpu_to_sapicid in acpi_map_lsapic()

acpi_map_lsapic tries to stuff a long into ia64_cpu_to_sapicid[],
which can only hold ints, so let's fix that.

We need to update the signature of acpi_map_cpu2node() too.
Signed-off-by: default avatarAlex Chiang <achiang@hp.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 740a8de0
...@@ -774,7 +774,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) ...@@ -774,7 +774,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
*/ */
#ifdef CONFIG_ACPI_HOTPLUG_CPU #ifdef CONFIG_ACPI_HOTPLUG_CPU
static static
int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
{ {
#ifdef CONFIG_ACPI_NUMA #ifdef CONFIG_ACPI_NUMA
int pxm_id; int pxm_id;
...@@ -854,8 +854,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) ...@@ -854,8 +854,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
union acpi_object *obj; union acpi_object *obj;
struct acpi_madt_local_sapic *lsapic; struct acpi_madt_local_sapic *lsapic;
cpumask_t tmp_map; cpumask_t tmp_map;
long physid; int cpu, physid;
int cpu;
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer)))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment