All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pavitrakumar Managutte" <pavitrakumarm@vayavyalabs.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v18 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile
Date: Thu, 23 Jul 2026 12:14:39 +0000	[thread overview]
Message-ID: <20260723121509.00E2E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723120156.285270-5-pavitrakumarm@vayavyalabs.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] A `bool` Kconfig option `CRYPTO_DEV_SPACC_HASH` selects `tristate` crypto algorithms, which forces them to be built-in (`=y`) even when the main driver is compiled as a module (`=m`).
- [Medium] Hardware-specific tuning parameters (arbitration priority and watchdog counter) are hardcoded in Kconfig.
--

--- Patch [4]: [PATCH v18 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile ---
commit 1a5158f785caf71e111384b68f165f725e321ebf
Author: Pavitrakumar Managutte <pavitrakumarm@vayavyalabs.com>

crypto: spacc - Add SPAcc Kconfig and Makefile

This commit introduces the Kconfig and Makefile configurations for the SPAcc
driver. It adds options for driver inclusion, hashing, debug traces, and
hardware-specific tunables.

> diff --git a/drivers/crypto/dwc-spacc/Kconfig b/drivers/crypto/dwc-spacc/Kconfig
> new file mode 100644
> index 0000000000000..bf70adc1a2084
> --- /dev/null
> +++ b/drivers/crypto/dwc-spacc/Kconfig

[ ... ]

> +if CRYPTO_DEV_SPACC
> +
> +config CRYPTO_DEV_SPACC_HASH
> +	bool "Enable HASH functionality"
> +	default CRYPTO_DEV_SPACC
> +	select CRYPTO_HASH
> +	select CRYPTO_SHA1
> +	select CRYPTO_MD5
> +	select CRYPTO_SHA256
> +	select CRYPTO_SHA512
> +	select CRYPTO_HMAC
> +	select CRYPTO_CMAC
> +	select CRYPTO_XCBC
> +	select CRYPTO_AES
> +	select CRYPTO_SM4_GENERIC

[Severity: Medium]
Since CRYPTO_DEV_SPACC_HASH is a boolean option, if the main driver is
compiled as a module, will this select statement force all these tristate
algorithms to be built-in rather than modules?

It looks like this might cause unnecessary vmlinux bloat when
CRYPTO_DEV_SPACC is set to m.

> +
> +	help
> +	  Say y to enable Hash functionality of SPAcc.

[ ... ]

> +config CRYPTO_DEV_SPACC_PRIORITY
> +	int "VSPACC priority value"
> +	range 0 15
> +	default 1
> +	help
> +	  Default arbitration priority weight for this Virtual SPAcc instance.
> +	  Hardware resets this to 1. Higher values means higher priority.
> +
> +config CRYPTO_DEV_SPACC_INTERNAL_COUNTER
> +	int "SPAcc internal counter value"
> +	range 100000 1048575
> +	default 100000
> +	help
> +	  This value configures a hardware watchdog counter in the SPAcc
> +	  engine.The counter starts ticking when a completed cryptographic
> +	  job is sitting in the STATUS FIFO. If the job remains unprocessed
> +	  for the configured duration, an interrupt is triggered to ensure
> +	  it is serviced.

[Severity: Medium]
Does hardcoding these hardware tuning parameters in Kconfig break the ability
to support a multi-platform kernel?

For systems where a single kernel image boots on multiple boards, different
SoC instances might require different tuning values.

Would it be better to provide these via Device Tree properties or module
parameters instead?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260723120156.285270-1-pavitrakumarm@vayavyalabs.com?part=4

      reply	other threads:[~2026-07-23 12:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 12:01 [PATCH v18 0/4] crypto: spacc - Add SPAcc Crypto Driver Pavitrakumar Managutte
2026-07-23 12:01 ` [PATCH v18 1/4] dt-bindings: crypto: Document support for SPAcc Pavitrakumar Managutte
2026-07-23 12:01 ` [PATCH v18 2/4] crypto: spacc - Add SPAcc ahash support Pavitrakumar Managutte
2026-07-23 12:24   ` sashiko-bot
2026-07-23 12:01 ` [PATCH v18 3/4] crypto: spacc - Add SPAcc AUTODETECT Support Pavitrakumar Managutte
2026-07-23 12:19   ` sashiko-bot
2026-07-23 12:01 ` [PATCH v18 4/4] crypto: spacc - Add SPAcc Kconfig and Makefile Pavitrakumar Managutte
2026-07-23 12:14   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260723121509.00E2E1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=pavitrakumarm@vayavyalabs.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.