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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 4B0FEC28CC6 for ; Wed, 5 Jun 2019 14:17:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 246B320866 for ; Wed, 5 Jun 2019 14:17:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kvxtMTCZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728460AbfFEORJ (ORCPT ); Wed, 5 Jun 2019 10:17:09 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:36272 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728083AbfFEORI (ORCPT ); Wed, 5 Jun 2019 10:17:08 -0400 Received: by mail-ed1-f65.google.com with SMTP id a8so6059239edx.3; Wed, 05 Jun 2019 07:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DYFO74imdmleJLw5lYkuA6kO6lk6BDNzHYqBpZMjZ8s=; b=kvxtMTCZdYLS36jfstozpuwwHILmf0b2bvAMNZXohkogm+c2hPkV+4Z95BmSa+Iqxh ZVGQ9C767Mwx8Ubqg7OXp4cc5CZA5jSH642GgtyyWORUHyEr1yHfT+o5w1ktS+0B1E2k VE4Q8MtKaqiEo8ZAclw5warQKFbLbRryMg6MMwGAZdzZ0/aXkoolO6+F5v/FVE8PgoRz wjDdu3SfUhW1O6EVCML5GIKEDN1vkOd1YFIkqUl0szkdzv18oI0Pfv/hKcA64SRN4QKq RO1JzS9ecXpXP+8nLy05iP+IsEluRraqXvXeKhUhfZOANq+Kntu5MISL4uAXjrVMgbTe +6EQ== 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=DYFO74imdmleJLw5lYkuA6kO6lk6BDNzHYqBpZMjZ8s=; b=gMLwK+UtnG3D0YHfkoAawmZ0YnqD0oJSZGb4hoeJeVFC+EJbDApMRcTCeXXlNA+HBX oPrcqed6BjydKk/mjvxn/IvpwJcfIzAOGn0TBDSVd2l2gqmlwb463OAri8aT6gkW+yhp mdhTKs+UTE7UNGr7fCKhVe/xXCx7l+MJkP6ElDCsz30OoQZbN8/G/HGo0Blh0VocQZws MOx0ffD16YRv7wgbW132hIU/cRBruvPcbigQP/YwatgoxdYYcn8ttUe3x7kOsA5WfM/f M88c/6aW6jJuRcnJL6czYPZvl3JBzEg7KOr+oeBpRkN5kOM21fNbwEjhXnhNmTb5oc4D h3vw== X-Gm-Message-State: APjAAAWUUIyfuzaSX62gkF9w30Ur9n35aQvW/oBmlLWdsif/Y0/NEW89 WDSumJJuL0aykQ67twmNOwmKjP9QOZIdUW/G//k= X-Google-Smtp-Source: APXvYqz++haK8phyFHbXw+7xx+j+S+xiNW3yfgGMolbWak16tppAeVvpIviRn0GFGAEATK3z185Rfr0/uCa7tvr7S5E= X-Received: by 2002:a17:906:2ada:: with SMTP id m26mr8080786eje.265.1559744226214; Wed, 05 Jun 2019 07:17:06 -0700 (PDT) MIME-Version: 1.0 References: <20181201165348.24140-1-robdclark@gmail.com> <95d6e963-7f30-1d9c-99d7-0f6cc1589997@samsung.com> In-Reply-To: <95d6e963-7f30-1d9c-99d7-0f6cc1589997@samsung.com> From: Rob Clark Date: Wed, 5 Jun 2019 07:16:51 -0700 Message-ID: Subject: Re: [Freedreno] [PATCH] of/device: add blacklist for iommu dma_ops To: Marek Szyprowski Cc: Tomasz Figa , freedreno , Daniel Vetter , Frank Rowand , devicetree@vger.kernel.org, David Airlie , linux-arm-msm , Will Deacon , Doug Anderson , dri-devel , "linux-kernel@vger.kernel.org" , Linux IOMMU , Rob Herring , Sean Paul , Vivek Gautam , Robin Murphy , Christoph Hellwig 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 On Wed, Jun 5, 2019 at 6:18 AM Marek Szyprowski wrote: > > Hi Rob, > > On 2019-06-05 14:57, Rob Clark wrote: > > On Tue, Jun 4, 2019 at 11:58 PM Tomasz Figa wrote: > >> But first of all, I remember Marek already submitted some patches long > >> ago that extended struct driver with some flag that means that the > >> driver doesn't want the IOMMU to be attached before probe. Why > >> wouldn't that work? Sounds like a perfect opt-out solution. > > Actually, yeah.. we should do that. That is the simplest solution. > > Tomasz has very good memory. It took me a while to find that old patches: > > https://patchwork.kernel.org/patch/4677251/ > https://patchwork.kernel.org/patch/4677941/ > https://patchwork.kernel.org/patch/4677401/ > > It looks that my idea was a bit ahead of its time ;) > if I re-spin this, was their a reason not to just use bitfields, ie: - bool suppress_bind_attrs; /* disables bind/unbind via sysfs */ + bool suppress_bind_attrs : 1; /* disables bind/unbind via sysfs */ + bool has_own_iommu_manager : 1; /* driver explictly manages IOMMU */ That seems like it would have been a bit less churn and a bit nicer looking (IMO at least) BR, -R