aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/dmar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r--drivers/pci/dmar.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index 22b02c6df854..577956566a0b 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -348,6 +348,26 @@ found:
348} 348}
349#endif 349#endif
350 350
351static int __init
352dmar_parse_one_rhsa(struct acpi_dmar_header *header)
353{
354 struct acpi_dmar_rhsa *rhsa;
355 struct dmar_drhd_unit *drhd;
356
357 rhsa = (struct acpi_dmar_rhsa *)header;
358 for_each_drhd_unit(drhd)
359 if (drhd->reg_base_addr == rhsa->base_address) {
360 int node = acpi_map_pxm_to_node(rhsa->proximity_domain);
361
362 if (!node_online(node))
363 node = -1;
364 drhd->iommu->node = node;
365 return 0;
366 }
367
368 return -ENODEV;
369}
370
351static void __init 371static void __init
352dmar_table_print_dmar_entry(struct acpi_dmar_header *header) 372dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
353{ 373{
@@ -467,7 +487,7 @@ parse_dmar_table(void)
467#endif 487#endif
468 break; 488 break;
469 case ACPI_DMAR_HARDWARE_AFFINITY: 489 case ACPI_DMAR_HARDWARE_AFFINITY:
470 /* We don't do anything with RHSA (yet?) */ 490 ret = dmar_parse_one_rhsa(entry_header);
471 break; 491 break;
472 default: 492 default:
473 printk(KERN_WARNING PREFIX 493 printk(KERN_WARNING PREFIX
@@ -677,6 +697,8 @@ int alloc_iommu(struct dmar_drhd_unit *drhd)
677 iommu->agaw = agaw; 697 iommu->agaw = agaw;
678 iommu->msagaw = msagaw; 698 iommu->msagaw = msagaw;
679 699
700 iommu->node = -1;
701
680 /* the registers might be more than one page */ 702 /* the registers might be more than one page */
681 map_size = max_t(int, ecap_max_iotlb_offset(iommu->ecap), 703 map_size = max_t(int, ecap_max_iotlb_offset(iommu->ecap),
682 cap_max_fault_reg_offset(iommu->cap)); 704 cap_max_fault_reg_offset(iommu->cap));