QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup
@ 2020-10-17 18:07 Philippe Mathieu-Daudé
  2020-10-17 18:07 ` [PATCH 1/2] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-17 18:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-arm, Luc Michel, Philippe Mathieu-Daudé,
	Andrew Baumann

Add trace event for IRQ from CPU/GPU,\r
use definitions for IRQ numbers.\r
\r
Philippe Mathieu-Daudé (2):\r
  hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers\r
  hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers\r
\r
 hw/intc/bcm2835_ic.c      | 4 +++-\r
 hw/intc/bcm2836_control.c | 8 ++++----\r
 hw/intc/trace-events      | 4 ++++\r
 3 files changed, 11 insertions(+), 5 deletions(-)\r
\r
-- \r
2.26.2\r
\r


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

* [PATCH 1/2] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers
  2020-10-17 18:07 [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Philippe Mathieu-Daudé
@ 2020-10-17 18:07 ` Philippe Mathieu-Daudé
  2020-10-17 18:07 ` [PATCH 2/2] hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-17 18:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Luc Michel, Philippe Mathieu-Daudé,
	Andrew Baumann, qemu-arm, Luc Michel

Add trace events for GPU and CPU IRQs.

Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/intc/bcm2835_ic.c | 4 +++-
 hw/intc/trace-events | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c
index 53ab8f58810..9000d995e81 100644
--- a/hw/intc/bcm2835_ic.c
+++ b/hw/intc/bcm2835_ic.c
@@ -18,6 +18,7 @@
 #include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
+#include "trace.h"
 
 #define GPU_IRQS 64
 #define ARM_IRQS 8
@@ -51,7 +52,6 @@ static void bcm2835_ic_update(BCM2835ICState *s)
     set = (s->gpu_irq_level & s->gpu_irq_enable)
         || (s->arm_irq_level & s->arm_irq_enable);
     qemu_set_irq(s->irq, set);
-
 }
 
 static void bcm2835_ic_set_gpu_irq(void *opaque, int irq, int level)
@@ -59,6 +59,7 @@ static void bcm2835_ic_set_gpu_irq(void *opaque, int irq, int level)
     BCM2835ICState *s = opaque;
 
     assert(irq >= 0 && irq < 64);
+    trace_bcm2835_ic_set_gpu_irq(irq, level);
     s->gpu_irq_level = deposit64(s->gpu_irq_level, irq, 1, level != 0);
     bcm2835_ic_update(s);
 }
@@ -68,6 +69,7 @@ static void bcm2835_ic_set_arm_irq(void *opaque, int irq, int level)
     BCM2835ICState *s = opaque;
 
     assert(irq >= 0 && irq < 8);
+    trace_bcm2835_ic_set_cpu_irq(irq, level);
     s->arm_irq_level = deposit32(s->arm_irq_level, irq, 1, level != 0);
     bcm2835_ic_update(s);
 }
diff --git a/hw/intc/trace-events b/hw/intc/trace-events
index 527c3f76cae..22782b3f089 100644
--- a/hw/intc/trace-events
+++ b/hw/intc/trace-events
@@ -199,3 +199,7 @@ nvic_sysreg_write(uint64_t addr, uint32_t value, unsigned size) "NVIC sysreg wri
 heathrow_write(uint64_t addr, unsigned int n, uint64_t value) "0x%"PRIx64" %u: 0x%"PRIx64
 heathrow_read(uint64_t addr, unsigned int n, uint64_t value) "0x%"PRIx64" %u: 0x%"PRIx64
 heathrow_set_irq(int num, int level) "set_irq: num=0x%02x level=%d"
+
+# bcm2835_ic.c
+bcm2835_ic_set_gpu_irq(int irq, int level) "GPU irq #%d level %d"
+bcm2835_ic_set_cpu_irq(int irq, int level) "CPU irq #%d level %d"
-- 
2.26.2



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

* [PATCH 2/2] hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers
  2020-10-17 18:07 [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Philippe Mathieu-Daudé
  2020-10-17 18:07 ` [PATCH 1/2] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers Philippe Mathieu-Daudé
