Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 913
b: refs/heads/master
c: bb0fc08
h: refs/heads/master
i:
  911: fc9da48
v: v3
  • Loading branch information
Alex Williamson authored and Tony Luck committed May 3, 2005
1 parent 9cc26f2 commit 29678b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 49 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0b12422e5e1d041026dd27074de17d2d7e32c4e
refs/heads/master: bb0fc085457cf6a865b8232b0cefab3a7819df44
34 changes: 4 additions & 30 deletions trunk/arch/ia64/hp/common/sba_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1944,43 +1944,17 @@ sba_connect_bus(struct pci_bus *bus)
static void __init
sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle)
{
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
union acpi_object *obj;
acpi_handle phandle;
unsigned int node;
int pxm;

ioc->node = MAX_NUMNODES;

/*
* Check for a _PXM on this node first. We don't typically see
* one here, so we'll end up getting it from the parent.
*/
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_PXM", NULL, &buffer))) {
if (ACPI_FAILURE(acpi_get_parent(handle, &phandle)))
return;

/* Reset the acpi buffer */
buffer.length = ACPI_ALLOCATE_BUFFER;
buffer.pointer = NULL;

if (ACPI_FAILURE(acpi_evaluate_object(phandle, "_PXM", NULL,
&buffer)))
return;
}
pxm = acpi_get_pxm(handle);

if (!buffer.length || !buffer.pointer)
if (pxm < 0)
return;

obj = buffer.pointer;

if (obj->type != ACPI_TYPE_INTEGER ||
obj->integer.value >= MAX_PXM_DOMAINS) {
acpi_os_free(buffer.pointer);
return;
}

node = pxm_to_nid_map[obj->integer.value];
acpi_os_free(buffer.pointer);
node = pxm_to_nid_map[pxm];

if (node >= MAX_NUMNODES || !node_online(node))
return;
Expand Down
23 changes: 5 additions & 18 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ acpi_map_iosapic (acpi_handle handle, u32 depth, void *context, void **ret)
union acpi_object *obj;
struct acpi_table_iosapic *iosapic;
unsigned int gsi_base;
int node;
int pxm, node;

/* Only care about objects w/ a method that returns the MADT */
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer)))
Expand All @@ -805,29 +805,16 @@ acpi_map_iosapic (acpi_handle handle, u32 depth, void *context, void **ret)
gsi_base = iosapic->global_irq_base;

acpi_os_free(buffer.pointer);
buffer.length = ACPI_ALLOCATE_BUFFER;
buffer.pointer = NULL;

/*
* OK, it's an IOSAPIC MADT entry, look for a _PXM method to tell
* OK, it's an IOSAPIC MADT entry, look for a _PXM value to tell
* us which node to associate this with.
*/
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_PXM", NULL, &buffer)))
return AE_OK;

if (!buffer.length || !buffer.pointer)
return AE_OK;

obj = buffer.pointer;

if (obj->type != ACPI_TYPE_INTEGER ||
obj->integer.value >= MAX_PXM_DOMAINS) {
acpi_os_free(buffer.pointer);
pxm = acpi_get_pxm(handle);
if (pxm < 0)
return AE_OK;
}

node = pxm_to_nid_map[obj->integer.value];
acpi_os_free(buffer.pointer);
node = pxm_to_nid_map[pxm];

if (node >= MAX_NUMNODES || !node_online(node) ||
cpus_empty(node_to_cpumask(node)))
Expand Down

0 comments on commit 29678b9

Please sign in to comment.