<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/dma/ioat, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-10-26T11:15:44Z</updated>
<entry>
<title>dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup()</title>
<updated>2022-10-26T11:15:44Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2022-09-19T16:58:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d967328312111870abe00283faa8c7cca11e8db1'/>
<id>urn:sha1:d967328312111870abe00283faa8c7cca11e8db1</id>
<content type='text'>
[ Upstream commit 898ec89dbb55b8294695ad71694a0684e62b2a73 ]

User reports observing timer event report channel halted but no error
observed in CHANERR register. The driver finished self-test and released
channel resources. Debug shows that __cleanup() can call
mod_timer() after the timer has been deleted and thus resurrect the
timer. While harmless, it causes suprious error message to be emitted.
Use mod_timer_pending() call to prevent deleted timer from being
resurrected.

Fixes: 3372de5813e4 ("dmaengine: ioatdma: removal of dma_v3.c and relevant ioat3 references")
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/166360672197.3851724.17040290563764838369.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: ioat setting ioat timeout as module parameter</title>
<updated>2020-07-31T14:44:03Z</updated>
<author>
<name>Leonid Ravich</name>
</author>
<published>2020-07-01T18:48:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ef026214f70de1ce50559421d54ad9741d14e52'/>
<id>urn:sha1:9ef026214f70de1ce50559421d54ad9741d14e52</id>
<content type='text'>
[ Upstream commit 87730ccbddcb48478b1b88e88b14e73424130764 ]

DMA transaction time to completion is a function of PCI bandwidth,
transaction size and a queue depth.  So hard coded value for timeouts
might be wrong for some scenarios.

Signed-off-by: Leonid Ravich &lt;Leonid.Ravich@emc.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/20200701184816.29138-1-leonid.ravich@dell.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ioat: ioat_alloc_ring() failure handling.</title>
<updated>2020-01-23T07:19:37Z</updated>
<author>
<name>Alexander.Barabash@dell.com</name>
</author>
<published>2019-12-25T17:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cb9ccb8443dc3d173f6bedb8c8a14c296754ea0'/>
<id>urn:sha1:1cb9ccb8443dc3d173f6bedb8c8a14c296754ea0</id>
<content type='text'>
[ Upstream commit b0b5ce1010ffc50015eaec72b0028aaae3f526bb ]

If dma_alloc_coherent() returns NULL in ioat_alloc_ring(), ring
allocation must not proceed.

Until now, if the first call to dma_alloc_coherent() in
ioat_alloc_ring() returned NULL, the processing could proceed, failing
with NULL-pointer dereferencing further down the line.

Signed-off-by: Alexander Barabash &lt;alexander.barabash@dell.com&gt;
Acked-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Link: https://lore.kernel.org/r/75e9c0e84c3345d693c606c64f8b9ab5@x13pwhopdag1307.AMER.DELL.COM
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: ioat: fix prototype of ioat_enumerate_channels</title>
<updated>2019-11-25T08:53:35Z</updated>
<author>
<name>Rami Rosen</name>
</author>
<published>2018-10-04T21:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87fc52e97f62e5219de9ab8383c864dd8aa00800'/>
<id>urn:sha1:87fc52e97f62e5219de9ab8383c864dd8aa00800</id>
<content type='text'>
[ Upstream commit f4d34aa8c887a8a2d23ef546da0efa10e3f77241 ]

Signed-off-by: Rami Rosen &lt;ramirose@gmail.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>driver/dma/ioat: Call del_timer_sync() without holding prep_lock</title>
<updated>2018-11-13T19:16:53Z</updated>
<author>
<name>Waiman Long</name>
</author>
<published>2018-09-14T18:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=479cd3e8ad91098db194dc995c7567fb480dd289'/>
<id>urn:sha1:479cd3e8ad91098db194dc995c7567fb480dd289</id>
<content type='text'>
[ Upstream commit cfb03be6c7e8a1591285849c361d67b09f5149f7 ]

The following lockdep splat was observed:

[ 1222.241750] ======================================================
[ 1222.271301] WARNING: possible circular locking dependency detected
[ 1222.301060] 4.16.0-10.el8+5.x86_64+debug #1 Not tainted
[ 1222.326659] ------------------------------------------------------
[ 1222.356565] systemd-shutdow/1 is trying to acquire lock:
[ 1222.382660]  ((&amp;ioat_chan-&gt;timer)){+.-.}, at: [&lt;00000000f71e1a28&gt;] del_timer_sync+0x5/0xf0
[ 1222.422928]
[ 1222.422928] but task is already holding lock:
[ 1222.451743]  (&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock){+.-.}, at: [&lt;000000008ea98b12&gt;] ioat_shutdown+0x86/0x100 [ioatdma]
   :
