Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4319384rdb; Thu, 14 Sep 2023 20:34:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwIsP8bhDiTAH6VoUVuDY1Z/p4WsMnQnBneE5NSaNQ5tnNKBJ5BxDg5r2nhHTJWUECialr X-Received: by 2002:a05:6a00:1704:b0:68f:d44c:22f8 with SMTP id h4-20020a056a00170400b0068fd44c22f8mr684283pfc.1.1694748886344; Thu, 14 Sep 2023 20:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694748886; cv=none; d=google.com; s=arc-20160816; b=Ij9v3Lm+VUIL6aUiaMoeOn5t9Aw7++OoBjy+oAw1sdnyVEK7cmJtMwrXx7MuZAgfoJ uORpkdrsklkAWQsUazpgxtOAbZIx2bzlIu9bSc/IcRK9/8HQWDP+FmXGwafO+oc1AYuY 5BLZrqG3AZHhBdR6+zittHgFXFgfmghDsPcvQYQEKeiv0hyPA89nzBGXwbXYwkwvEzxO Ztv5RbLJ1YaWFnq1XqmP0uuGm6ebn2KJaLQTDsT+e5Dui+ydDFc9J5l0QUVtUH7a9xE0 VumOTWDqMF6U3/3TYy4GYXx/3PRAdT77pKjjwuoDolFml1ua/kH+t92XGixJbX5qOcOz V0Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NVv6krl4SbdZrODHbuc8MmkHsQdPdgar/ZHLqzTOwnQ=; fh=Ia1BPq3WhbDEWYyeO8p/96C3/4ylE40BAWq4E/ugo2Y=; b=LjqGa2qtTlyjrk3ptkoOHiYmCjYy4iiP6M9v6+TlQUIR32xjfWebIcxkSh8GmlQKK+ 3zmO1Xf7Nq+MfHyoDrfzQhRvjSD6cb0piVEZNqMb4wo1hztOQeojKkBnNGDWjAykE2Qx 7G+t+/7xDUsgeFQ4wsVoAfBkDb7lVUfEDadhq/hETX/o0gs10cZggtL96dIOuAB2HheF OVSkXzBUizAc4yCuTvoNaqgt4OQJGDBJV/mM5OntYZKHIoZDNfXDb98Yd1lM4xBGuG8T YN6SBnzKKPDqOZDbf7Eh55I1qqccmSEku3VtLg/d2ie6p+pk1j+oewOMCgjBWcy4OBoL aICw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FFFEn1OC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id d20-20020a656214000000b00565aa20a07asi2384647pgv.683.2023.09.14.20.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 20:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=FFFEn1OC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 866BA80B8DE3; Thu, 14 Sep 2023 12:14:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240636AbjINTNy (ORCPT + 99 others); Thu, 14 Sep 2023 15:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237398AbjINTNx (ORCPT ); Thu, 14 Sep 2023 15:13:53 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFBEA1FFB; Thu, 14 Sep 2023 12:13:49 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38EIvmHV014148; Thu, 14 Sep 2023 19:13:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=NVv6krl4SbdZrODHbuc8MmkHsQdPdgar/ZHLqzTOwnQ=; b=FFFEn1OCJaridW5qy84BRfxEYATL9+nngpEJiDXyyUIr3TN0CletoJJiMnOttz+Ib4fC xCs4aL/gze1joj++KzkS7BOKrCinzOXuHYmxlDtTrIGUJRPmUXZ72e1LHCbUM7dSSexj HIrtjYPv49f9GwBd8INRfvw08+qF4fEpyMpOe9LUXc02PzHQSihMC6abwIHCKYCtE1so mk1SrU6SuS4AjWV/KzmxLhIpy1G+lg5E/2BCltZzRqFEqZeHzAzK+5TxNcz8J3X6GOjZ Abf5udqSaHcDAXZEH0GfsJ1kypvcTtJSgSiId8GtEDEIePDmhVYZ9LdNv3bCf6G+FRzU UQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t3re32ktv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 19:13:31 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38EJDUEM017429 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 19:13:30 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 14 Sep 2023 12:13:29 -0700 Date: Thu, 14 Sep 2023 12:13:28 -0700 From: Bjorn Andersson To: John Ogness CC: Greg Kroah-Hartman , Jiri Slaby , , Petr Mladek , Thomas Gleixner , , Andy Gross , Bjorn Andersson , Konrad Dybcio , Subject: Re: [PATCH tty v1 41/74] serial: msm: Use port lock wrappers Message-ID: <20230914191328.GA1487598@hu-bjorande-lv.qualcomm.com> References: <20230914183831.587273-1-john.ogness@linutronix.de> <20230914183831.587273-42-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230914183831.587273-42-john.ogness@linutronix.de> X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: K81qciQUJPAJoPKqEj7m5ZqHF-6DCpH6 X-Proofpoint-ORIG-GUID: K81qciQUJPAJoPKqEj7m5ZqHF-6DCpH6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-14_09,2023-09-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 malwarescore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 clxscore=1011 suspectscore=0 impostorscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309140166 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Sep 2023 12:14:02 -0700 (PDT) On Thu, Sep 14, 2023 at 08:43:58PM +0206, John Ogness wrote: > From: Thomas Gleixner > > When a serial port is used for kernel console output, then all > modifications to the UART registers which are done from other contexts, > e.g. getty, termios, are interference points for the kernel console. > > So far this has been ignored and the printk output is based on the > principle of hope. The rework of the console infrastructure which aims to > support threaded and atomic consoles, requires to mark sections which > modify the UART registers as unsafe. This allows the atomic write function > to make informed decisions and eventually to restore operational state. It > also allows to prevent the regular UART code from modifying UART registers > while printk output is in progress. > > All modifications of UART registers are guarded by the UART port lock, > which provides an obvious synchronization point with the console > infrastructure. > > To avoid adding this functionality to all UART drivers, wrap the > spin_[un]lock*() invocations for uart_port::lock into helper functions > which just contain the spin_[un]lock*() invocations for now. In a > subsequent step these helpers will gain the console synchronization > mechanisms. > > Converted with coccinelle. No functional change. > > Signed-off-by: Thomas Gleixner Reviewed-by: Bjorn Andersson Regards, Bjorn