crypto: nx - move include/linux/nx842.h into drivers/crypto/nx/nx-842.h
authorDan Streetman <ddstreet@ieee.org>
Fri, 12 Jun 2015 14:58:46 +0000 (10:58 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 15 Jun 2015 10:15:56 +0000 (18:15 +0800)
Move the contents of the include/linux/nx842.h header file into the
drivers/crypto/nx/nx-842.h header file.  Remove the nx842.h header
file and its entry in the MAINTAINERS file.

The include/linux/nx842.h header originally was there because the
crypto/842.c driver needed it to communicate with the nx-842 hw
driver.  However, that crypto compression driver was moved into
the drivers/crypto/nx/ directory, and now can directly include the
nx-842.h header.  Nothing else needs the public include/linux/nx842.h
header file, as all use of the nx-842 hardware driver will be through
the "842-nx" crypto compression driver, since the direct nx-842 api is
very limited in the buffer alignments and sizes that it will accept,
and the crypto compression interface handles those limitations and
allows any alignment and size buffers.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
MAINTAINERS
drivers/crypto/nx/nx-842-crypto.c
drivers/crypto/nx/nx-842.h
include/linux/nx842.h [deleted file]

index 912c9d9f741c5f95b3a20ea7a2278e7b55c6c5ea..fb06e1eba7589b3e565b7f015b0ecadce46110b1 100644 (file)
@@ -4862,7 +4862,6 @@ IBM Power 842 compression accelerator
 M:     Dan Streetman <ddstreet@us.ibm.com>
 S:     Supported
 F:     drivers/crypto/nx/nx-842*
-F:     include/linux/nx842.h
 F:     include/linux/sw842.h
 F:     crypto/842.c
 F:     lib/842/
index 2ffa1031c91f67483366f2a226397b2a43ffac1d..95066f336b26d7acef53c4c179fc2d5fe9cf1653 100644 (file)
 #include <linux/module.h>
 #include <linux/crypto.h>
 #include <linux/vmalloc.h>
-#include <linux/nx842.h>
 #include <linux/sw842.h>
 #include <linux/ratelimit.h>
 
+#include "nx-842.h"
+
 /* The first 5 bits of this magic are 0x1f, which is an invalid 842 5-bit
  * template (see lib/842/842.h), so this magic number will never appear at
  * the start of a raw 842 compressed buffer.  That is important, as any buffer
index 1730f4da1cf61abb473bba1efa85e16adfc206b2..4dbac11c2aa510c7064a16c62c41f98f6bc624a1 100644 (file)
@@ -4,7 +4,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/nx842.h>
 #include <linux/sw842.h>
 #include <linux/of.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/ratelimit.h>
 
+#define __NX842_PSERIES_MEM_COMPRESS   (10240)
+#define __NX842_POWERNV_MEM_COMPRESS   (1024)
+
+#define NX842_MEM_COMPRESS     (max_t(unsigned int,                    \
+       __NX842_PSERIES_MEM_COMPRESS, __NX842_POWERNV_MEM_COMPRESS))
+
 /* Restrictions on Data Descriptor List (DDL) and Entry (DDE) buffers
  *
  * From NX P8 workbook, sec 4.9.1 "842 details"
@@ -104,6 +109,13 @@ static inline unsigned long nx842_get_pa(void *addr)
 #define GET_FIELD(v, m)                (((v) & (m)) >> MASK_LSH(m))
 #define SET_FIELD(v, m, val)   (((v) & ~(m)) | (((val) << MASK_LSH(m)) & (m)))
 
+struct nx842_constraints {
+       int alignment;
+       int multiple;
+       int minimum;
+       int maximum;
+};
+
 struct nx842_driver {
        char *name;
        struct module *owner;
@@ -124,4 +136,11 @@ void nx842_platform_driver_unset(struct nx842_driver *driver);
 bool nx842_platform_driver_get(void);
 void nx842_platform_driver_put(void);
 
+int nx842_constraints(struct nx842_constraints *constraints);
+
+int nx842_compress(const unsigned char *in, unsigned int in_len,
+                  unsigned char *out, unsigned int *out_len, void *wrkmem);
+int nx842_decompress(const unsigned char *in, unsigned int in_len,
+                    unsigned char *out, unsigned int *out_len, void *wrkmem);
+
 #endif /* __NX_842_H__ */
diff --git a/include/linux/nx842.h b/include/linux/nx842.h
deleted file mode 100644 (file)
index 4ddf68d..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __NX842_H__
-#define __NX842_H__
-
-#define __NX842_PSERIES_MEM_COMPRESS   (10240)
-#define __NX842_POWERNV_MEM_COMPRESS   (1024)
-
-#define NX842_MEM_COMPRESS     (max_t(unsigned int,                    \
-       __NX842_PSERIES_MEM_COMPRESS, __NX842_POWERNV_MEM_COMPRESS))
-
-struct nx842_constraints {
-       int alignment;
-       int multiple;
-       int minimum;
-       int maximum;
-};
-
-int nx842_constraints(struct nx842_constraints *constraints);
-
-int nx842_compress(const unsigned char *in, unsigned int in_len,
-                  unsigned char *out, unsigned int *out_len, void *wrkmem);
-int nx842_decompress(const unsigned char *in, unsigned int in_len,
-                    unsigned char *out, unsigned int *out_len, void *wrkmem);
-
-#endif
This page took 0.033697 seconds and 5 git commands to generate.