diff mbox series

[3/3] skiboot: Mambo hack to add trace-imc nodes in the device-tree

Message ID 20181004060934.27140-4-anju@linux.vnet.ibm.com
State Superseded
Headers show
Series skiboot: OPAL support for IMC trace-mode | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/make_check success Test make_check on branch master

Commit Message

Anju T Sudhakar Oct. 4, 2018, 6:09 a.m. UTC
Patch adds device-tree entries for trace-imc node in Mambo.

Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
---
 external/mambo/skiboot.tcl | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

maddy Dec. 5, 2018, 6:01 p.m. UTC | #1
On 04/10/18 11:39 AM, Anju T Sudhakar wrote:
> Patch adds device-tree entries for trace-imc node in Mambo.
Could have been "Update the skiboot.tcl device tree
to include trace-imc node to help test the code path
in mambo"

Reviewed-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>

>
> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> ---
>   external/mambo/skiboot.tcl | 21 +++++++++++++++++++++
>   1 file changed, 21 insertions(+)
>
> diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
> index 17561be2..49e1f9b5 100644
> --- a/external/mambo/skiboot.tcl
> +++ b/external/mambo/skiboot.tcl
> @@ -503,6 +503,27 @@ if { $default_config == "P9" } {
>        mysim of addprop  $thread string "scale" "512"
>        mysim of addprop  $thread int "events" $ct_et
>        mysim of addprop  $thread int "type" 1
> +
> +      #Add a common trace event  node
> +      set tr_et [mysim of addchild $imc_c "trace-events" ""]
> +      mysim of addprop $tr_et int "#address-cells" 1
> +      mysim of addprop $tr_et int "#size-cells" 1
> +
> +         #Add an event
> +         set tr [mysim of addchild $tr_et event [format 10200000]]
> +         mysim of addprop  $tr string "event-name" "cycles"
> +         mysim of addprop  $tr string "desc" "Reference cycles"
> +         mysim of addprop  $tr int "reg" 0x10200000
> +
> +     #Add a trace device node
> +     set trace [mysim of addchild $imc_c "trace" ""]
> +     mysim of addprop $trace string "compatible" "ibm,imc-counters"
> +     mysim of addprop  $trace string "events-prefix" "trace_"
> +     mysim of addprop  $trace int "reg" 0
> +     mysim of addprop  $trace int "size" 262144
> +     mysim of addprop  $trace int "events" $tr_et
> +     mysim of addprop  $trace int "type" 2
> +
>   }
>
>   mconfig enable_stb SKIBOOT_ENABLE_MAMBO_STB 0
diff mbox series

Patch

diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 17561be2..49e1f9b5 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -503,6 +503,27 @@  if { $default_config == "P9" } {
      mysim of addprop  $thread string "scale" "512"
      mysim of addprop  $thread int "events" $ct_et
      mysim of addprop  $thread int "type" 1
+
+      #Add a common trace event  node
+      set tr_et [mysim of addchild $imc_c "trace-events" ""]
+      mysim of addprop $tr_et int "#address-cells" 1
+      mysim of addprop $tr_et int "#size-cells" 1
+
+         #Add an event
+         set tr [mysim of addchild $tr_et event [format 10200000]]
+         mysim of addprop  $tr string "event-name" "cycles"
+         mysim of addprop  $tr string "desc" "Reference cycles"
+         mysim of addprop  $tr int "reg" 0x10200000
+
+     #Add a trace device node
+     set trace [mysim of addchild $imc_c "trace" ""]
+     mysim of addprop $trace string "compatible" "ibm,imc-counters"
+     mysim of addprop  $trace string "events-prefix" "trace_"
+     mysim of addprop  $trace int "reg" 0
+     mysim of addprop  $trace int "size" 262144
+     mysim of addprop  $trace int "events" $tr_et
+     mysim of addprop  $trace int "type" 2
+
 }
 
 mconfig enable_stb SKIBOOT_ENABLE_MAMBO_STB 0