aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorJohn Ogness <[email protected]>2024-09-04 12:05:28 +0000
committerPetr Mladek <[email protected]>2024-09-04 13:56:32 +0000
commit13189fa73afae2b961d29132fd36d9cc0be77ecb (patch)
treeac48e44ca10e9e7801334b258b8648491f08e5c9 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentprintk: nbcon: Use thread callback if in task context for legacy (diff)
downloadkernel-13189fa73afae2b961d29132fd36d9cc0be77ecb.tar.gz
kernel-13189fa73afae2b961d29132fd36d9cc0be77ecb.zip
printk: nbcon: Rely on kthreads for normal operation
Once the kthread is running and available (i.e. @printk_kthreads_running is set), the kthread becomes responsible for flushing any pending messages which are added in NBCON_PRIO_NORMAL context. Namely the legacy console_flush_all() and device_release() no longer flush the console. And nbcon_atomic_flush_pending() used by nbcon_cpu_emergency_exit() no longer flushes messages added after the emergency messages. The console context is safe when used by the kthread only when one of the following conditions are true: 1. Other caller acquires the console context with NBCON_PRIO_NORMAL with preemption disabled. It will release the context before rescheduling. 2. Other caller acquires the console context with NBCON_PRIO_NORMAL under the device_lock. 3. The kthread is the only context which acquires the console with NBCON_PRIO_NORMAL. This is satisfied for all atomic printing call sites: nbcon_legacy_emit_next_record() (#1) nbcon_atomic_flush_pending_con() (#1) nbcon_device_release() (#2) It is even double guaranteed when @printk_kthreads_running is set because then _only_ the kthread will print for NBCON_PRIO_NORMAL. (#3) Signed-off-by: John Ogness <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Mladek <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions