Thread (28 messages) 28 messages, 5 authors, 2023-01-23
STALE1224d REVIEWED: 2 (2M)
Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH v2 10/10] iommu/s390: Use GFP_KERNEL in sleepable contexts

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2023-01-18 18:01:14
Also in: ath11k, dri-devel, kvm, linux-arm-kernel, linux-arm-msm, linux-iommu, linux-media, linux-rdma, linux-remoteproc, linux-s390, linux-tegra, linux-wireless, nouveau
Subsystem: iommu subsystem, s390 architecture, s390 iommu (pci), s390 pci subsystem, the rest · Maintainers: Joerg Roedel, Will Deacon, Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Niklas Schnelle, Matthew Rosato, Gerd Bayer, Linus Torvalds

These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC
was added mechanically in the prior patches.

Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
---
 arch/s390/pci/pci_dma.c    | 2 +-
 drivers/iommu/s390-iommu.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c
index 2f6d05d6da4f76..2d9b01d7ca4c5c 100644
--- a/arch/s390/pci/pci_dma.c
+++ b/arch/s390/pci/pci_dma.c
@@ -579,7 +579,7 @@ int zpci_dma_init_device(struct zpci_dev *zdev)
 
 	spin_lock_init(&zdev->iommu_bitmap_lock);
 
-	zdev->dma_table = dma_alloc_cpu_table(GFP_ATOMIC);
+	zdev->dma_table = dma_alloc_cpu_table(GFP_KERNEL);
 	if (!zdev->dma_table) {
 		rc = -ENOMEM;
 		goto out;
diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c
index 654ec4411fe36c..7dcfffed260e6b 100644
--- a/drivers/iommu/s390-iommu.c
+++ b/drivers/iommu/s390-iommu.c
@@ -52,7 +52,7 @@ static struct iommu_domain *s390_domain_alloc(unsigned domain_type)
 	if (!s390_domain)
 		return NULL;
 
-	s390_domain->dma_table = dma_alloc_cpu_table(GFP_ATOMIC);
+	s390_domain->dma_table = dma_alloc_cpu_table(GFP_KERNEL);
 	if (!s390_domain->dma_table) {
 		kfree(s390_domain);
 		return NULL;
-- 
2.39.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help