qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ps2-keyboard: Add val to trace_ps2_read_data
@ 2016-05-04 20:01 Wink Saville
       [not found] ` <cover.1462389348.git.wink@saville.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Wink Saville @ 2016-05-04 20:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: dkoch

While investigating why I can't get the ps2 keyboard working
I wanted to see the value returned by ps2_read_data while tracing.
So I've created this simple patch to add printing the value.

Wink Saville (1):
  ps2-keyboard: Add val to trace_ps2_read_data

 hw/input/ps2.c | 2 +-
 trace-events   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.8.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Qemu-devel] [PATCH] ps2-keyboard: Add val to trace_ps2_read_data
       [not found] ` <cover.1462389348.git.wink@saville.com>
@ 2016-05-04 20:01   ` Wink Saville
  0 siblings, 0 replies; 2+ messages in thread
From: Wink Saville @ 2016-05-04 20:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: dkoch

To make the trace output more useful print the value
returned by ps2_read_data.

Signed-off-by: Wink Saville <wink@saville.com>
---
 hw/input/ps2.c | 2 +-
 trace-events   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index a8aa36f..e27d8e4 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -199,7 +199,6 @@ uint32_t ps2_read_data(void *opaque)
     PS2Queue *q;
     int val, index;
 
-    trace_ps2_read_data(opaque);
     q = &s->queue;
     if (q->count == 0) {
         /* NOTE: if no data left, we return the last keyboard one
@@ -219,6 +218,7 @@ uint32_t ps2_read_data(void *opaque)
         /* reassert IRQs if data left */
         s->update_irq(s->update_arg, q->count != 0);
     }
+    trace_ps2_read_data(opaque, val);
     return val;
 }
 
diff --git a/trace-events b/trace-events
index 8350743..4a5d056 100644
--- a/trace-events
+++ b/trace-events
@@ -229,7 +229,7 @@ slavio_set_timer_irq_cpu(int cpu, int level) "Set cpu %d local timer level %d"
 
 # hw/input/ps2.c
 ps2_put_keycode(void *opaque, int keycode) "%p keycode %d"
-ps2_read_data(void *opaque) "%p"
+ps2_read_data(void *opaque, int val) "%p val %d"
 ps2_set_ledstate(void *s, int ledstate) "%p ledstate %d"
 ps2_reset_keyboard(void *s) "%p"
 ps2_write_keyboard(void *opaque, int val) "%p val %d"
-- 
2.8.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-04 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 20:01 [Qemu-devel] [PATCH] ps2-keyboard: Add val to trace_ps2_read_data Wink Saville
     [not found] ` <cover.1462389348.git.wink@saville.com>
2016-05-04 20:01   ` Wink Saville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).