| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Instead of using two different ways to id various chiplets, consistently
use "index" property.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Even though device tree compatible property can hold multiple strings,
the struct pdbg_target definition can only take a single compatible
string.
Also, rename chtm hw unit to match nhtm.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Rename the chip-id functions to be consistent with other libpdbg
function names and move them in with the rest of the general libpdbg
code.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Reviewed-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently htm_toggle_debug_bit() assumes the target's parent is a core
but this is only the case for core htm. For nest htm, the target's
parent is a chip.
Also for nest, we don't need to toggle this bit.
This detects the nest htm case and just returns.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
| |
Always run configure functions rather than gating based on current
settings. This helps fix nest HTM which was gated by the current
hardware setting.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
| |
Functions were added to allow a targets parents to be traversed until a parent
of the correct class is found. Switch to using those instead of blindly assuming
a particular node is always a child of the desired class.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
Gives 10% speedup for no more complexity.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we only dump from the start of the buffer to the last
location written which means we can miss a lot of the trace. This is
fine for the record command (which never wraps), but is sub-optimal for
start/stop commands.
This fixes the dumping so it detects if the buffer has wrapped, and if
so, dump the last part of the buffer first, then the rest after.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
This isn't used and just complicates things.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
| |
Add some buffer size checks, use the P8 bit definitions (we don't
support P9 currently and simplify the algorithm to calculate
HTM_MEM_SIZE.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
| |
"htm record" is set to non-wrapping mode
"htm start" is in wrapping mode since it's assumed "htm stop" will
stop it.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
| |
This starts the trace, waits for it to complete (ie fill the buffer),
then stops the trace and dumps out the file.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
| |
Make total the actual trace size.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
| |
Without this the trace doesn't actually run.
In the past, it was only running once the user did another htm command
which toggled this bit during the probe.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
Simplify the code.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
Cleanup the core from running in single issue mode when we stop the trace.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
Base/size aren't needed so remove them.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
So they can use some helper functions later.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
Braces are fun.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
| |
Currently we always generate 0.0-htm.dump irrespective of the chip,
core and thread it's generated from.
This changes it to htm-p??-c??-t??.dump using the correct CPU being
run on.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
| |
Remove unused arguments.
Remove unused pause command.
Make < 80 cols
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
| |
Actually print something in status output. Drop some of the more
esoteric details to PR_INFO()
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
... and avoid duplicate definitions
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It isn't clear if chtm needs to be enabled before or after setting
single dispatch single instruction mode in the core. It also isn't
clear if the NCU enable should be done before of after core enable.
This fixes problems related with chtm being stuck in "INIT" state and
failing to become "READY".
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we have this terrible mess of dt_nodes pointing to targets
and targets pointing to dt_nodes. This has been the cause of bugs due
to folling NULL pointers from a target expecting a node and vice versa.
Consolidating these structs means that there must be a node for a
target.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
|
|
|
|
|
|
|
|
| |
A core is a specific subset of chiplets so rename the existing usage of chiplet
to core so that we may add other types of chiplets to the system. No functional
change.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
| |
In preparation for a better defined libpdbg API rename "struct target" to
something less generic so that we can export the name.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
This is not Hardware Transactional Memory, rather it is the Hardware Trace
Macro (HTM) which can be used to gather data about hardware activity.
Currently only Nest HTM is implemented.
Only runs on a PPC host on a kernel built with CONFIG_PPC_MEMTRACE and
CONFIG_PPC_SCOM.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|