diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2009-03-16 20:05:05 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-03-17 19:49:30 -0400 |
commit | fa4b57cc045d6134b9862b2873f9c8ba9ed53ffe (patch) | |
tree | 7c31d15426e29d86314545be3cf9553ab91ef574 /drivers/pci/dmar.c | |
parent | 68a8ca593fac82e336a792226272455901fa83df (diff) |
x86, dmar: use atomic allocations for QI and Intr-remapping init
Impact: invalid use of GFP_KERNEL in interrupt context
Queued invalidation and interrupt-remapping will get initialized with
interrupts disabled (while enabling interrupt-remapping). So use
GFP_ATOMIC instead of GFP_KERNEL for memory alloacations.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r-- | drivers/pci/dmar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index f1805002e436..d313039e2fdf 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -809,20 +809,20 @@ int dmar_enable_qi(struct intel_iommu *iommu) | |||
809 | if (iommu->qi) | 809 | if (iommu->qi) |
810 | return 0; | 810 | return 0; |
811 | 811 | ||
812 | iommu->qi = kmalloc(sizeof(*qi), GFP_KERNEL); | 812 | iommu->qi = kmalloc(sizeof(*qi), GFP_ATOMIC); |
813 | if (!iommu->qi) | 813 | if (!iommu->qi) |
814 | return -ENOMEM; | 814 | return -ENOMEM; |
815 | 815 | ||
816 | qi = iommu->qi; | 816 | qi = iommu->qi; |
817 | 817 | ||
818 | qi->desc = (void *)(get_zeroed_page(GFP_KERNEL)); | 818 | qi->desc = (void *)(get_zeroed_page(GFP_ATOMIC)); |
819 | if (!qi->desc) { | 819 | if (!qi->desc) { |
820 | kfree(qi); | 820 | kfree(qi); |
821 | iommu->qi = 0; | 821 | iommu->qi = 0; |
822 | return -ENOMEM; | 822 | return -ENOMEM; |
823 | } | 823 | } |
824 | 824 | ||
825 | qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_KERNEL); | 825 | qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC); |
826 | if (!qi->desc_status) { | 826 | if (!qi->desc_status) { |
827 | free_page((unsigned long) qi->desc); | 827 | free_page((unsigned long) qi->desc); |
828 | kfree(qi); | 828 | kfree(qi); |