[20/22] xive/p9: remove percpu logging
diff mbox series

Message ID 20190903170413.4373-21-clg@kaod.org
State New
Headers show
Series
  • xive: new interfaces, fixes and cleanups in a new driver
Related show

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (7b12d5489fcfd73ef7ec0cb27eff7f8a5f13b238)

Commit Message

Cédric Le Goater Sept. 3, 2019, 5:04 p.m. UTC
This is dead code now that emulation was removed.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/xive-p9.c | 78 ----------------------------------------------------
 1 file changed, 78 deletions(-)

Patch
diff mbox series

diff --git a/hw/xive-p9.c b/hw/xive-p9.c
index 320ec65ebe1f..c66f4ef08f2c 100644
--- a/hw/xive-p9.c
+++ b/hw/xive-p9.c
@@ -32,10 +32,8 @@ 
 
 /* Extra debug options used in debug builds */
 #ifdef DEBUG
-#define XIVE_PERCPU_LOG
 #define XIVE_CHECK_LOCKS
 #else
-#undef  XIVE_PERCPU_LOG
 #undef  XIVE_CHECK_LOCKS
 #endif
 
@@ -216,29 +214,10 @@  struct xive_src {
 	uint32_t			flags;
 };
 
-#define LOG_TYPE_XIRR	0
-#define LOG_TYPE_XIRR2	1
-#define LOG_TYPE_POPQ	2
-#define LOG_TYPE_EOI	3
-#define LOG_TYPE_EQD	4
-
-struct xive_log_ent {
-	uint8_t type;
-	uint8_t cnt;
-	uint64_t tb;
-#define MAX_LOG_DATA	8
-	uint32_t data[MAX_LOG_DATA];
-};
-#define MAX_LOG_ENT	32
-
 struct xive_cpu_state {
 	struct xive	*xive;
 	void		*tm_ring1;
 
-#ifdef XIVE_PERCPU_LOG
-	struct xive_log_ent log[MAX_LOG_ENT];
-	uint32_t	log_pos;
-#endif
 	/* Base HW VP and associated queues */
 	uint32_t	vp_blk;
 	uint32_t	vp_idx;
@@ -248,63 +227,6 @@  struct xive_cpu_state {
 	struct lock	lock;
 };
 
-#ifdef XIVE_PERCPU_LOG
-
-static void log_add(struct xive_cpu_state *xs, uint8_t type,
-		    uint8_t count, ...)
-{
-	struct xive_log_ent *e = &xs->log[xs->log_pos];
-	va_list args;
-	int i;
-
-	e->type = type;
-	e->cnt = count;
-	e->tb = mftb();
-	va_start(args, count);
-	for (i = 0; i < count; i++)
-		e->data[i] = va_arg(args, u32);
-	va_end(args);
-	xs->log_pos = xs->log_pos + 1;
-	if (xs->log_pos == MAX_LOG_ENT)
-		xs->log_pos = 0;
-}
-
-static void log_print(struct xive_cpu_state *xs)
-{
-	uint32_t pos = xs->log_pos;
-	uint8_t buf[256];
-	int i, j;
-	static const char *lts[] = {
-		">XIRR",
-		"<XIRR",
-		" POPQ",
-		"  EOI",
-		"  EQD"
-	};
-	for (i = 0; i < MAX_LOG_ENT; i++) {
-		struct xive_log_ent *e = &xs->log[pos];
-		uint8_t *b = buf, *eb = &buf[255];
-
-		b += snprintf(b, eb-b, "%08llx %s ", e->tb,
-			      lts[e->type]);
-		for (j = 0; j < e->cnt && b < eb; j++)
-			b += snprintf(b, eb-b, "%08x ", e->data[j]);
-		printf("%s\n", buf);
-		pos = pos + 1;
-		if (pos == MAX_LOG_ENT)
-			pos = 0;
-	}
-}
-
-#else /* XIVE_PERCPU_LOG */
-
-static inline void log_add(struct xive_cpu_state *xs __unused,
-			   uint8_t type __unused,
-			   uint8_t count __unused, ...) { }
-static inline void log_print(struct xive_cpu_state *xs __unused) { }
-
-#endif /* XIVE_PERCPU_LOG */
-
 enum xive_generation {
 	XIVE_GEN_1 = 1,
 	XIVE_GEN_2 = 2,