mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
powerpc/ftrace: Use PPC_RAW_xxx() macros instead of opencoding.
PPC_RAW_xxx() macros are self explanatory and less error prone than open coding. Use them in ftrace.c Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/9292094c9a69cef6d29ee83f435a557b59c45065.1652074503.git.christophe.leroy@csgroup.eu
This commit is contained in:
committed by
Michael Ellerman
parent
cf9df92a82
commit
e89aa642be
@@ -363,6 +363,10 @@
|
||||
#define PPC_HIGHER(v) (((v) >> 32) & 0xffff)
|
||||
#define PPC_HIGHEST(v) (((v) >> 48) & 0xffff)
|
||||
|
||||
/* LI Field */
|
||||
#define PPC_LI_MASK 0x03fffffc
|
||||
#define PPC_LI(v) ((v) & PPC_LI_MASK)
|
||||
|
||||
/*
|
||||
* Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
|
||||
* larx with EH set as an illegal instruction.
|
||||
@@ -583,6 +587,7 @@
|
||||
#define PPC_RAW_EIEIO() (0x7c0006ac)
|
||||
|
||||
#define PPC_RAW_BRANCH(addr) (PPC_INST_BRANCH | ((addr) & 0x03fffffc))
|
||||
#define PPC_RAW_BL(offset) (0x48000001 | PPC_LI(offset))
|
||||
|
||||
/* Deal with instructions that older assemblers aren't aware of */
|
||||
#define PPC_BCCTR_FLUSH stringify_in_c(.long PPC_INST_BCCTR_FLUSH)
|
||||
|
||||
Reference in New Issue
Block a user