linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] add 842 hw compression for PowerNV platform
@ 2015-04-07 17:34 Dan Streetman
  2015-04-07 17:34 ` [PATCH 01/11] powerpc: export of_get_ibm_chip_id function Dan Streetman
                   ` (11 more replies)
  0 siblings, 12 replies; 46+ messages in thread
From: Dan Streetman @ 2015-04-07 17:34 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras
  Cc: linux-kernel, Robert Jennings, linux-crypto, linuxppc-dev,
	Seth Jennings, Dan Streetman

IBM PowerPC processors starting at version P7+ contain a NX coprocessor that
provides various hw-accelerated functions, one of which is memory compression
to the IBM "842" compression format.  This NX-842 coprocessor is already
supported on the pSeries platform, by the nx-842.c driver and the crypto
compression interface at crypto/842.c.  This patch set adds support for NX-842
on the PowerNV (Non-Virtualized) platform.

The existing pSeries platform NX-842 driver could not be re-used for the
PowerNV platform driver, as there are fundamentally different interfaces;
on pSeries the system hypervisor (pHyp) provides the interface and manages
communication with the coprocessor, while on PowerNV the kernel talks directly
to the coprocessor using the ICSWX instruction.  The data structures used to
describe each compression or decompression request to the coprocessor are
also different between pHyp's interface and direct communication with ICSWX.
So, different drivers for pSeries and PowerNV are required.  Adding the new
PowerNV driver but keeping the interface to the drivers the same required
adding a new common frontend interface, to which only one of the platform
drivers will connect (based on what platform the kernel is currently running
on), and moving some functionality out of the existing pSeries driver into a
more common location.  Also, the crypto/842.c interface to the NX-842 hw
driver is modified to be able to handle any alignment or length input or
output buffer; currently with the pSeries driver only page-size and
page-aligned (uncompressed) buffers are possible.

The result is a crypto 842 interface that allows using any input and output
buffers (i.e. any alignment and length) to communicate with the NX-842
hardware on either the pSeries or PowerNV platforms, as well as a generic
842 software decompressor that the crypto 842 interface falls back to if the
NX-842 hardware fails and/or returns error during decompression.

Finally, this also adds a generic crypto compression selftest module, that
can verify correct compression/decompression cycles using variable alignment
and length buffers, multiple threads, and can calculate the throughput.

Dan Streetman (11):
  powerpc: export of_get_ibm_chip_id function
  powerpc: Add ICSWX instruction
  crypto: add software 842 decompression
  drivers/crypto/nx: move nx-842.c to nx-842-pseries.c
  drivers/crypto/nx: add NX-842 platform frontend driver
  drivers/crypto/nx: add nx842 constraints
  drivers/crypto/nx: add PowerNV platform NX-842 driver
  drivers/crypto/nx: simplify pSeries nx842 driver
  crypto: remove LZO fallback from crypto 842
  crypto: rewrite crypto 842 to use nx842 constraints
  crypto: add crypto compression sefltest

 MAINTAINERS                           |    5 +-
 arch/powerpc/include/asm/icswx.h      |  184 ++++
 arch/powerpc/include/asm/ppc-opcode.h |   13 +
 arch/powerpc/kernel/prom.c            |    1 +
 crypto/842.c                          |  495 ++++++++--
 crypto/Kconfig                        |   13 +-
 crypto/Makefile                       |    1 +
 crypto/comp_selftest.c                |  928 +++++++++++++++++++
 drivers/crypto/Kconfig                |    6 +-
 drivers/crypto/nx/Kconfig             |   43 +-
 drivers/crypto/nx/Makefile            |    4 +
 drivers/crypto/nx/nx-842-powernv.c    |  623 +++++++++++++
 drivers/crypto/nx/nx-842-pseries.c    | 1126 +++++++++++++++++++++++
 drivers/crypto/nx/nx-842.c            | 1623 +++------------------------------
 drivers/crypto/nx/nx-842.h            |  131 +++
 include/linux/nx842.h                 |   17 +-
 include/linux/sw842.h                 |    7 +
 lib/842/842_decompress.c              |  413 +++++++++
 lib/842/Makefile                      |    1 +
 lib/Kconfig                           |    3 +
 lib/Makefile                          |    1 +
 21 files changed, 4001 insertions(+), 1637 deletions(-)
 create mode 100644 arch/powerpc/include/asm/icswx.h
 create mode 100644 crypto/comp_selftest.c
 create mode 100644 drivers/crypto/nx/nx-842-powernv.c
 create mode 100644 drivers/crypto/nx/nx-842-pseries.c
 create mode 100644 drivers/crypto/nx/nx-842.h
 create mode 100644 include/linux/sw842.h
 create mode 100644 lib/842/842_decompress.c
 create mode 100644 lib/842/Makefile

-- 
2.1.0

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

