diff mbox series

[08/18] htm: Remove base/size from reset

Message ID 20180619052535.24043-8-mikey@neuling.org
State Accepted
Headers show
Series [01/18] Make -a the default for probe | expand

Commit Message

Michael Neuling June 19, 2018, 5:25 a.m. UTC
Base/size aren't needed so remove them.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 libpdbg/htm.c     | 15 +++++----------
 libpdbg/libpdbg.h |  2 +-
 libpdbg/target.h  |  2 +-
 src/htm.c         | 11 +----------
 4 files changed, 8 insertions(+), 22 deletions(-)
diff mbox series

Patch

diff --git a/libpdbg/htm.c b/libpdbg/htm.c
index b4bdd3f5e5..48ad001f15 100644
--- a/libpdbg/htm.c
+++ b/libpdbg/htm.c
@@ -207,11 +207,11 @@  int htm_stop(struct pdbg_target *target)
 	return htm ? htm->stop(htm) : -1;
 }
 
-int htm_reset(struct pdbg_target *target, uint64_t *base, uint64_t *size)
+int htm_reset(struct pdbg_target *target)
 {
 	struct htm *htm = check_and_convert(target);
 
-	return htm ? htm->reset(htm, base, size) : -1;
+	return htm ? htm->reset(htm) : -1;
 }
 
 int htm_status(struct pdbg_target *target)
@@ -615,7 +615,7 @@  static bool is_configured(struct htm *htm)
 
 	return true;
 }
-static int configure_memory(struct htm *htm, uint64_t *r_base, uint64_t *r_size)
+static int configure_memory(struct htm *htm)
 {
 	uint64_t i, size, base, val;
 	uint16_t mem_size;
@@ -667,15 +667,10 @@  static int configure_memory(struct htm *htm, uint64_t *r_base, uint64_t *r_size)
 	if (HTM_ERR(pib_write(&htm->target, HTM_SCOM_TRIGGER, HTM_TRIG_RESET)))
 		return -1;
 
-	if (r_size)
-		*r_size = size;
-	if (r_base)
-		*r_base = base;
-
 	return 0;
 }
 
-static int do_htm_reset(struct htm *htm, uint64_t *r_base, uint64_t *r_size)
+static int do_htm_reset(struct htm *htm)
 {
 	struct htm_status status;
 
@@ -700,7 +695,7 @@  static int do_htm_reset(struct htm *htm, uint64_t *r_base, uint64_t *r_size)
 
 	}
 
-	if (HTM_ERR(configure_memory(htm, r_base, r_size)))
+	if (HTM_ERR(configure_memory(htm)))
 		return -1;
 
 	return 1;
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index c0990d928c..1f5c31167f 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -165,7 +165,7 @@  struct thread_state {
 int htm_start(struct pdbg_target *target);
 int htm_stop(struct pdbg_target *target);
 int htm_status(struct pdbg_target *target);
-int htm_reset(struct pdbg_target *target, uint64_t *base, uint64_t *size);
+int htm_reset(struct pdbg_target *target);
 int htm_dump(struct pdbg_target *target, uint64_t size, char *filename);
 
 int adu_getmem(struct pdbg_target *target, uint64_t addr, uint8_t *ouput, uint64_t size);
diff --git a/libpdbg/target.h b/libpdbg/target.h
index e4a3ed41f0..ac00b56e86 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -93,7 +93,7 @@  struct htm {
 	struct pdbg_target target;
 	int (*start)(struct htm *);
 	int (*stop)(struct htm *);
-	int (*reset)(struct htm *, uint64_t *, uint64_t *);
+	int (*reset)(struct htm *);
 	int (*status)(struct htm *);
 	int (*dump)(struct htm *, uint64_t, char *);
 };
diff --git a/src/htm.c b/src/htm.c
index 1103b9c8c9..a41b2e52bb 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -148,7 +148,6 @@  static int run_status(enum htm_type type)
 
 static int run_reset(enum htm_type type)
 {
-	uint64_t old_base = 0, base, size;
 	struct pdbg_target *target;
 	int rc = 0;
 
@@ -161,18 +160,10 @@  static int run_reset(enum htm_type type)
 
 		printf("Resetting HTM@");
 		print_htm_address(type, target);
-		if (htm_reset(target, &base, &size) != 1) {
+		if (htm_reset(target) != 1) {
 			printf("Couldn't reset HTM@");
 			print_htm_address(type, target);
 		}
-		if (old_base != base) {
-			printf("The kernel has initialised HTM memory at:\n");
-			printf("base: 0x%016" PRIx64 " for 0x%016" PRIx64 " size\n",
-				base, size);
-			printf("In case of system crash/xstop use the following to dump the trace on the BMC:\n");
-			printf("./pdbg getmem 0x%016" PRIx64 " 0x%016" PRIx64 " > htm.dump\n",
-					base, size);
-		}
 		rc++;
 	}