Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1296054lqh; Mon, 6 May 2024 03:29:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyjsrGfQ8eugz7xjZdnaPHokwvNP4GHHDcPtmFjFgqLYwjJr3DFD/V/kwq3ry2+nT45m38/X9QCfGs/aVMbF9EB342DZux2OIOiyunFA== X-Google-Smtp-Source: AGHT+IHdD9l7wBaxVFu3IFlsXyOXG8/GhWlxuZyWTEgrPT5JcBhuZ9q3LCKXIMk0v3qP3hxaKq9X X-Received: by 2002:a25:ae91:0:b0:dcd:a9ad:7d67 with SMTP id b17-20020a25ae91000000b00dcda9ad7d67mr11225251ybj.8.1714991373019; Mon, 06 May 2024 03:29:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714991373; cv=pass; d=google.com; s=arc-20160816; b=ggvnT2ysxeqcVXRQ55D6YZLi+nQ/+iN9r0oSv0e6CoSL8lgUyYez2D5b6Y3sXbS01e OGQHu4GF5qZU/xSJfF1J4MSJpIv6QIbsDYBvSSflDo0KWMnAZpqebaJSzhVkyKqL5xau YD9i1BkjaEnzGL7IlPEwta6+tDDgip15St8jsY44BbOItvZJajdq2qCfsGWwQ9T/jHJA CMcTBdxmywlTQMbJ6JKWX+CrNzIqVEP6TqMo3HYi76lllPIbG10r/JGzGaCZrzKRr+Jm Yx+d+cgrpRba8MygOcFr9LNHosiU+Y5CPxoFBTSyZKuuDjPV9x4F9VjhoqaoHnBiwZDO oYkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=YSG8WTCiJ42OSrw/ZVN2wRnUOYZNdndEtbaFf3OeZr4=; fh=/NZX815RJy/ecOe1WbZ023sSZUJKZnpaeIZwQG5Ym7U=; b=fjF/86gUU3RKOVAIxI5pIwR7Sxi93zjUCNWa9PzGDhy/5476LKQiDUcB0XnAnQGd3z Rr29MWRLQrE2HV3Pd//SVNLHUwX4FsOIKOZvmK/D/9bqk+87H+SumsIrzjK4W7Gu7fQC MLqU+gXIxjrW6y3bnw8v7MINdjY4qYXbCv1rjEDcP4WlQueX4E5zBQMXbeQgZ8ZDOaLi 9ig1BwBqQ+KulvcqCKbPfxqR5c8OTMMKCN6Zyjlut/WfjlKbLGstsBDwSHEuvb5LeYgV m1Z3X89hFO7n72Uvq5umYWFoOzSsDKrA2NqR7mUZ/aOvAH9VqltzWkZu/2prqnqSJf4I /BDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=AhjRFZTX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=UdyrFk5A; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-169668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169668-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id dr25-20020a05622a529900b0043af1f00130si8506279qtb.693.2024.05.06.03.29.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 03:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=AhjRFZTX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=UdyrFk5A; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-169668-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169668-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B692E1C21194 for ; Mon, 6 May 2024 10:29:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 717B31428FA; Mon, 6 May 2024 10:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AhjRFZTX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UdyrFk5A" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F8D543AA5 for ; Mon, 6 May 2024 10:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714991366; cv=none; b=b0ighbOUkcP9y+VtVXFz1XxUkDCmjsmPlUCTT3HAU6KPWunvZ48vkfkFvmhty2X5JYuq2FdUaHf2lxh9Ba2/3IB1Y/8HrGF0Y3NY8KiB6wONcTVRUbm8VxWpfHfDWNbfJcrl7LVE5y9tai9x73OO3FhujzFV00807bl0Hv4+K08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714991366; c=relaxed/simple; bh=zhd7UACo0p+TrDMQIhCGKv6uEm4HA45+hbwsK5Pl2Mk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=o3vgJ2EfFSBBLw075iqMNnznx1c7Nl4efdlRUhkcclQbZ57qf4ZbnGyMRjsKpnSrSQbrErSiFz6mRH03y4RQorY7dtYwh3PNfaB780P+HCFzZnoT5Bcslaa3IljOguyYG7StKwkrpkl3GfvjMH3ws1Dowsvd8LZv67yx55aXIGE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AhjRFZTX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UdyrFk5A; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1714991363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YSG8WTCiJ42OSrw/ZVN2wRnUOYZNdndEtbaFf3OeZr4=; b=AhjRFZTXmsC85Rk3iY2zEzhSV41O9Mokk9F6ghuYzE0EnKSwdLLi5iPAK923Thmp+3pTzI 7PIfEhp6neIxotOO8xofnN++kJ3UTaXD/27+j17sdYILmhL4ACDQdhZSYgp+VQwkSbo+9e WN+Q7lcJv6VrUsWtaCy0/XpTZizgrX8M8MX9qhZOPFSqfQt5dfiidkWgFnG/jP8WGsBQy+ 2P58bNaoTNNfnTYj+fcaTjLjFGq7qGpREkkLOWlZgPHaG8854ToJLe5sA2jUpXI/c6c5/J 0a+NsEvmcOTV1+XAcC3XKHla0HN3XAWBuq6Ag684nIOO0fZf7a9GSX1kA5NGyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1714991363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YSG8WTCiJ42OSrw/ZVN2wRnUOYZNdndEtbaFf3OeZr4=; b=UdyrFk5AC2djoX0ASYfDh345fhYjJV66uyXBfl/SW2m+lRJMSh0XR99irR0VKFv63MLV8J 7NEEM7rEmsfjckDA== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH printk v5 11/30] nbcon: Provide functions for drivers to acquire console for non-printing In-Reply-To: <20240502213839.376636-12-john.ogness@linutronix.de> References: <20240502213839.376636-1-john.ogness@linutronix.de> <20240502213839.376636-12-john.ogness@linutronix.de> Date: Mon, 06 May 2024 12:35:21 +0206 Message-ID: <87jzk7i67y.fsf@jogness.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 On 2024-05-02, John Ogness wrote: > diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c > index dd7c3180b335..b8a7e3e136d3 100644 > --- a/kernel/printk/nbcon.c > +++ b/kernel/printk/nbcon.c > @@ -989,3 +991,54 @@ void nbcon_free(struct console *con) > > con->pbufs = NULL; > } > + > +/** > + * nbcon_driver_try_acquire - Try to acquire nbcon console and enter unsafe > + * section > + * @con: The nbcon console to acquire > + * > + * Context: Under the locking mechanism implemented in > + * @con->device_lock() including disabling migration. * Return: True if the console was acquired. False otherwise. John