Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1680719rwb; Fri, 23 Sep 2022 17:07:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49OK9/RI5rFiZ1zAQDkSTLHVc/0MwlD02GxXDQtY98YhoVqgevfLzh0AvYqEgV6v3gBqDI X-Received: by 2002:a17:907:3e99:b0:782:2980:e1c9 with SMTP id hs25-20020a1709073e9900b007822980e1c9mr8759535ejc.91.1663978072510; Fri, 23 Sep 2022 17:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663978072; cv=none; d=google.com; s=arc-20160816; b=BBZanCmyt13vtYxtofgmSfqQLRo5EC2iHfM0jSyJ09XTOPAui0ILGaMekQhGtVt/+6 cvGjEwtmHyrigmfSL5hC7T5A0/Sm+HGWIfegJOeBEwxNYR5Vl0A+lhBZxLP0Txu2IUtf UnJmdPT79ux+UUjqwKIYnqstpy4I/2wRLjf5JbRhcC649kR20olOi0ry2XiLvIIPZEZr CorQRW4ffy7ctM7RN46ymZ/Vyn38gLAe+l4INr8oKFDiqhndB97aZBzknmLBVAIPHA64 RGUs7rgNSdfzghVxP+8rbXHaY++VaYCnTiGd2HBPwYRt3toBiRBOENkJBFQADq/EEV+Z E+BA== 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=aIZ/p/zzcUdqvZHBfaTh7iNfzROHCGADiXc3h/IYPhs=; b=OaxLJ2pFKFKqMQ7toDO468FHwMDwiIITZo4JRYGlK6ZeFYRnRd2wGoBlZfkjxk6b+7 QQfUiBOadSA/8RvWP3Kfl8A4T1qTP+9Y9/sn+xMNRFBKVIDSTjKTSQxe4xUoUHSjWwuc WDRA5qSBxz5R0hzLD+4xAQnKM2FTR68flnDxkMdKm5DZ37rKfMPm+EraJFhtjzOyT0Po kDwttwU1GL8hE0oCjupVG3jtPQcVOHU4/vmC0E5hLqm0apYnkrgeDfXaLWDJKTC1M2Jm ukzhNNbjOA6OzBcmZzdUvpCLGuDDCvUifgr/12oQ4XdHygx7abcpFXbs5OuNkrboVUfo UgIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=tCZMo4OJ; dkim=neutral (no key) header.i=@linutronix.de; 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 w4-20020a50d784000000b00448b88378f8si7994654edi.359.2022.09.23.17.07.25; Fri, 23 Sep 2022 17:07:52 -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=tCZMo4OJ; dkim=neutral (no key) header.i=@linutronix.de; 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 S233029AbiIXAFO (ORCPT + 99 others); Fri, 23 Sep 2022 20:05:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232779AbiIXAFE (ORCPT ); Fri, 23 Sep 2022 20:05:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4969E9AFA8; Fri, 23 Sep 2022 17:04:57 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1663977895; 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=aIZ/p/zzcUdqvZHBfaTh7iNfzROHCGADiXc3h/IYPhs=; b=tCZMo4OJzUDsRF8Tt5+dc9rVSfsM8skI4n+zWXwCUkL8CFC32e6KCXNJYzr7jmUCSiy7PK d9ZVBFsHn5tVkGw/58xnFgn8uhx7BTppvYVU7Vd4CaZ2bIRNe8Z/Ii/vYBnlumMa3r3Hq3 49kHaqlbV5niuvxKHiUPpIHDZsJZQw1iJD8rOb3wM23v9LK2MTpnIthq8+Q6WNMEqYUufP PMS42lqeKjpuGybID818ebteZp2Kb3z4H0DJdG80La4a8KFtliJL5kdAiqEuYYZCQlPrl1 P+/5opPrHYIwb+TO/xBD8nL5QfWxEhOeCKp9VOoMS4tpmc0c4KjlfXyhkmGRAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1663977895; 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=aIZ/p/zzcUdqvZHBfaTh7iNfzROHCGADiXc3h/IYPhs=; b=G1F2Ln97f+/dUnOPn//ayxn+aXiNDFuWDxoBSCqEd1WNNf6v/RbGXOH0HkyRnz8gTDiImh gtw3fZf+UFXvSmDA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , "James E.J. Bottomley" , Helge Deller , Sven Schnelle , John David Anglin , "Eric W. Biederman" , Julia Lawall , linux-parisc@vger.kernel.org, Jason Wessel , Daniel Thompson , Douglas Anderson , kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org, Aaron Tomlin , Luis Chamberlain Subject: [PATCH printk 00/18] preparation for threaded/atomic printing Date: Sat, 24 Sep 2022 02:10:36 +0206 Message-Id: <20220924000454.3319186-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 series is essentially the first 18 patches of tglx's RFC series [0] with only minor changes in comments and commit messages. It's purpose is to lay the groundwork for the upcoming threaded/atomic console printing posted as the RFC series and demonstrated at LPC2022 [1]. This series is interesting for mainline because it cleans up various code and documentation quirks discovered while working on the new console printing implementation. Aside from cleanups, the main features introduced here are: - Converts the console's DIY linked list implementation to hlist. - Introduces a console list lock (mutex) so that readers (such as /proc/consoles) can safely iterate the consoles without blocking console printing. - Adds SRCU support to the console list to prepare for safe console list iterating from any context. - Refactors buffer handling to prepare for per-console, per-cpu, per-context atomic printing. The series has the following parts: Patches 1 - 5: Cleanups Patches 6 - 12: Locking and list conversion Patches 13 - 18: Improved output buffer handling to prepare for code sharing John Ogness [0] https://lore.kernel.org/lkml/20220910221947.171557773@linutronix.de [1] https://lore.kernel.org/lkml/875yheqh6v.fsf@jogness.linutronix.de Thomas Gleixner (18): printk: Make pr_flush() static printk: Declare log_wait properly printk: Remove write only variable nr_ext_console_drivers printk: Remove bogus comment vs. boot consoles printk: Mark __printk percpu data ready __ro_after_init printk: Protect [un]register_console() with a mutex printk: Convert console list walks for readers to list lock parisc: Put console abuse into one place serial: kgdboc: Lock console list in probe function kgbd: Pretend that console list walk is safe printk: Convert console_drivers list to hlist printk: Prepare for SCRU console list protection printk: Move buffer size defines printk: Document struct console printk: Add struct cons_text_buf printk: Use struct cons_text_buf printk: Use an output descriptor struct for emit printk: Handle dropped message smarter arch/parisc/include/asm/pdc.h | 2 +- arch/parisc/kernel/pdc_cons.c | 55 +++-- arch/parisc/kernel/traps.c | 17 +- drivers/tty/serial/kgdboc.c | 9 +- drivers/tty/tty_io.c | 6 +- fs/proc/consoles.c | 11 +- fs/proc/kmsg.c | 2 - include/linux/console.h | 197 +++++++++++++--- include/linux/printk.h | 9 - include/linux/syslog.h | 3 + kernel/debug/kdb/kdb_io.c | 7 +- kernel/printk/printk.c | 414 ++++++++++++++++++++++------------ 12 files changed, 499 insertions(+), 233 deletions(-) base-commit: dc453dd89daacdc0da6d66234aa27e417df7edcd -- 2.30.2