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=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 F31D3C2B9F7 for ; Tue, 25 May 2021 03:16:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4E796113E for ; Tue, 25 May 2021 03:16:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230130AbhEYDSN (ORCPT ); Mon, 24 May 2021 23:18:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbhEYDSM (ORCPT ); Mon, 24 May 2021 23:18:12 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C26C061574 for ; Mon, 24 May 2021 20:16:42 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id 29so10506095pgu.11 for ; Mon, 24 May 2021 20:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=UieisilkjhqvCv5TM4Uhta7TWRN2Fo+qizEnyHuJxA4va8bXfSD+rLVykfuHhWprMs LshPVy4dFsoXIkmd56qov4ggYtlL759ArIJ4nJdiIlOu+d8oU3Tdh/1w/BJ1fDxfpbcA V3s9TTUmNV6cOGqUjcXpB0nmY9PGjsUH8vbqY= 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=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=laqO950+sfniwNYe0HGSGBl9WPWBV9aaiUL8LzXKtyrRsHzNVTqNyCrGqaYHChnOGd EAo3GfKRyoZZQ5ZDFhBIWMYQVz0c/fc3tWKWW3pW+FTFLD5KVfpGmdiUb49lMJYtmk/A sH+lxRafyXIf5aumZ0UfAFsTONS9GSZuqt5uFFxmDCXI6sGkcP8Ng6Fy4PrP97JNvcoa lyjwsS/0IqJoMIkuRU61ObWDlIlyr32wFaZznxmld5NoG377XAStvFXZPjXvWFnWtGve JmdSWLtjLudQsFex7u36H16r9ZCKIpntZq1XfDK9uBhob1/KhbD7z+OBYFtij07G6KGr EyHA== X-Gm-Message-State: AOAM530JfrHIrM3CQw4OJzb+01MxQpSqDOYUESeARKXTeZ2AXwF30u+z xla7Jm8TOPOxK8jV4HQ/5F3uPZP/Uc3+9A== X-Google-Smtp-Source: ABdhPJx89DdCSAz+mPgbyVazAPohHWZQAGmivbWZ4vpxWztODtV7KuzNL6wW8DrY/GQJ2rnjFX2gZA== X-Received: by 2002:a63:4b43:: with SMTP id k3mr16773307pgl.450.1621912601831; Mon, 24 May 2021 20:16:41 -0700 (PDT) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com. [209.85.215.174]) by smtp.gmail.com with ESMTPSA id s9sm12041224pfm.120.2021.05.24.20.16.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 20:16:41 -0700 (PDT) Received: by mail-pg1-f174.google.com with SMTP id l70so21619251pga.1 for ; Mon, 24 May 2021 20:16:41 -0700 (PDT) X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr18955732ilr.18.1621912124990; Mon, 24 May 2021 20:08:44 -0700 (PDT) MIME-Version: 1.0 References: <20210518064215.2856977-1-tientzu@chromium.org> <20210518064215.2856977-6-tientzu@chromium.org> In-Reply-To: From: Claire Chang Date: Tue, 25 May 2021 11:08:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter To: Konrad Rzeszutek Wilk Cc: Rob Herring , mpe@ellerman.id.au, Joerg Roedel , Will Deacon , Frank Rowand , boris.ostrovsky@oracle.com, jgross@suse.com, Christoph Hellwig , Marek Szyprowski , benh@kernel.crashing.org, paulus@samba.org, "list@263.net:IOMMU DRIVERS" , sstabellini@kernel.org, Robin Murphy , grant.likely@arm.com, xypron.glpk@gmx.de, Thierry Reding , mingo@kernel.org, bauerman@linux.ibm.com, peterz@infradead.org, Greg KH , Saravana Kannan , "Rafael J . Wysocki" , heikki.krogerus@linux.intel.com, Andy Shevchenko , Randy Dunlap , Dan Williams , Bartosz Golaszewski , linux-devicetree , lkml , linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, Nicolas Boichat , Jim Quinlan , Tomasz Figa , bskeggs@redhat.com, Bjorn Helgaas , chris@chris-wilson.co.uk, Daniel Vetter , airlied@linux.ie, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, jani.nikula@linux.intel.com, Jianxiong Gao , joonas.lahtinen@linux.intel.com, linux-pci@vger.kernel.org, maarten.lankhorst@linux.intel.com, matthew.auld@intel.com, rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 24, 2021 at 11:51 PM Konrad Rzeszutek Wilk wrote: > > On Tue, May 18, 2021 at 02:51:52PM +0800, Claire Chang wrote: > > Still keep this function because directly using dev->dma_io_tlb_mem > > will cause issues for memory allocation for existing devices. The pool > > can't support atomic coherent allocation so we need to distinguish the > > per device pool and the default pool in swiotlb_alloc. > > This above should really be rolled in the commit. You can prefix it by > "The reason it was done this way was because directly using .." > Will add it. 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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 B736DC2B9F7 for ; Tue, 25 May 2021 03:15:53 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5242B61415 for ; Tue, 25 May 2021 03:15:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5242B61415 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Fpzjz4djbz3bnb for ; Tue, 25 May 2021 13:15:51 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Uieisilk; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::d30; helo=mail-io1-xd30.google.com; envelope-from=tientzu@chromium.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Uieisilk; dkim-atps=neutral Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FpzjR4DXgz2xv5 for ; Tue, 25 May 2021 13:15:22 +1000 (AEST) Received: by mail-io1-xd30.google.com with SMTP id z24so30026104ioi.3 for ; Mon, 24 May 2021 20:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=UieisilkjhqvCv5TM4Uhta7TWRN2Fo+qizEnyHuJxA4va8bXfSD+rLVykfuHhWprMs LshPVy4dFsoXIkmd56qov4ggYtlL759ArIJ4nJdiIlOu+d8oU3Tdh/1w/BJ1fDxfpbcA V3s9TTUmNV6cOGqUjcXpB0nmY9PGjsUH8vbqY= 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=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=kfJWaMmCnhGkhVHLidD1b7gOkPTaZJ8k0qzDfgZuO05cFWc1nhjpAzZWo7/SLe5sd+ P3xR49yFgui4qQoLAnU+TDxYilq2Vw+FCwOH8gMrCRS+51STF3DoyvwDa5JLvGUdkgQk zCOzJPedinu/Vi0HWH6mKwM918Zhi7f5xIOW+9x04QG4FxNXJyuwPyzxPt0rV6t3fd1t oJQEm1DvWwascuRjiJXF57dCnxemUhRClsKjqB+GnKmy2pUmRpfJWo8G/82xGNXrBipw o36sqKpYjB8GB5MHBMidPkTzZfFwun3WV4fdnkU65ufjOH2t6aQSt2zcgyp00f9B5hlj PYyw== X-Gm-Message-State: AOAM532XKtddAtB8MXQKy7UbK39M/V5vGHp/nTb5hD8+VBtXqa9zp+Vk YMQlWC3uc5/yR/UTEvQivVnGkn7cnwjj7w== X-Google-Smtp-Source: ABdhPJxt85ySRCQi6Oz8UMvRRGk9AKENr3HjRObLSCZtGhsr4ORIDYwxUzxFUZhOrRhPxDJmtGQN8A== X-Received: by 2002:a02:866a:: with SMTP id e97mr28822229jai.136.1621912518624; Mon, 24 May 2021 20:15:18 -0700 (PDT) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com. [209.85.166.54]) by smtp.gmail.com with ESMTPSA id g12sm12036989ile.23.2021.05.24.20.15.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 20:15:18 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id v9so3552678ion.11 for ; Mon, 24 May 2021 20:15:18 -0700 (PDT) X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr18955732ilr.18.1621912124990; Mon, 24 May 2021 20:08:44 -0700 (PDT) MIME-Version: 1.0 References: <20210518064215.2856977-1-tientzu@chromium.org> <20210518064215.2856977-6-tientzu@chromium.org> In-Reply-To: From: Claire Chang Date: Tue, 25 May 2021 11:08:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter To: Konrad Rzeszutek Wilk Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heikki.krogerus@linux.intel.com, thomas.hellstrom@linux.intel.com, peterz@infradead.org, joonas.lahtinen@linux.intel.com, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, grant.likely@arm.com, paulus@samba.org, Frank Rowand , mingo@kernel.org, Marek Szyprowski , sstabellini@kernel.org, Saravana Kannan , Joerg Roedel , "Rafael J . Wysocki" , Christoph Hellwig , Bartosz Golaszewski , bskeggs@redhat.com, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Thierry Reding , intel-gfx@lists.freedesktop.org, matthew.auld@intel.com, linux-devicetree , Jianxiong Gao , Daniel Vetter , Will Deacon , maarten.lankhorst@linux.intel.com, airlied@linux.ie, Dan Williams , linuxppc-dev@lists.ozlabs.org, jani.nikula@linux.intel.com, Rob Herring , rodrigo.vivi@intel.com, Bjorn Helgaas , boris.ostrovsky@oracle.com, Andy Shevchenko , jgross@suse.com, Nicolas Boichat , Greg KH , Randy Dunlap , lkml , Tomasz Figa , "list@263.net:IOMMU DRIVERS" , Jim Quinlan , xypron.glpk@gmx.de, Robin Murphy , bauerman@linux.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, May 24, 2021 at 11:51 PM Konrad Rzeszutek Wilk wrote: > > On Tue, May 18, 2021 at 02:51:52PM +0800, Claire Chang wrote: > > Still keep this function because directly using dev->dma_io_tlb_mem > > will cause issues for memory allocation for existing devices. The pool > > can't support atomic coherent allocation so we need to distinguish the > > per device pool and the default pool in swiotlb_alloc. > > This above should really be rolled in the commit. You can prefix it by > "The reason it was done this way was because directly using .." > Will add it. 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 E7BE5C2B9F7 for ; Tue, 25 May 2021 03:14:14 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 836A961404 for ; Tue, 25 May 2021 03:14:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 836A961404 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2E20A4031F; Tue, 25 May 2021 03:14:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MIwZrg8wm04d; Tue, 25 May 2021 03:14:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTP id C4F2B40268; Tue, 25 May 2021 03:14:12 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 861FBC000D; Tue, 25 May 2021 03:14:12 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 331C1C0001 for ; Tue, 25 May 2021 03:14:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 200DA40204 for ; Tue, 25 May 2021 03:14:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZhDC16Q2LssR for ; Tue, 25 May 2021 03:14:09 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by smtp2.osuosl.org (Postfix) with ESMTPS id DA9CA400B5 for ; Tue, 25 May 2021 03:14:09 +0000 (UTC) Received: by mail-pg1-x535.google.com with SMTP id i5so21636000pgm.0 for ; Mon, 24 May 2021 20:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=UieisilkjhqvCv5TM4Uhta7TWRN2Fo+qizEnyHuJxA4va8bXfSD+rLVykfuHhWprMs LshPVy4dFsoXIkmd56qov4ggYtlL759ArIJ4nJdiIlOu+d8oU3Tdh/1w/BJ1fDxfpbcA V3s9TTUmNV6cOGqUjcXpB0nmY9PGjsUH8vbqY= 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=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=QqlBR11nMDIvH38AHCB4NY+xq2W3nt1qe71Wzf3oI0EHmKmXIJE2L312fI9gAZSVS0 gkJy3EJT/60qsu/Wi59XIqIJnFQ4r+eRK5eGSiBYYk5u2okA/QOHpNILqp413hetj3rf 2cGXeMyT/v6I97C9/7DIsJIxVn12GLIxWwu1+4TgMHNUuOQoR+V2tPwbh3IhDRSd4QZL 5FKiT0uaetE3HBzhywruLW7++2RZbi2OzAjEF4jihYqm/EkgwtJprAMGwZYet4jnGHbE EAsUvELZBL1NZWGpEWm3QFL+nRrUW+wVF69CnOw08PqOAhg+QmwqQ0KI1gF/PDAWhiuN lsiQ== X-Gm-Message-State: AOAM532lw3mIMI88fbO+CUePOprpBOOi3W/9KZRx/ekUVSurA+2ud7Kh lb4fjJtB/OZvk4CvUxB36yTQVYNpCtpyZg== X-Google-Smtp-Source: ABdhPJyDlbU8zN4Op/MXDPsB64ryvVoKPV89fonTvyFxOkiSEqRxlnslg351HPIRx7K6sS5YN3Bb5g== X-Received: by 2002:a62:e908:0:b029:2db:8791:c217 with SMTP id j8-20020a62e9080000b02902db8791c217mr28225911pfh.28.1621912449023; Mon, 24 May 2021 20:14:09 -0700 (PDT) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com. [209.85.210.174]) by smtp.gmail.com with ESMTPSA id y13sm12801463pgp.16.2021.05.24.20.14.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 20:14:08 -0700 (PDT) Received: by mail-pf1-f174.google.com with SMTP id j21so105958pfj.6 for ; Mon, 24 May 2021 20:14:08 -0700 (PDT) X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr18955732ilr.18.1621912124990; Mon, 24 May 2021 20:08:44 -0700 (PDT) MIME-Version: 1.0 References: <20210518064215.2856977-1-tientzu@chromium.org> <20210518064215.2856977-6-tientzu@chromium.org> In-Reply-To: From: Claire Chang Date: Tue, 25 May 2021 11:08:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter To: Konrad Rzeszutek Wilk Cc: heikki.krogerus@linux.intel.com, thomas.hellstrom@linux.intel.com, peterz@infradead.org, benh@kernel.crashing.org, joonas.lahtinen@linux.intel.com, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, grant.likely@arm.com, paulus@samba.org, Frank Rowand , mingo@kernel.org, sstabellini@kernel.org, Saravana Kannan , mpe@ellerman.id.au, "Rafael J . Wysocki" , Christoph Hellwig , Bartosz Golaszewski , bskeggs@redhat.com, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Thierry Reding , intel-gfx@lists.freedesktop.org, matthew.auld@intel.com, linux-devicetree , Jianxiong Gao , Daniel Vetter , Will Deacon , maarten.lankhorst@linux.intel.com, airlied@linux.ie, Dan Williams , linuxppc-dev@lists.ozlabs.org, jani.nikula@linux.intel.com, Rob Herring , rodrigo.vivi@intel.com, Bjorn Helgaas , boris.ostrovsky@oracle.com, Andy Shevchenko , jgross@suse.com, Nicolas Boichat , Greg KH , Randy Dunlap , lkml , "list@263.net:IOMMU DRIVERS" , Jim Quinlan , xypron.glpk@gmx.de, Robin Murphy , bauerman@linux.ibm.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Mon, May 24, 2021 at 11:51 PM Konrad Rzeszutek Wilk wrote: > > On Tue, May 18, 2021 at 02:51:52PM +0800, Claire Chang wrote: > > Still keep this function because directly using dev->dma_io_tlb_mem > > will cause issues for memory allocation for existing devices. The pool > > can't support atomic coherent allocation so we need to distinguish the > > per device pool and the default pool in swiotlb_alloc. > > This above should really be rolled in the commit. You can prefix it by > "The reason it was done this way was because directly using .." > Will add it. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 8FCECC2B9F8 for ; Tue, 25 May 2021 03:15:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5565161415 for ; Tue, 25 May 2021 03:15:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5565161415 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 10FF46E364; Tue, 25 May 2021 03:15:34 +0000 (UTC) Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5237E6E3DB for ; Tue, 25 May 2021 03:15:06 +0000 (UTC) Received: by mail-io1-xd2e.google.com with SMTP id n10so30030295ion.8 for ; Mon, 24 May 2021 20:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=UieisilkjhqvCv5TM4Uhta7TWRN2Fo+qizEnyHuJxA4va8bXfSD+rLVykfuHhWprMs LshPVy4dFsoXIkmd56qov4ggYtlL759ArIJ4nJdiIlOu+d8oU3Tdh/1w/BJ1fDxfpbcA V3s9TTUmNV6cOGqUjcXpB0nmY9PGjsUH8vbqY= 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=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=MZiCxnvp+CTKiNtCW8Z/FmYZH7D3wihxPpYn0xxV+kbSiLFzHWYc2ESgtxDbytVHi1 ja4HRE8Ix3lE/KQO4fwhDDM9IBjAnLPfUtvU+bZtRPIrzM9hFaZJ6ysE9Bcig2SYRILB cOR8NQCpbU+tqfYOGeUALyHXegH2bw8LWLb6L76I16BiP13+xBY0pZ26aIxFQFZhAJ3m BJia7pwgRvDC7qt+U0scMZG7bHEi/JuIBvKAQcqPF07GBeNxjgn/7fTqzlD96gX6W89U mBljoFOYmZZgBzCQkv6TfJQS55nxbhVuTRAoLGMcdZr7mnGVxxt3sB6+Q8CZrvHNWSEl CXzA== X-Gm-Message-State: AOAM533emzNacE7U9Oy6I1L7ydbW35Dl9QEveIksudvy1xyqXxkMTbUd zZzNl14tD5YfjaFP+q/CEyL75Whg1L5k3g== X-Google-Smtp-Source: ABdhPJyXGD4ToKEyN0rf4Q5Gfu+UhgEuW3QoZW6NzQZGnlt/nTkzym6DUGhFrwkd7ffTBTpz4AVwBA== X-Received: by 2002:a5d:8a0a:: with SMTP id w10mr18485885iod.188.1621912505479; Mon, 24 May 2021 20:15:05 -0700 (PDT) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com. [209.85.166.178]) by smtp.gmail.com with ESMTPSA id a7sm12327111iln.83.2021.05.24.20.15.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 20:15:05 -0700 (PDT) Received: by mail-il1-f178.google.com with SMTP id e10so25263595ilu.11 for ; Mon, 24 May 2021 20:15:05 -0700 (PDT) X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr18955732ilr.18.1621912124990; Mon, 24 May 2021 20:08:44 -0700 (PDT) MIME-Version: 1.0 References: <20210518064215.2856977-1-tientzu@chromium.org> <20210518064215.2856977-6-tientzu@chromium.org> In-Reply-To: From: Claire Chang Date: Tue, 25 May 2021 11:08:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter To: Konrad Rzeszutek Wilk Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heikki.krogerus@linux.intel.com, thomas.hellstrom@linux.intel.com, peterz@infradead.org, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, grant.likely@arm.com, paulus@samba.org, Frank Rowand , mingo@kernel.org, Marek Szyprowski , sstabellini@kernel.org, Saravana Kannan , mpe@ellerman.id.au, Joerg Roedel , "Rafael J . Wysocki" , Christoph Hellwig , Bartosz Golaszewski , bskeggs@redhat.com, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Thierry Reding , intel-gfx@lists.freedesktop.org, matthew.auld@intel.com, linux-devicetree , Jianxiong Gao , Will Deacon , airlied@linux.ie, Dan Williams , linuxppc-dev@lists.ozlabs.org, Rob Herring , rodrigo.vivi@intel.com, Bjorn Helgaas , boris.ostrovsky@oracle.com, Andy Shevchenko , jgross@suse.com, Nicolas Boichat , Greg KH , Randy Dunlap , lkml , Tomasz Figa , "list@263.net:IOMMU DRIVERS" , Jim Quinlan , xypron.glpk@gmx.de, Robin Murphy , bauerman@linux.ibm.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, May 24, 2021 at 11:51 PM Konrad Rzeszutek Wilk wrote: > > On Tue, May 18, 2021 at 02:51:52PM +0800, Claire Chang wrote: > > Still keep this function because directly using dev->dma_io_tlb_mem > > will cause issues for memory allocation for existing devices. The pool > > can't support atomic coherent allocation so we need to distinguish the > > per device pool and the default pool in swiotlb_alloc. > > This above should really be rolled in the commit. You can prefix it by > "The reason it was done this way was because directly using .." > Will add it. 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 351D1C2B9F7 for ; Tue, 25 May 2021 03:09:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBBDE61404 for ; Tue, 25 May 2021 03:09:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBBDE61404 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B9B06E5D2; Tue, 25 May 2021 03:09:11 +0000 (UTC) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7341F89467 for ; Tue, 25 May 2021 03:08:58 +0000 (UTC) Received: by mail-pj1-x102e.google.com with SMTP id cu11-20020a17090afa8bb029015d5d5d2175so12402925pjb.3 for ; Mon, 24 May 2021 20:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=UieisilkjhqvCv5TM4Uhta7TWRN2Fo+qizEnyHuJxA4va8bXfSD+rLVykfuHhWprMs LshPVy4dFsoXIkmd56qov4ggYtlL759ArIJ4nJdiIlOu+d8oU3Tdh/1w/BJ1fDxfpbcA V3s9TTUmNV6cOGqUjcXpB0nmY9PGjsUH8vbqY= 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=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=QMrexqY91H/QLR7zgHtuXKEcxeZdjIB7PUJFSL/RWw9xxiREEhberZUUXFDhZU6T/q zcd5K5ja7LgctA6Okqc13/M109qnSGvDzMXFLeYNGjAQpTkq3/4TiU7W2z1aRYa22z+V tZ4KrItZN0gzKFvzbOezfgADDSejMObMV68yP+JBuQNDw42Fgui44q0ivkKO8Mv5vqWR r/O1GOOKo31aGjXpeAcRgi7oK1fE0PCvs8Q8gljpCBpW0BRqelXpk32cYj2pnGXcirk1 X1878BqSSfEUMToSZMeFCGvoLqJ2uZ6hjapmN4tG3Eayh2z3ywReKU3zlTgIzYOeOmRN hY8Q== X-Gm-Message-State: AOAM533hYlr7geYKdEtDPa0h7QpSiFmoAXkN2zUgWyWfq/vVOwyBpbta 2SnKe4NzeG3sNxVkQaph5z6IKk23lqxjkA== X-Google-Smtp-Source: ABdhPJxyqProiXo1qTxKeexQRz8PgJMZCVp2fmRFMMF1Zj21rVh7bzwpVO1wQIukX36rByhSaYtiPg== X-Received: by 2002:a17:90b:d98:: with SMTP id bg24mr2348007pjb.112.1621912137838; Mon, 24 May 2021 20:08:57 -0700 (PDT) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com. [209.85.210.170]) by smtp.gmail.com with ESMTPSA id k186sm12286862pgk.82.2021.05.24.20.08.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 20:08:57 -0700 (PDT) Received: by mail-pf1-f170.google.com with SMTP id 22so22085528pfv.11 for ; Mon, 24 May 2021 20:08:56 -0700 (PDT) X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr18955732ilr.18.1621912124990; Mon, 24 May 2021 20:08:44 -0700 (PDT) MIME-Version: 1.0 References: <20210518064215.2856977-1-tientzu@chromium.org> <20210518064215.2856977-6-tientzu@chromium.org> In-Reply-To: From: Claire Chang Date: Tue, 25 May 2021 11:08:34 +0800 X-Gmail-Original-Message-ID: Message-ID: To: Konrad Rzeszutek Wilk Subject: Re: [Intel-gfx] [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heikki.krogerus@linux.intel.com, thomas.hellstrom@linux.intel.com, peterz@infradead.org, benh@kernel.crashing.org, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, grant.likely@arm.com, paulus@samba.org, Frank Rowand , mingo@kernel.org, Marek Szyprowski , sstabellini@kernel.org, Saravana Kannan , mpe@ellerman.id.au, Joerg Roedel , "Rafael J . Wysocki" , Christoph Hellwig , Bartosz Golaszewski , bskeggs@redhat.com, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Thierry Reding , intel-gfx@lists.freedesktop.org, matthew.auld@intel.com, linux-devicetree , Jianxiong Gao , Will Deacon , airlied@linux.ie, Dan Williams , linuxppc-dev@lists.ozlabs.org, Rob Herring , Bjorn Helgaas , boris.ostrovsky@oracle.com, Andy Shevchenko , jgross@suse.com, Nicolas Boichat , Greg KH , Randy Dunlap , lkml , Tomasz Figa , "list@263.net:IOMMU DRIVERS" , Jim Quinlan , xypron.glpk@gmx.de, Robin Murphy , bauerman@linux.ibm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, May 24, 2021 at 11:51 PM Konrad Rzeszutek Wilk wrote: > > On Tue, May 18, 2021 at 02:51:52PM +0800, Claire Chang wrote: > > Still keep this function because directly using dev->dma_io_tlb_mem > > will cause issues for memory allocation for existing devices. The pool > > can't support atomic coherent allocation so we need to distinguish the > > per device pool and the default pool in swiotlb_alloc. > > This above should really be rolled in the commit. You can prefix it by > "The reason it was done this way was because directly using .." > Will add it. _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx 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=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 80A48C2B9F7 for ; Tue, 25 May 2021 03:09:09 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4023F611CD for ; Tue, 25 May 2021 03:09:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4023F611CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.132034.246446 (Exim 4.92) (envelope-from ) id 1llNRD-0000Xv-In; Tue, 25 May 2021 03:08:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 132034.246446; Tue, 25 May 2021 03:08:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1llNRD-0000Xm-F7; Tue, 25 May 2021 03:08:59 +0000 Received: by outflank-mailman (input) for mailman id 132034; Tue, 25 May 2021 03:08:57 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1llNRB-0000XI-Qm for xen-devel@lists.xenproject.org; Tue, 25 May 2021 03:08:57 +0000 Received: from mail-il1-x12b.google.com (unknown [2607:f8b0:4864:20::12b]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f4f89e21-2058-4b48-8b0c-866b7b8e71b4; Tue, 25 May 2021 03:08:57 +0000 (UTC) Received: by mail-il1-x12b.google.com with SMTP id o9so26884709ilh.6 for ; Mon, 24 May 2021 20:08:57 -0700 (PDT) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com. [209.85.166.178]) by smtp.gmail.com with ESMTPSA id z8sm4598705ilq.30.2021.05.24.20.08.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 20:08:55 -0700 (PDT) Received: by mail-il1-f178.google.com with SMTP id b5so6922288ilc.12 for ; Mon, 24 May 2021 20:08:55 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f4f89e21-2058-4b48-8b0c-866b7b8e71b4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=UieisilkjhqvCv5TM4Uhta7TWRN2Fo+qizEnyHuJxA4va8bXfSD+rLVykfuHhWprMs LshPVy4dFsoXIkmd56qov4ggYtlL759ArIJ4nJdiIlOu+d8oU3Tdh/1w/BJ1fDxfpbcA V3s9TTUmNV6cOGqUjcXpB0nmY9PGjsUH8vbqY= 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=ibLnJElvlxlVpclpJPUNJ2cC/oiUOQSOujwiFR/Tp+s=; b=PWJbCHlauLA4u4girKWOySdVYZYv/qu1qpaTJp4nRuFFSIg3sMGrgT6K+aCJGuhgUP K0t+cvSZL69uYwKs/jYDGs9xChMn3VbpDLwRY5I1o5Gt91dpD8nMVKo8OmEfaZhBobdC L60L1qyyhhqpYYWx+5BnWVyRsk0MoRYpblwnDgMbQ/VNFBl9rErcqyyy06EvFpwKfmia kEfy9WbrhEEKNupEXE+5GD6fRgesYV7BOIP9ljK0phBFgm5Z/XkNUGF6V1onFzHQjP+w a6QDfqahhtgFTPJ3gOeHmVou+gsyPw/jJ7GN6PmtgH4zh/uU3ULGJ0Og37lZNY6cxRIG TAsw== X-Gm-Message-State: AOAM532qSkzHxHYGeMqrHRNopnvoW0UsyBiSa7IFAGBFnm4xEcJD4seE /N/pysog613TUr6m+omALiTSjiF0Zg5BuQ== X-Google-Smtp-Source: ABdhPJzs3vEWPqSOmGkQ+nFPQJ2FRCf6CxOSIF/NlT+PdgOAA8gGt3a20xinNb3EPEIw9ouI1DQ83g== X-Received: by 2002:a05:6e02:1a67:: with SMTP id w7mr16335619ilv.137.1621912136278; Mon, 24 May 2021 20:08:56 -0700 (PDT) X-Received: by 2002:a05:6e02:b:: with SMTP id h11mr18955732ilr.18.1621912124990; Mon, 24 May 2021 20:08:44 -0700 (PDT) MIME-Version: 1.0 References: <20210518064215.2856977-1-tientzu@chromium.org> <20210518064215.2856977-6-tientzu@chromium.org> In-Reply-To: From: Claire Chang Date: Tue, 25 May 2021 11:08:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter To: Konrad Rzeszutek Wilk Cc: Rob Herring , mpe@ellerman.id.au, Joerg Roedel , Will Deacon , Frank Rowand , boris.ostrovsky@oracle.com, jgross@suse.com, Christoph Hellwig , Marek Szyprowski , benh@kernel.crashing.org, paulus@samba.org, "list@263.net:IOMMU DRIVERS" , sstabellini@kernel.org, Robin Murphy , grant.likely@arm.com, xypron.glpk@gmx.de, Thierry Reding , mingo@kernel.org, bauerman@linux.ibm.com, peterz@infradead.org, Greg KH , Saravana Kannan , "Rafael J . Wysocki" , heikki.krogerus@linux.intel.com, Andy Shevchenko , Randy Dunlap , Dan Williams , Bartosz Golaszewski , linux-devicetree , lkml , linuxppc-dev@lists.ozlabs.org, xen-devel@lists.xenproject.org, Nicolas Boichat , Jim Quinlan , Tomasz Figa , bskeggs@redhat.com, Bjorn Helgaas , chris@chris-wilson.co.uk, Daniel Vetter , airlied@linux.ie, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, jani.nikula@linux.intel.com, Jianxiong Gao , joonas.lahtinen@linux.intel.com, linux-pci@vger.kernel.org, maarten.lankhorst@linux.intel.com, matthew.auld@intel.com, rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com Content-Type: text/plain; charset="UTF-8" On Mon, May 24, 2021 at 11:51 PM Konrad Rzeszutek Wilk wrote: > > On Tue, May 18, 2021 at 02:51:52PM +0800, Claire Chang wrote: > > Still keep this function because directly using dev->dma_io_tlb_mem > > will cause issues for memory allocation for existing devices. The pool > > can't support atomic coherent allocation so we need to distinguish the > > per device pool and the default pool in swiotlb_alloc. > > This above should really be rolled in the commit. You can prefix it by > "The reason it was done this way was because directly using .." > Will add it.