OSDN Git Service

perf/arm-cmn: Move group validation data off-stack
authorRobin Murphy <robin.murphy@arm.com>
Fri, 3 Dec 2021 11:44:58 +0000 (11:44 +0000)
committerWill Deacon <will@kernel.org>
Tue, 14 Dec 2021 12:09:28 +0000 (12:09 +0000)
commit558a07807038017255005a4820f600da643d8a5f
treeefcb7fd0762dbe735bf94a633836d16d4289a000
parent4f2c3872dde55090bf39e1f12a8517a32b6cd048
perf/arm-cmn: Move group validation data off-stack

With the value of CMN_MAX_DTMS increasing significantly, our validation
data structure is set to get quite big. Technically we could pack it at
least twice as densely, since we only need around 19 bits of information
per DTM, but that makes the code even more mind-bogglingly impenetrable,
and even half of "quite big" may still be uncomfortably large for a
stack frame (~1KB). Just move it to an off-stack allocation instead.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/0cabff2e5839ddc0979e757c55515966f65359e4.1638530442.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c