mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-07 07:52:54 +00:00
Directly read the current CPU number from the kgdb_active variable. Before, the active CPU was obtained through the current task, which required searching the task list for the pid of GDB's selected thread. Obtaining the pid was buggy: GDB may use selected_thread().ptid[1] (LWPID) instead of .ptid[2] (TID) to store the threads pid; see https://sourceware.org/gdb/current/onlinedocs/gdb.html/Threads-In-Python.html As a result, the detection could return the wrong CPU number, leading to incorrect results for $lx_per_cpu and $lx_current. As a side effect, the patch significantly speeds up $lx_per_cpu and $lx_current in KGDB by avoiding the task-list iteration. Link: https://lkml.kernel.org/r/20240425153501.749966-5-mail@florommel.de Signed-off-by: Florian Rommel <mail@florommel.de> Cc: Andrew Jones <ajones@ventanamicro.com> Cc: Deepak Gupta <debug@rivosinc.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> Cc: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| .gitignore | ||
| clk.py | ||
| config.py | ||
| constants.py.in | ||
| cpus.py | ||
| device.py | ||
| dmesg.py | ||
| genpd.py | ||
| interrupts.py | ||
| lists.py | ||
| Makefile | ||
| mm.py | ||
| modules.py | ||
| page_owner.py | ||
| pgtable.py | ||
| proc.py | ||
| radixtree.py | ||
| rbtree.py | ||
| slab.py | ||
| stackdepot.py | ||
| symbols.py | ||
| tasks.py | ||
| timerlist.py | ||
| utils.py | ||
| vfs.py | ||
| vmalloc.py | ||