@ 2020-10-17 18:07 ` Philippe Mathieu-Daudé
  2020-10-20 14:33 ` [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Peter Maydell
  2020-10-26 17:07 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-17 18:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-arm, Luc Michel, Philippe Mathieu-Daudé,
	Andrew Baumann

The IRQ values are defined few lines earlier, use them instead of
the magic numbers.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/intc/bcm2836_control.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c
index 53dba0080ca..2ead76ffdce 100644
--- a/hw/intc/bcm2836_control.c
+++ b/hw/intc/bcm2836_control.c
@@ -157,22 +157,22 @@ static void bcm2836_control_set_local_irq(void *opaque, int core, int local_irq,
 
 static void bcm2836_control_set_local_irq0(void *opaque, int core, int level)
 {
-    bcm2836_control_set_local_irq(opaque, core, 0, level);
+    bcm2836_control_set_local_irq(opaque, core, IRQ_CNTPSIRQ, level);
 }
 
 static void bcm2836_control_set_local_irq1(void *opaque, int core, int level)
 {
-    bcm2836_control_set_local_irq(opaque, core, 1, level);
+    bcm2836_control_set_local_irq(opaque, core, IRQ_CNTPNSIRQ, level);
 }
 
 static void bcm2836_control_set_local_irq2(void *opaque, int core, int level)
 {
-    bcm2836_control_set_local_irq(opaque, core, 2, level);
+    bcm2836_control_set_local_irq(opaque, core, IRQ_CNTHPIRQ, level);
 }
 
 static void bcm2836_control_set_local_irq3(void *opaque, int core, int level)
 {
-    bcm2836_control_set_local_irq(opaque, core, 3, level);
+    bcm2836_control_set_local_irq(opaque, core, IRQ_CNTVIRQ, level);
 }
 
 static void bcm2836_control_set_gpu_irq(void *opaque, int irq, int level)
-- 
2.26.2



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

* Re: [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup
  2020-10-17 18:07 [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Philippe Mathieu-Daudé
  2020-10-17 18:07 ` [PATCH 1/2] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers Philippe Mathieu-Daudé
  2020-10-17 18:07 ` [PATCH 2/2] hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers Philippe Mathieu-Daudé
@ 2020-10-20 14:33 ` Peter Maydell
  2020-10-26 17:07 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2020-10-20 14:33 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-arm, Luc Michel, QEMU Developers, Andrew Baumann

On Sat, 17 Oct 2020 at 19:07, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Add trace event for IRQ from CPU/GPU,
> use definitions for IRQ numbers.
>
> Philippe Mathieu-Daudé (2):
>   hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers
>   hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers



Applied to target-arm.next, thanks.

-- PMM


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

* Re: [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup
  2020-10-17 18:07 [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2020-10-20 14:33 ` [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Peter Maydell
@ 2020-10-26 17:07 ` Philippe Mathieu-Daudé
  2020-10-27  8:36   ` Philippe Mathieu-Daudé
  3 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-26 17:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-arm, Luc Michel, Andrew Baumann

ping?

On 10/17/20 8:07 PM, Philippe Mathieu-Daudé wrote:
> Add trace event for IRQ from CPU/GPU,
> use definitions for IRQ numbers.
> 
> Philippe Mathieu-Daudé (2):
>    hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers
>    hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers
> 
>   hw/intc/bcm2835_ic.c      | 4 +++-
>   hw/intc/bcm2836_control.c | 8 ++++----
>   hw/intc/trace-events      | 4 ++++
>   3 files changed, 11 insertions(+), 5 deletions(-)
> 


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

* Re: [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup
  2020-10-26 17:07 ` Philippe Mathieu-Daudé
@ 2020-10-27  8:36   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-27  8:36 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers
  Cc: Peter Maydell, qemu-arm, Luc Michel, Andrew Baumann

On Mon, Oct 26, 2020 at 6:07 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> ping?

Oops wrong series, these patches are already merged, sorry.

>
> On 10/17/20 8:07 PM, Philippe Mathieu-Daudé wrote:
> > Add trace event for IRQ from CPU/GPU,
> > use definitions for IRQ numbers.
> >
> > Philippe Mathieu-Daudé (2):
> >    hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers
> >    hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers


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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-17 18:07 [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Philippe Mathieu-Daudé
2020-10-17 18:07 ` [PATCH 1/2] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers Philippe Mathieu-Daudé
2020-10-17 18:07 ` [PATCH 2/2] hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers Philippe Mathieu-Daudé
2020-10-20 14:33 ` [PATCH 0/2] hw/intc/bcm283x: Trivial tracing cleanup Peter Maydell
2020-10-26 17:07 ` Philippe Mathieu-Daudé
2020-10-27  8:36   ` Philippe Mathieu-Daudé

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git