]> git.baikalelectronics.ru Git - kernel.git/commit
kdb: Get rid of custom debug heap allocator
authorSumit Garg <sumit.garg@linaro.org>
Wed, 14 Jul 2021 05:56:20 +0000 (11:26 +0530)
committerDaniel Thompson <daniel.thompson@linaro.org>
Tue, 27 Jul 2021 13:46:11 +0000 (14:46 +0100)
commitca2052a1bd8ba6b24c7b81223e62475b76bfe888
tree6db9ad7fd87cc1c54c4bdcea28c4f852d19c1eb4
parent1f1666416de944b8eb5f4b7888ec514f1a2fe178
kdb: Get rid of custom debug heap allocator

Currently the only user for debug heap is kdbnearsym() which can be
modified to rather use statically allocated buffer for symbol name as
per it's current usage. So do that and hence remove custom debug heap
allocator.

Note that this change puts a restriction on kdbnearsym() callers to
carefully use shared namebuf such that a caller should consume the symbol
returned immediately prior to another call to fetch a different symbol.

Also, this change uses standard KSYM_NAME_LEN macro for namebuf
allocation instead of local variable: knt1_size which should avoid any
conflicts caused by changes to KSYM_NAME_LEN macro value.

This change has been tested using kgdbtest on arm64 which doesn't show
any regressions.

Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20210714055620.369915-1-sumit.garg@linaro.org
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
kernel/debug/kdb/kdb_debugger.c
kernel/debug/kdb/kdb_private.h
kernel/debug/kdb/kdb_support.c