summaryrefslogtreecommitdiffstats
path: root/drivers/pci/dmar.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2009-03-16 17:05:05 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2009-03-17 16:49:30 -0700
commitfa4b57cc045d6134b9862b2873f9c8ba9ed53ffe (patch)
tree7c31d15426e29d86314545be3cf9553ab91ef574 /drivers/pci/dmar.c
parent68a8ca593fac82e336a792226272455901fa83df (diff)
downloadop-kernel-dev-fa4b57cc045d6134b9862b2873f9c8ba9ed53ffe.zip
op-kernel-dev-fa4b57cc045d6134b9862b2873f9c8ba9ed53ffe.tar.gz
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index f180500..d313039 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -809,20 +809,20 @@ int dmar_enable_qi(struct intel_iommu *iommu)
if (iommu->qi)
return 0;
- iommu->qi = kmalloc(sizeof(*qi), GFP_KERNEL);
+ iommu->qi = kmalloc(sizeof(*qi), GFP_ATOMIC);
if (!iommu->qi)
return -ENOMEM;
qi = iommu->qi;
- qi->desc = (void *)(get_zeroed_page(GFP_KERNEL));
+ qi->desc = (void *)(get_zeroed_page(GFP_ATOMIC));
if (!qi->desc) {
kfree(qi);
iommu->qi = 0;
return -ENOMEM;
}
- qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_KERNEL);
+ qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC);
if (!qi->desc_status) {
free_page((unsigned long) qi->desc);
kfree(qi);
OpenPOWER on IntegriCloud