Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp465218lqp; Wed, 22 May 2024 09:31:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmUL0116RVm1bJruj0voQCZUv0WH0SkPSyrf59f9ZV9Fsuu6o4mJgQNqxk9YImDwP80BWAlXC1e0i0KX8pWlzY8Ra3TP9ufYpKE4kuTw== X-Google-Smtp-Source: AGHT+IEL1Rni6M3NSlfEKTUMDU1RsSr6oZnAAbgD3U+bWWUBcQijbrV+t+tsuPb/0wKXyv2Oz3Yq X-Received: by 2002:a17:902:e5c9:b0:1f2:fa73:3bbb with SMTP id d9443c01a7336-1f31c967225mr27442345ad.22.1716395495536; Wed, 22 May 2024 09:31:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716395495; cv=pass; d=google.com; s=arc-20160816; b=Dab+yifJhY8hKsDWCjBWU2ldlvaV0kKTNYlaHW9THVqryNHhbZH/ImyDHAG/zsLGCR Qq6K8GsGncGAl1T2yfhrwfh546OFlmXOHzmV60lcvHUZBg4FqxCe55VdgVfDS8LRadvc hyc32035gsFo8+LcVCz8hMCVBGHXlx4658cLTEGH7LF3GZyFnXYI1goDHhF3Y+k9HnIi MWOIFsTOb9qWW0IR1zqnOiUmwbjZQt6LeKAGcLHKQHWqJ78vYQNJ+qC23eBbq7t+11UC L9vBzoe8g11FeCANAGLeG2l3XdNQ2ppjd7lU/xZI+mG7QJmJ1xGJgFPi9lJHlnxHQrjZ ixfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-transfer-encoding :content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:references:message-id:subject:cc:to:from:date :dkim-signature; bh=AMkywhF+1uEoNMAD86yUOA1xXXMDRQaK1IRpFVnPZDY=; fh=wfg4uxR5dEbr2yLur3itD4Zm6+XW0/MNhUfFDqSrGXI=; b=TL53wi81NWEzK5+k0fDqDBssUAbvHLgQyglThKmkpG1QZI5KOJpLkEY4b0SlrO+MWl cqFb5RwyLSWiWr7g7PnWrKCKVXM9W2T8+jsTgU9XIwTOmv+A6akDNWMm3+GxzPFEfsVT lL8d2lo5eVDtPIO/wmzZtYwfz26gvtv4yIlZBS6wzFPZQuEy6W/8rVYlKn/XnxGYWGM7 mVLWLpTeaiT00aWNDBeVU+Ru/DtWeFHJh+zSQf9zjeJoYL2vKkCCh4xrOXQNnKdn/fQD v1MVX4eDqGUo2Qc9WgLYUWEE4s+L96Z2DuVmULAJ69iLIr4b4/BIAZ4dxSPQEy+jXVdl Q/0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G8y2NcjM; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f2f566a3dbsi34010565ad.101.2024.05.22.09.31.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 09:31:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186143-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=pass header.i=@intel.com header.s=Intel header.b=G8y2NcjM; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 54C6EB21036 for ; Wed, 22 May 2024 11:33:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2ED0A82887; Wed, 22 May 2024 11:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="G8y2NcjM" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 E6BBE2A8D7; Wed, 22 May 2024 11:33:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716377621; cv=none; b=R0U8iIOekIFN9gm0Nd5GWvyc6UOuN+65iks5DWbewdPdselkwkNH6x5ASsKD2C5ZQd2v/WzTPUmR95TUbqFnNZBw1oeEEOqRftteEeGdshbMRsEKQ1P/5szaxu8tHLI4v1X1OkTa3OS84nQlxMUVqnbFL3BpFfXu8Wkf4LTHBI4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716377621; c=relaxed/simple; bh=ppLA3GtdGJReY+A88qxBFMZYBsM5WtwL4sGmG7lx61U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qUBsyhW2+K8kMfnGtEor0aHNoKjvbmwRHfgSnEOuP1omlQg9U+ovCs9vQxJzToFPUKmbb7bej9+BYEXBcbtvoDIcHzkWxmOTOE5DMbgyqEblgykrhYvCDuF1LLa/AydfjXsBnITQoio+dqsR+dq0wbHBX+cb/UNTnvO5avXlspo= 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=G8y2NcjM; arc=none smtp.client-ip=198.175.65.15 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=1716377619; x=1747913619; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=ppLA3GtdGJReY+A88qxBFMZYBsM5WtwL4sGmG7lx61U=; b=G8y2NcjMpj+/l/P7UHOyaUddffTulsyWhtVidB7GNmsRjm88qg1ANF9n yXZNjrLS1Ghgy3lncD7Vh4RFxhz1eP5wphn4kGCLD67Ukf97jJUzSrwDK 4dfovW00vKOy0YdYaldw7ligkV8RXIW98PSIPfmcAYi1AeQOFbx/nIVte flrF8JSNuS9ZsmHjLlnxGw7Wi6Gs4sEJFpnvHMokuueEc8Pq2zAeki0Tf NieAGU+ZjxReHO163Z/uTkiTqqHTaxFUjXiIF2UaarTOIRjrV4HL6geVl PtTkB4P0Fbev1i9D7MmYN0HcAoHqkaT5j5CmF2EHjzKZttBL6DdAIKaz9 g==; X-CSE-ConnectionGUID: YgrQ/WPbS8Cd+SY5uwbufg== X-CSE-MsgGUID: Zd6SrbKVRgKJLV5KoUE6kg== X-IronPort-AV: E=McAfee;i="6600,9927,11079"; a="16410563" X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="16410563" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 04:33:05 -0700 X-CSE-ConnectionGUID: STpzZLEJQgy8EMLg52h4aw== X-CSE-MsgGUID: JUnZ14FAQc+QX6sUZCtHJQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,179,1712646000"; d="scan'208";a="33680482" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa006.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 04:33:04 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1s9kDM-00000009xMi-3ino; Wed, 22 May 2024 14:33:00 +0300 Date: Wed, 22 May 2024 14:33:00 +0300 From: Andy Shevchenko To: Neil Armstrong Cc: =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado , Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm Subject: Re: [PATCH v1 1/1] spi: Remove unneded check for orig_nents Message-ID: References: <20240507201028.564630-1-andriy.shevchenko@linux.intel.com> <8ae675b5-fcf9-4c9b-b06a-4462f70e1322@linaro.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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8ae675b5-fcf9-4c9b-b06a-4462f70e1322@linaro.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, May 22, 2024 at 12:03:33PM +0200, Neil Armstrong wrote: > On 15/05/2024 23:09, N?colas F. R. A. Prado wrote: > > On Tue, May 07, 2024 at 11:10:27PM +0300, Andy Shevchenko wrote: > > > Both dma_unmap_sgtable() and sg_free_table() in spi_unmap_buf_attrs() > > > have checks for orig_nents against 0. No need to duplicate this. > > > All the same applies to other DMA mapping API calls. > > > > > > Also note, there is no other user in the kernel that does this kind of > > > checks. > > > > > > Signed-off-by: Andy Shevchenko > > > > Hi, > > > > this commit caused a regression which I reported here: > > > > https://lore.kernel.org/all/d3679496-2e4e-4a7c-97ed-f193bd53af1d@notapiano > > > > along with some thoughts on the cause and a possible solution, though I'm not > > familiar with this code base at all and would really appreciate any feedback you > > may have. > > I also see the same regression on the SM8550 and SM8650 platforms, > please CC linux-arm-msm@vger.kernel.org and me for a potential fix to test on those platforms. There is still no answer from IOMMU patch author. Do you have the same trace due to IOMMU calls? Anyway, I guess it would be nice to see it. Meanwhile, I have three changes I posted in the replies to the initial report, can you combine them all and test? This will be a plan B (? or A, depending on the culprit). -- With Best Regards, Andy Shevchenko