* [Qemu-devel] [PATCH 0/3] ppc: trivial Mac-related trace-events patches
@ 2018-01-26 9:20 Mark Cave-Ayland
2018-01-26 9:20 ` [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events Mark Cave-Ayland
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mark Cave-Ayland @ 2018-01-26 9:20 UTC (permalink / raw)
To: qemu-devel, david
Here is a set of trivial PPC patches which convert grackle and uninorth over
to use trace-events, and also add a missing newline to hw/input/trace-events
which was accidentally omitted when previously converting the ADB devices.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mark Cave-Ayland (3):
grackle: convert to trace-events
uninorth: convert to trace-events
input: add missing newline from trace-events
hw/input/trace-events | 1 +
hw/pci-host/grackle.c | 13 ++-----------
hw/pci-host/trace-events | 9 +++++++++
hw/pci-host/uninorth.c | 24 +++++-------------------
4 files changed, 17 insertions(+), 30 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events
2018-01-26 9:20 [Qemu-devel] [PATCH 0/3] ppc: trivial Mac-related trace-events patches Mark Cave-Ayland
@ 2018-01-26 9:20 ` Mark Cave-Ayland
2018-01-27 6:26 ` David Gibson
2018-01-26 9:20 ` [Qemu-devel] [PATCH 2/3] uninorth: " Mark Cave-Ayland
2018-01-26 9:20 ` [Qemu-devel] [PATCH 3/3] input: add missing newline from trace-events Mark Cave-Ayland
2 siblings, 1 reply; 7+ messages in thread
From: Mark Cave-Ayland @ 2018-01-26 9:20 UTC (permalink / raw)
To: qemu-devel, david
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/pci-host/grackle.c | 13 ++-----------
hw/pci-host/trace-events | 3 +++
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
index 3caf1ccb37..033588b7d2 100644
--- a/hw/pci-host/grackle.c
+++ b/hw/pci-host/grackle.c
@@ -27,16 +27,7 @@
#include "hw/pci/pci_host.h"
#include "hw/ppc/mac.h"
#include "hw/pci/pci.h"
-
-/* debug Grackle */
-//#define DEBUG_GRACKLE
-
-#ifdef DEBUG_GRACKLE
-#define GRACKLE_DPRINTF(fmt, ...) \
- do { printf("GRACKLE: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define GRACKLE_DPRINTF(fmt, ...)
-#endif
+#include "trace.h"
#define GRACKLE_PCI_HOST_BRIDGE(obj) \
OBJECT_CHECK(GrackleState, (obj), TYPE_GRACKLE_PCI_HOST_BRIDGE)
@@ -58,7 +49,7 @@ static void pci_grackle_set_irq(void *opaque, int irq_num, int level)
{
qemu_irq *pic = opaque;
- GRACKLE_DPRINTF("set_irq num %d level %d\n", irq_num, level);
+ trace_grackle_set_irq(irq_num, level);
qemu_set_irq(pic[irq_num + 0x15], level);
}
diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events
index 32dfc84692..5b8fcc228b 100644
--- a/hw/pci-host/trace-events
+++ b/hw/pci-host/trace-events
@@ -1,5 +1,8 @@
# See docs/devel/tracing.txt for syntax documentation.
+# hw/pci-host/grackle.c
+grackle_set_irq(int irq_num, int level) "set_irq num %d level %d"
+
# hw/pci-host/sabre.c
sabre_set_request(int irq_num) "request irq %d"
sabre_clear_request(int irq_num) "clear request irq %d"
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 2/3] uninorth: convert to trace-events
2018-01-26 9:20 [Qemu-devel] [PATCH 0/3] ppc: trivial Mac-related trace-events patches Mark Cave-Ayland
2018-01-26 9:20 ` [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events Mark Cave-Ayland
@ 2018-01-26 9:20 ` Mark Cave-Ayland
2018-01-27 6:27 ` David Gibson
2018-01-26 9:20 ` [Qemu-devel] [PATCH 3/3] input: add missing newline from trace-events Mark Cave-Ayland
2 siblings, 1 reply; 7+ messages in thread
From: Mark Cave-Ayland @ 2018-01-26 9:20 UTC (permalink / raw)
To: qemu-devel, david
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/pci-host/trace-events | 6 ++++++
hw/pci-host/uninorth.c | 24 +++++-------------------
2 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events
index 5b8fcc228b..341a87a702 100644
--- a/hw/pci-host/trace-events
+++ b/hw/pci-host/trace-events
@@ -12,3 +12,9 @@ sabre_pci_config_write(uint64_t addr, uint64_t val) "addr 0x%"PRIx64" val 0x%"PR
sabre_pci_config_read(uint64_t addr, uint64_t val) "addr 0x%"PRIx64" val 0x%"PRIx64
sabre_pci_set_irq(int irq_num, int level) "set irq_in %d level %d"
sabre_pci_set_obio_irq(int irq_num, int level) "set irq %d level %d"
+
+# hw/pci-host/uninorth.c
+unin_set_irq(int irq_num, int level) "setting INT %d = %d"
+unin_get_config_reg(uint32_t reg, uint32_t addr, uint32_t retval) "converted config space accessor 0x%"PRIx32 "/0x%"PRIx32 " -> 0x%"PRIx32
+unin_data_write(uint64_t addr, unsigned len, uint64_t val) "write addr 0x%"PRIx64 " len %d val 0x%"PRIx64
+unin_data_read(uint64_t addr, unsigned len, uint64_t val) "read addr 0x%"PRIx64 " len %d val 0x%"PRIx64
diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index 5d8ccaa711..66991da975 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -26,16 +26,7 @@
#include "hw/ppc/mac.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_host.h"
-
-/* debug UniNorth */
-//#define DEBUG_UNIN
-
-#ifdef DEBUG_UNIN
-#define UNIN_DPRINTF(fmt, ...) \
- do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define UNIN_DPRINTF(fmt, ...)
-#endif
+#include "trace.h"
static const int unin_irq_line[] = { 0x1b, 0x1c, 0x1d, 0x1e };
@@ -69,8 +60,7 @@ static void pci_unin_set_irq(void *opaque, int irq_num, int level)
{
qemu_irq *pic = opaque;
- UNIN_DPRINTF("%s: setting INT %d = %d\n", __func__,
- unin_irq_line[irq_num], level);
+ trace_unin_set_irq(unin_irq_line[irq_num], level);
qemu_set_irq(pic[unin_irq_line[irq_num]], level);
}
@@ -103,9 +93,7 @@ static uint32_t unin_get_config_reg(uint32_t reg, uint32_t addr)
retval |= func << 8;
}
-
- UNIN_DPRINTF("Converted config space accessor %08x/%08x -> %08x\n",
- reg, addr, retval);
+ trace_unin_get_config_reg(reg, addr, retval);
return retval;
}
@@ -115,8 +103,7 @@ static void unin_data_write(void *opaque, hwaddr addr,
{
UNINState *s = opaque;
PCIHostState *phb = PCI_HOST_BRIDGE(s);
- UNIN_DPRINTF("write addr " TARGET_FMT_plx " len %d val %"PRIx64"\n",
- addr, len, val);
+ trace_unin_data_write(addr, len, val);
pci_data_write(phb->bus,
unin_get_config_reg(phb->config_reg, addr),
val, len);
@@ -132,8 +119,7 @@ static uint64_t unin_data_read(void *opaque, hwaddr addr,
val = pci_data_read(phb->bus,
unin_get_config_reg(phb->config_reg, addr),
len);
- UNIN_DPRINTF("read addr " TARGET_FMT_plx " len %d val %x\n",
- addr, len, val);
+ trace_unin_data_read(addr, len, val);
return val;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 3/3] input: add missing newline from trace-events
2018-01-26 9:20 [Qemu-devel] [PATCH 0/3] ppc: trivial Mac-related trace-events patches Mark Cave-Ayland
2018-01-26 9:20 ` [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events Mark Cave-Ayland
2018-01-26 9:20 ` [Qemu-devel] [PATCH 2/3] uninorth: " Mark Cave-Ayland
@ 2018-01-26 9:20 ` Mark Cave-Ayland
2018-01-27 6:27 ` David Gibson
2 siblings, 1 reply; 7+ messages in thread
From: Mark Cave-Ayland @ 2018-01-26 9:20 UTC (permalink / raw)
To: qemu-devel, david
This was accidentally omitted from 77cb0f5aaf "Split adb.c into adb.c, adb-mouse.c
and adb-kbd.c".
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/input/trace-events | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/input/trace-events b/hw/input/trace-events
index a8d46cb766..5affabc81d 100644
--- a/hw/input/trace-events
+++ b/hw/input/trace-events
@@ -4,6 +4,7 @@
adb_kbd_no_key(void) "Ignoring NO_KEY"
adb_kbd_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
adb_kbd_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
+
# hw/input/adb-mouse.c
adb_mouse_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events
2018-01-26 9:20 ` [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events Mark Cave-Ayland
@ 2018-01-27 6:26 ` David Gibson
0 siblings, 0 replies; 7+ messages in thread
From: David Gibson @ 2018-01-27 6:26 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]
On Fri, Jan 26, 2018 at 09:20:27AM +0000, Mark Cave-Ayland wrote:
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Applied to ppc-for-2.12.
> ---
> hw/pci-host/grackle.c | 13 ++-----------
> hw/pci-host/trace-events | 3 +++
> 2 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c
> index 3caf1ccb37..033588b7d2 100644
> --- a/hw/pci-host/grackle.c
> +++ b/hw/pci-host/grackle.c
> @@ -27,16 +27,7 @@
> #include "hw/pci/pci_host.h"
> #include "hw/ppc/mac.h"
> #include "hw/pci/pci.h"
> -
> -/* debug Grackle */
> -//#define DEBUG_GRACKLE
> -
> -#ifdef DEBUG_GRACKLE
> -#define GRACKLE_DPRINTF(fmt, ...) \
> - do { printf("GRACKLE: " fmt , ## __VA_ARGS__); } while (0)
> -#else
> -#define GRACKLE_DPRINTF(fmt, ...)
> -#endif
> +#include "trace.h"
>
> #define GRACKLE_PCI_HOST_BRIDGE(obj) \
> OBJECT_CHECK(GrackleState, (obj), TYPE_GRACKLE_PCI_HOST_BRIDGE)
> @@ -58,7 +49,7 @@ static void pci_grackle_set_irq(void *opaque, int irq_num, int level)
> {
> qemu_irq *pic = opaque;
>
> - GRACKLE_DPRINTF("set_irq num %d level %d\n", irq_num, level);
> + trace_grackle_set_irq(irq_num, level);
> qemu_set_irq(pic[irq_num + 0x15], level);
> }
>
> diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events
> index 32dfc84692..5b8fcc228b 100644
> --- a/hw/pci-host/trace-events
> +++ b/hw/pci-host/trace-events
> @@ -1,5 +1,8 @@
> # See docs/devel/tracing.txt for syntax documentation.
>
> +# hw/pci-host/grackle.c
> +grackle_set_irq(int irq_num, int level) "set_irq num %d level %d"
> +
> # hw/pci-host/sabre.c
> sabre_set_request(int irq_num) "request irq %d"
> sabre_clear_request(int irq_num) "clear request irq %d"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] uninorth: convert to trace-events
2018-01-26 9:20 ` [Qemu-devel] [PATCH 2/3] uninorth: " Mark Cave-Ayland
@ 2018-01-27 6:27 ` David Gibson
0 siblings, 0 replies; 7+ messages in thread
From: David Gibson @ 2018-01-27 6:27 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 3728 bytes --]
On Fri, Jan 26, 2018 at 09:20:28AM +0000, Mark Cave-Ayland wrote:
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Applied to ppc-for-2.12.
> ---
> hw/pci-host/trace-events | 6 ++++++
> hw/pci-host/uninorth.c | 24 +++++-------------------
> 2 files changed, 11 insertions(+), 19 deletions(-)
>
> diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events
> index 5b8fcc228b..341a87a702 100644
> --- a/hw/pci-host/trace-events
> +++ b/hw/pci-host/trace-events
> @@ -12,3 +12,9 @@ sabre_pci_config_write(uint64_t addr, uint64_t val) "addr 0x%"PRIx64" val 0x%"PR
> sabre_pci_config_read(uint64_t addr, uint64_t val) "addr 0x%"PRIx64" val 0x%"PRIx64
> sabre_pci_set_irq(int irq_num, int level) "set irq_in %d level %d"
> sabre_pci_set_obio_irq(int irq_num, int level) "set irq %d level %d"
> +
> +# hw/pci-host/uninorth.c
> +unin_set_irq(int irq_num, int level) "setting INT %d = %d"
> +unin_get_config_reg(uint32_t reg, uint32_t addr, uint32_t retval) "converted config space accessor 0x%"PRIx32 "/0x%"PRIx32 " -> 0x%"PRIx32
> +unin_data_write(uint64_t addr, unsigned len, uint64_t val) "write addr 0x%"PRIx64 " len %d val 0x%"PRIx64
> +unin_data_read(uint64_t addr, unsigned len, uint64_t val) "read addr 0x%"PRIx64 " len %d val 0x%"PRIx64
> diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
> index 5d8ccaa711..66991da975 100644
> --- a/hw/pci-host/uninorth.c
> +++ b/hw/pci-host/uninorth.c
> @@ -26,16 +26,7 @@
> #include "hw/ppc/mac.h"
> #include "hw/pci/pci.h"
> #include "hw/pci/pci_host.h"
> -
> -/* debug UniNorth */
> -//#define DEBUG_UNIN
> -
> -#ifdef DEBUG_UNIN
> -#define UNIN_DPRINTF(fmt, ...) \
> - do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)
> -#else
> -#define UNIN_DPRINTF(fmt, ...)
> -#endif
> +#include "trace.h"
>
> static const int unin_irq_line[] = { 0x1b, 0x1c, 0x1d, 0x1e };
>
> @@ -69,8 +60,7 @@ static void pci_unin_set_irq(void *opaque, int irq_num, int level)
> {
> qemu_irq *pic = opaque;
>
> - UNIN_DPRINTF("%s: setting INT %d = %d\n", __func__,
> - unin_irq_line[irq_num], level);
> + trace_unin_set_irq(unin_irq_line[irq_num], level);
> qemu_set_irq(pic[unin_irq_line[irq_num]], level);
> }
>
> @@ -103,9 +93,7 @@ static uint32_t unin_get_config_reg(uint32_t reg, uint32_t addr)
> retval |= func << 8;
> }
>
> -
> - UNIN_DPRINTF("Converted config space accessor %08x/%08x -> %08x\n",
> - reg, addr, retval);
> + trace_unin_get_config_reg(reg, addr, retval);
>
> return retval;
> }
> @@ -115,8 +103,7 @@ static void unin_data_write(void *opaque, hwaddr addr,
> {
> UNINState *s = opaque;
> PCIHostState *phb = PCI_HOST_BRIDGE(s);
> - UNIN_DPRINTF("write addr " TARGET_FMT_plx " len %d val %"PRIx64"\n",
> - addr, len, val);
> + trace_unin_data_write(addr, len, val);
> pci_data_write(phb->bus,
> unin_get_config_reg(phb->config_reg, addr),
> val, len);
> @@ -132,8 +119,7 @@ static uint64_t unin_data_read(void *opaque, hwaddr addr,
> val = pci_data_read(phb->bus,
> unin_get_config_reg(phb->config_reg, addr),
> len);
> - UNIN_DPRINTF("read addr " TARGET_FMT_plx " len %d val %x\n",
> - addr, len, val);
> + trace_unin_data_read(addr, len, val);
> return val;
> }
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] input: add missing newline from trace-events
2018-01-26 9:20 ` [Qemu-devel] [PATCH 3/3] input: add missing newline from trace-events Mark Cave-Ayland
@ 2018-01-27 6:27 ` David Gibson
0 siblings, 0 replies; 7+ messages in thread
From: David Gibson @ 2018-01-27 6:27 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
On Fri, Jan 26, 2018 at 09:20:29AM +0000, Mark Cave-Ayland wrote:
> This was accidentally omitted from 77cb0f5aaf "Split adb.c into adb.c, adb-mouse.c
> and adb-kbd.c".
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Applied to ppc-for-2.12.
> ---
> hw/input/trace-events | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/input/trace-events b/hw/input/trace-events
> index a8d46cb766..5affabc81d 100644
> --- a/hw/input/trace-events
> +++ b/hw/input/trace-events
> @@ -4,6 +4,7 @@
> adb_kbd_no_key(void) "Ignoring NO_KEY"
> adb_kbd_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
> adb_kbd_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
> +
> # hw/input/adb-mouse.c
> adb_mouse_writereg(int reg, uint8_t val) "reg %d val 0x%2.2x"
> adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x obuf[1] 0x%2.2x"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-01-27 6:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 9:20 [Qemu-devel] [PATCH 0/3] ppc: trivial Mac-related trace-events patches Mark Cave-Ayland
2018-01-26 9:20 ` [Qemu-devel] [PATCH 1/3] grackle: convert to trace-events Mark Cave-Ayland
2018-01-27 6:26 ` David Gibson
2018-01-26 9:20 ` [Qemu-devel] [PATCH 2/3] uninorth: " Mark Cave-Ayland
2018-01-27 6:27 ` David Gibson
2018-01-26 9:20 ` [Qemu-devel] [PATCH 3/3] input: add missing newline from trace-events Mark Cave-Ayland
2018-01-27 6:27 ` David Gibson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.