summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/bitops.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-02-28 12:00:48 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-03-10 16:32:08 +1100
commit7b9f71f974a12740e79e918cfd58c2fce0b5b580 (patch)
tree0b230999683b3ceee32c7cb553da03a2bec03671 /arch/powerpc/include/asm/bitops.h
parentc1bbf387d6191e6e18f3adc4db45b922822c2ba4 (diff)
downloadop-kernel-dev-7b9f71f974a12740e79e918cfd58c2fce0b5b580.zip
op-kernel-dev-7b9f71f974a12740e79e918cfd58c2fce0b5b580.tar.gz
powerpc/64s: POWER9 machine check handler
Add POWER9 machine check handler. There are several new types of errors added, so logging messages for those are also added. This doesn't attempt to reuse any of the P7/8 defines or functions, because that becomes too complex. The better option in future is to use a table driven approach. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/bitops.h')
-rw-r--r--arch/powerpc/include/asm/bitops.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h
index 73eb794..bc5fdfd 100644
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch/powerpc/include/asm/bitops.h
@@ -51,6 +51,10 @@
#define PPC_BIT(bit) (1UL << PPC_BITLSHIFT(bit))
#define PPC_BITMASK(bs, be) ((PPC_BIT(bs) - PPC_BIT(be)) | PPC_BIT(bs))
+/* Put a PPC bit into a "normal" bit position */
+#define PPC_BITEXTRACT(bits, ppc_bit, dst_bit) \
+ ((((bits) >> PPC_BITLSHIFT(ppc_bit)) & 1) << (dst_bit))
+
#include <asm/barrier.h>
/* Macro for generating the ***_bits() functions */
OpenPOWER on IntegriCloud