]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Revert "powerpc/powernv: Move GET_FIELD/SET_FIELD to vas.h"
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 4 Oct 2017 21:15:33 +0000 (16:15 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 4 Oct 2017 21:17:55 +0000 (16:17 -0500)
BugLink: http://bugs.launchpad.net/bugs/1721391
This reverts commit d799c495873bdf3bb4164e914dedf07b155b9829.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/include/asm/vas.h
drivers/crypto/nx/nx-842-powernv.c
drivers/crypto/nx/nx-842.h

index 7dcf3bded343747a1118db782038f2ee6367fddc..9f81db68f27b4d8baa113fbdd78da11b20fd59e5 100644 (file)
 #define VAS_THRESH_FIFO_GT_QTR_FULL    2
 #define VAS_THRESH_FIFO_GT_EIGHTH_FULL 3
 
-/*
- * Get/Set bit fields
- */
-#define GET_FIELD(m, v)                (((v) & (m)) >> MASK_LSH(m))
-#define MASK_LSH(m)            (__builtin_ffsl(m) - 1)
-#define SET_FIELD(m, v, val)   \
-               (((v) & ~(m)) | ((((typeof(v))(val)) << MASK_LSH(m)) & (m)))
-
 /*
  * Co-processor Engine type.
  */
index 3abb045cdba72bbf462e81b9cd769e3f2de0bbc6..1710f80a09ec3b3227af8e2d04e9d3196dea031c 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <asm/prom.h>
 #include <asm/icswx.h>
-#include <asm/vas.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Dan Streetman <ddstreet@ieee.org>");
@@ -425,9 +424,9 @@ static int nx842_powernv_function(const unsigned char *in, unsigned int inlen,
 
        /* set up CCW */
        ccw = 0;
-       ccw = SET_FIELD(CCW_CT, ccw, nx842_ct);
-       ccw = SET_FIELD(CCW_CI_842, ccw, 0); /* use 0 for hw auto-selection */
-       ccw = SET_FIELD(CCW_FC_842, ccw, fc);
+       ccw = SET_FIELD(ccw, CCW_CT, nx842_ct);
+       ccw = SET_FIELD(ccw, CCW_CI_842, 0); /* use 0 for hw auto-selection */
+       ccw = SET_FIELD(ccw, CCW_FC_842, fc);
 
        /* set up CRB's CSB addr */
        csb_addr = nx842_get_pa(csb) & CRB_CSB_ADDRESS;
index 30929bd7d1a93afbffb1fe65ada0ea6864ef7fc4..a4eee3bba93736b601ca587fb702b4e88de1b9a9 100644 (file)
@@ -100,6 +100,11 @@ static inline unsigned long nx842_get_pa(void *addr)
        return page_to_phys(vmalloc_to_page(addr)) + offset_in_page(addr);
 }
 
+/* Get/Set bit fields */
+#define MASK_LSH(m)            (__builtin_ffsl(m) - 1)
+#define GET_FIELD(v, m)                (((v) & (m)) >> MASK_LSH(m))
+#define SET_FIELD(v, m, val)   (((v) & ~(m)) | (((val) << MASK_LSH(m)) & (m)))
+
 /**
  * This provides the driver's constraints.  Different nx842 implementations
  * may have varying requirements.  The constraints are: