Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp626716yba; Wed, 24 Apr 2019 07:06:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJUF+YIyTeGn01Q4hwvfiCURGkOdsgc1AaGYIDEG084Fpi6VmI3ETg3GlMVIZoAeMbvoUv X-Received: by 2002:a63:1509:: with SMTP id v9mr30614273pgl.194.1556114795944; Wed, 24 Apr 2019 07:06:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556114795; cv=none; d=google.com; s=arc-20160816; b=mlg3e2ckDYXgPIO/mDIo1+n7uPFMynbPEp1YdJH2Lpax1YrvG/krzGnDdl1xw93sLl 0IGgx8bSrZKUOczphU9+X+7X7cLfg4numTg99sWegRBgdEhkwCQxyb9nyMmId07UCUV6 sWoayVPyyDDmBC5dvwQjaGDpc4vkyMZBaROZ8G4R5QtOmz3gqCCREEpCkV19NHCeEbbt yJLDJIQtqPRX1lzO9763e5+CVDgzQ0Wn6nVw7aL9fdknqfaJkbI4gEdCdzXNcqeRT3/U luBHTXmH2QfmKbib5E+BotHlK3E44M13PWyA8L8rZTOL1gV9hCT7rv8GRnIC6xjLv3ZO UbPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=/7rzl/+NRmw3Xm7CxaAVx23KhJltqsBCBUaLBJQhfAI=; b=El7HSKATBtmLKaSwKrpIqaMv5xWD6ZcAE6uHiCuTICIS8d8FhG7DxOYWVeUE0zcacV lGzkxp91TdE6pbwOO/RSht8hLzo5I894/ykAapOMmMEjGTAPuE+kYI7XqGOauc4T6Aoq 1LsCNGp/eJ0CC0ciEHFJ7mki6gTcHwpTMRFBxoJk97I3gPRo33Giv3ygQ3CnJBamjB4v LvrkN/UnBtzZYnn2WxcHpKRIYT++ekgS+/iukPUjnTeD9odyz1DeDcijFSGkslBCzmhD WqwUvGg1kL5i+w9FdSZexN6X54m+bwv1H/08EVyQPV2MEwoU0nmOYpGAY0bjKCJAt4Yu JuhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si18808563pfn.136.2019.04.24.07.06.18; Wed, 24 Apr 2019 07:06:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730834AbfDXNzX (ORCPT + 99 others); Wed, 24 Apr 2019 09:55:23 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:50546 "EHLO laurent.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727522AbfDXNzW (ORCPT ); Wed, 24 Apr 2019 09:55:22 -0400 Received: from ramsan ([84.194.111.163]) by laurent.telenet-ops.be with bizsmtp id 4DvL200093XaVaC01DvL9w; Wed, 24 Apr 2019 15:55:20 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hJIMq-00087x-39; Wed, 24 Apr 2019 15:55:20 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hJIMq-0006YT-18; Wed, 24 Apr 2019 15:55:20 +0200 From: Geert Uytterhoeven To: Joerg Roedel , Magnus Damm Cc: Laurent Pinchart , iommu@lists.linux-foundation.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v3 0/6] iommu/ipmmu-vmsa: Suspend/resume support and assorted cleanups Date: Wed, 24 Apr 2019 15:55:12 +0200 Message-Id: <20190424135518.25150-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jörg, Magnus, On R-Car Gen3 systems with PSCI, PSCI may power down the SoC during system suspend, thus losing all IOMMU state. Hence after s2ram, devices behind an IPMMU (e.g. SATA), and configured to use it, will fail to complete their I/O operations. This patch series adds suspend/resume support to the Renesas IPMMU-VMSA IOMMU driver, and performs some smaller cleanups and fixes during the process. Most patches are fairly independent, except for patch 6/6, which depends on patches 4/6 and 5/6. Changes compared to v2: - Fix sysfs path typo in patch description, - Add Reviewed-by. Changes compared to v1: - Dropped "iommu/ipmmu-vmsa: Call ipmmu_ctx_write_root() instead of open coding", - Add Reviewed-by, - Merge IMEAR/IMELAR, - s/ipmmu_context_init/ipmmu_domain_setup_context/, - Drop PSCI checks. This has been tested on Salvator-XS with R-Car H3 ES2.0, with IPMMU suport for SATA enabled. To play safe, the resume operation has also been tested on R-Car M2-W. Thanks! Geert Uytterhoeven (6): iommu/ipmmu-vmsa: Link IOMMUs and devices in sysfs iommu/ipmmu-vmsa: Prepare to handle 40-bit error addresses iommu/ipmmu-vmsa: Make IPMMU_CTX_MAX unsigned iommu/ipmmu-vmsa: Move num_utlbs to SoC-specific features iommu/ipmmu-vmsa: Extract hardware context initialization iommu/ipmmu-vmsa: Add suspend/resume support drivers/iommu/ipmmu-vmsa.c | 185 +++++++++++++++++++++++++------------ 1 file changed, 124 insertions(+), 61 deletions(-) -- 2.17.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds