summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/vas.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/vas.h')
-rw-r--r--arch/powerpc/include/asm/vas.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/vas.h b/arch/powerpc/include/asm/vas.h
index 9f81db68f27b..7dcf3bded343 100644
--- a/arch/powerpc/include/asm/vas.h
+++ b/arch/powerpc/include/asm/vas.h
@@ -30,6 +30,14 @@
#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.
*/
enum vas_cop_type {