Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp177747lqj; Wed, 10 Apr 2024 07:30:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUOudPAr19liJ+3VqnScIgtYomTlxLvMzQmrI4UTtcrz3sB2nhKgxW0yfZ7REJxPMy6KqwbPe660v9jYJa3M8Cv3w9p0sNbU6kudUb8Mg== X-Google-Smtp-Source: AGHT+IFGDQ5tEDfXJA0Ka/reKpNKt58XdjDq8p7mJ6a98xHFZYJ/xJ/yT4TYLpo5totMQttc1stF X-Received: by 2002:a05:6a20:de94:b0:1a3:65af:9baa with SMTP id la20-20020a056a20de9400b001a365af9baamr2508143pzb.62.1712759442203; Wed, 10 Apr 2024 07:30:42 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ey3-20020a056a0038c300b006eada9fe237si10805975pfb.188.2024.04.10.07.30.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 07:30:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=c9erP2RV; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-138670-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138670-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 4859EB294EE for ; Wed, 10 Apr 2024 13:54:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B52DA1791F1; Wed, 10 Apr 2024 13:45:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.b="c9erP2RV" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (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 86F7A171659; Wed, 10 Apr 2024 13:45:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756734; cv=none; b=OoTSpPyHkPyV+YWJsp2VJjQFQd1COOFZIo29EZ5PPNb59FhVPXsz8glN+tEoTxCkQuwGsROQsSVfJ81hyGNDgDzYCjWBDeiyWBcb/gwFlIliK8vPjEeECqHCkK39A6+ilmDs5AmzjG3ObqocvtqQWrUFg5WAbutjia4bp59y9Hs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712756734; c=relaxed/simple; bh=BZBYIru1y9O0ff+KqP42qWApBTmbdjS4qKJAb5/5bwo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H0JVDdk5jwEbUpMtKdeuk6QaMpH1M++vsL/LWWQMUTw0hlmE5mW9bsA9tPqAm0tpA6IFKgbhRWnrpGbBxA/amVJTRdSIqwgPKw7hva4rvD605m9NcZL+Hi4FcOoyLjYrVxuTFDVhx/RV5RfUYkc8DCOIF9+LFuPv4we8aASGxRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=c9erP2RV; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712756734; x=1744292734; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=BZBYIru1y9O0ff+KqP42qWApBTmbdjS4qKJAb5/5bwo=; b=c9erP2RVSPWjuTKDNSLaGLMc1sR8iZgNFugyP3wmow7YOdhpwx9IzIro ZQ7YsM2uSfR9mCLgmEzqDmLlEU+lxYl6B6EarMGQB+Ta+tX7iDHiVwYpj 7iIPIG176zm88WXqau93sE0kpepFA0Fi75WO0rhN8Zny54gwk+Wsu4Nun POzmiaJ49FmImyaFZJZer5JuLaskn09Hj8GiKrK7TFrlWnfk19z6hG0NM LXBWyKtm77G+DkXs9y+/AokdCHA7h7xQB8LDDhxVKvMDJ8kJZ2l05v4cA 34ATQekF4MbpGZpr7kA0+KfkVtBlNyODGL8s14MJv3cTI01kC7xj9gKaX w==; X-CSE-ConnectionGUID: EGQD7SB6TMCeh1oPmVd6hA== X-CSE-MsgGUID: lxIkZn92TpS3QGBxbaXVOA== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="7991959" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="7991959" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 06:45:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="915433467" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="915433467" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 06:45:31 -0700 Received: from andy by smile with local (Exim 4.97) (envelope-from ) id 1ruYGX-0000000354V-17GR; Wed, 10 Apr 2024 16:45:29 +0300 Date: Wed, 10 Apr 2024 16:45:29 +0300 From: Andy Shevchenko To: Jiri Slaby Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v1 1/1] serial: core: Extract uart_alloc_xmit_buf() and uart_free_xmit_buf() Message-ID: References: <20240409174057.1104262-1-andriy.shevchenko@linux.intel.com> <52a83cb5-ef4f-46f5-ad90-1f64b4d588e2@kernel.org> 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: <52a83cb5-ef4f-46f5-ad90-1f64b4d588e2@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Apr 10, 2024 at 11:04:35AM +0200, Jiri Slaby wrote: > On 09. 04. 24, 19:40, Andy Shevchenko wrote: .. > I see very much of tty_port_alloc_xmit_buf() and tty_port_free_xmit_buf() in > here :). A-ha! > Currently, different locks are used, so the patch is, I think, good for now. > For future, we should switch to the tty port helpers. Sure, but I'm not familiar with TTY. > Actually have you looked if the different locking is an issue at all? IOW, > isn't the tty_port's (and its xmit buf) lifetime enough w/o uart port locks? Nope. I only looked at spin lock differences (irq/irqsave) and decided that irqsave variant is good for both cases. .. So, do I need to do anything or is it good to go as-is? Thanks for review. -- With Best Regards, Andy Shevchenko