Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35397312rwd; Mon, 10 Jul 2023 06:59:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHCbEPc8Q+4xeURSnEpGqzBfOaJqSwwbem4zp2A9yGF9KNIMm1Y9MdwF8bdSz06ZcFqK9VH X-Received: by 2002:a05:6808:120e:b0:397:ec35:f5a6 with SMTP id a14-20020a056808120e00b00397ec35f5a6mr9772922oil.57.1688997595155; Mon, 10 Jul 2023 06:59:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688997595; cv=none; d=google.com; s=arc-20160816; b=VSgyDaUJ4Zk2ITwunWEQhWcRoQo1rRkZFBvlu8/nCikt4EalFlAbQI+u1zPrqbfXBg EeddWJNuPMdus16Jwej9DbJ3/4ALsRdnGn3hLpIljkjgi2nbr01epxkTypB2bCc1qUHS SnnoC6ghWCt1XIBszkKigIEDEuREQmX1ZAh35czUFJ2oeP+VXqDdFMHF37zk+Dz9XK2G cbhjiImfFzQhNAHAVDbUPaKOOUEzhEyRKrPkJLWfMiwIuSZWSzBMyhHYH3ZWR5H0zHoD 31gNvXK5nNMyG4wFnMbe+LnBTYgrjGRneh/vS06z97LvOUckTaDyVWMO64rpHVxs/SOr XjNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:dkim-signature:from; bh=MqQQHifjCL0c2OnScyIKu+7EiHoYi5j4PKb/MmJ4YBA=; fh=INFbsj9snzIqE91OrAQNm2x6ghfbt/qYoY4nQPmle5k=; b=OfNepjKPNxGMbb3XrK/eOPnCHcChQeIognpDsmiTBfaike2rK0Z9ZUMX4e+4CAj2CL jjEi+rhcY/UYlp4/TpOqvcWolFdMr+yaQH9SjGPafiL1B9VKAEfZAcMDiv5NmbJL74px X6Rt/UirsnlqMKwZjepwLa0SHhBMRB3SnTz484WGu323+z+gWK847Q4SQ0Ss4u/sglbK +D6APZjkLPftSIzwerQK72jJP+uow909kRYmsZHKqTOrEPiNGjCTx1XNqq7tYwYmhud3 /nVSkb9QpCypl9ftNvBVo8C7USQ9CR52qr8o0IJ3p5h1CSejGpCBq8qxXwutxssNf5LO hFgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OYec+o0K; dkim=neutral (no key) header.i=@linutronix.de header.b=NzZe8c77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i185-20020a6387c2000000b0054402b987f8si8778652pge.605.2023.07.10.06.59.42; Mon, 10 Jul 2023 06:59:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OYec+o0K; dkim=neutral (no key) header.i=@linutronix.de header.b=NzZe8c77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232975AbjGJNpc (ORCPT + 99 others); Mon, 10 Jul 2023 09:45:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231180AbjGJNpb (ORCPT ); Mon, 10 Jul 2023 09:45:31 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97BF0E9 for ; Mon, 10 Jul 2023 06:45:29 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1688996727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MqQQHifjCL0c2OnScyIKu+7EiHoYi5j4PKb/MmJ4YBA=; b=OYec+o0KCOOMwsAfbtONOyof+75wVZgRLD2p5Ragkko/rI9iROmI++kcRgw7NcXsMP/aUy OqMhd7M3j/l7Cr3qrlv2+W/kWjJGUqAfy1B0iHJgxl3aLDpLRsBwFW95jd9H7nhm0cTZ43 cRXClf2IZBBu6sy2gU1RRDCcNlopiMeEciXXgGVOIQAF/RGrqUhiJGvLopfyYucZeq8qxj bvmTXG7Hy000m7nmS7gInhx8/py1oQ4HQFVTsp7w+NojIq/DWGV/DuIjwSSTyv5YLD3ys5 CE7tklijPZdN75G21yNM+UidRBLiwv2cLujHgDWnBaHxwGUYooY74A4lUO1fHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1688996727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MqQQHifjCL0c2OnScyIKu+7EiHoYi5j4PKb/MmJ4YBA=; b=NzZe8c77yHkyAWz/iVBJWdIWGLOw5m7u9FzXMD/Sc+4z5UzWEm8Ns0yDB8rDS9YZbksRrR SS/pWGdMjQa29bBg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Jason Wessel , Daniel Thompson , Douglas Anderson , Aaron Tomlin , kgdb-bugreport@lists.sourceforge.net, Greg Kroah-Hartman Subject: [PATCH printk v2 0/5] various cleanups Date: Mon, 10 Jul 2023 15:51:19 +0206 Message-Id: <20230710134524.25232-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is v2 of a series working towards threaded/atomic console printing. This series is only a subset of the original v1 [0]. That series began with various cleanups before adding the threaded/atomic code. Since none of those cleanups made it into the recent 6.5 merge window, I have decided to post them as their own series. I hope this helps to get them accepted without being attached to any threaded/atomic discussions. Changes since v1: - drop patches 5-18 (they will return in a follow-up series) - console_unblank() aborts if called from NMI context - console_flush_on_panic() directly flushes rather than using console_lock/_unlock dance (because console_lock/_unlock is not NMI-safe) - remove @console_suspended and rely only on CON_SUSPENDED flag - rename abandon_console_lock_in_panic() to other_cpu_in_panic() - console_trylock() and console_lock() will fail and block, respectively, while another CPU is in panic - adjust various comments and whitespace as suggested John Ogness [0] https://lore.kernel.org/lkml/20230302195618.156940-1-john.ogness@linutronix.de John Ogness (5): kdb: do not assume write() callback available printk: Add NMI safety to console_flush_on_panic() and console_unblank() printk: Consolidate console deferred printing printk: Add per-console suspended state printk: Rename abandon_console_lock_in_panic() to other_cpu_in_panic() include/linux/console.h | 3 + kernel/debug/kdb/kdb_io.c | 2 + kernel/printk/internal.h | 2 + kernel/printk/printk.c | 189 +++++++++++++++++++++++------------- kernel/printk/printk_safe.c | 9 +- 5 files changed, 132 insertions(+), 73 deletions(-) base-commit: 7ec85f3e089aa423a69559bf4555b6218b5a2ef7 -- 2.30.2