summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/octeon/cvmx-l2c.h
diff options
context:
space:
mode:
authorPaul Martin <paul.martin@codethink.co.uk>2015-03-30 19:00:56 +0300
committerRalf Baechle <ralf@linux-mips.org>2015-04-01 18:22:14 +0300
commit11db04c8f3f2353b45848ceda2e6e3440520f7cb (patch)
tree1c2acd6c46f0444f0e3cb19e7051c3baf3a78ebf /arch/mips/include/asm/octeon/cvmx-l2c.h
parent0a1cd2c5887cc87178adf9f58191a18cca8c55c0 (diff)
downloadlinux-11db04c8f3f2353b45848ceda2e6e3440520f7cb.tar.xz
MIPS: Octeon: Turn hardware bitfields and structures inside out.
Although the proper way to do this for bitfields would be to use the macro that Ralf has provided, this is a little easier to understand as a diff. Signed-off-by: Paul Martin <paul.martin@codethink.co.uk> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9628/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/octeon/cvmx-l2c.h')
-rw-r--r--arch/mips/include/asm/octeon/cvmx-l2c.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/include/asm/octeon/cvmx-l2c.h b/arch/mips/include/asm/octeon/cvmx-l2c.h
index 11c0a8fa8eb5..ddb429210a0e 100644
--- a/arch/mips/include/asm/octeon/cvmx-l2c.h
+++ b/arch/mips/include/asm/octeon/cvmx-l2c.h
@@ -53,12 +53,21 @@
union cvmx_l2c_tag {
uint64_t u64;
struct {
+#ifdef __BIG_ENDIAN_BITFIELD
uint64_t reserved:28;
uint64_t V:1; /* Line valid */
uint64_t D:1; /* Line dirty */
uint64_t L:1; /* Line locked */
uint64_t U:1; /* Use, LRU eviction */
uint64_t addr:32; /* Phys mem (not all bits valid) */
+#else
+ uint64_t addr:32; /* Phys mem (not all bits valid) */
+ uint64_t U:1; /* Use, LRU eviction */
+ uint64_t L:1; /* Line locked */
+ uint64_t D:1; /* Line dirty */
+ uint64_t V:1; /* Line valid */
+ uint64_t reserved:28;
+#endif
} s;
};