Commit e6807b44 authored by Max Filippov's avatar Max Filippov
Browse files

xtensa: report trax and perf counters in cpuinfo



Add 'trax' to the list of CPU features when xtensa core is configured
with TRAX.
Add 'perf' to the list of CPU features when xtensa core is configured
with perf counters and show the number of configured perf counters.

Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 338d9150
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -26,6 +26,14 @@
#define XCHAL_SPANNING_WAY 0
#define XCHAL_SPANNING_WAY 0
#endif
#endif


#ifndef XCHAL_HAVE_TRAX
#define XCHAL_HAVE_TRAX 0
#endif

#ifndef XCHAL_NUM_PERF_COUNTERS
#define XCHAL_NUM_PERF_COUNTERS 0
#endif

#if XCHAL_HAVE_WINDOWED
#if XCHAL_HAVE_WINDOWED
#if defined(CONFIG_USER_ABI_DEFAULT) || defined(CONFIG_USER_ABI_CALL0_PROBE)
#if defined(CONFIG_USER_ABI_DEFAULT) || defined(CONFIG_USER_ABI_CALL0_PROBE)
/* Whether windowed ABI is supported in userspace. */
/* Whether windowed ABI is supported in userspace. */
+10 −2
Original line number Original line Diff line number Diff line
@@ -586,6 +586,12 @@ c_show(struct seq_file *f, void *slot)
# if XCHAL_HAVE_OCD
# if XCHAL_HAVE_OCD
		     "ocd "
		     "ocd "
# endif
# endif
#if XCHAL_HAVE_TRAX
		     "trax "
#endif
#if XCHAL_NUM_PERF_COUNTERS
		     "perf "
#endif
#endif
#endif
#if XCHAL_HAVE_DENSITY
#if XCHAL_HAVE_DENSITY
	    	     "density "
	    	     "density "
@@ -635,11 +641,13 @@ c_show(struct seq_file *f, void *slot)
	seq_printf(f,"physical aregs\t: %d\n"
	seq_printf(f,"physical aregs\t: %d\n"
		     "misc regs\t: %d\n"
		     "misc regs\t: %d\n"
		     "ibreak\t\t: %d\n"
		     "ibreak\t\t: %d\n"
		     "dbreak\t\t: %d\n",
		     "dbreak\t\t: %d\n"
		     "perf counters\t: %d\n",
		     XCHAL_NUM_AREGS,
		     XCHAL_NUM_AREGS,
		     XCHAL_NUM_MISC_REGS,
		     XCHAL_NUM_MISC_REGS,
		     XCHAL_NUM_IBREAK,
		     XCHAL_NUM_IBREAK,
		     XCHAL_NUM_DBREAK);
		     XCHAL_NUM_DBREAK,
		     XCHAL_NUM_PERF_COUNTERS);




	/* Interrupt. */
	/* Interrupt. */