Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1589412ybh; Tue, 14 Jul 2020 01:45:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP3LMKYSGUbMnSFJtR0jVkHEPyIjJKqhNS0oI+BABBA6HYDtlxrI2scne4om2V3V4V/3wl X-Received: by 2002:a50:fe0c:: with SMTP id f12mr3342058edt.360.1594716328817; Tue, 14 Jul 2020 01:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594716328; cv=none; d=google.com; s=arc-20160816; b=oV2iJitr1cfLBGvj6Mz+YdH9EtKMQoGKHtXAiBR5xDp3RfM8SvzXwjfTEnL5J591oW x8/pMm7y9eMzzZUJn6D3niIuTStzpSrPexQ3j2Pu5yvSouxhGz+M3VcSWJokUnyKOMLK 0lUhbzFvVo8DhEXq8Ln9H+eRB5TqRyEDaNJ06SjeEJ2+4KWCNhduyIw+jHX14zgs7kvP PS38YuH6ypdMgDUMrxSDUCuP+epdLjtpttqTBDEHlgK2m4Pw31GFZOuaID8noc37wghS 2MOjC7IZR5Gvck3R0t5hZpiHOrF86IzhX0JLhGISG3SIJeuLcpLUUzLlp2HN84/t3LJn mAFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=oQnzKz3C/NevNjTlEZYFL5iXV3ehjQViqfoH5iOv3SM=; b=x6RBvG38HuILRVeiRcEIVi3WeMu1ZNg2cxmxnB1elvF6IgAalD7r3hGwGT8/Gnwi6S 84O9qsdx0SzOvki838U/NwJbufawP9BwWGAefiu8LW17lMKBnEPV5KPbnaWh48mitKWo /uSUNC1AC/PCB9M6nCkag7MXYQhyuH7wat5X5D/MfPBNwJCEgDdLYcHmforqAu8qhNBQ 7uJ4sMl2dkQUODOt+eFw2VmzYJRgQu2PSCnMWt3tjwPIsNkxXjZ9GIlYh2D4awW82XSv ueVruetiP1kLw0R2SPHwMua9sh9IPIYww6veobI4pMWpGFZh6E4XvGnOUd0nlFqvhmN5 8XMQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc21si11325783edb.51.2020.07.14.01.45.05; Tue, 14 Jul 2020 01:45:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbgGNImB (ORCPT + 99 others); Tue, 14 Jul 2020 04:42:01 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:37554 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725833AbgGNImA (ORCPT ); Tue, 14 Jul 2020 04:42:00 -0400 Received: by mail-oi1-f193.google.com with SMTP id 12so13327377oir.4; Tue, 14 Jul 2020 01:41:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oQnzKz3C/NevNjTlEZYFL5iXV3ehjQViqfoH5iOv3SM=; b=ZXEtkG+Wam84TPU/nvD5Wwj0MonII4buXn2A4y2s2Y3L2GtprWNx7EMJra5L96QT3j nYkx05Idwq6j8lVh6THDI51bJcoVcNQyhnTAwqu3s4wAG8EwM6/RIEHUxIfZMJbLtAz2 BbmSP+zeSy3UCs7hwqg6Lg4Bx+7nxxlQWQXVu954QqC11CEGD+DWVxQeU1OZzrMte7QF V2yhiILIg1hgILs0AUkd8TCG9602QltCBIQ4Xonhhws6xEt751XZQIxhb0GRwfuxz2ql Fixvq4PJMegWvuR/NEpBgR5/4FoFInxyGsYQsz7rBDwKBB4TBDUpezEtgA9feW0XHMni TBdQ== X-Gm-Message-State: AOAM531WbWsLPXEW/IpMQASLjoDCmgt9XphcndZaHn/JFRcW7JeB3RcT fCxCDUy0rVsnpO0glmEowRgJOBNtlQivzD97c/U= X-Received: by 2002:aca:ac10:: with SMTP id v16mr2626302oie.153.1594716118642; Tue, 14 Jul 2020 01:41:58 -0700 (PDT) MIME-Version: 1.0 References: <1594676120-5862-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> <1594676120-5862-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 14 Jul 2020 10:41:47 +0200 Message-ID: Subject: Re: [PATCH 2/9] iommu/ipmmu-vmsa: Hook up R8A774E1 DT matching code To: "Lad, Prabhakar" Cc: Lad Prabhakar , Vinod Koul , Rob Herring , Linus Walleij , Bartosz Golaszewski , Joerg Roedel , Sergei Shtylyov , "David S. Miller" , Jakub Kicinski , Magnus Damm , Yoshihiro Shimoda , dmaengine , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:GPIO SUBSYSTEM" , Linux IOMMU , netdev , Linux-Renesas , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, On Tue, Jul 14, 2020 at 10:30 AM Lad, Prabhakar wrote: > On Tue, Jul 14, 2020 at 9:09 AM Geert Uytterhoeven wrote: > > On Mon, Jul 13, 2020 at 11:35 PM Lad Prabhakar > > wrote: > > > From: Marian-Cristian Rotariu > > > > > > Add support for RZ/G2H (R8A774E1) SoC IPMMUs. > > > > > > Signed-off-by: Marian-Cristian Rotariu > > > Signed-off-by: Lad Prabhakar > > > > Thanks for your patch! > > > > > --- a/drivers/iommu/ipmmu-vmsa.c > > > +++ b/drivers/iommu/ipmmu-vmsa.c > > > @@ -751,6 +751,7 @@ static const struct soc_device_attribute soc_rcar_gen3[] = { > > > static const struct soc_device_attribute soc_rcar_gen3_whitelist[] = { > > > { .soc_id = "r8a774b1", }, > > > { .soc_id = "r8a774c0", }, > > > + { .soc_id = "r8a774e1", }, > > > > Adding an entry to soc_rcar_gen3_whitelist[] doesn't do anything, unless > > you also add the same entry to soc_rcar_gen3[]. > > > I think the comment "For R-Car Gen3 use a white list to opt-in slave > devices." is misleading. Booting through the kernel I do see iommu > groups (attached is the logs). Indeed. Without an entry in soc_rcar_gen3[], the IPMMU is enabled unconditionally, and soc_rcar_gen3_whitelist[] is ignored. That's why you want an entry in both, unless you have an R-Car Gen3 SoC where the IPMMU works correctly with all slave devices present. Perhaps soc_rcar_gen3[] should be renamed to soc_rcar_gen3_greylist[] (or soc_rcar_gen3_maybelist[]) to make this clear? > Also the recent patch to add > "r8a77961" just adds to soc_rcar_gen3_whitelist. Oops, commit 17fe16181639801b ("iommu/renesas: Add support for r8a77961") did it wrong, too. > > > { .soc_id = "r8a7795", .revision = "ES3.*" }, > > > { .soc_id = "r8a77961", }, > > > { .soc_id = "r8a77965", }, 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