mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] crypto: engine - add acomp support and adapt Hisilicon HPRE and ZIP drivers
@ 2026-11-09  7:35 Chenghai Huang
  2026-11-09  7:35 ` [PATCH 1/4] crypto: engine - clear busy and recheck running in the retry pump loop Chenghai Huang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chenghai Huang @ 2026-11-09  7:35 UTC (permalink / raw)
  To: herbert, davem
  Cc: linux-kernel, linux-crypto, liulongfang, qianweili, wangzhou1,
	linwenkai6

This series adds asynchronous compression (acomp) support to the crypto
engine framework, then converts the Hisilicon HPRE and ZIP drivers to
use it instead of their hand-rolled backlog / queue-retry mechanisms.

Patch 1 fixes the retry pump loop in the engine core: it skips the
idle check that clears engine->busy and rechecks engine->running, so
after the queue drains a later request can be enqueued without a pump
and stall the engine, and crypto_engine_stop() can spin on the stale
busy flag up to -EBUSY.

Patch 2 adds struct acomp_engine_alg with transfer/finalize helpers and
a register/unregister interface, mirroring the existing akcipher and
kpp support. struct acomp_alg moves to <crypto/acompress.h> so that
engine.h can embed it.

Patch 3 gives each HPRE QP (DH/RSA/ECDH) its own crypto engine.
MAY_BACKLOG requests are routed through the engine, which provides the
backlog queue and retries on -ENOSPC; other requests are sent directly
with bounded retries, and in-flight requests are cleaned up by the
completion callback.

Patch 4 gives ZIP a per-device engine pool, with each QP context
borrowing an engine by its QP id so compression and decompression
queue independently. Requests are sent to the hardware when it has
room; on a full queue they are parked in the engine queue and retried,
with the DMA mappings kept across retries.

Chenghai Huang (3):
  crypto: engine - clear busy and recheck running in the retry pump loop
  crypto: engine - add acomp support
  crypto: hisilicon/zip - adapt to use crypto engine

Weili Qian (1):
  crypto: hisilicon/hpre - use crypto engine framework

 crypto/crypto_engine.c                      |  46 ++-
 drivers/crypto/hisilicon/Kconfig            |   2 +
 drivers/crypto/hisilicon/hpre/hpre.h        |   4 +
 drivers/crypto/hisilicon/hpre/hpre_crypto.c | 414 +++++++++++++++-----
 drivers/crypto/hisilicon/zip/zip.h          |   5 +
 drivers/crypto/hisilicon/zip/zip_crypto.c   | 358 +++++++++++------
 include/crypto/acompress.h                  |  33 ++
 include/crypto/engine.h                     |  13 +
 include/crypto/internal/acompress.h         |  33 --
 9 files changed, 649 insertions(+), 259 deletions(-)

-- 
2.43.0

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

end of thread, other threads:[~2026-11-09  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09  7:35 [PATCH 0/4] crypto: engine - add acomp support and adapt Hisilicon HPRE and ZIP drivers Chenghai Huang
2026-11-09  7:35 ` [PATCH 1/4] crypto: engine - clear busy and recheck running in the retry pump loop Chenghai Huang
2026-11-09  7:35 ` [PATCH 2/4] crypto: engine - add acomp support Chenghai Huang
2026-11-09  7:35 ` [PATCH 3/4] crypto: hisilicon/hpre - use crypto engine framework Chenghai Huang
2026-11-09  7:35 ` [PATCH 4/4] crypto: hisilicon/zip - adapt to use crypto engine Chenghai Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®