aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/hp
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2005-03-25 00:58:00 -0500
committerTony Luck <tony.luck@intel.com>2005-05-03 16:33:18 -0400
commitbb0fc085457cf6a865b8232b0cefab3a7819df44 (patch)
treedeaa9e3b58d6e40cb2bdba61898bf8373dc02688 /arch/ia64/hp
parentc0b12422e5e1d041026dd27074de17d2d7e32c4e (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/hp')
-rw-r--r--arch/ia64/hp/common/sba_iommu.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 6a8fcba7a853..b8db6e3e5e81 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -1944,43 +1944,17 @@ sba_connect_bus(struct pci_bus *bus)
1944static void __init 1944static void __init
1945sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle) 1945sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle)
1946{ 1946{
1947 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
1948 union acpi_object *obj;
1949 acpi_handle phandle;
1950 unsigned int node; 1947 unsigned int node;
1948 int pxm;
1951 1949
1952 ioc->node = MAX_NUMNODES; 1950 ioc->node = MAX_NUMNODES;
1953 1951
1954 /* 1952 pxm = acpi_get_pxm(handle);
1955 * Check for a _PXM on this node first. We don't typically see
1956 * one here, so we'll end up getting it from the parent.
1957 */
1958 if (ACPI_FAILURE(acpi_evaluate_object(handle, "_PXM", NULL, &buffer))) {
1959 if (ACPI_FAILURE(acpi_get_parent(handle, &phandle)))
1960 return;
1961
1962 /* Reset the acpi buffer */
1963 buffer.length = ACPI_ALLOCATE_BUFFER;
1964 buffer.pointer = NULL;
1965
1966 if (ACPI_FAILURE(acpi_evaluate_object(phandle, "_PXM", NULL,
1967 &buffer)))
1968 return;
1969 }
1970 1953
1971 if (!buffer.length || !buffer.pointer) 1954 if (pxm < 0)
1972 return; 1955 return;
1973 1956
1974 obj = buffer.pointer; 1957 node = pxm_to_nid_map[pxm];
1975
1976 if (obj->type != ACPI_TYPE_INTEGER ||
1977 obj->integer.value >= MAX_PXM_DOMAINS) {
1978 acpi_os_free(buffer.pointer);
1979 return;
1980 }
1981
1982 node = pxm_to_nid_map[obj->integer.value];
1983 acpi_os_free(buffer.pointer);
1984 1958
1985 if (node >= MAX_NUMNODES || !node_online(node)) 1959 if (node >= MAX_NUMNODES || !node_online(node))
1986 return; 1960 return;