aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorOreoluwa Babatunde <quic_obabatun@quicinc.com>2024-10-08 15:06:24 -0700
committerRob Herring (Arm) <robh@kernel.org>2024-10-15 10:34:33 -0500
commit00c9a452a235c61f099504783badd9a7675ff5a5 (patch)
tree3a1ae301946efa55ce48a3af98a3707b3beecbb9 /tools/perf/scripts/python/syscall-counts.py
parent8a6e02d0c00e7b62e6acb74146878bb91e9e7e31 (diff)
downloadlinux-00c9a452a235c61f099504783badd9a7675ff5a5.tar.gz
linux-00c9a452a235c61f099504783badd9a7675ff5a5.tar.bz2
linux-00c9a452a235c61f099504783badd9a7675ff5a5.zip
of: reserved_mem: Add code to dynamically allocate reserved_mem array
The reserved_mem array is statically allocated with a size of MAX_RESERVED_REGIONS(64). Therefore, if the number of reserved_mem regions exceeds this size, there will not be enough space to store all the data. Hence, extend the use of the static array by introducing a dynamically allocated array based on the number of reserved memory regions specified in the DT. On architectures such as arm64, memblock allocated memory is not writable until after the page tables have been setup. Hence, the dynamic allocation of the reserved_mem array will need to be done only after the page tables have been setup. As a result, a temporary static array is still needed in the initial stages to store the information of the dynamically-placed reserved memory regions because the start address is selected only at run-time and is not stored anywhere else. It is not possible to wait until the reserved_mem array is allocated because this is done after the page tables are setup and the reserved memory regions need to be initialized before then. After the reserved_mem array is allocated, all entries from the static array is copied over to the new array, and the rest of the information for the statically-placed reserved memory regions are read in from the DT and stored in the new array as well. Once the init process is completed, the temporary static array is released back to the system because it is no longer needed. This is achieved by marking it as __initdata. Signed-off-by: Oreoluwa Babatunde <quic_obabatun@quicinc.com> Link: https://lore.kernel.org/r/20241008220624.551309-3-quic_obabatun@quicinc.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions