From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0127121E08B for ; Thu, 9 Jan 2025 16:13:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736439197; cv=none; b=fixz+LtIlXMfKUZmUfqIVerlcQLrK0rJe0BbJiOVdH3Rpy8c4leRSfqpJG+4G5xOa8fp6Gg5e7+npM50BxDBpTdEzh2Pj0kY/LUV8MjuDiMdSqA7+1eGyng1uuDXYFh4lCiQwWvR68L1L+TAyNOeOehXGk4WbBfMMjBBinaUh1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736439197; c=relaxed/simple; bh=hrHoS4vPlPfy16tkj356Uv+3+REsoEqobKAqrk9g0ls=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nG1h0TtPrL4DlxKFg/hhkNmicXBk6h2paOyDG7AY4MWeyJQbfWLdFmyivR9EnvyyU8/PiwMN5B9ggA0LCKRnrs2i9pXqbUboLXDTpXxaObqXWA9wxJMcV4UNSltgzLtCpZ+nOVVbDBk4u4mXdjXdmhd/bc86Vp1Tm2LeQ25ycDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=QY7h4boy; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="QY7h4boy" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-385dece873cso614087f8f.0 for ; Thu, 09 Jan 2025 08:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1736439193; x=1737043993; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kai5ZgxDf+EShyzs7bDwWO83K4Oce/nwpcJg76eHGM4=; b=QY7h4boyJd/WdMU9zEM4zRsf+0I4wrNFPJ4g6z57OwQAXQ/APKVwPZ3O21hCL76asa OKaEu6tslHqcnlVAjwIZVtgsjaCq0jaeahT4hmEWjORLjGOsTVH3ZZ5me0wTLKb3vrVm orD5tsDQ/PKQ+aSdPz6CfL2Cr9wFrQEDfqK3ZebbWjnuBbcioJRPgYh54O6JXPjCF++8 hgMlGMiQPkeL9fAiPNzEYmTjwTNA5t1Ob6tEldZroGAuy1Kt/RCkZIiHtqNriC8SgH8s ExHAHV7f5BN94rmPLmRSO+QZuE9whJ4T4i371VjmmP8wDss+WBrtjZw7m2bMun+V2ZHg w1Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736439193; x=1737043993; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kai5ZgxDf+EShyzs7bDwWO83K4Oce/nwpcJg76eHGM4=; b=qr0Hehv8i62Mfs/OjdEuf4l6BgTCILyIXF7EC9eXWayPBToBWGo6qJuzmKhPzTgNJr /RUkB8N+WqJEOREB2BLX2V92Jyi3rH40DRJhBV9AtHboHYirPNNcOonafyZdVTbtpVyP ffFb8ycqDVQ+m7NrxydV5LvtYbY2QYggQdiVwy5IvtgOHejcMjQMnxfXEFr+7EVeyhcO B3rYKcBzncXbFpvNvYNQJwUCntBgN0fj402PBdEzgqP1eDtvRKud87m63g6mw4ZgsyvR EzfSIqlVL9p0ZClnk1R/DqhiiHR/HyD0XZzjgjPKs7vLb9aRSUwM2ZSyNLwp4vGHJQHW k2zw== X-Forwarded-Encrypted: i=1; AJvYcCXuOo6O9xQfXDpvyMeQwo3IkdQN4MBQ0B4qslTNpxTCdZPdPuYqQrWT1VK5py29bBfWW6+IBjuNw71235M=@vger.kernel.org X-Gm-Message-State: AOJu0Yw2Cshw+Gh1UxRPeRG+zBdb/2QwbLDRdUPEVUE6AOFY9aHzdNRz mOomBgG/ceursDM4bGVbWle9L3fwAPguB/FtoBdn1HTSQlark3kr1LJiwXUmtjY= X-Gm-Gg: ASbGncsab3EtsLI7QwQSzdOcfVFsri/XQfQRuZSJR5f41laQ0nd/5ppByTNsYoU+B6B A1Fu2Bb6O3xOoXfseADhPTTgXeKkbRM/+Zv4f0+YLhaN8Qi+8KrmgwtXnquGUKa+8xsyTcPBwVL PXUJIW/6ob98lqjthRIlVLUzzUJOlvoiCAtXhShy+8n+h56QQeM13yApcozdbh2dX17KDIt5pye EQzOnzsYhR1cOpgdlAnf6GjZfM+t8ZRGcx7SdtOoHEw4Iy/Fy8dgwcFVw== X-Google-Smtp-Source: AGHT+IEKi5W9KtWRj/RV+N8EK/6UrsGmYGe36NimQHrosYmeKEq1AxHaQOTx8OfeKcJcyKsFoedR1g== X-Received: by 2002:a05:6000:1847:b0:385:f060:b7fc with SMTP id ffacd0b85a97d-38a8730a60cmr6395814f8f.25.1736439193253; Thu, 09 Jan 2025 08:13:13 -0800 (PST) Received: from pathway.suse.cz ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2e89fc3sm60501045e9.30.2025.01.09.08.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2025 08:13:12 -0800 (PST) Date: Thu, 9 Jan 2025 17:13:10 +0100 From: Petr Mladek To: John Ogness Cc: Greg Kroah-Hartman , Jiri Slaby , Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , Esben Haabendal , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Arnd Bergmann , Tony Lindgren , Niklas Schnelle , Serge Semin Subject: Re: [PATCH tty-next v5 5/6] serial: 8250: Switch to nbcon console Message-ID: References: <20250107212702.169493-1-john.ogness@linutronix.de> <20250107212702.169493-6-john.ogness@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250107212702.169493-6-john.ogness@linutronix.de> On Tue 2025-01-07 22:33:01, John Ogness wrote: > Implement the necessary callbacks to switch the 8250 console driver > to perform as an nbcon console. > > Add implementations for the nbcon console callbacks: > > ->write_atomic() > ->write_thread() > ->device_lock() > ->device_unlock() > > and add CON_NBCON to the initial @flags. > > All register access in the callbacks are within unsafe sections. > The ->write_atomic() and ->write_thread() callbacks allow safe > handover/takeover per byte and add a preceding newline if they > take over from another context mid-line. > > For the ->write_atomic() callback, a new irq_work is used to defer > modem control since it may be called from a context that does not > allow waking up tasks. > > Note: A new __serial8250_clear_IER() is introduced for direct > clearing of UART_IER. This will allow to restore the lockdep > check to serial8250_clear_IER() in a follow-up commit. > > Signed-off-by: John Ogness It looks good and seems to work fine: Reviewed-by: Petr Mladek Tested-by: Petr Mladek Best Regards, Petr