mbox series

[00/10] Device tree path base targeting

Message ID 20181002060430.3344784-1-amitay@ozlabs.org
Headers show
Series Device tree path base targeting | expand

Message

Amitay Isaacs Oct. 2, 2018, 6:04 a.m. UTC
This patchset adds ability to select any arbitrary target in a device tree.
A target is identified by it's name in the device tree (e.g. 'pib' for
processor, 'thread' for hardware thread).

Path based targets are specified using -P.

Examples:
    -P thread                    select all threads
    -P thread0                   select all threads with index 0
    -P pib0/thread               select all threads for proc 0
    -P pib0/core[1,2]/thread     select all threads for proc 0 and cores 1,2

The existing target selection using -p/-c/-t/-a/-l now maps to path based
targets.  Currently the only commands that are using path based targeting
are:

   probe
   getscom
   putscom

Amitay Isaacs (10):
  main: Convert target_selection() to return a boolean
  Makefile: Keep the list of dependencies sorted
  util: Move parse_list() into a separate file
  path: Add device tree path based targeting
  main: Add an option for path based targetting
  main: Convert -p/-c/-t/-a/-l to path based targets
  main: Switch to path based target selection
  main: Convert probe to use path style targeting
  tests: Add path based selection tests
  main: Convert getscom/putscom

 Makefile.am              |  27 +-
 src/main.c               | 297 +++++++++-------------
 src/path.c               | 383 ++++++++++++++++++++++++++++
 src/path.h               | 125 +++++++++
 src/scom.c               |  82 ++++--
 src/util.c               |  95 +++++++
 src/util.h               |  34 +++
 tests/test_selection.sh  |  43 +---
 tests/test_selection2.sh | 537 +++++++++++++++++++++++++++++++++++++++
 9 files changed, 1375 insertions(+), 248 deletions(-)
 create mode 100644 src/path.c
 create mode 100644 src/path.h
 create mode 100644 src/util.c
 create mode 100644 src/util.h
 create mode 100755 tests/test_selection2.sh