Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4504218rdb; Fri, 15 Sep 2023 04:31:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0VS0XbYVy9pivMnR4/uWbXYkGuijVdnOWDp7uP153FZ6nEZDFsMGbXHeIJue1s/2U0X2S X-Received: by 2002:a17:902:c191:b0:1bb:ce4a:5893 with SMTP id d17-20020a170902c19100b001bbce4a5893mr1186721pld.30.1694777482052; Fri, 15 Sep 2023 04:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694777482; cv=none; d=google.com; s=arc-20160816; b=g0+B+ToDL5afd9GDv8xXdrWPteeYZFZdQcZZq8lYiFWZiky5xERno63eyEw3fyyWb4 3pi2skofUuDR1PTWczrPbXcf8d5kqffCTNOZTFE/ENyX8silOZ7g4t4asQFdPIncxZeq lBmHWJe4wkmK0+/p0aM33h7qgs28soMKMY+4OgIceUGa2kgjeAH9/KCRG6t1NbWNw/zR axE4TBt1TmlMx8172CIJqxdGh/QXurb9pnPemxP9oeLm2IaaDmEMkJiORFlonxYadAvJ wB83syr05av9PI0peGkfKR07sb6bDPybF2+7jN5E1u8kOIyyvv90LlC5MkqqZ3lvI881 Np4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=kRCtVNMdeMpNrLhxPv6+YkXccR5Ww/MO5AIsGHKSVbE=; fh=1tHj36qTJiBnp7I0cQ4EWcwXEe9uH+f2hzBq0P6JWls=; b=H4V+/lgmhXOsCXxIDmA2zGNxNAaZydgGW4lZucqdfjjVHlX4Jt3j9PnxndTEHCWFxp NF9YX+3qtDQt91FBerblVOhL3ie3YI7hgKE/un3oGdfE/sz1kQ+G1WAVDal3cGYlWibE 4wCm/tvj1ESg9gDPqed0e/AuEhZcVFW6lURQxVQ1PLALe1ky6XZYG2HtPGXq7uIJe1IM nip4dN7mfJeHPYQJ+DaOAcDVWVLgbawPV69GUx0mveANUYnjZlzCFy7Vl1arqx1NQ40n W042NoPy9gdS2opwdyxGfwh309RZ7WeiDw9n7tT6I5NE+I3/gzhFot/kXkswlHrRUGyQ aK1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N7sWQtSC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t6-20020a1709027fc600b001c42b2b02casi1310511plb.174.2023.09.15.04.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 04:31:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N7sWQtSC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1730B820BDFB; Fri, 15 Sep 2023 02:26:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233655AbjIOJ0f (ORCPT + 99 others); Fri, 15 Sep 2023 05:26:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233680AbjIOJ0e (ORCPT ); Fri, 15 Sep 2023 05:26:34 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB80730DF; Fri, 15 Sep 2023 02:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694769910; x=1726305910; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Dl5e9nvtvoay6nbLKFpX4/b6GOacVIKhsuZx+SNWBWA=; b=N7sWQtSCkRjss5ezN0UDBcSZh26zmb1rpPHA9sM1fLAeqjQxh7xxwCBr F/XdTUv8xhMksLRphCPx7YBwGMYLsjyVsI4ph2+zVTqrgH+RCPIn5c6CJ CTeRlbWaJPYflXd+Qd32Y3eZXAWqMJnurRsxmfpmJ9bDPuwf9cmJ9IMB7 SSDsTwflK0XjvgiEIuRhJbGa8ts10Oi6isZWu5gNypj4vRmsX/OsI3dm3 J59oXd4LMO7alA+/yZB/TmjYI6qCbgjERPSK6EfXfpwudM7dgqaTL34ZE zPyqHndZSO/P6bnGee0P/hEwKk+KvTsFvO0ihXJvl1E7YE5o5/nzThWd2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="465571244" X-IronPort-AV: E=Sophos;i="6.02,148,1688454000"; d="scan'208";a="465571244" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 02:24:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10833"; a="738264445" X-IronPort-AV: E=Sophos;i="6.02,148,1688454000"; d="scan'208";a="738264445" Received: from srdoo-mobl1.ger.corp.intel.com ([10.252.38.99]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 02:24:55 -0700 Date: Fri, 15 Sep 2023 12:24:52 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: John Ogness cc: Greg Kroah-Hartman , Jiri Slaby , linux-serial , Petr Mladek , Thomas Gleixner , LKML , Tony Lindgren , Andy Shevchenko , Florian Fainelli Subject: Re: [PATCH tty v1 06/74] serial: 8250: Use port lock wrappers In-Reply-To: <20230914183831.587273-7-john.ogness@linutronix.de> Message-ID: <4f44c64d-bd2-c10-8ae3-25f1b4594df@linux.intel.com> References: <20230914183831.587273-1-john.ogness@linutronix.de> <20230914183831.587273-7-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1271593363-1694769897=:2347" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 02:26:57 -0700 (PDT) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1271593363-1694769897=:2347 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Thu, 14 Sep 2023, 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: Ilpo J?rvinen -- i. --8323329-1271593363-1694769897=:2347--