Skip to contentSkip to conversation

ARC: Enable PERF_EVENTS in nSIM driven platforms

PATCH In review Alexey Brodkin 2 participants 2 messages Oct 31, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARC: Enable PERF_EVENTS in nSIM driven platforms

Now when we have properly working performance counters in nSIM even with interrupt support (fix should be a part of upcoming nSIM engineering build 2016.12-005) we may enable perf support by default for all platforms that use nSIM for ARC cores simulation.

Note 1: PCT node was missing for some reason in nsimosci.dts
while all other nSIM-related .dts files already had PCT node for quite some time, so adding it now.

Note 2: All defconfigs were regenerated with "make savedefconfig"
which led to some clean-ups in nsimosci_hs_smp_defconfig:
CONFIG_FRAMEBUFFER_CONSOLE=y was removed because it is automatically selected now by DRM.

Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>

---

changes v1 -> v2:
* Added missing PCT Device Tree node in nsimosci.dts

 arch/arc/boot/dts/nsimosci.dts             | 4 ++++
 arch/arc/configs/nsim_700_defconfig        | 1 +
 arch/arc/configs/nsim_hs_defconfig         | 1 +
 arch/arc/configs/nsim_hs_smp_defconfig     | 1 +
 arch/arc/configs/nsimosci_defconfig        | 1 +
 arch/arc/configs/nsimosci_hs_defconfig     | 1 +
 arch/arc/configs/nsimosci_hs_smp_defconfig | 3 +--
 7 files changed, 10 insertions(+), 2 deletions(-)
arch/arc/boot/dts/nsimosci.dts +4 -0
index bcf603142a33..7fe184435956 100644
@@ -83,5 +83,9 @@
 			reg = <0xf0003000 0x44>;
 			interrupts = <7>;
 		};
+
+		arcpct0: pct {
+			compatible = "snps,archs-pct";
+		};
 	};
 };
arch/arc/configs/nsim_700_defconfig +1 -0
index 7314f538847b..b0066a749d4c 100644
@@ -14,6 +14,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_COMPAT_BRK is not set
 CONFIG_KPROBES=y
arch/arc/configs/nsim_hs_defconfig +1 -0
index 65ab9fbf83f2..ebe9ebb92933 100644
@@ -14,6 +14,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_COMPAT_BRK is not set
 CONFIG_KPROBES=y
arch/arc/configs/nsim_hs_smp_defconfig +1 -0
index 3b3990cddbe1..4bde43278be6 100644
@@ -12,6 +12,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_COMPAT_BRK is not set
 CONFIG_KPROBES=y
arch/arc/configs/nsimosci_defconfig +1 -0
index 98cf20933bbb..f6fb3d26557e 100644
@@ -14,6 +14,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_COMPAT_BRK is not set
 CONFIG_KPROBES=y
arch/arc/configs/nsimosci_hs_defconfig +1 -0
index ddf8b96d494e..b9f0fe00044b 100644
@@ -14,6 +14,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
 # CONFIG_SLUB_DEBUG is not set
 # CONFIG_COMPAT_BRK is not set
 CONFIG_KPROBES=y
arch/arc/configs/nsimosci_hs_smp_defconfig +1 -2
index ceb90745326e..6da71ba253a9 100644
@@ -10,6 +10,7 @@ CONFIG_IKCONFIG_PROC=y
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
+CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_KPROBES=y
 CONFIG_MODULES=y
@@ -34,7 +35,6 @@ CONFIG_INET=y
 # CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 # CONFIG_INET_XFRM_MODE_TUNNEL is not set
 # CONFIG_INET_XFRM_MODE_BEET is not set
-# CONFIG_INET_LRO is not set
 # CONFIG_IPV6 is not set
 # CONFIG_WIRELESS is not set
 CONFIG_DEVTMPFS=y
@@ -72,7 +72,6 @@ CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_HWMON is not set
 CONFIG_DRM=y
 CONFIG_DRM_ARCPGU=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 # CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
Signature · 1 line
2.7.4
#1 lore raw
Quoted 34 lines · Alexey Brodkin

Now when we have properly working performance counters in nSIM even with interrupt support (fix should be a part of upcoming nSIM engineering build 2016.12-005) we may enable perf support by default for all platforms that use nSIM for ARC cores simulation.

Note 1: PCT node was missing for some reason in nsimosci.dts
while all other nSIM-related .dts files already had PCT node for quite some time, so adding it now.

Note 2: All defconfigs were regenerated with "make savedefconfig"
which led to some clean-ups in nsimosci_hs_smp_defconfig:
CONFIG_FRAMEBUFFER_CONSOLE=y was removed because it is automatically selected now by DRM.

Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>

---

changes v1 -> v2:
* Added missing PCT Device Tree node in nsimosci.dts

 arch/arc/boot/dts/nsimosci.dts             | 4 ++++
 arch/arc/configs/nsim_700_defconfig        | 1 +
 arch/arc/configs/nsim_hs_defconfig         | 1 +
 arch/arc/configs/nsim_hs_smp_defconfig     | 1 +
 arch/arc/configs/nsimosci_defconfig        | 1 +
 arch/arc/configs/nsimosci_hs_defconfig     | 1 +
 arch/arc/configs/nsimosci_hs_smp_defconfig | 3 +--
 7 files changed, 10 insertions(+), 2 deletions(-)
arch/arc/boot/dts/nsimosci.dts +0 -0
index bcf603142a33..7fe184435956 100644

arch/arc/boot/dts/nsimosci.dts line 90

Quoted 8 lines
arch/arc/boot/dts/nsimosci.dts +4 -0
@@ -83,5 +83,9 @@
 			reg = <0xf0003000 0x44>;
 			interrupts = <7>;
 		};
+
+		arcpct0: pct {
+			compatible = "snps,archs-pct";
+		};
 	};

This is not the right binding for 700 pct - I've fixed it and pushed to for-next !

-Vineet