Message ID | 20221116171656.4128212-2-schnelle@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp264426wru; Wed, 16 Nov 2022 09:29:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ulh1wImMLoP8hv5hFcXsJwL+NQ49btRMKX7eSQBQFOJCkz2U7zmMWt2GSU0I7nYgrxzDc X-Received: by 2002:a50:fb03:0:b0:467:621f:879e with SMTP id d3-20020a50fb03000000b00467621f879emr19954995edq.380.1668619764691; Wed, 16 Nov 2022 09:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668619764; cv=none; d=google.com; s=arc-20160816; b=AWm9il+64okpKfDkUvxskMxAhoA25nm7ZBlILX9jnFlcm+VxFPceLp4qcA+OVoxDsb cIPEW14YDpfHB/fD5SRkgXi7weaN9yivz1cCdm24NxwecAhqAMh/VxG8YxTyFugSncCv aC51CPeFRy4ocaao3RkE0jzyzEJLsGPILHFZcHZ0NHqhzMtDViNqnoMaJuwXx3Sikdhw 1Mf34dD9aVRMJDTjFqFSqcgt8f6hfBXlj9iL2IKEkkmMkeHtghV1oYRIQsq0NuuefrDz 5xYjymaDgZ1Z/25rYzhG1JXaL7zkY6+LFibmKwEPczt9G+KJIXOYP7MuLeXybu5+tsuL tojw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XLl9jwPWrKUEGMxUqZ8ZOHMSN21/G6zNljyYvTYvI4o=; b=JtxZkNAbcyle7Bf4KXV5HJar7QXVm4IPC8qQcWr9klkc7RwBZPh+deZIqAX6g+MJ4Y War9j9KyH8UdChoeepzfvyoMo0wOt5fRAWHRMp0EgrQ55BxrQRD7h+JEXHn4Sc7E1Ru4 ijc7kDrjw11Bj9Y0oquwdhB0fv1/62keOIdDNQYpmolZWOqNXIBkjG2MG5KDJFgjj6k2 MuHt7nwXxcoU4knUQRNzCK86ME8f42MeQTSmYt3LBxCcK2aDnReU/JQQBUMZlkaDHuXS kFUnX8efKtGMC7QPMLg2XvD725KowvAzxgXDPZocaz5Tm5Zrf0BLAYs7TGruKEkeUdZd Misg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="tAc//YkJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv21-20020a17090760d500b007ae4717bf11si12907965ejc.80.2022.11.16.09.28.48; Wed, 16 Nov 2022 09:29:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="tAc//YkJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234505AbiKPRSB (ORCPT <rfc822;just.gull.subs@gmail.com> + 99 others); Wed, 16 Nov 2022 12:18:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234309AbiKPRRk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 16 Nov 2022 12:17:40 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA6C15B5B6; Wed, 16 Nov 2022 09:17:25 -0800 (PST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AGGK3qt037051; Wed, 16 Nov 2022 17:17:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=XLl9jwPWrKUEGMxUqZ8ZOHMSN21/G6zNljyYvTYvI4o=; b=tAc//YkJSEKv5CGActK615FcZZw9K9CaK2oDBl3c87TwlRDXvzXEDV0bHVK+2ocapbya ynvurXvGYw+ZvGcB6Vp3XdSZCRyYZqIDqpa/3bRdIimhm0OFHCfnM+z5qVjDSHiADEL9 eCa6Ypipx4Ho1EidNSzFQggwG5NyYaqspShHMnBrqUpmao8idHqRF9wHbyVNlTyf3hoo c8MT3TGspZmaPp0JdkubkN9FuynTTHEg17vgE1ZxobEIeKflQthkvZl1rpEve3n/7RUI ZG/OdufgYAfX1qbSHnz5DSuiZxC90PJr2m/KbeKQ5g5zCrKALvYcLaPPgVAsZ3WnrLpa SQ== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kw39s1pr7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 17:17:02 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2AGH6k8I009477; Wed, 16 Nov 2022 17:17:00 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3kt348xawm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Nov 2022 17:17:00 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2AGHHbju39518624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Nov 2022 17:17:37 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92C4A5204E; Wed, 16 Nov 2022 17:16:57 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 09A0D52050; Wed, 16 Nov 2022 17:16:57 +0000 (GMT) From: Niklas Schnelle <schnelle@linux.ibm.com> To: Matthew Rosato <mjrosato@linux.ibm.com>, Gerd Bayer <gbayer@linux.ibm.com>, iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Jason Gunthorpe <jgg@nvidia.com>, Wenjia Zhang <wenjia@linux.ibm.com> Cc: Pierre Morel <pmorel@linux.ibm.com>, linux-s390@vger.kernel.org, borntraeger@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, gerald.schaefer@linux.ibm.com, agordeev@linux.ibm.com, svens@linux.ibm.com, linux-kernel@vger.kernel.org, Julian Ruess <julianr@linux.ibm.com> Subject: [PATCH v2 1/7] s390/ism: Set DMA coherent mask Date: Wed, 16 Nov 2022 18:16:50 +0100 Message-Id: <20221116171656.4128212-2-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221116171656.4128212-1-schnelle@linux.ibm.com> References: <20221116171656.4128212-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: l7jEHWgblB2GeUGu6m8stahNtk2oHL6n X-Proofpoint-GUID: l7jEHWgblB2GeUGu6m8stahNtk2oHL6n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-16_03,2022-11-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 malwarescore=0 phishscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 mlxscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211160119 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749674638063987404?= X-GMAIL-MSGID: =?utf-8?q?1749674638063987404?= |
Series |
iommu/dma: s390 DMA API conversion and optimized IOTLB flushing
|
|
Commit Message
Niklas Schnelle
Nov. 16, 2022, 5:16 p.m. UTC
A future change will convert the DMA API implementation from the
architecture specific arch/s390/pci/pci_dma.c to using the common code
drivers/iommu/dma-iommu.c which the utilizes the same IOMMU hardware
through the s390-iommu driver. Unlike the s390 specific DMA API this
requires devices to correctly call set the coherent mask to be allowed
to use IOVAs >2^32 in dma_alloc_coherent(). This was however not done
for ISM devices. ISM requires such addresses since currently the DMA
aperture for PCI devices starts at 2^32 and all calls to
dma_alloc_coherent() would thus fail.
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
v1 -> v2:
- Use dma_set_mask_and_coherent() (Christoph Hellwig)
drivers/s390/net/ism_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c index d34bb6ec1490..da8a549b5965 100644 --- a/drivers/s390/net/ism_drv.c +++ b/drivers/s390/net/ism_drv.c @@ -556,7 +556,7 @@ static int ism_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ret) goto err_disable; - ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (ret) goto err_resource;