Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp199757lqn; Thu, 11 Apr 2024 20:29:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyGRx0JS+FjNBtFASe1HZfWnQaeiow3LsdECYP2BrRzddn10ntcNyu6WFgvoDfGURpsDiNv1TyzqYkWwunOOVCfBCnWxUB32tXbjFNRA== X-Google-Smtp-Source: AGHT+IFSZNIaUhSEPTzjDIal4P1/9+yUB8kslVEZOiRP2frqwykySZqW63DqFlCV3DF9bZ6/91z6 X-Received: by 2002:a05:6808:2112:b0:3c5:e551:2772 with SMTP id r18-20020a056808211200b003c5e5512772mr1698035oiw.21.1712892539870; Thu, 11 Apr 2024 20:28:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712892539; cv=pass; d=google.com; s=arc-20160816; b=Dhn3UKYt7TwMbM4h+dm6JTjiwLqeCm0E1JSvfIjSZmVe5NK1d98Ji/76+XU82n3/me Wx7U3if43lytfL1dhIcm0+K8ceONx6SEWVk/31H7EBf+jfzHAciMmy9M4apQHTuGNMnu TXsR5x3cOIgTpj82/IEI2RDRpR1vpns/pHUcBn+kMNrZIhLDmSDiAuJLkLNJGZR27tPr jnQhaZaFohln6mDP64SFhY5M4aRxRzF1cJR6alKx+NALnYf0z1KlGJmhmTalvu10VZSb iEuKxEP11QD7kUSeRdlwNoD1lL2kpyeet/McWH9viSLZPIpPi8+xXzXjqOhIIhKzwPw3 Cq/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:in-reply-to:message-id:date; bh=nXNsIgydw8Zdl8kFL8pMfD2IYcL55ZSBNUsgHJ6RORk=; fh=VXnFXlIAC2ZDeSN1P5xok1rpcQtBsvML8qQ6B4Mlj7g=; b=b33A3nDFxTuLpFXTfooMDh4QFo4xIQsjkXxOBxk8m4hKLCGHQ0PiKQLOol7rMwUrLg fEPA2MR8UEomLync596kpJvpylSdfPeNaWdrgXk3mFD2NJvxadWu+BcsZRC/DvxQvkq6 UB0CNNqmWGIDdB807ycHEL/naApF0eqZ6tWDN4BTCn11QNHpqdpyEvpP8Xvt/DhqVkdb vlO9NEIU/m9hW517dwdUQPpnY26u4akQ2iFWYHdffZoJhXMl+IcGhPDYJ0AIO76jjjNJ hWlFfVnkVCmxC+98tR9aeZzfZQO0/s3EOHLaA0qBuzNJF9dMubQBa1yxOF7bInT4ogxT sgfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=zte.com.cn dmarc=pass fromdomain=zte.com.cn); spf=pass (google.com: domain of linux-kernel+bounces-141866-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e29-20020a63371d000000b005f3c5cf0de8si2383428pga.233.2024.04.11.20.28.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 20:28:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141866-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=zte.com.cn dmarc=pass fromdomain=zte.com.cn); spf=pass (google.com: domain of linux-kernel+bounces-141866-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 597C4B20C52 for ; Fri, 12 Apr 2024 03:26:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA26D179A7; Fri, 12 Apr 2024 03:25:55 +0000 (UTC) Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) (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 4B65417579 for ; Fri, 12 Apr 2024 03:25:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=63.216.63.40 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712892355; cv=none; b=EsrVf5zza5OYFOUGTMiSvaf1gvdlIakXXeuWEZVKRYAExsIUr5PDmuYV2Yb1afyYsTw3g7piboYNsjh6MbcZ7GFB1eKS7O0ERPoVC6yJA9jNbQbNvQUAJ71POdaBPhIUbWQqqPzG5DcKdnR9+wQt1JiKZrkuqQsIKwl2DAGho3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712892355; c=relaxed/simple; bh=nXNsIgydw8Zdl8kFL8pMfD2IYcL55ZSBNUsgHJ6RORk=; h=Date:Message-ID:In-Reply-To:References:Mime-Version:From:To:Cc: Subject:Content-Type; b=hAD4U6kjqqC3MeqFmrUhpbsnbDnfHYTvfMHDsN4jdJutkew1bpndnOVdAXf6SynKmbzraCSBoPwg2OFLXUleRdqUCj49Qaum3IgDmk0UoH85dMxa1BVH3LzZ3d8R7OeKYWzSDZLwtKjrLcOcn1acrBXofaHDA8Kpych+3MVEcqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=63.216.63.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4VG25W0SDPz8XrRG; Fri, 12 Apr 2024 11:25:51 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 43C3PkOW095723; Fri, 12 Apr 2024 11:25:46 +0800 (+08) (envelope-from li.hao40@zte.com.cn) Received: from mapi (xaxapp03[null]) by mapi (Zmail) with MAPI id mid31; Fri, 12 Apr 2024 11:25:47 +0800 (CST) Date: Fri, 12 Apr 2024 11:25:47 +0800 (CST) X-Zmail-TransId: 2afb6618a9bbffffffffab7-1093f X-Mailer: Zmail v1.0 Message-ID: <20240412112547433nW9Ip0D2cBmiCc-YaWRru@zte.com.cn> In-Reply-To: <2024041151-crewmate-entail-62a5@gregkh> References: 20240411215017604oDcKsSipiLnfwd2SzAnsj@zte.com.cn,2024041151-crewmate-entail-62a5@gregkh Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: Cc: , , Subject: =?UTF-8?B?UmU6IFtQQVRDSF0gdHR5OiBodmM6IHdha2V1cCBodmMgY29uc29sZSBpbW1lZGlhdGVseSB3aGVuIG5lZWRlZA==?= Content-Type: text/plain; charset="UTF-8" X-MAIL:mse-fl2.zte.com.cn 43C3PkOW095723 X-Fangmail-Gw-Spam-Type: 0 X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6618A9BF.000/4VG25W0SDPz8XrRG sorry,the patch seems to be corrupt,I will resubmit the patch ------------------Original------------------ From: gregkh To: li hao10307857; Cc: jirislaby ;linuxppc-dev ;linux-kernel ; Date: 2024/04/11 22:03 Subject: Re: [PATCH] tty: hvc: wakeup hvc console immediately when needed On Thu, Apr 11, 2024 at 09:50:17PM +0800, li.hao40@zte.com.cn wrote: > From: Li Hao > > Cancel the do_wakeup flag in hvc_struct, and change it to immediately > wake up tty when hp->n_outbuf is 0 in hvc_push(). > > When we receive a key input character, the interrupt handling function > hvc_handle_interrupt() will be executed, and the echo thread > flush_to_ldisc() will be added to the queue. > > If the user is currently using tcsetattr(), a hang may occur. tcsetattr() > enters kernel and waits for hp->n_outbuf to become 0 via > tty_wait_until_sent(). If the echo thread finishes executing before > reaching tty_wait_until_sent (for example, put_chars() takes too long), > it will cause while meeting the wakeup condition (hp->do_wakeup = 1), > tty_wait_until_sent() cannot be woken up (missed the tty_wakeup() of > this round's tty_poll). Unless the next key input character comes, > hvc_poll will be executed, and tty_wakeup() will be performed through > the do_wakeup flag. > > Signed-off-by: Li Hao Did checkpatch say this was ok?