end of thread, other threads:[~2015-05-11  7:21 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-07 17:34 [PATCH 00/11] add 842 hw compression for PowerNV platform Dan Streetman
2015-04-07 17:34 ` [PATCH 01/11] powerpc: export of_get_ibm_chip_id function Dan Streetman
2015-04-07 17:34 ` [PATCH 02/11] powerpc: Add ICSWX instruction Dan Streetman
2015-04-07 17:34 ` [PATCH 03/11] crypto: add software 842 decompression Dan Streetman
2015-04-07 17:34 ` [PATCH 04/11] drivers/crypto/nx: move nx-842.c to nx-842-pseries.c Dan Streetman
2015-04-07 17:34 ` [PATCH 05/11] drivers/crypto/nx: add NX-842 platform frontend driver Dan Streetman
2015-04-07 17:34 ` [PATCH 06/11] drivers/crypto/nx: add nx842 constraints Dan Streetman
2015-04-07 17:34 ` [PATCH 07/11] drivers/crypto/nx: add PowerNV platform NX-842 driver Dan Streetman
2015-04-07 17:34 ` [PATCH 08/11] drivers/crypto/nx: simplify pSeries nx842 driver Dan Streetman
2015-04-07 17:34 ` [PATCH 09/11] crypto: remove LZO fallback from crypto 842 Dan Streetman
2015-04-08 14:16   ` Herbert Xu
2015-04-08 14:28     ` Dan Streetman
2015-04-08 14:38       ` Herbert Xu
2015-04-08 14:45         ` Dan Streetman
2015-04-08 14:48           ` Herbert Xu
2015-04-07 17:34 ` [PATCH 10/11] crypto: rewrite crypto 842 to use nx842 constraints Dan Streetman
2015-04-07 17:34 ` [PATCH 11/11] crypto: add crypto compression sefltest Dan Streetman
2015-04-08 14:16   ` Herbert Xu
2015-04-08 14:48     ` Dan Streetman
2015-05-06 16:50 ` [PATCHv2 00/10] add 842 hw compression for PowerNV platform Dan Streetman
2015-05-06 16:50   ` [PATCH 01/10] powerpc: export of_get_ibm_chip_id function Dan Streetman
2015-05-06 16:50   ` [PATCH 02/10] powerpc: Add ICSWX instruction Dan Streetman
2015-05-06 16:50   ` [PATCH 03/10] lib: add software 842 compression/decompression Dan Streetman
2015-05-06 16:51   ` [PATCH 04/10] crypto: change 842 alg to use software Dan Streetman
2015-05-07  3:07     ` Herbert Xu
2015-05-06 16:51   ` [PATCH 05/10] drivers/crypto/nx: rename nx-842.c to nx-842-pseries.c Dan Streetman
2015-05-06 16:51   ` [PATCH 06/10] drivers/crypto/nx: add NX-842 platform frontend driver Dan Streetman
2015-05-06 16:51   ` [PATCH 07/10] drivers/crypto/nx: add nx842 constraints Dan Streetman
2015-05-06 16:51   ` [PATCH 08/10] drivers/crypto/nx: add PowerNV platform NX-842 driver Dan Streetman
2015-05-06 16:51   ` [PATCH 09/10] drivers/crypto/nx: simplify pSeries nx842 driver Dan Streetman
2015-05-06 16:51   ` [PATCH 10/10] drivers/crypto/nx: add hardware 842 crypto comp alg Dan Streetman
2015-05-07  3:12     ` Herbert Xu
2015-05-07 15:06       ` Dan Streetman
2015-05-08  2:32         ` Herbert Xu
2015-05-07 17:49   ` [PATCHv3 00/10] add 842 hw compression for PowerNV platform Dan Streetman
2015-05-07 17:49     ` [PATCH 01/10] powerpc: export of_get_ibm_chip_id function Dan Streetman
2015-05-07 17:49     ` [PATCH 02/10] powerpc: Add ICSWX instruction Dan Streetman
2015-05-07 17:49     ` [PATCH 03/10] lib: add software 842 compression/decompression Dan Streetman
2015-05-07 17:49     ` [PATCH 04/10] crypto: change 842 alg to use software Dan Streetman
2015-05-07 17:49     ` [PATCH 05/10] drivers/crypto/nx: rename nx-842.c to nx-842-pseries.c Dan Streetman
2015-05-07 17:49     ` [PATCH 06/10] drivers/crypto/nx: add NX-842 platform frontend driver Dan Streetman
2015-05-07 17:49     ` [PATCH 07/10] drivers/crypto/nx: add nx842 constraints Dan Streetman
2015-05-07 17:49     ` [PATCH 08/10] drivers/crypto/nx: add PowerNV platform NX-842 driver Dan Streetman
2015-05-07 17:49     ` [PATCH 09/10] drivers/crypto/nx: simplify pSeries nx842 driver Dan Streetman
2015-05-07 17:49     ` [PATCH 10/10] drivers/crypto/nx: add hardware 842 crypto comp alg Dan Streetman
2015-05-11  7:21     ` [PATCHv3 00/10] add 842 hw compression for PowerNV platform Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).