diff options
| author | Alex Williamson <alex.williamson@hp.com> | 2005-03-25 00:58:00 -0500 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2005-05-03 16:33:18 -0400 |
| commit | bb0fc085457cf6a865b8232b0cefab3a7819df44 (patch) | |
| tree | deaa9e3b58d6e40cb2bdba61898bf8373dc02688 /arch/ia64/kernel/acpi.c | |
| parent | c0b12422e5e1d041026dd27074de17d2d7e32c4e (diff) | |
[IA64] use common pxm function
This patch simplifies a couple places where we search for _PXM
values in ACPI namespace. Thanks,
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/acpi.c')
| -rw-r--r-- | arch/ia64/kernel/acpi.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index a8e99c56a768..72dfd9e7de0f 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
| @@ -779,7 +779,7 @@ acpi_map_iosapic (acpi_handle handle, u32 depth, void *context, void **ret) | |||
| 779 | union acpi_object *obj; | 779 | union acpi_object *obj; |
| 780 | struct acpi_table_iosapic *iosapic; | 780 | struct acpi_table_iosapic *iosapic; |
| 781 | unsigned int gsi_base; | 781 | unsigned int gsi_base; |
| 782 | int node; | 782 | int pxm, node; |
| 783 | 783 | ||
| 784 | /* Only care about objects w/ a method that returns the MADT */ | 784 | /* Only care about objects w/ a method that returns the MADT */ |
| 785 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) | 785 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) |
| @@ -805,29 +805,16 @@ acpi_map_iosapic (acpi_handle handle, u32 depth, void *context, void **ret) | |||
| 805 | gsi_base = iosapic->global_irq_base; | 805 | gsi_base = iosapic->global_irq_base; |
| 806 | 806 | ||
| 807 | acpi_os_free(buffer.pointer); | 807 | acpi_os_free(buffer.pointer); |
| 808 | buffer.length = ACPI_ALLOCATE_BUFFER; | ||
| 809 | buffer.pointer = NULL; | ||
| 810 | 808 | ||
| 811 | /* | 809 | /* |
| 812 | * OK, it's an IOSAPIC MADT entry, look for a _PXM method to tell | 810 | * OK, it's an IOSAPIC MADT entry, look for a _PXM value to tell |
| 813 | * us which node to associate this with. | 811 | * us which node to associate this with. |
| 814 | */ | 812 | */ |
| 815 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_PXM", NULL, &buffer))) | 813 | pxm = acpi_get_pxm(handle); |
| 816 | return AE_OK; | 814 | if (pxm < 0) |
| 817 | |||
| 818 | if (!buffer.length || !buffer.pointer) | ||
| 819 | return AE_OK; | ||
| 820 | |||
| 821 | obj = buffer.pointer; | ||
| 822 | |||
| 823 | if (obj->type != ACPI_TYPE_INTEGER || | ||
| 824 | obj->integer.value >= MAX_PXM_DOMAINS) { | ||
| 825 | acpi_os_free(buffer.pointer); | ||
| 826 | return AE_OK; | 815 | return AE_OK; |
| 827 | } | ||
| 828 | 816 | ||
| 829 | node = pxm_to_nid_map[obj->integer.value]; | 817 | node = pxm_to_nid_map[pxm]; |
| 830 | acpi_os_free(buffer.pointer); | ||
| 831 | 818 | ||
| 832 | if (node >= MAX_NUMNODES || !node_online(node) || | 819 | if (node >= MAX_NUMNODES || !node_online(node) || |
| 833 | cpus_empty(node_to_cpumask(node))) | 820 | cpus_empty(node_to_cpumask(node))) |
