<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/crypto/cavium/zip/zip_main.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/crypto/cavium/zip/zip_main.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/crypto/cavium/zip/zip_main.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-03-02T22:46:19Z</updated>
<entry>
<title>crypto: cavium/zip - register algorithm only if hardware is present</title>
<updated>2022-03-02T22:46:19Z</updated>
<author>
<name>Corentin Labbe</name>
<email>clabbe@baylibre.com</email>
</author>
<published>2022-02-21T11:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2f5ee72ee950a677069ee8ab75af40cebba3bb3c'/>
<id>urn:sha1:2f5ee72ee950a677069ee8ab75af40cebba3bb3c</id>
<content type='text'>
On my renesas salavator-X, I saw some cavium driver failing crypto
self-tests.
But salvator does not have such hardware.
This is due to cavium/zip driver registering algorithms even if hardware
is not present.
The solution is to move algorithm registration in the probe function.
This permits also to simplify module init/exit by using
module_pci_driver.

Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/zip - Use dma_set_mask_and_coherent to simplify code</title>
<updated>2020-11-27T06:13:47Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2020-11-21T07:31:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d4f9afb23378f50e40cd3bc8aee35679bfd1d27b'/>
<id>urn:sha1:d4f9afb23378f50e40cd3bc8aee35679bfd1d27b</id>
<content type='text'>
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by
an equivalent 'dma_set_mask_and_coherent()' which is much less verbose.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/zip - Convert to DEFINE_SHOW_ATTRIBUTE</title>
<updated>2020-09-25T07:48:16Z</updated>
<author>
<name>Qinglang Miao</name>
<email>miaoqinglang@huawei.com</email>
</author>
<published>2020-09-18T01:31:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f464851806bd7baf1333c2639a107fcb67513e97'/>
<id>urn:sha1:f464851806bd7baf1333c2639a107fcb67513e97</id>
<content type='text'>
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Qinglang Miao &lt;miaoqinglang@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/zip - Add missing single_release()</title>
<updated>2019-09-09T13:48:41Z</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2019-09-04T14:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c552ffb5c93d9d65aaf34f5f001c4e7e8484ced1'/>
<id>urn:sha1:c552ffb5c93d9d65aaf34f5f001c4e7e8484ced1</id>
<content type='text'>
When using single_open() for opening, single_release() should be
used instead of seq_release(), otherwise there is a memory leak.

Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/zip - fix collision with generic cra_driver_name</title>
<updated>2019-02-28T06:37:35Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-02-23T08:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=41798036430015ad45137db2d4c213cd77fd0251'/>
<id>urn:sha1:41798036430015ad45137db2d4c213cd77fd0251</id>
<content type='text'>
The cavium/zip implementation of the deflate compression algorithm is
incorrectly being registered under the generic driver name, which
prevents the generic implementation from being registered with the
crypto API when CONFIG_CRYPTO_DEV_CAVIUM_ZIP=y.  Similarly the lzs
algorithm (which does not currently have a generic implementation...)
is incorrectly being registered as lzs-generic.

Fix the naming collision by adding a suffix "-cavium" to the
cra_driver_name of the cavium/zip algorithms.

Fixes: 640035a2dc55 ("crypto: zip - Add ThunderX ZIP driver core")
Cc: Mahipal Challa &lt;mahipalreddy2006@gmail.com&gt;
Cc: Jan Glauber &lt;jglauber@cavium.com&gt;
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium/zip - no need to check return value of debugfs_create functions</title>
<updated>2019-02-01T06:42:03Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-01-22T15:14:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e30886b47c43046a310797b139f741c01600f39a'/>
<id>urn:sha1:e30886b47c43046a310797b139f741c01600f39a</id>
<content type='text'>
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Robert Richter &lt;rrichter@cavium.com&gt;
Cc: Jan Glauber &lt;jglauber@cavium.com&gt;
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Fix smp_processor_id() warnings</title>
<updated>2018-04-20T16:58:36Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e7a9b05ca4c707ff4b46a77963db48d085d383e0'/>
<id>urn:sha1:e7a9b05ca4c707ff4b46a77963db48d085d383e0</id>
<content type='text'>
Switch to raw_smp_processor_id() to prevent a number of
warnings from kernel debugging. We do not care about
preemption here, as the CPU number is only used as a
poor mans load balancing or device selection. If preemption
happens during a compress/decompress operation a small performance
hit will occur but everything will continue to work, so just
ignore it.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Fix statistics pending request value</title>
<updated>2018-04-20T16:58:35Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1cc7e01ff977770ce0651f4d347a84e360835c3b'/>
<id>urn:sha1:1cc7e01ff977770ce0651f4d347a84e360835c3b</id>
<content type='text'>
The pending request counter was read from the wrong register. While
at it, there is no need to use an atomic for it as it is only read
localy in a loop.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: cavium - Prevent division by zero</title>
<updated>2018-04-20T16:58:35Z</updated>
<author>
<name>Jan Glauber</name>
<email>jglauber@cavium.com</email>
</author>
<published>2018-04-09T15:45:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a40c88045506ecba8e3ae75da19e8a2c53e23a41'/>
<id>urn:sha1:a40c88045506ecba8e3ae75da19e8a2c53e23a41</id>
<content type='text'>
Avoid two potential divisions by zero when calculating average
values for the zip statistics.

Signed-off-by: Jan Glauber &lt;jglauber@cavium.com&gt;
Reviewed-by: Robert Richter &lt;rrichter@cavium.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: zip - add a cast for printing atomic64_t values</title>
<updated>2017-03-24T14:03:01Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-03-20T12:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d64069ee1869b9f77eef0bf9dfceffee2bfd7692'/>
<id>urn:sha1:d64069ee1869b9f77eef0bf9dfceffee2bfd7692</id>
<content type='text'>
kernelci.org reports a build-time regression on linux-next, with a harmless
warning in x86 allmodconfig:

drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'long long int' [-Wformat=]
drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'long long int' [-Wformat=]
drivers/crypto/cavium/zip/zip_main.c:489:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'long long int' [-Wformat=]

The return type for atomic64_read() unfortunately differs between
architectures, with some defining it as atomic_long_read() and others
returning a 64-bit type explicitly. Fixing this in general would be nice,
but also require changing other users of these functions, so the simpler
workaround is to add a cast here that avoids the warnings on the default
build.

Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
