diff options
Diffstat (limited to 'arch/ia64/kernel/acpi.c')
| -rw-r--r-- | arch/ia64/kernel/acpi.c | 77 | 
1 files changed, 14 insertions, 63 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 5eb71d22c3d..615ef81def4 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -53,15 +53,10 @@  #include <asm/numa.h>  #include <asm/sal.h>  #include <asm/cyclone.h> -#include <asm/xen/hypervisor.h> - -#define BAD_MADT_ENTRY(entry, end) (                                        \ -		(!entry) || (unsigned long)entry + sizeof(*entry) > end ||  \ -		((struct acpi_subtable_header *)entry)->length < sizeof(*entry))  #define PREFIX			"ACPI: " -u32 acpi_rsdt_forced; +int acpi_lapic;  unsigned int acpi_cpei_override;  unsigned int acpi_cpei_phys_cpuid; @@ -120,8 +115,6 @@ acpi_get_sysname(void)  			return "uv";  		else  			return "sn2"; -	} else if (xen_pv_domain() && !strcmp(hdr->oem_id, "XEN")) { -		return "xen";  	}  #ifdef CONFIG_INTEL_IOMMU @@ -684,6 +677,8 @@ int __init early_acpi_boot_init(void)  	if (ret < 1)  		printk(KERN_ERR PREFIX  		       "Error parsing MADT - no LAPIC entries\n"); +	else +		acpi_lapic = 1;  #ifdef CONFIG_SMP  	if (available_cpus == 0) { @@ -807,14 +802,9 @@ int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)   *  ACPI based hotplug CPU support   */  #ifdef CONFIG_ACPI_HOTPLUG_CPU -static -int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) +static int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)  {  #ifdef CONFIG_ACPI_NUMA -	int pxm_id; -	int nid; - -	pxm_id = acpi_get_pxm(handle);  	/*  	 * We don't have cpu-only-node hotadd. But if the system equips  	 * SRAT table, pxm is already found and node is ready. @@ -822,11 +812,10 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)  	 * This code here is for the system which doesn't have full SRAT    	 * table for possible cpus.  	 */ -	nid = acpi_map_pxm_to_node(pxm_id);  	node_cpuid[cpu].phys_id = physid; -	node_cpuid[cpu].nid = nid; +	node_cpuid[cpu].nid = acpi_get_node(handle);  #endif -	return (0); +	return 0;  }  int additional_cpus __initdata = -1; @@ -882,40 +871,10 @@ __init void prefill_possible_map(void)  		set_cpu_possible(i, true);  } -static int _acpi_map_lsapic(acpi_handle handle, int *pcpu) +static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu)  { -	struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; -	union acpi_object *obj; -	struct acpi_madt_local_sapic *lsapic;  	cpumask_t tmp_map; -	int cpu, physid; - -	if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) -		return -EINVAL; - -	if (!buffer.length || !buffer.pointer) -		return -EINVAL; - -	obj = buffer.pointer; -	if (obj->type != ACPI_TYPE_BUFFER) -	{ -		kfree(buffer.pointer); -		return -EINVAL; -	} - -	lsapic = (struct acpi_madt_local_sapic *)obj->buffer.pointer; - -	if ((lsapic->header.type != ACPI_MADT_TYPE_LOCAL_SAPIC) || -	    (!(lsapic->lapic_flags & ACPI_MADT_ENABLED))) { -		kfree(buffer.pointer); -		return -EINVAL; -	} - -	physid = ((lsapic->id << 8) | (lsapic->eid)); - -	kfree(buffer.pointer); -	buffer.length = ACPI_ALLOCATE_BUFFER; -	buffer.pointer = NULL; +	int cpu;  	cpumask_complement(&tmp_map, cpu_present_mask);  	cpu = cpumask_first(&tmp_map); @@ -934,9 +893,9 @@ static int _acpi_map_lsapic(acpi_handle handle, int *pcpu)  }  /* wrapper to silence section mismatch warning */ -int __ref acpi_map_lsapic(acpi_handle handle, int *pcpu) +int __ref acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu)  { -	return _acpi_map_lsapic(handle, pcpu); +	return _acpi_map_lsapic(handle, physid, pcpu);  }  EXPORT_SYMBOL(acpi_map_lsapic); @@ -963,7 +922,7 @@ static acpi_status acpi_map_iosapic(acpi_handle handle, u32 depth,  	union acpi_object *obj;  	struct acpi_madt_io_sapic *iosapic;  	unsigned int gsi_base; -	int pxm, node; +	int node;  	/* Only care about objects w/ a method that returns the MADT */  	if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) @@ -990,17 +949,9 @@ static acpi_status acpi_map_iosapic(acpi_handle handle, u32 depth,  	kfree(buffer.pointer); -	/* -	 * OK, it's an IOSAPIC MADT entry, look for a _PXM value to tell -	 * us which node to associate this with. -	 */ -	pxm = acpi_get_pxm(handle); -	if (pxm < 0) -		return AE_OK; - -	node = pxm_to_node(pxm); - -	if (node >= MAX_NUMNODES || !node_online(node) || +	/* OK, it's an IOSAPIC MADT entry; associate it with a node */ +	node = acpi_get_node(handle); +	if (node == NUMA_NO_NODE || !node_online(node) ||  	    cpumask_empty(cpumask_of_node(node)))  		return AE_OK;  | 
