Re: [PATCH v2 1/2] dt-bindings: timeriomem_rng: Add entropy quality property
On Mon, May 22, 2017 at 02:12:23PM -0700, Rick Altherr wrote: > Signed-off-by: Rick AltherrBoth patches applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [PATCH 0/5] crypto: arm - enable module autoloading
On Sun, May 21, 2017 at 10:23:35AM +, Ard Biesheuvel wrote: > Now that the prerequisite changes are in place, we can modify the > various accelerated crypto modules that use special instructions to > expose the CPU feature they depend on. This allows udev to autoload > the module at boot. All applied. Thanks. -- Email: Herbert XuHome Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[PATCH v1 2/2] dt-bindings: crypto: remove mediatek ethif clock
This patch removes the parent clock 'ethif' in bindings, since we don't need to control the parent of a clock in current clock framework. Moreover, the clocks are get by name in the driver, thus this change does not break backwards compatibility. Signed-off-by: Ryder LeeReviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/crypto/mediatek-crypto.txt | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/mediatek-crypto.txt b/Documentation/devicetree/bindings/crypto/mediatek-crypto.txt index c204725..450da36 100644 --- a/Documentation/devicetree/bindings/crypto/mediatek-crypto.txt +++ b/Documentation/devicetree/bindings/crypto/mediatek-crypto.txt @@ -6,8 +6,7 @@ Required properties: - interrupts: Should contain the five crypto engines interrupts in numeric order. These are global system and four descriptor rings. - clocks: the clock used by the core -- clock-names: the names of the clock listed in the clocks property. These are - "ethif", "cryp" +- clock-names: Must contain "cryp". - power-domains: Must contain a reference to the PM domain. @@ -20,8 +19,7 @@ Example: , , ; - clocks = < CLK_TOP_ETHIF_SEL>, -< CLK_ETHSYS_CRYPTO>; - clock-names = "ethif","cryp"; + clocks = < CLK_ETHSYS_CRYPTO>; + clock-names = "cryp"; power-domains = < MT2701_POWER_DOMAIN_ETH>; }; -- 1.9.1
[PATCH v1 1/2] crypto: mediatek - remove redundant clock setting
This patch removes redundant clock setting for 'clk_ethif', which is the parent of 'clk_cryp'. Hence, we just need to handle its child. Signed-off-by: Ryder Lee--- drivers/crypto/mediatek/mtk-platform.c | 10 +- drivers/crypto/mediatek/mtk-platform.h | 2 -- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-platform.c b/drivers/crypto/mediatek/mtk-platform.c index b6ecc28..9b4437c 100644 --- a/drivers/crypto/mediatek/mtk-platform.c +++ b/drivers/crypto/mediatek/mtk-platform.c @@ -504,19 +504,14 @@ static int mtk_crypto_probe(struct platform_device *pdev) } } - cryp->clk_ethif = devm_clk_get(>dev, "ethif"); cryp->clk_cryp = devm_clk_get(>dev, "cryp"); - if (IS_ERR(cryp->clk_ethif) || IS_ERR(cryp->clk_cryp)) + if (IS_ERR(cryp->clk_cryp)) return -EPROBE_DEFER; cryp->dev = >dev; pm_runtime_enable(cryp->dev); pm_runtime_get_sync(cryp->dev); - err = clk_prepare_enable(cryp->clk_ethif); - if (err) - goto err_clk_ethif; - err = clk_prepare_enable(cryp->clk_cryp); if (err) goto err_clk_cryp; @@ -559,8 +554,6 @@ static int mtk_crypto_probe(struct platform_device *pdev) err_resource: clk_disable_unprepare(cryp->clk_cryp); err_clk_cryp: - clk_disable_unprepare(cryp->clk_ethif); -err_clk_ethif: pm_runtime_put_sync(cryp->dev); pm_runtime_disable(cryp->dev); @@ -576,7 +569,6 @@ static int mtk_crypto_remove(struct platform_device *pdev) mtk_desc_dma_free(cryp); clk_disable_unprepare(cryp->clk_cryp); - clk_disable_unprepare(cryp->clk_ethif); pm_runtime_put_sync(cryp->dev); pm_runtime_disable(cryp->dev); diff --git a/drivers/crypto/mediatek/mtk-platform.h b/drivers/crypto/mediatek/mtk-platform.h index 303c152..f0831f1 100644 --- a/drivers/crypto/mediatek/mtk-platform.h +++ b/drivers/crypto/mediatek/mtk-platform.h @@ -200,7 +200,6 @@ struct mtk_sha_rec { * struct mtk_cryp - Cryptographic device * @base: pointer to mapped register I/O base * @dev: pointer to device - * @clk_ethif: pointer to ethif clock * @clk_cryp: pointer to crypto clock * @irq: global system and rings IRQ * @ring: pointer to descriptor rings @@ -215,7 +214,6 @@ struct mtk_sha_rec { struct mtk_cryp { void __iomem *base; struct device *dev; - struct clk *clk_ethif; struct clk *clk_cryp; int irq[MTK_IRQ_NUM]; -- 1.9.1
[PATCH v1 0/2] remove mediatek ethif clock in crypto driver
This patch series only remove redundant clock setting in mediatek crypto driver. Changes since v1: -rework the commit message. Ryder Lee (2): crypto: mediatek - remove redundant clock setting dt-bindings: crypto: remove mediatek ethif clock Documentation/devicetree/bindings/crypto/mediatek-crypto.txt | 8 +++- drivers/crypto/mediatek/mtk-platform.c | 10 +- drivers/crypto/mediatek/mtk-platform.h | 2 -- 3 files changed, 4 insertions(+), 16 deletions(-) -- 1.9.1
Re: [PATCH 2/2] crypto: mediatek - update DT binding documentation
On Wed, 2017-05-31 at 13:46 -0500, Rob Herring wrote: > On Fri, May 26, 2017 at 05:43:09PM +0800, Ryder Lee wrote: > > This patch removes unnecessary clock in binding file. > > Why is the clock unnecessary? A h/w block either has a clock or doesn't. > > The subject needs some work. Perhaps "dt-bindings: crypto: remove > mediatek ethif clock". > > Rob I'll write more clearly, thanks. Ryder.
Re: [PATCH 2/2] crypto: mediatek - update DT binding documentation
On Fri, May 26, 2017 at 05:43:09PM +0800, Ryder Lee wrote: > This patch removes unnecessary clock in binding file. Why is the clock unnecessary? A h/w block either has a clock or doesn't. The subject needs some work. Perhaps "dt-bindings: crypto: remove mediatek ethif clock". Rob
[PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs
From: Sean WangAdd the generic binding for allowing the support of RNG on MediaTek SoCs such as MT7622. Signed-off-by: Sean Wang --- Documentation/devicetree/bindings/rng/mtk-rng.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/rng/mtk-rng.txt b/Documentation/devicetree/bindings/rng/mtk-rng.txt index a6d62a2..0772913 100644 --- a/Documentation/devicetree/bindings/rng/mtk-rng.txt +++ b/Documentation/devicetree/bindings/rng/mtk-rng.txt @@ -2,7 +2,8 @@ Device-Tree bindings for Mediatek random number generator found in Mediatek SoC family Required properties: -- compatible : Should be "mediatek,mt7623-rng" +- compatible : Should be "mediatek,generic-rng" or + "mediatek,mt7623-rng". - clocks : list of clock specifiers, corresponding to entries in clock-names property; - clock-names : Should contain "rng" entries; -- 1.9.1
[PATCH 2/4] hwrng: mtk - add support for MT7622 SoC
From: Sean WangAdd "mediatek,generic-rng" allowing most of RNG on MediaTek SoCs to be compatible with the driver including MT7622 SoC. Signed-off-by: Sean Wang --- drivers/char/hw_random/mtk-rng.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c index df8eb54..3a1e1f1 100644 --- a/drivers/char/hw_random/mtk-rng.c +++ b/drivers/char/hw_random/mtk-rng.c @@ -148,6 +148,7 @@ static int mtk_rng_probe(struct platform_device *pdev) } static const struct of_device_id mtk_rng_match[] = { + { .compatible = "mediatek,generic-rng" }, { .compatible = "mediatek,mt7623-rng" }, {}, }; -- 1.9.1
[PATCH 4/4] MAINTAINERS: add entry for MediaTek Random Number Generator
From: Sean WangI work for MediaTek on maintaining the MediaTek RNG driver for the existing SoCs and adding support for the following SoCs. Signed-off-by: Sean Wang --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cf86519..da473d0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8262,6 +8262,11 @@ L: linux-wirel...@vger.kernel.org S: Maintained F: drivers/net/wireless/mediatek/mt7601u/ +MEDIATEK RANDOM NUMBER GENERATOR SUPPORT +M: Sean Wang +S: Maintained +F: drivers/char/hw_random/mtk-rng.c + MEGACHIPS STDP-GE-B850V3-FW LVDS/DP++ BRIDGES M: Peter Senna Tschudin M: Martin Donnelly -- 1.9.1
[PATCH 3/4] hwrng: mtk - add runtime PM support
From: Sean WangAdd runtime PM support. There will be the benefit on SoCs where the clock to the RNG used can be shutdown. Signed-off-by: Sean Wang --- drivers/char/hw_random/mtk-rng.c | 42 1 file changed, 42 insertions(+) diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c index 3a1e1f1..59ded4e 100644 --- a/drivers/char/hw_random/mtk-rng.c +++ b/drivers/char/hw_random/mtk-rng.c @@ -25,6 +25,10 @@ #include #include #include +#include + +/* Runtime PM autosuspend timeout: */ +#define RNG_AUTOSUSPEND_TIMEOUT100 #define USEC_POLL 2 #define TIMEOUT_POLL 20 @@ -90,6 +94,8 @@ static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) struct mtk_rng *priv = to_mtk_rng(rng); int retval = 0; + pm_runtime_get_sync((struct device *)priv->rng.priv); + while (max >= sizeof(u32)) { if (!mtk_rng_wait_ready(rng, wait)) break; @@ -100,6 +106,9 @@ static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) max -= sizeof(u32); } + pm_runtime_mark_last_busy((struct device *)priv->rng.priv); + pm_runtime_put_sync_autosuspend((struct device *)priv->rng.priv); + return retval || !wait ? retval : -EIO; } @@ -120,9 +129,12 @@ static int mtk_rng_probe(struct platform_device *pdev) return -ENOMEM; priv->rng.name = pdev->name; +#ifndef CONFIG_PM priv->rng.init = mtk_rng_init; priv->rng.cleanup = mtk_rng_cleanup; +#endif priv->rng.read = mtk_rng_read; + priv->rng.priv = (unsigned long)>dev; priv->clk = devm_clk_get(>dev, "rng"); if (IS_ERR(priv->clk)) { @@ -142,11 +154,40 @@ static int mtk_rng_probe(struct platform_device *pdev) return ret; } + dev_set_drvdata(>dev, priv); + pm_runtime_set_autosuspend_delay(>dev, RNG_AUTOSUSPEND_TIMEOUT); + pm_runtime_use_autosuspend(>dev); + pm_runtime_enable(>dev); + dev_info(>dev, "registered RNG driver\n"); return 0; } +#ifdef CONFIG_PM +static int mtk_rng_runtime_suspend(struct device *dev) +{ + struct mtk_rng *priv = dev_get_drvdata(dev); + + mtk_rng_cleanup(>rng); + + return 0; +} + +static int mtk_rng_runtime_resume(struct device *dev) +{ + struct mtk_rng *priv = dev_get_drvdata(dev); + + return mtk_rng_init(>rng); +} + +static UNIVERSAL_DEV_PM_OPS(mtk_rng_pm_ops, mtk_rng_runtime_suspend, + mtk_rng_runtime_resume, NULL); +#define MTK_RNG_PM_OPS (_rng_pm_ops) +#else /* CONFIG_PM */ +#define MTK_RNG_PM_OPS NULL +#endif /* CONFIG_PM */ + static const struct of_device_id mtk_rng_match[] = { { .compatible = "mediatek,generic-rng" }, { .compatible = "mediatek,mt7623-rng" }, @@ -158,6 +199,7 @@ static int mtk_rng_probe(struct platform_device *pdev) .probe = mtk_rng_probe, .driver = { .name = MTK_RNG_DEV, + .pm = MTK_RNG_PM_OPS, .of_match_table = mtk_rng_match, }, }; -- 1.9.1
Re: [sparc64] crc32c misbehave
From: David MillerDate: Wed, 31 May 2017 11:53:35 -0400 (EDT) > Can you try something like disabling cpu IRQs around the crc32c() function > in lib/libcrc32c.c? Something like: > > u32 retval; > > local_irq_disable(); > > shash->tfm = tfm; > shash->flags = 0; > *ctx = crc; > > err = crypto_shash_update(shash, address, length); > BUG_ON(err); > > retval = *ctx; > > local_irq_enable(); > > return retval; Actually you would need a spinlock, with IRQs disabled, to properly test this theory since the TFM is shared across the entire system. The really suspicious part of your test results is that the corrupted checksum always evaluates to zero.
Re: [sparc64] crc32c misbehave
From: Anatoly PugachevDate: Wed, 31 May 2017 14:56:52 +0300 > While debugging occasional crc32c checksum errors with xfs disk reads on > sparc64 (T5 [sun4v] 3.6 GHz CPU ldom, debian unstable/sid), Eric have found > that crc32c sometimes returns wrong checksum for data. Eric made a simple > test kernel module (included), which produce the following results on my > sparc64 machines: I don't think that crc32c() is thread safe because of the way it is implemented with a shared TFM crypto object allocated once at boot time. I think you are seeing the corruption any time an interrupt comes in on the same cpu as your test module is running on and does a crc32c() calculation, corrupting the context key value being used by your invocation. At least that's my guess, I could have misread how the key is stored and managed around operations. Can you try something like disabling cpu IRQs around the crc32c() function in lib/libcrc32c.c? Something like: u32 retval; local_irq_disable(); shash->tfm = tfm; shash->flags = 0; *ctx = crc; err = crypto_shash_update(shash, address, length); BUG_ON(err); retval = *ctx; local_irq_enable(); return retval; Thanks.
[PATCH] Staging: ccree: cc_crypto_ctx.h: Fixed a comment coding style issue.
Fixed a comment coding style issue that generated a warning stating that block comments should align the * on each line. Signed-off-by: srishti sharma--- drivers/staging/ccree/cc_crypto_ctx.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers/staging/ccree/cc_crypto_ctx.h index c5784bc..38f6615 100644 --- a/drivers/staging/ccree/cc_crypto_ctx.h +++ b/drivers/staging/ccree/cc_crypto_ctx.h @@ -239,10 +239,10 @@ struct drv_ctx_cipher { enum drv_crypto_padding_type padding_type; u32 key_size; /* numeric value in bytes */ u32 data_unit_size; /* required for XTS */ - /* block_state is the AES engine block state. - * It is used by the host to pass IV or counter at initialization. - * It is used by SeP for intermediate block chaining state and for - * returning MAC algorithms results. */ + /* block_state is the AES engine block state. +* It is used by the host to pass IV or counter at initialization. +* It is used by SeP for intermediate block chaining state and for +* returning MAC algorithms results. */ u8 block_state[CC_AES_BLOCK_SIZE]; u8 key[CC_AES_KEY_SIZE_MAX]; u8 xex_key[CC_AES_KEY_SIZE_MAX]; 2.7.4
Re: [sparc64] crc32c misbehave
A bit more on testing machines: kernel on T5 ldom ttip is git kernel: Linux ttip 4.12.0-rc3-00011-gf511c0b17b08 #327 SMP Wed May 31 12:54:02 MSK 2017 sparc64 GNU/Linux kernel on v215 is debian sid kernel: Linux v215 4.9.0-3-sparc64-smp #1 SMP Debian 4.9.25-1 (2017-05-02) sparc64 GNU/Linux mator@ttip:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/6/lto-wrapper Target: sparc64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=sparc64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-sparc64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-sparc64 --with-arch-directory=sparc64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc=auto --enable-multiarch --enable-targets=all --with-cpu-32=ultrasparc --with-long-double-128 --enable-multilib --enable-checking=release --build=sparc64-linux-gnu --host=sparc64-linux-gnu --target=sparc64-linux-gnu Thread model: posix gcc version 6.3.0 20170516 (Debian 6.3.0-18)
[PATCH] Staging: ccree: cc_crypto_ctx.h: Fixed a comment coding style issue.
Fixed a comment coding style issue that generated a warning stating block comments use * on subsequent lines. Signed-off-by: srishti sharma--- drivers/staging/ccree/cc_crypto_ctx.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers/staging/ccree/cc_crypto_ctx.h index ac39d34..c5784bc 100644 --- a/drivers/staging/ccree/cc_crypto_ctx.h +++ b/drivers/staging/ccree/cc_crypto_ctx.h @@ -279,9 +279,9 @@ struct drv_ctx_aead { /* Get the address of a @member within a given @ctx address - @ctx: The context address - @type: Type of context structure - @member: Associated context field */ + * @ctx: The context address + * @type: Type of context structure + * @member: Associated context field */ #define GET_CTX_FIELD_ADDR(ctx, type, member) (ctx + offsetof(type, member)) #endif /* _CC_CRYPTO_CTX_H_ */ 2.7.4
Re: [sparc64] crc32c misbehave
Hello! While debugging occasional crc32c checksum errors with xfs disk reads on sparc64 (T5 [sun4v] 3.6 GHz CPU ldom, debian unstable/sid), Eric have found that crc32c sometimes returns wrong checksum for data. Eric made a simple test kernel module (included), which produce the following results on my sparc64 machines: # cat test3.c #include #include #include #include #define CRC_SEED (~(u32)0) static int __init mymodule_init (void) { char data[512]; u32 oldcrc = 0xd00dface, crc = 0xdeadbeef; int i; u64 nsec; memset(data, 0, 512); nsec = ktime_get_ns(); for (i = 0; i < 100; i++) { crc = crc32c(CRC_SEED, data, 512); if (i > 0 && crc != oldcrc) printk("i: %d: oldcrc: 0x%x, crc: 0x%x\n", i, oldcrc, crc); oldcrc = crc; } nsec = ktime_get_ns() - nsec; printk("Loop done in %lld nsec\n", nsec); return 0; } static void __exit mymodule_exit (void) { printk ("Module uninitialized successfully \n"); } module_init(mymodule_init); module_exit(mymodule_exit); MODULE_LICENSE("GPL"); root@ttip# modprobe libcrc32c root@ttip# for i in `seq 1 100`; do echo -n "$i "; insmod ./test3.ko; sleep 1; rmmod test3; done # journalctl -k -f CONFIG_CRYPTO_CRC32C = M CONFIG_CRYPTO_CRC32C_SPARC64 = M # lsmod| grep crc crc32test 1557 0 libcrc32c 1382 3 nf_conntrack,xfs,nf_nat crc32c_generic 2528 0 crc16 1745 1 ext4 crc32c_sparc64 3493 3 May 31 12:35:13 ttip kernel: Module uninitialized successfully May 31 12:35:13 ttip kernel: Loop done in 139269659 nsec May 31 12:35:14 ttip kernel: Module uninitialized successfully May 31 12:35:15 ttip kernel: Loop done in 139650571 nsec May 31 12:35:16 ttip kernel: Module uninitialized successfully May 31 12:35:16 ttip kernel: Loop done in 139559959 nsec May 31 12:35:17 ttip kernel: Module uninitialized successfully May 31 12:35:17 ttip kernel: Loop done in 139212192 nsec May 31 12:35:18 ttip kernel: Module uninitialized successfully May 31 12:35:18 ttip kernel: Loop done in 139619805 nsec May 31 12:35:19 ttip kernel: Module uninitialized successfully May 31 12:35:20 ttip kernel: Loop done in 139558722 nsec May 31 12:35:21 ttip kernel: Module uninitialized successfully May 31 12:35:21 ttip kernel: i: 34706: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:35:21 ttip kernel: i: 34707: oldcrc: 0x0, crc: 0xcf03123f May 31 12:35:36 ttip kernel: Module uninitialized successfully May 31 12:35:37 ttip kernel: i: 695650: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:35:37 ttip kernel: i: 695651: oldcrc: 0x0, crc: 0xcf03123f May 31 12:36:24 ttip kernel: Module uninitialized successfully May 31 12:36:24 ttip kernel: i: 664460: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:36:24 ttip kernel: i: 664461: oldcrc: 0x0, crc: 0xcf03123f another run with kernel CONFIG_CRYPTO_CRC32C = M CONFIG_CRYPTO_CRC32C_SPARC64 is not set # lsmod | grep crc libcrc32c 1382 3 nf_conntrack,xfs,nf_nat crc32c_generic 2528 3 crc16 1745 1 ext4 May 31 12:57:26 ttip kernel: test3: loading out-of-tree module taints kernel. May 31 12:57:26 ttip kernel: Loop done in 439555353 nsec May 31 12:57:27 ttip kernel: Module uninitialized successfully May 31 12:57:28 ttip kernel: Loop done in 44064 nsec May 31 12:57:29 ttip kernel: Module uninitialized successfully May 31 12:57:29 ttip kernel: Loop done in 439476126 nsec May 31 12:57:30 ttip kernel: Module uninitialized successfully May 31 12:57:31 ttip kernel: Loop done in 440995512 nsec May 31 12:57:32 ttip kernel: Module uninitialized successfully May 31 12:57:33 ttip kernel: Loop done in 439825440 nsec May 31 12:57:34 ttip kernel: Module uninitialized successfully May 31 12:57:34 ttip kernel: i: 293384: oldcrc: 0xcf03123f, crc: 0x0 May 31 12:57:34 ttip kernel: i: 293385: oldcrc: 0x0, crc: 0xcf03123f May 31 12:57:34 ttip kernel: Loop done in 439500110 nsec May 31 12:57:35 ttip kernel: Module uninitialized successfully May 31 13:02:26 ttip kernel: i: 293577: oldcrc: 0xcf03123f, crc: 0x0 May 31 13:02:26 ttip kernel: i: 293578: oldcrc: 0x0, crc: 0xcf03123f May 31 13:02:26 ttip kernel: i: 515055: oldcrc: 0xcf03123f, crc: 0x0 May 31 13:02:26 ttip kernel: i: 515056: oldcrc: 0x0, crc: 0xcf03123f May 31 13:03:15 ttip kernel: Module uninitialized successfully May 31 13:03:15 ttip kernel: i: 259986: oldcrc: 0xcf03123f, crc: 0x0 May 31 13:03:15 ttip kernel: i: 259987: oldcrc: 0x0, crc: 0xcf03123f May 31 13:03:16 ttip kernel: Loop done in 449601790 nsec cycle loading (for i in `seq 1 100`) crc32test module (CONFIG_CRC32_SELFTEST) shows all tests as passed (no errors). running on older (1.5 GHz cpu) sparc64 (sun4u) v215 machine hit wrong crc error immidiatelly: # lsmod | grep crc crc16 1591 1 ext4 libcrc32c 1234 1 raid456 crc32c_generic 2270 1 root@v215# journalctl -k -b May 31 14:32:13 v215 kernel: systemd: 28 output lines suppressed due to ratelimiting May 31 14:36:34 v215 kernel: test3: loading out-of-tree module taints kernel. May 31 14:36:35
Re: [PATCH v2 2/5] dt-bindings : Document the STM32F4 CRC32 binding
On Tue, May 30, 2017 at 05:50:24PM -0500, Rob Herring wrote: > On Sat, May 20, 2017 at 04:32:12PM +0300, Cosar Dindar wrote: > > Add device tree binding for STM32F4. > > > > Signed-off-by: Cosar Dindar> > --- > > Documentation/devicetree/bindings/crypto/st,stm32-crc.txt | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/crypto/st,stm32-crc.txt > > b/Documentation/devicetree/bindings/crypto/st,stm32-crc.txt > > index 3ba92a5..7b30f1e 100644 > > --- a/Documentation/devicetree/bindings/crypto/st,stm32-crc.txt > > +++ b/Documentation/devicetree/bindings/crypto/st,stm32-crc.txt > > @@ -1,7 +1,7 @@ > > * STMicroelectronics STM32 CRC > > > > Required properties: > > -- compatible: Should be "st,stm32f7-crc". > > +- compatible: Can be either "st,stm32f7-crc" or "st,srm32f4-crc". > > Here you say either, but the example has both. > Thanks for reviewing. Here it could be changed as : Should be one of the following string "st,stm32f7-crc" "st,stm32f4-crc" Also, example may not contain both binding strings, I think. It could be leaved unchanged as in the previous version. I will make these changes with this way if it is OK. > > - reg: The address and length of the peripheral registers space > > - clocks: The input clock of the CRC instance > > > > @@ -10,7 +10,7 @@ Optional properties: none > > Example: > > > > crc: crc@40023000 { > > - compatible = "st,stm32f7-crc"; > > + compatible = "st,stm32f7-crc", "st,stm32f4-crc"; > > reg = <0x40023000 0x400>; > > clocks = < 0 12>; > > }; > > -- > > 2.7.4 > >