Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5993439rwl; Mon, 9 Jan 2023 02:45:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXucKyaFiddop0KFrXdhQso9ZwvwVm/hAHxZHgyt1GnacfsR6hN/wni9t5NU/JoU7lnqMM4D X-Received: by 2002:a17:907:d68e:b0:7c1:37:421c with SMTP id wf14-20020a170907d68e00b007c10037421cmr57700886ejc.32.1673261158060; Mon, 09 Jan 2023 02:45:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673261158; cv=none; d=google.com; s=arc-20160816; b=vRi0n5oEVHnYW7CQQlbvGwDC6vsVqN3LvNyWNX7pIsDirlzMHsKWdkf36kjv69JGJE 7w5iBIuwF7uZg1m21wgI7cw+XDh0Ol4BOnhRzhuyJpSvAnB1ssnlxTaDUPmdQBzEt9Rp qUS9m4xcRM7UgmailyomxIQXayaEE8/fMXsVCj8stzZVIfj9uvWcX0I9bD9PfD9g0GTD jpeIz6EiRm2xK3gB+ePc1vWQB3wg3AuZfCVsILpqukePF5UdADpBUACLa1KDc9PZW4Xs 2+EpNRR/IHb2/9fdfGGwkIe28uUCRuuPvW/3KOvmip1yLV/rfag37p4C6bxu7r0Bb+FN qW7Q== 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=72AG3JRI1xk+MbrVQlkAivsLz4+7Y+wE7DkvkbW3NJ0=; b=fdb8Q5wkE+exN/DGjjzpigjB8M7Tvyr7SDW//BQsY3/26UvyyJ0EVCQchaWY7w/Anx 9GwlJ5Vivz7U4cOR3hqN2oNGhh4c+94/AmDVvN0DAj6WbraPzk/oarLDHrIRtRflr730 u+QrmLbMV8RcdwSEuKvNSlFGFmdHk7FEyHSKrIVslUc89l48WRu4vjdeE03+Rny37B9q /oOh47VJhHdHUa+/uJSChE9S4eWnMTy1S9A+K2yMCtzLz6d07Obkt2Jmm5kowKVemvLe n3yZzL8k7Up38so3E+MNwAEtAqUYyPJxK0RBmDG2B/uLfS76RVLjqVoeaK+KO47bO7jU FhRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WBCGKDbZ; 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 qw10-20020a1709066a0a00b0080f0493b9c2si8306196ejc.249.2023.01.09.02.45.44; Mon, 09 Jan 2023 02:45:58 -0800 (PST) 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=WBCGKDbZ; 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 S233686AbjAIKJK (ORCPT + 56 others); Mon, 9 Jan 2023 05:09:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236859AbjAIKIr (ORCPT ); Mon, 9 Jan 2023 05:08:47 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662261054F for ; Mon, 9 Jan 2023 02:08:46 -0800 (PST) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673258924; 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=72AG3JRI1xk+MbrVQlkAivsLz4+7Y+wE7DkvkbW3NJ0=; b=WBCGKDbZ4yoy50cnZXwyXsgLTAdMCARw5Ho+zt8bJKSWWdNJrbSM+vjnq3E+9CNeSLymhO 6PIE7fe5XFBNv7QO7LRWGpwPFY9IW+jBBeToMHwUMjDS6byCwHsQgv1pUyYJgYP0u9HefK SbqkgOeqIY7QvUBWJKoHoveufAOGGU4WekVJTVgaqiJPAMbM7dgQ7Gx0Bw9ql792aG4ejh MUD0+sSelXJf/buifxzQlniwGHRtLtsIhoJnbfOpQYazd0ilElLsBq2YURZ9tG6lN4dIRj xcOZwCk4YGa8uFAkT/JJ9uyTTmG8wD/959aQW7ppArcwlxNMOMX2qnGeoZZrfQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673258924; 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=72AG3JRI1xk+MbrVQlkAivsLz4+7Y+wE7DkvkbW3NJ0=; b=bHSiILY/ryGpaX4ilQZkUvRbgnBnqyAaTFQ7CDp10BjhQazWgJZAz82Ut89++6djbzvEyE 92lZyHf5QyWslYCg== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [PATCH printk v5 0/8] printk: cleanup buffer handling Date: Mon, 9 Jan 2023 11:13:52 +0106 Message-Id: <20230109100800.1085541-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 is v5 of a series to cleanup console buffer handling and prepare for code sharing with the upcoming threaded/atomic consoles. v4 is here [0]. The main purpose of the series is to introduce two new lockless functions to handle reading and formatting of printk messages. These functions can then be used from any context, which is important for the upcoming threaded/atomic consoles. The series also helps to cleanup some of the internal printk interfaces and cleanly separate formatting code from outputting code. Changes since v4: - Make console_prepend_dropped() a NOP for !CONFIG_PRINTK to workaround compiler warnings. - In devkmsg_read() use printk_get_next_message() for the wait condition instead of looping to retry the actual read. - Add an argument @may_suppress to printk_get_next_message() so devkmsg_read() can specify that records should not be skipped based on loglevel. John Ogness [0] https://lore.kernel.org/lkml/20230105103735.880956-1-john.ogness@linutronix.de John Ogness (6): printk: move size limit macros into internal.h printk: introduce struct printk_buffers printk: introduce printk_get_next_message() and printk_message printk: introduce console_prepend_dropped() for dropped messages printk: use printk_buffers for devkmsg printk: adjust string limit macros Thomas Gleixner (2): console: Use BIT() macros for @flags values console: Document struct console include/linux/console.h | 100 +++++++++---- include/linux/printk.h | 2 - kernel/printk/internal.h | 45 ++++++ kernel/printk/printk.c | 308 +++++++++++++++++++++++---------------- 4 files changed, 297 insertions(+), 158 deletions(-) base-commit: 6b2b0d839acaa84f05a77184370f793752e786e9 -- 2.30.2