Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp882929ybc; Tue, 19 Nov 2019 10:50:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxH01UySoWBOjcl9B92L9TZ5x4VyzinUofPMRURnbWJvFg9ax+gs85gVcS6xQrjb8wByZHu X-Received: by 2002:a5d:638a:: with SMTP id p10mr36711320wru.336.1574189425166; Tue, 19 Nov 2019 10:50:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574189425; cv=none; d=google.com; s=arc-20160816; b=Au1KfZKRkypFPY8H+4lBIwmyLE5KbsHC48TIgE6uyz01jrLNWdTIPuQaBE+PjX5tXf Ql2dEkfILKRCjLH3zn2VfpMhErEW4rhmBKyt+6x8KXKirLcbhxtZZHJoeMrdCMfmnNmL qk9bxrWWxecndqZnJFhoXWCh9nC6G/LvHv3SZom6Z+xXC6l/PCQLppHRXYgNYyG4FQOW QNl4LtKYIdRXCkG8EEcezSnDYOZ9ceHUYKGkqAK7cC2PKKrLGu6txjLow0mzLQgrD5r4 8coIW5IQ7lPFLfM2BTQvTmrnTyh5CQMcFA8e5XwYQY38n5XjecSL3Q2WgwNlrnQw98vW f4MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3ZdR1c5xAjrcpt6k2LBUSqAjpQzIBxubylJThYRgFBE=; b=AqIxgE3CD7WCyF7bCGM2dWq2OsOpYNQqgt626k1IKkX0he5Im8u+vkE/aircqyd2fF WePP0o/4jdZhxl3G0JKIXOA2rkWzbJYChiQOD28LEN+b0nxkAomUIQAsEv0m6eZCudV+ X5lsiNi9v4kHnARX3m0v5uKPPs8Etka3u0kJRgdef3/G3gGijgQffLrXsD/3HwgjpLcH xn3kSBqnFibzuIgPOmntoG7jfPQLDx+4rVbM7wtR3/ydtkwA+VKDcrnaz/pCyN5leoGb VZ4rS1AsWhrdTX9E/H5FTqp7tN1+JDlvhHh5FaGchyjV6Z0jieiLnpTDGrlPnpAZnrZa K81Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=L6FBVkXk; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si16448851edb.265.2019.11.19.10.50.00; Tue, 19 Nov 2019 10:50:25 -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; dkim=pass header.i=@broadcom.com header.s=google header.b=L6FBVkXk; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727316AbfKSSqg (ORCPT + 99 others); Tue, 19 Nov 2019 13:46:36 -0500 Received: from mail-il1-f194.google.com ([209.85.166.194]:35266 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726510AbfKSSqg (ORCPT ); Tue, 19 Nov 2019 13:46:36 -0500 Received: by mail-il1-f194.google.com with SMTP id z12so20665102ilp.2 for ; Tue, 19 Nov 2019 10:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3ZdR1c5xAjrcpt6k2LBUSqAjpQzIBxubylJThYRgFBE=; b=L6FBVkXkS9Lg0FONzzG9hSkFSxQa9J7lBbUZRc/EXQE7pE8kE9txR3N4Lgs7mEXZ0Y 6nRS0VxRkuKqfauh+0CTEEcMam80kvujQvhaM1IeIlyXOJXxt73QSEtZzeiHfnD4Alfv hrz5pRd+VZWXCTUta1KrJhk55M6r90yG4PuO8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3ZdR1c5xAjrcpt6k2LBUSqAjpQzIBxubylJThYRgFBE=; b=t0YJ0WFFCCI0W1oAPsm/TLgFq4KLerGgsYAJ16gJ/KAZaKbyj6GD5rWa2uELJBh5Wh iyBXDHuiza4P5li1ldzWfrc4SDwtOoNOTu7V0d28BYH5TcO1O+5vGWyBpDgRp2WsFpjF fi5Wl0SJw/tT1kp7pP/t6hqcLpY95DlFTIU22FXL3ge+ZL2NvOHWvYpFxUZnMZU5lJbd STPZAcGeJgewtycZyFAWqkcjPkUbRHcfU9KOdfZ86WvxTad2h6dNQCTaF+QO5GydrfBS Fz2+SuEAuvXK5T+U3q8XkUaIP0LpBh/hv+ziU64+Bu+/gQWarwy+saysatIAZFgJK417 E5tQ== X-Gm-Message-State: APjAAAUiiF1n2MPcwqsWLc9dUhUK9laU6XsaH7aEezlhKK3z5SMkF5IL XiutSDDTXF7A1ggmNv3CJ5RWSH07EQzFfztN6K8eSg== X-Received: by 2002:a92:5fc2:: with SMTP id i63mr22116131ill.218.1574189193304; Tue, 19 Nov 2019 10:46:33 -0800 (PST) MIME-Version: 1.0 References: <20191114095737.wl5nvxu3w6p5thfc@pathway.suse.cz> <20191115043356.GA220831@google.com> <20191119003457.GA208047@google.com> In-Reply-To: <20191119003457.GA208047@google.com> From: Jonathan Richardson Date: Tue, 19 Nov 2019 10:46:22 -0800 Message-ID: Subject: Re: console output duplicated when registering additional consoles To: Sergey Senozhatsky Cc: Petr Mladek , gregkh@linuxfoundation.org, jslaby@suse.com, sergey.senozhatsky@gmail.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Scott Branden , Ray Jui , Srinath Mannam Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Thanks. It also needs to be cleared when the second console driver is > > registered (of the same type, boot or normal) > > The second 'normal' console can be, for instance, netcon - it's sort > of OK to have CON_PRINTBUFFER tty and CON_PRINTBUFFER netcon consoles. OK I missed that case. > > Maybe > > > not just when a normal con replaces a bootconsole. A simple way of > > avoiding the problem I'm seeing is to not even set the CON_PRINTBUFFER > > flag on my consoles. > > This is up to the console driver to decide. > > > It skips the replay and the output on all consoles looks fine. The flag > > is only used by register_console(), although I don't think that is the > > intended usage? There are no console drivers that do this. > > Not sure I'm following. There are consoles that want all logbuf messages > once those consoles are available. I meant mine would be the only driver that didn't set CON_PRINTBUFFER. Thanks for clarifying why it would be set. I guess what I didn't understand is why are all the consoles updated (potentially) when a new console is registered. As I mentioned before I can not set CON_PRINTBUFFER to avoid the issue but it's probably not what I want. I would possibly lose some of the log I guess if there was something in the buffer during registration of the new console. So I tried the patch but the issue remains as I originally described. Thanks, Jon