summaryrefslogtreecommitdiffstats
path: root/libpdbg/htm.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2018-10-25 16:38:26 +1100
committerAlistair Popple <alistair@popple.id.au>2018-11-09 11:27:47 +1100
commit82bd8aefa25318c03a269f6863142525010260e4 (patch)
treea9f23b0b31779c86ed5f133cd0e62a2f3e17b394 /libpdbg/htm.c
parent541331dc5e346e45217caf3fcdf3f00479ef05a9 (diff)
downloadpdbg-82bd8aefa25318c03a269f6863142525010260e4.tar.gz
pdbg-82bd8aefa25318c03a269f6863142525010260e4.zip
libpdbg: Rework target compatible
Rework the target compatible code to reuse existing libpdbg code where possible. Renames and exports these functions for use by external libraries. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
Diffstat (limited to 'libpdbg/htm.c')
-rw-r--r--libpdbg/htm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpdbg/htm.c b/libpdbg/htm.c
index 40d54d3..1ca176d 100644
--- a/libpdbg/htm.c
+++ b/libpdbg/htm.c
@@ -520,7 +520,7 @@ static int configure_nhtm(struct htm *htm, bool wrap)
NHTM_TTYPE_SIZE_MASK ))) /* no pattern matching */
return -1;
- if (dt_node_is_compatible(&htm->target, "ibm,power9-nhtm")) {
+ if (pdbg_target_compatible(&htm->target, "ibm,power9-nhtm")) {
if (HTM_ERR(pib_read(&htm->target, NHTM_FLEX_MUX, &val)))
return -1;
@@ -735,7 +735,7 @@ static int htm_toggle_debug_bit(struct htm *htm)
return 0; /* nhtm case */
/* FIXME: this is a hack for P8 */
- if (!dt_node_is_compatible(core, "ibm,power8-core")) {
+ if (!pdbg_target_compatible(core, "ibm,power8-core")) {
PR_ERROR("HTM is POWER8 only currently\n");
return -1;
}
@@ -862,7 +862,7 @@ static int do_htm_status(struct htm *htm)
uint64_t val, total;
int i, regs = 9;
- if (dt_node_is_compatible(&htm->target, "ibm,power9-nhtm"))
+ if (pdbg_target_compatible(&htm->target, "ibm,power9-nhtm"))
regs++;
PR_INFO("HTM register dump:\n");
@@ -1091,7 +1091,7 @@ static int nhtm_probe(struct pdbg_target *target)
if (!is_debugfs_memtrace_ok() || !is_debugfs_scom_ok())
return -1;
- if (dt_node_is_compatible(target, "ibm,power9-nhtm")) {
+ if (pdbg_target_compatible(target, "ibm,power9-nhtm")) {
pib_read(target, NHTM_FLEX_MUX, &val);
if (GETFIELD(NHTM_FLEX_MUX_MASK, val) != NHTM_FLEX_DEFAULT) {
PR_DEBUG("FLEX_MUX not default\n");
OpenPOWER on IntegriCloud