Skip to contentSkip to conversation

iommu/vt-d: Unify format of the printed messages

PATCH In review Andy Shevchenko 3 participants 5 messages May 7, 2020 – May 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 iommu/vt-d: Unify format of the printed messages

Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...).

---
 drivers/iommu/intel-iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iommu/intel-iommu.c +1 -2
index 0182cff2c7ac7..624831e5a583c 100644
@@ -480,8 +480,7 @@ static int __init intel_iommu_setup(char *str)
 			pr_info("Intel-IOMMU: scalable mode supported\n");
 			intel_iommu_sm = 1;
 		} else if (!strncmp(str, "tboot_noforce", 13)) {
-			printk(KERN_INFO
-				"Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
+			pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
 			intel_iommu_tboot_noforce = 1;
 		} else if (!strncmp(str, "nobounce", 8)) {
 			pr_info("Intel-IOMMU: No bounce buffer. This could expose security risks of DMA attacks\n");
Signature · 6 lines
2.26.2

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
#1 lore raw

PATCH 2/3 iommu/iova: Unify format of the printed messages

Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...).

---
 drivers/iommu/iova.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iommu/iova.c +3 -3
index 0e6a9536eca62..49fc01f2a28d4 100644
@@ -253,7 +253,7 @@ int iova_cache_get(void)
 			SLAB_HWCACHE_ALIGN, NULL);
 		if (!iova_cache) {
 			mutex_unlock(&iova_cache_mutex);
-			printk(KERN_ERR "Couldn't create iova cache\n");
+			pr_err("Couldn't create iova cache\n");
 			return -ENOMEM;
 		}
 	}
@@ -718,8 +718,8 @@ copy_reserved_iova(struct iova_domain *from, struct iova_domain *to)
 
 		new_iova = reserve_iova(to, iova->pfn_lo, iova->pfn_hi);
 		if (!new_iova)
-			printk(KERN_ERR "Reserve iova range %lx@%lx failed\n",
-				iova->pfn_lo, iova->pfn_lo);
+			pr_err("Reserve iova range %lx@%lx failed\n",
+			       iova->pfn_lo, iova->pfn_lo);
 	}
 	spin_unlock_irqrestore(&from->iova_rbtree_lock, flags);
 }
Signature · 6 lines
2.26.2

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
#2 lore raw

PATCH 3/3 iommu/amd: Unify format of the printed messages

In reply to Andy Shevchenko

Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...).

---
 drivers/iommu/amd_iommu_types.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iommu/amd_iommu_types.h +4 -4
index ca8c4522045b3..cf829ebe37cb5 100644
@@ -395,10 +395,10 @@
 #define PD_IOMMUV2_MASK		(1UL << 3) /* domain has gcr3 table */
 
 extern bool amd_iommu_dump;
-#define DUMP_printk(format, arg...)					\
-	do {								\
-		if (amd_iommu_dump)						\
-			printk(KERN_INFO "AMD-Vi: " format, ## arg);	\
+#define DUMP_printk(format, arg...)				\
+	do {							\
+		if (amd_iommu_dump)				\
+			pr_info("AMD-Vi: " format, ## arg);	\
 	} while(0);
 
 /* global flag if IOMMUs cache non-present entries */
Signature · 6 lines
2.26.2

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Reviewed-by on v1 1/3
#3 lore raw
In reply to Andy Shevchenko
Quoted 2 lines · Andy Shevchenko

Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...).

Thanks!

Quoted 12 lines
---
  drivers/iommu/intel-iommu.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iommu/intel-iommu.c +0 -0
index 0182cff2c7ac7..624831e5a583c 100644

drivers/iommu/intel-iommu.c static int __init intel_iommu_setup(char *str) · line 486

Quoted 9 lines
drivers/iommu/intel-iommu.c +1 -2
@@ -480,8 +480,7 @@ static int __init intel_iommu_setup(char *str)
  			pr_info("Intel-IOMMU: scalable mode supported\n");
  			intel_iommu_sm = 1;
  		} else if (!strncmp(str, "tboot_noforce", 13)) {
-			printk(KERN_INFO
-				"Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
+			pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
  			intel_iommu_tboot_noforce = 1;
  		} else if (!strncmp(str, "nobounce", 8)) {
  			pr_info("Intel-IOMMU: No bounce buffer. This could expose security risks of DMA attacks\n");

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

maintainer
#4 lore raw
In reply to Andy Shevchenko
Quoted 7 lines · Andy Shevchenko

Unify format of the printed messages, i.e. replace printk(LEVEL ... ) with pr_level(...).

---
 drivers/iommu/intel-iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied all, thanks.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu