All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
@ 2018-05-02 10:05 ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2018-05-02 10:05 UTC (permalink / raw)
  To: iommu
  Cc: linux-kernel, intel-gfx, Chris Wilson, Christian König,
	Mike Galbraith, Konrad Rzeszutek Wilk, Christoph Hellwig

This extends the warning suppression from commit d0bc0c2a31c9 ("swiotlb:
suppress warning when __GFP_NOWARN is set") to suppress the warnings
when DMA_ATTR_NO_WARN is given by caller. In such cases the caller wants
to handle the error themselves.

Fixes: d0bc0c2a31c9 ("swiotlb: suppress warning when __GFP_NOWARN is set")
Cc: Christian König <christian.koenig@amd.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
---
 lib/swiotlb.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index fece57566d45..2bfb936c5708 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -768,11 +768,14 @@ static bool swiotlb_free_buffer(struct device *dev, size_t size,
 
 static void
 swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir,
-	     int do_panic)
+	     unsigned long attrs, int do_panic)
 {
 	if (swiotlb_force == SWIOTLB_NO_FORCE)
 		return;
 
+	if (attrs & DMA_ATTR_NO_WARN)
+		return;
+
 	/*
 	 * Ran out of IOMMU space for this operation. This is very bad.
 	 * Unfortunately the drivers cannot handle this operation properly.
@@ -823,7 +826,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
 	/* Oh well, have to allocate and map a bounce buffer. */
 	map = map_single(dev, phys, size, dir, attrs);
 	if (map == SWIOTLB_MAP_ERROR) {
-		swiotlb_full(dev, size, dir, 1);
+		swiotlb_full(dev, size, dir, attrs, 1);
 		return __phys_to_dma(dev, io_tlb_overflow_buffer);
 	}
 
@@ -959,7 +962,7 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
 			if (map == SWIOTLB_MAP_ERROR) {
 				/* Don't panic here, we expect map_sg users
 				   to do proper error handling. */
-				swiotlb_full(hwdev, sg->length, dir, 0);
+				swiotlb_full(hwdev, sg->length, dir, attrs, 0);
 				attrs |= DMA_ATTR_SKIP_CPU_SYNC;
 				swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir,
 						       attrs);
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
@ 2018-05-02 10:05 ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2018-05-02 10:05 UTC (permalink / raw)
  To: iommu
  Cc: Konrad Rzeszutek Wilk, intel-gfx, Mike Galbraith, linux-kernel,
	Christoph Hellwig, Christian König

This extends the warning suppression from commit d0bc0c2a31c9 ("swiotlb:
suppress warning when __GFP_NOWARN is set") to suppress the warnings
when DMA_ATTR_NO_WARN is given by caller. In such cases the caller wants
to handle the error themselves.

Fixes: d0bc0c2a31c9 ("swiotlb: suppress warning when __GFP_NOWARN is set")
Cc: Christian König <christian.koenig@amd.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
---
 lib/swiotlb.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index fece57566d45..2bfb936c5708 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -768,11 +768,14 @@ static bool swiotlb_free_buffer(struct device *dev, size_t size,
 
 static void
 swiotlb_full(struct device *dev, size_t size, enum dma_data_direction dir,
-	     int do_panic)
+	     unsigned long attrs, int do_panic)
 {
 	if (swiotlb_force == SWIOTLB_NO_FORCE)
 		return;
 
+	if (attrs & DMA_ATTR_NO_WARN)
+		return;
+
 	/*
 	 * Ran out of IOMMU space for this operation. This is very bad.
 	 * Unfortunately the drivers cannot handle this operation properly.
@@ -823,7 +826,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
 	/* Oh well, have to allocate and map a bounce buffer. */
 	map = map_single(dev, phys, size, dir, attrs);
 	if (map == SWIOTLB_MAP_ERROR) {
-		swiotlb_full(dev, size, dir, 1);
+		swiotlb_full(dev, size, dir, attrs, 1);
 		return __phys_to_dma(dev, io_tlb_overflow_buffer);
 	}
 
@@ -959,7 +962,7 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
 			if (map == SWIOTLB_MAP_ERROR) {
 				/* Don't panic here, we expect map_sg users
 				   to do proper error handling. */
-				swiotlb_full(hwdev, sg->length, dir, 0);
+				swiotlb_full(hwdev, sg->length, dir, attrs, 0);
 				attrs |= DMA_ATTR_SKIP_CPU_SYNC;
 				swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir,
 						       attrs);
-- 
2.17.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
  2018-05-02 10:05 ` Chris Wilson
  (?)
@ 2018-05-02 12:44 ` Christoph Hellwig
  -1 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2018-05-02 12:44 UTC (permalink / raw)
  To: Chris Wilson
  Cc: iommu, linux-kernel, intel-gfx, Christian König,
	Mike Galbraith, Konrad Rzeszutek Wilk, Christoph Hellwig

On Wed, May 02, 2018 at 11:05:01AM +0100, Chris Wilson wrote:
> This extends the warning suppression from commit d0bc0c2a31c9 ("swiotlb:
> suppress warning when __GFP_NOWARN is set") to suppress the warnings
> when DMA_ATTR_NO_WARN is given by caller. In such cases the caller wants
> to handle the error themselves.

I have patches that remove swiotlb_full entirely to be posted soon.
I'll defer the patch for now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
  2018-05-02 10:05 ` Chris Wilson
  (?)
  (?)
@ 2018-05-02 13:29 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-05-02 13:29 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
URL   : https://patchwork.freedesktop.org/series/42561/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
25e047ba06d3 swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
-:57: ERROR:MISSING_SIGN_OFF: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 0 checks, 31 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
  2018-05-02 10:05 ` Chris Wilson
                   ` (2 preceding siblings ...)
  (?)
@ 2018-05-02 13:54 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-05-02 13:54 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
URL   : https://patchwork.freedesktop.org/series/42561/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4121 -> Patchwork_8872 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/42561/revisions/1/mbox/

== Known issues ==

  Here are the changes found in Patchwork_8872 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-kbl-7500u:       PASS -> DMESG-WARN (fdo#105128)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-ivb-3520m:       DMESG-WARN (fdo#106084) -> PASS

    
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
  fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084


== Participating hosts (40 -> 36) ==

  Missing    (4): fi-ctg-p8600 fi-skl-6700hq fi-ilk-m540 fi-skl-6260u 


== Build changes ==

    * Linux: CI_DRM_4121 -> Patchwork_8872

  CI_DRM_4121: d4f7520d80ab83ea9053ee080df09a23463b6966 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4456: 43761534c6482dc67b9c3d8eeecd425ef40b3c4c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8872: 25e047ba06d384d3616d3a46852a6ede47598ca6 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4456: 30b992bdc047073e1fe99b1ac622f026618a8081 @ git://anongit.freedesktop.org/piglit


== Linux commits ==

25e047ba06d3 swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8872/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.IGT: success for swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
  2018-05-02 10:05 ` Chris Wilson
                   ` (3 preceding siblings ...)
  (?)
@ 2018-05-02 17:43 ` Patchwork
  -1 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-05-02 17:43 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN
URL   : https://patchwork.freedesktop.org/series/42561/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4121_full -> Patchwork_8872_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_8872_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_8872_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/42561/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_8872_full:

  === IGT changes ===

    ==== Warnings ====

    igt@gem_exec_schedule@deep-vebox:
      shard-kbl:          SKIP -> PASS +1

    igt@gem_mocs_settings@mocs-rc6-vebox:
      shard-kbl:          PASS -> SKIP

    igt@pm_rc6_residency@rc6-accuracy:
      shard-snb:          SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_8872_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
      shard-hsw:          PASS -> FAIL (fdo#100368) +1

    igt@kms_flip@absolute-wf_vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#106087)

    igt@kms_flip@plain-flip-fb-recreate-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368) +2

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-hsw:          PASS -> FAIL (fdo#103925)

    igt@perf_pmu@interrupts-sync:
      shard-glk:          PASS -> FAIL (fdo#104485)

    
    ==== Possible fixes ====

    igt@kms_flip@2x-plain-flip-ts-check:
      shard-hsw:          FAIL (fdo#100368) -> PASS +1

    igt@kms_flip@modeset-vs-vblank-race:
      shard-glk:          FAIL (fdo#103060) -> PASS

    igt@kms_flip@plain-flip-ts-check-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS +1

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu:
      shard-apl:          FAIL (fdo#103167) -> PASS

    igt@kms_sysfs_edid_timing:
      shard-apl:          WARN (fdo#100047) -> PASS

    igt@perf@blocking:
      shard-hsw:          FAIL (fdo#102252) -> PASS

    

  === Piglit changes ===

    ==== Issues hit ====

    spec@glsl-1.40-compat@execution@built-in-constants:
      pig-hsw-4770r:      NOTRUN -> FAIL (fdo#106277)

    
  fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#104485 https://bugs.freedesktop.org/show_bug.cgi?id=104485
  fdo#106087 https://bugs.freedesktop.org/show_bug.cgi?id=106087
  fdo#106277 https://bugs.freedesktop.org/show_bug.cgi?id=106277


== Participating hosts (7 -> 7) ==

  Additional (1): pig-hsw-4770r 
  Missing    (1): pig-glk-j4005 


== Build changes ==

    * Linux: CI_DRM_4121 -> Patchwork_8872

  CI_DRM_4121: d4f7520d80ab83ea9053ee080df09a23463b6966 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4456: 43761534c6482dc67b9c3d8eeecd425ef40b3c4c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8872: 25e047ba06d384d3616d3a46852a6ede47598ca6 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4456: 30b992bdc047073e1fe99b1ac622f026618a8081 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8872/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-02 17:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 10:05 [PATCH] swiotlb: Suppress "Out of SW-IOMMU" errors for NO_WARN Chris Wilson
2018-05-02 10:05 ` Chris Wilson
2018-05-02 12:44 ` Christoph Hellwig
2018-05-02 13:29 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-05-02 13:54 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-02 17:43 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.