diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2009-10-02 14:01:22 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-10-05 02:55:26 -0400 |
commit | 751cafe3aeceb9ff887c97237f6daaf596c9e547 (patch) | |
tree | 810ea3e51dd942afb850e3523b97d61f296dcff0 /drivers/pci/dmar.c | |
parent | ee34b32d8c2950f66038c8975747ef9aec855289 (diff) |
dmar: Allocate queued invalidation structure using numa locality info
Allocate queued invalidation descriptor structures using numa locality info.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r-- | drivers/pci/dmar.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 577956566a0b..63aa52973d4d 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -1040,6 +1040,7 @@ static void __dmar_enable_qi(struct intel_iommu *iommu) | |||
1040 | int dmar_enable_qi(struct intel_iommu *iommu) | 1040 | int dmar_enable_qi(struct intel_iommu *iommu) |
1041 | { | 1041 | { |
1042 | struct q_inval *qi; | 1042 | struct q_inval *qi; |
1043 | struct page *desc_page; | ||
1043 | 1044 | ||
1044 | if (!ecap_qis(iommu->ecap)) | 1045 | if (!ecap_qis(iommu->ecap)) |
1045 | return -ENOENT; | 1046 | return -ENOENT; |
@@ -1056,13 +1057,16 @@ int dmar_enable_qi(struct intel_iommu *iommu) | |||
1056 | 1057 | ||
1057 | qi = iommu->qi; | 1058 | qi = iommu->qi; |
1058 | 1059 | ||
1059 | qi->desc = (void *)(get_zeroed_page(GFP_ATOMIC)); | 1060 | |
1060 | if (!qi->desc) { | 1061 | desc_page = alloc_pages_node(iommu->node, GFP_ATOMIC | __GFP_ZERO, 0); |
1062 | if (!desc_page) { | ||
1061 | kfree(qi); | 1063 | kfree(qi); |
1062 | iommu->qi = 0; | 1064 | iommu->qi = 0; |
1063 | return -ENOMEM; | 1065 | return -ENOMEM; |
1064 | } | 1066 | } |
1065 | 1067 | ||
1068 | qi->desc = page_address(desc_page); | ||
1069 | |||
1066 | qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC); | 1070 | qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC); |
1067 | if (!qi->desc_status) { | 1071 | if (!qi->desc_status) { |
1068 | free_page((unsigned long) qi->desc); | 1072 | free_page((unsigned long) qi->desc); |