Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp489717lqp; Wed, 22 May 2024 10:10:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0i72LHNpllPdSCYxgVOlCoDEj4B4t9JIlM5N/J/acRBF+ClMLahW4DycDQohZuQcY9XFDQjQBC8xL16T13by4HJMYekf/d79j2A5V7A== X-Google-Smtp-Source: AGHT+IHa9fQ269AY5UU7dWbfCwsvw7fl7vxUTCqXuGwLY0EkCHdrVROBOH5ukRdors7BH3EeSld3 X-Received: by 2002:a05:6808:2341:b0:3c9:c350:bd3e with SMTP id 5614622812f47-3cdb996482bmr2713452b6e.53.1716397835622; Wed, 22 May 2024 10:10:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716397835; cv=pass; d=google.com; s=arc-20160816; b=Q2VmeHriXah581vf2ijgOlufIS7i0eBMQt41H6P3mFxD0r0x6a5GXXTqLXusfjZfEC 1rj2cmzzEGFE380FhM2haAgnO2RJpw98QABmTR+soupgRPiM9xNVSirSIBKjkRdx9JIh /p892FPEDLuuDst11luqKa+uKsznhg47NZbH2YbqO3hEOOxp+2Ov1OiWbLx7euSMZW/U HnD263lgBeEame9pPQyqMzZROEhIIDkBQK7PHx/ec+FaoyjobbDuAKypnDH/cFa5rc8k FY97++tEE9HjH+bhft8Pj7mxZoOR718S3lhVfxtioPEpts6xmlGfLGcovbKF2dLCCw1Y u8TQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=MFI3FEcJV6tuF3uz+6hNAfBJaclw0Lk4Ga1SsqQRZKE=; fh=YFtScoUunhJmX7ZOPxGiS/33exQVzY/px3W6mPQEyC4=; b=PsS8GVibrzuXOtCV7DYI4bAZPV5Ao89F/ls7qhlfvKUDthaNDJCJkzJvVlMWBM82aK mwMo6B/8dmVI461p9Su+3Q3c2jR3wH7K5QGduqOc7TsUJ2n7AbvQGSOHz/Woei8NqShI kqpzrG5okJp/gmkstdB9vbQHoEWmpX+ZScnXcP6leurigLiB2J8ro7pT8ARpFzOfIbqY yU8MTs5Tn4sCiIzT52Ro6zmCUp2G590kgcGeYxhkv94CQtowopCm/r1OwUZyGoDQXCJX dJD2tS3ouZYPjvN34AS+NkeFjJ/y9K1H2EpHj3AVbhN/sBPpDmooRnEoGDpKwa9hvLLa 6B/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ady4lhI9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186539-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf336d9bsi3329213385a.390.2024.05.22.10.10.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 10:10:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ady4lhI9; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-186539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186539-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4788E1C2140E for ; Wed, 22 May 2024 17:10:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8738C1422B0; Wed, 22 May 2024 17:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ady4lhI9" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 E7C041F17B; Wed, 22 May 2024 17:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716397828; cv=none; b=VCyZ04ztHIBIIalIb0sToPaxsxH/fu2V47BqOxnB/pj/IJhjeYghx+ZXJWofPwhmEqt25tPPQ3sCDVX/k9dz/+ho0irVLURst8chgqiJoabpk6XFYX/hbY0Z0OHF9dRmTpSVxdH0l5sF+2AOXhtAHiNtTtFe8QzY2yjp9hZG9Uo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716397828; c=relaxed/simple; bh=EDYiEPwBiLwANwrOE2xUCd+SiLuSIGHn2RhSnXDlKR8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=oaM6oRk1N7yTZlXgsP29CSYhHlo259BFL350NLaG9BR6D7+ejf4xkTNNFE03qpfJxn/fy7ORxvvM3k6NHg7gIuvxTx/42ccZ1ncMkuM2iT3TQaFhokCWfYhElzRAlbDu/hTa7DCVu/Q3VzT8K0PN3VRCDBZk3rk8NcYlPYdf1fM= 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=ady4lhI9; arc=none smtp.client-ip=198.175.65.9 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=1716397827; x=1747933827; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EDYiEPwBiLwANwrOE2xUCd+SiLuSIGHn2RhSnXDlKR8=; b=ady4lhI9LILHOE/0K4dY3959e1vgabz9sgJVbAQMAU7doEair+GpSXCT j58KU59s5jILKgwG8VMZWoF4ZfnJFXIMrPXmI3YG+EUcYtRqBfUDiUuCI FRsGW6loap3qfMSbX2PdXvDSLr8p8OEe2gZYUhU6nGeXvMNoSUUWb/Lkj B2+OG6ij+I4U3B4T3ccT+D7HEKwqm3WBocJbVDQljwgzY2775QDNwimSv 9Uo2iH+G/Eo4wIEKEsEkT2cnQArVahra7CgiqUlL36uyRTNtzyvfS0c/x VxsXR3DJ17azOLzqLzqflD7Pxz6KK5AfOXxXdzQT1LPNdPghJCEk2HsOh A==; X-CSE-ConnectionGUID: 5U8/LgfhRf27qev5gENk9Q== X-CSE-MsgGUID: E4SF7rPmR9mlGI8f0of+Pw== X-IronPort-AV: E=McAfee;i="6600,9927,11080"; a="35180060" X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208";a="35180060" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2024 10:10:27 -0700 X-CSE-ConnectionGUID: wcIOMKQ5RWKK0DxwWFVjEQ== X-CSE-MsgGUID: uTyT67bdQPWk99Itli993Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,181,1712646000"; d="scan'208";a="38204819" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa005.jf.intel.com with ESMTP; 22 May 2024 10:10:25 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 17FC3179; Wed, 22 May 2024 20:10:23 +0300 (EEST) From: Andy Shevchenko To: Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 0/2] soi: Don't call DMA sync API when not needed Date: Wed, 22 May 2024 20:09:48 +0300 Message-ID: <20240522171018.3362521-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac 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=UTF-8 Content-Transfer-Encoding: 8bit A couple of fixes to avoid calling DMA sync API when it's not needed. This doesn't stop from discussing if IOMMU code is doing the right thing, i.e. dereferences SG list when orig_nents == 0, but this is a separate story. Andy Shevchenko (2): spi: Don't mark message DMA mapped when no transfer in it is spi: Check if transfer is mapped before calling DMA sync APIs drivers/spi/spi.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) -- 2.43.0.rc1.1336.g36b5255a03ac