[ 1223.524987] Chain exists of:
[ 1223.524987]   (&amp;ioat_chan-&gt;timer) --&gt; &amp;(&amp;ioat_chan-&gt;cleanup_lock)-&gt;rlock --&gt; &amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock
[ 1223.524987]
[ 1223.594082]  Possible unsafe locking scenario:
[ 1223.594082]
[ 1223.622630]        CPU0                    CPU1
[ 1223.645080]        ----                    ----
[ 1223.667404]   lock(&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock);
[ 1223.691535]                                lock(&amp;(&amp;ioat_chan-&gt;cleanup_lock)-&gt;rlock);
[ 1223.728657]                                lock(&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock);
[ 1223.765122]   lock((&amp;ioat_chan-&gt;timer));
[ 1223.784095]
[ 1223.784095]  *** DEADLOCK ***
[ 1223.784095]
[ 1223.813492] 4 locks held by systemd-shutdow/1:
[ 1223.834677]  #0:  (reboot_mutex){+.+.}, at: [&lt;0000000056d33456&gt;] SYSC_reboot+0x10f/0x300
[ 1223.873310]  #1:  (&amp;dev-&gt;mutex){....}, at: [&lt;00000000258dfdd7&gt;] device_shutdown+0x1c8/0x660
[ 1223.913604]  #2:  (&amp;dev-&gt;mutex){....}, at: [&lt;0000000068331147&gt;] device_shutdown+0x1d6/0x660
[ 1223.954000]  #3:  (&amp;(&amp;ioat_chan-&gt;prep_lock)-&gt;rlock){+.-.}, at: [&lt;000000008ea98b12&gt;] ioat_shutdown+0x86/0x100 [ioatdma]

In the ioat_shutdown() function:

	spin_lock_bh(&amp;ioat_chan-&gt;prep_lock);
	set_bit(IOAT_CHAN_DOWN, &amp;ioat_chan-&gt;state);
	del_timer_sync(&amp;ioat_chan-&gt;timer);
	spin_unlock_bh(&amp;ioat_chan-&gt;prep_lock);

According to the synchronization rule for the del_timer_sync() function,
the caller must not hold locks which would prevent completion of the
timer's handler.

The timer structure has its own lock that manages its synchronization.
Setting the IOAT_CHAN_DOWN bit should prevent other CPUs from
trying to use that device anyway, there is probably no need to call
del_timer_sync() while holding the prep_lock. So the del_timer_sync()
call is now moved outside of the prep_lock critical section to prevent
the circular lock dependency.

Signed-off-by: Waiman Long &lt;longman@redhat.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: ioat: Fix error handling path</title>
<updated>2018-02-25T10:05:48Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2017-11-17T21:37:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b3df69b4abe6cfd8efc8c3c187cff7f02aeff642'/>
<id>urn:sha1:b3df69b4abe6cfd8efc8c3c187cff7f02aeff642</id>
<content type='text'>
[ Upstream commit 5c9afbda911ce20b3f2181d1e440a0222e1027dd ]

If the last test in 'ioat_dma_self_test()' fails, we must release all
the allocated resources and not just part of them.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Acked-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: ioatdma: workaround SKX ioatdma version</title>
<updated>2017-08-07T01:59:46Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2016-12-13T18:15:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2804b21f2e7f46f76500aa58850127b31054c84'/>
<id>urn:sha1:c2804b21f2e7f46f76500aa58850127b31054c84</id>
<content type='text'>
[ Upstream commit 34a31f0af84158955a9747fb5c6712da5bbb5331 ]

The Skylake ioatdma is technically CBDMA 3.2+ and contains the same hardware
bits with some additional 3.3 features, but it's not really 3.3 where the
driver is concerned.

Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: ioatdma: Add Skylake PCI Dev ID</title>
<updated>2017-08-07T01:59:46Z</updated>
<author>
<name>Dave Jiang</name>
</author>
<published>2016-12-13T18:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2987ce159fb9b0894d9bf000b8317e07cfed3fa8'/>
<id>urn:sha1:2987ce159fb9b0894d9bf000b8317e07cfed3fa8</id>
<content type='text'>
[ Upstream commit 1594c18fd297a8edcc72bc4b161f3f52603ebb92 ]

Adding Skylake Xeon PCI device ids for ioatdma and related bits.

Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: iota: ioat_alloc_chan_resources should not perform sleeping allocations.</title>
<updated>2017-03-22T11:43:35Z</updated>
<author>
<name>Krister Johansen</name>
</author>
<published>2017-01-04T09:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2382c1486c62a21d162f0d457c61cd87a2498ffd'/>
<id>urn:sha1:2382c1486c62a21d162f0d457c61cd87a2498ffd</id>
<content type='text'>
commit 21d25f6a4217e755906cb548b55ddab39d0e88b9 upstream.

On a kernel with DEBUG_LOCKS, ioat_free_chan_resources triggers an
in_interrupt() warning.  With PROVE_LOCKING, it reports detecting a
SOFTIRQ-safe to SOFTIRQ-unsafe lock ordering in the same code path.

This is because dma_generic_alloc_coherent() checks if the GFP flags
permit blocking.  It allocates from different subsystems if blocking is
permitted.  The free path knows how to return the memory to the correct
allocator.  If GFP_KERNEL is specified then the alloc and free end up
going through cma_alloc(), which uses mutexes.

Given that ioat_free_chan_resources() can be called in interrupt
context, ioat_alloc_chan_resources() must specify GFP_NOWAIT so that the
allocations do not block and instead use an allocator that uses
spinlocks.

Signed-off-by: Krister Johansen &lt;kjlx@templeofstupid.com&gt;
Acked-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branch 'topic/ioatdma' into for-linus</title>
<updated>2016-10-03T03:48:01Z</updated>
<author>
<name>Vinod Koul</name>
</author>
<published>2016-10-03T03:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f492908067d0dc4066706217938344b5e7fd0016'/>
<id>urn:sha1:f492908067d0dc4066706217938344b5e7fd0016</id>
<content type='text'>
</content>
</entry>
</feed>
