Skip to content

kdb: Add the ability to read iomapped memory via kdb + clean up "md" commands

Douglas Anderson lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13kdb: Get rid of "minlen" for the "md" commandkernel/debug/kdb/kdb_main.c+0 -10 replies
2/13kdb: Document the various "md" commands betterkernel/debug/kdb/kdb_main.c+23 -162 replies
3/13kdb: Use "bool" in "md" implementation where appropriatekernel/debug/kdb/kdb_main.c+21 -150 replies
4/13kdb: Drop "offset" and "name" args to kdbgetaddrarg()kernel/debug/kdb/kdb_bp.c kernel/debug/kdb/kdb_bt.c kernel/debug/kdb/kdb_main.c +1 more+12 -380 replies
5/13kdb: Separate out "mdr" handlingkernel/debug/kdb/kdb_main.c+31 -341 reply
6/13kdb: Remove "mdW" and "mdWcN" handling of "W" == 0kernel/debug/kdb/kdb_main.c+0 -52 replies
7/13kdb: Tweak "repeat" handling code for "mdW" and "mdWcN"kernel/debug/kdb/kdb_main.c+0 -22 replies
8/13kdb: In kdb_md() make `repeat` and `mdcount` calculations more obviouskernel/debug/kdb/kdb_main.c+14 -120 replies
9/13kdb: Use 'unsigned int' in kdb_md() where appropriatekernel/debug/kdb/kdb_main.c+5 -51 reply
10/13kdb: Replease simple_strtoul() with kstrtouint() in kdb_md()kernel/debug/kdb/kdb_main.c+2 -50 replies
11/13kdb: Abstract out parsing for mdWcNkernel/debug/kdb/kdb_main.c+46 -90 replies
12/13kdb: Add mdpW / mdpWcN commandskernel/debug/kdb/kdb_main.c+14 -20 replies
13/13kdb: Add mdi, mdiW / mdiWcN commands to show iomapped memorykernel/debug/kdb/kdb_main.c kernel/debug/kdb/kdb_private.h kernel/debug/kdb/kdb_support.c+82 -54 replies

Reviews trailers per patch

1 of 13 patches has a Reviewed-by or Acked-by.

PatchDaniel Thompson
1/13
2/13
3/13
4/13
5/13R-b
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/13] kdb: Add the ability to read iomapped memory via kdb + clean up "md" commands

The overall goal of this patch series is to add the ability to read from IO mapped memory at the kdb prompt. This is something I've long wished to have but never got around to implementing until now.

As I tried to implement this, I realized that the existing "md" code was a bit of a mess. I spent a bunch of time cleaning up the function which made the ability to support iomapped memory atop that pretty simple.

The cleanup code here is not quite a no-op. The "md" handling code has some esoteric corner cases that it handled and, as part of this, I removed some of the weird corners. I have a hard time believing anyone was relying on these, but if you think someone is then please yell.

Also note that it would probably be good to add iomapped memory writes, but this series is already pretty long so maybe that can be done later.

Douglas Anderson (13):
kdb: Get rid of "minlen" for the "md" command
kdb: Document the various "md" commands better
kdb: Use "bool" in "md" implementation where appropriate
kdb: Drop "offset" and "name" args to kdbgetaddrarg()
kdb: Separate out "mdr" handling
kdb: Remove "mdW" and "mdWcN" handling of "W" == 0
kdb: Tweak "repeat" handling code for "mdW" and "mdWcN"
kdb: In kdb_md() make repeat and mdcount calculations more obvious
kdb: Use 'unsigned int' in kdb_md() where appropriate
kdb: Replease simple_strtoul() with kstrtouint() in kdb_md()
kdb: Abstract out parsing for mdWcN
kdb: Add mdpW / mdpWcN commands
kdb: Add mdi, mdiW / mdiWcN commands to show iomapped memory

 kernel/debug/kdb/kdb_bp.c      |   5 +-
 kernel/debug/kdb/kdb_bt.c      |   4 +-
 kernel/debug/kdb/kdb_main.c    | 309 +++++++++++++++++++--------------
 kernel/debug/kdb/kdb_private.h |   5 +-
 kernel/debug/kdb/kdb_support.c |  48 +++++
 5 files changed, 236 insertions(+), 135 deletions(-)
Signature · 1 line
2.45.2.627.g7a2c4fd464-goog