misc: tegra-profiler: fix uninitialized spinlocks
authorIgor Nabirushkin <inabirushkin@nvidia.com>
Tue, 4 Jul 2017 06:12:42 +0000 (09:12 +0300)
committerIgor Nabirushkin <inabirushkin@nvidia.com>
Tue, 8 Aug 2017 14:23:12 +0000 (17:23 +0300)
commita293bf77a0117c79b85005e05f7edcee9d0b43c7
treeb24b9773082e69528822c2f8c938bea6c07944c5
parentae8fb9ec1dd9fb4af584358d6fcf0bb12c0b0fd4
misc: tegra-profiler: fix uninitialized spinlocks

Fix uninitialized spinlocks for some systems with "holes"
in the CPU numbering.
Use possible cpus instead of nr_cpu_ids for per-cpu buffers.
This fixes possible system crash.

Bug 200320513

Change-Id: I4610459b84bff2ed78d0521e77c6251dc4ded0ad
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: https://git-master/r/1512907
(cherry picked from commit ada8ad34fad3522974d9d7a1ea835474779d91c8)
drivers/misc/tegra-profiler/comm.c
drivers/misc/tegra-profiler/hrt.c
drivers/misc/tegra-profiler/pl310.c
drivers/misc/tegra-profiler/version.h