From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA2C9C433E6 for ; Tue, 14 Jul 2020 08:42:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B149F21897 for ; Tue, 14 Jul 2020 08:42:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726823AbgGNImB (ORCPT ); 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-Google-Smtp-Source: ABdhPJwxHQ4k7EDiUkAc1gcDGSS4Uw8Rp1iYZBGwEma0KUZbSrLDof4x63mIGl3zVqSk/DDgD3zmVlx4dejHfmNAQO0= 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