Comments

Implement instr_is_load_store_2_06() to detect whether a given instruction
is one of the fixed-point or floating-point load/store instructions in the
POWER Instruction Set Architecture v2.06.
This function will be used in a follow-on patch to save memory hierarchy
information of the load/store on a Power7 system. (Power8 systems set some
bits in the SIER to identify load/store operations and hence don't need a
similar functionality).
Based on optimized code from Michael Ellerman and comments from Tom Musta.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
Changelog[v6]
- [Michael Ellerman, Tom Musta]: Optmize the implementation to
avoid for loop.
arch/powerpc/include/asm/code-patching.h | 1 +
arch/powerpc/lib/code-patching.c | 45 ++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+)

David Laight [David.Laight@aculab.com] wrote:
|
| I can't help feeling the code could do with some comments about
| which actual instructions are selected where.
At a high level, only the load and store instructions are selected.
I added a reference to the Appendix F (Opcode maps) in the function
header. The opcode maps is a table of upper x lower values. From
that table it should be fairly straightforward which instructions
are selected.
How about I add this to the function header ?
* Please use the table in Appendix F (opcode maps) to determine
* events selected by this function.
There are over 100 instructions selected by this list and wasn't
sure if we should list them all.
Sukadev