Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6386140pxv; Thu, 29 Jul 2021 13:18:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVxbsK5xua8/unD7nTEVsiqWdvcS9HRxSC/3FXpXHN8t0HlHWIwYiEkQFxrG3YaY4FLNmS X-Received: by 2002:a05:6602:2e11:: with SMTP id o17mr5399192iow.55.1627589928598; Thu, 29 Jul 2021 13:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627589928; cv=none; d=google.com; s=arc-20160816; b=ayL52AhqUGc2JuWO14GLEJlTNS5WGPyUcpPW96WVa/fA72P7cKZAKE7evlGLiUG7f7 v8jHU00zsR2SH5nb77PcDGs29UYQIosab6jORh5ht1AxwMof24wXlunB2C+sQwPiGPeY 646nr8ahXnnDEw5pX7FXOzj01s7vkxBlqS3BwDJA5XppYg7yY+dlqUAbU0VP38Jb0UYH HUpe9N/ZEaZt0RKSiU4A1uK1QXic8DzVbNy1/yXo9Ue9nt6wCEjt3LEm8Ld38QY8Y1WP LF2mLqBLU6JaT+MNbPl2sAKM3LLSBMqTQo+Hz183KWxptpqy9ZRPsiliMQqZqZkgleBh fzcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=OuJXER8TMWR954py7rg3mrCeDrxT4LjuVdKtzQZh6Zs=; b=FLEUn5V2Hh9oM00RIoLsaF6FD1o+AD4UaP7rxxwI1UrLQvQ+nWHJh6LTbgBcY8P8yL RXIdhJHCZTKII9RVWbc9EImL6nLwkhM5VoPVSlznBCAYZF4xxxp/6OHOWoIUMJGplKE5 ZESl4CE00y5p/3yqxnJv7U56/0G7ogjHgznw5A+lo+dXyGD3syA2D7Qe4lmMT2YGBEjQ cH0EMV+yIg1wYKpcza4yLTuZAWjrR895NjpeIF0yfh7yZnhBjCxDvQ4FI9TFiWdskcIs 62cnfX1emAcxTofSvyasE9odMpMiAkIXnw2tkcgcfYQ7hDHHpF/LsA0lFG8mexQAF8t9 tqDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=UsY1ykbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y11si4809641jat.64.2021.07.29.13.18.36; Thu, 29 Jul 2021 13:18:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=UsY1ykbN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234734AbhG2URM (ORCPT + 99 others); Thu, 29 Jul 2021 16:17:12 -0400 Received: from ale.deltatee.com ([204.191.154.188]:59378 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233086AbhG2UQH (ORCPT ); Thu, 29 Jul 2021 16:16:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=OuJXER8TMWR954py7rg3mrCeDrxT4LjuVdKtzQZh6Zs=; b=UsY1ykbNnjwkWofJbI4f1VZfve Fb9GcU4897V0RXhNncyMCRQe7sgayHYtP/HsNnSTTgqV9fSgROyJgV2gOe2yhHQenOAwFghjiU+BP uBE72UYytCEMGELWbGcFBBFJ5DWJpDLdjxjdJ9o76T9/kXM4wUFj1A8GLgLcyYjYD9MYMXT/FVYJJ Xx9pqTWgXTMsYLV8JIWCFloKjmqOwP1AMgRG486raP6kmoPLNwRZM9Mva9yei/8c15JbavQd4F9cE bLRW9IWYGnW3Qd2UKQozsPYqQvM1z51/XZf/VA6C4GY0Cm7DkqTL8dIi4hp3eobbIJjY1Wlrv5TfE YeqChe0w==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9CRh-0008VL-Ts; Thu, 29 Jul 2021 14:15:59 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.92) (envelope-from ) id 1m9CRU-0001Tw-W8; Thu, 29 Jul 2021 14:15:45 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, iommu@lists.linux-foundation.org, linux-parisc@vger.kernel.org, xen-devel@lists.xenproject.org Cc: Christoph Hellwig , Marek Szyprowski , Robin Murphy , Stephen Bates , Martin Oliveira , Logan Gunthorpe , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Geoff Levand Date: Thu, 29 Jul 2021 14:15:29 -0600 Message-Id: <20210729201539.5602-12-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210729201539.5602-1-logang@deltatee.com> References: <20210729201539.5602-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-parisc@vger.kernel.org, xen-devel@lists.xenproject.org, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, sbates@raithlin.com, martin.oliveira@eideticom.com, logang@deltatee.com, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, geoff@infradead.org X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYRULES_FREE,MYRULES_NO_TEXT,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Subject: [PATCH v3 11/21] powerpc/iommu: don't set failed sg dma_address to DMA_MAPPING_ERROR X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention, so remove it. Link: https://lore.kernel.org/linux-mips/20210716063241.GC13345@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Geoff Levand --- arch/powerpc/kernel/iommu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index a8ec4fe42817..30b7736f0896 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c @@ -575,7 +575,6 @@ int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl, */ if (outcount < incount) { outs = sg_next(outs); - outs->dma_address = DMA_MAPPING_ERROR; outs->dma_length = 0; } @@ -593,7 +592,6 @@ int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl, npages = iommu_num_pages(s->dma_address, s->dma_length, IOMMU_PAGE_SIZE(tbl)); __iommu_free(tbl, vaddr, npages); - s->dma_address = DMA_MAPPING_ERROR; s->dma_length = 0; } if (s == outs) -- 2.20.1