Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp658164ybt; Wed, 8 Jul 2020 08:37:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdbzlpCaLi5iuJKAxLAGrpBVUr9MVDNMw46x3l71bXd8eJzorp5csMDLWMKVWL13S9d29x X-Received: by 2002:a05:6402:c83:: with SMTP id cm3mr70288092edb.307.1594222664150; Wed, 08 Jul 2020 08:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594222664; cv=none; d=google.com; s=arc-20160816; b=fFvUWiV6VJ4ZHPabvgUFvQNYRdkyGw8PxQzP+NLHiB6WXGRreIAngLoJqDOeFp6tG1 fjfY095Uz8bBsGdqaSEBoZ9ESjle7IVeJ0hbbzD6Gn2r2guDiiFbHiSk6lNzM3J6wjno V4z/xYgbsZmo2Nxyc/lPjy+9pLBr9KrXyUY1cKNTE3+zvj2B3qIsikE4+QxdopiqUsyD NZ44Ob1Untesn5w1hhc4pKT75dGiVdd0flST6uotB0/NiFPPgYHtebhm8+8fyWGm62Bi Vy6Ih2Q0pXO4FrJgzcnuYiETpYkFfy6IydhcRiJnIRwTYElzovn/b/LUIf8rzxMUyLQp NGgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fOSop7lztyRouL0kDGLhhSjX1ftEtB+Ao/N3362anSQ=; b=YRai14Al1b2kM5tYYnChvL/1TsrkLhX0wl4yLgRUEpkZm7XNGgYzD7oN88GJ3+SGAq Ac4g8/qhSAJmbIQvSYz2+J5LutGBRhprx4H4nzIu8AKOxQCTEnwe0cHb89Dl30N+Sq4R FjeuCyzF4kWlnA0S7AQVHiHUXvbz9O4ZO3tIEoAyIpYZ8iPHwgENd+Ffueaippwp4O29 +jErGvTbl2yyFUWc7wW//e8okgQfliFWO9zsl64eyMl0wlN+3ia9QbHdLvwZUZOsIa5i zJh7gW9cY2vwkoadh8kCqZWhcBEFYKx0irL8wAXRNSywVtWA66bndl0uz+8KBaP3Hq3k CDTw== 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 v16si222041edr.93.2020.07.08.08.37.21; Wed, 08 Jul 2020 08:37:44 -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 S1730054AbgGHPgj (ORCPT + 99 others); Wed, 8 Jul 2020 11:36:39 -0400 Received: from verein.lst.de ([213.95.11.211]:35930 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729022AbgGHPgi (ORCPT ); Wed, 8 Jul 2020 11:36:38 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 6727E68B05; Wed, 8 Jul 2020 17:36:36 +0200 (CEST) Date: Wed, 8 Jul 2020 17:36:35 +0200 From: Christoph Hellwig To: Nicolas Saenz Julienne Cc: Jeremy Linton , Christoph Hellwig , Marek Szyprowski , Robin Murphy , David Rientjes , linux-rpi-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dma-pool: use single atomic pool for both DMA zones Message-ID: <20200708153635.GB26743@lst.de> References: <20200707122804.21262-1-nsaenzjulienne@suse.de> <21a7276e98ae245404d82537ac1ee597a92f9150.camel@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21a7276e98ae245404d82537ac1ee597a92f9150.camel@suse.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 08, 2020 at 12:35:34PM +0200, Nicolas Saenz Julienne wrote: > > Which allows me to switch between ACPI/DT on the machine. In DT mode it > > works fine now, > > Nice, would that count as a Tested-by from you? > > > but with ACPI I continue to have failures unless I > > disable CMA via cma=0 on the kernel command line. > > Yes, I see why, in atomic_pool_expand() memory is allocated from CMA without > checking its correctness. That calls for a separate fix. I'll try to think of > something. I think we need a dma_coherent_ok for the allocations from the pool and then fall back to the next better one to get started. And yes, CMA is a bit of a mess, that generally needs better checks.