Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp727430img; Tue, 26 Feb 2019 07:38:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IYDHc7e87jPevr7U51R1egeceRBo3zRP0uZaHLGFnCpe+lGlsY3FWU9csbsJX+vsSCE8BrU X-Received: by 2002:a17:902:e00d:: with SMTP id ca13mr26610431plb.206.1551195537898; Tue, 26 Feb 2019 07:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551195537; cv=none; d=google.com; s=arc-20160816; b=G6zNr9a9Te3zzl2nxcQWzVZSQKGJC7VysROMjgitTf3Nyexuf7LU0aOlwbUb/dXja9 oAMKDHHEEqKf8jfpTW3jQXIO9cptbVtfWM8St1D3tDQm4zwJ3zxgbksd+eVGF2EZ899z mWiVtq8O5rUd7qxJE4kHM2ISa7HKO1i88W41kMjpmPzv+KHtDjfSAz33hwX1WhoMnIWM uzsmhfE+QuUbXSUVrx/58yu505qvH09WSiGhsFWQDRdXtDzPCopn4sodxOJ2amrElNGN swYF6bq7EAsQTGvRzLYNI8Q9gFpcEpQQZTk1pWEDXuvZe0N9NZ0mrwlW1qhX4iwY1jfo LUsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NnU0PLIxoTmwWBbP5mLu1eOm6ggBO8eil823vPgUQ4c=; b=CZckuJ9HX6hrcqhIE3C+/XtYPDYHtJwlP9l1MjkhGtc3MALqtkVOhp6o5Oy0UtqXKp J+VO1b2Ixw69+h10MiWfzGN/OSmaATVDzLBXkNHTNgSUAN1VyZnm+6YhgUN+cxaYTfhS XoT98V5rKlU6Rq5M9Kc0ZFJihWdlgLdqgHkKmbHcQeFyC47nOZcmfwvGOi9B1fV50Qf3 fv6kieBA/bXsKxc93G0zO1huSgIzt6UY313lzVPkTRed4rqAUyvNYqWHVjAovGSvSV9T cIRqAtzZcWE630MYHWpw6xsMrb1IUGVWJbKLbu+aC6d6FJUjnNc6bHy8Z9w2WXrKq69a X1lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si12531992pll.18.2019.02.26.07.38.42; Tue, 26 Feb 2019 07:38:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727447AbfBZPiR (ORCPT + 99 others); Tue, 26 Feb 2019 10:38:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:49010 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726478AbfBZPiR (ORCPT ); Tue, 26 Feb 2019 10:38:17 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E5EA7AD07; Tue, 26 Feb 2019 15:38:15 +0000 (UTC) Date: Tue, 26 Feb 2019 16:38:14 +0100 From: Petr Mladek To: John Ogness Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Sergey Senozhatsky , Steven Rostedt , Daniel Wang , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , Alan Cox , Jiri Slaby , Peter Feiner , linux-serial@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC PATCH v1 16/25] printk: implement CON_PRINTBUFFER Message-ID: <20190226153814.cem5lxr7sla2ihb5@pathway.suse.cz> References: <20190212143003.48446-1-john.ogness@linutronix.de> <20190212143003.48446-17-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190212143003.48446-17-john.ogness@linutronix.de> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2019-02-12 15:29:54, John Ogness wrote: > If the CON_PRINTBUFFER flag is not set, do not replay the history > for that console. This patch fixes a regression caused by previous patches. We need to do it a way that does not cause the regression and do not break bisection. > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 6c875abd7b17..b97d4195b09a 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1596,8 +1592,12 @@ static void call_console_drivers(u64 seq, const char *ext_text, size_t ext_len, > if (!(con->flags & CON_ENABLED)) > continue; > if (!con->wrote_history) { > - printk_write_history(con, seq); > - continue; > + if (con->flags & CON_PRINTBUFFER) { > + printk_write_history(con, seq); > + continue; > + } > + con->wrote_history = 1; I have just got an idea that we do not need a new flag. We could clear CON_PRINTBUFFER bit instead. Best Regards, Petr