]> 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)
commit6be2b79fa22eff3a6a46de9f1f614c2af798916c
tree6db9ad7fd87cc1c54c4bdcea28c4f852d19c1eb4
parent6e818c7f8de32c63462f5a745b7397a46ba3001b
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