Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1615260imu; Wed, 12 Dec 2018 00:58:58 -0800 (PST) X-Google-Smtp-Source: AFSGD/UfNGtt1jBqlTs5m0x4ZYcwgiG/vCJukPTVCJLije/ohcYIxWeBPO2/cmUpBrw68ShMHlNd X-Received: by 2002:a17:902:4124:: with SMTP id e33mr19060046pld.236.1544605138335; Wed, 12 Dec 2018 00:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544605138; cv=none; d=google.com; s=arc-20160816; b=J5vUkoCQtrwsLU9D/7tKT0Lw3odIhZOAmLqPz1hMOwqPcxv7FPJB98ovVU+QNOz7by qSSo9NbqrkBBZq8o4YT9Z9OTTYA3z6zEuPUl++43mhdsUQXL7ex8+0Xlz2rsBjNd+I16 EOSmDC/G/1Tkn6bYwIYV4qPOzdZIvQSesMpSttTQqr0gPfBkjuamMu8+20vB4QI7UuM2 BhinohH8ynMBO/E/z7cs9decX9EipG6Q0ZIQRN4msOXSA6nfv47Pt9UP6+y2qkw2dqBu k0C8lPxQs2MbMM5DNsCHxWjSAQ93E/pFfNubv57jfnuE3oUHSOxCKaFAGS4vSXmc3rcL yFhw== 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:dkim-signature; bh=BVZgFNf9WHF+xHaCgaoxUE1kaeM8S4ksks7q9NZZRnE=; b=VNMvYeDv2rfLyeaE1TgbOA3KGkU6Upyxpt79y9/1ZcJY5YqzgsWwoL8na0B+nRWYkA Tm0jiEPtwXTqN7dgk/DFQ0IdL2Sb8yhXNPq8ubC2iUYDgKBRpPpNkllhtT8Rw7wtcM/7 K5jIu/hbOlW3kOpR2V0iemK/RrKdTWo9hZAKeacqS2k5xEthfrzu1RCbZTpUaVPOSRjf KIASFm/0411xD48MZMsgnViZvuhNzDupG9DbRA6KnM55Pz7MdAO4iqCHjUkmFcHdAo/W gTfuCURNNktJ+QteAfAkOgAIq/fT1XO4A1aTgHE1rQ2E3jtO/QYbeZBGoRQUBqPkWCK8 Srqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OWal2l5X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si13958512pgl.16.2018.12.12.00.58.38; Wed, 12 Dec 2018 00:58:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OWal2l5X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726796AbeLLI5S (ORCPT + 99 others); Wed, 12 Dec 2018 03:57:18 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:42098 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726242AbeLLI5S (ORCPT ); Wed, 12 Dec 2018 03:57:18 -0500 Received: by mail-yw1-f68.google.com with SMTP id x2so6649723ywc.9 for ; Wed, 12 Dec 2018 00:57:17 -0800 (PST) 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=BVZgFNf9WHF+xHaCgaoxUE1kaeM8S4ksks7q9NZZRnE=; b=OWal2l5Xd3rmOLIt2j03zlUDCAKQGGigEZY4oWX6oNZq5Xdf9x7YDw6Ks2a644kTkh NSEm5yUsaasOjkQHrcNnTcnz7ofJQWX56rQP/aDRqkgNnsakiXxx3nNE+tGeIF5/Jz5e sEuAgJkNmR8UYr2Y2B4HOwOHy9CyjHSukkqhY= 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=BVZgFNf9WHF+xHaCgaoxUE1kaeM8S4ksks7q9NZZRnE=; b=S6IGUy16oHFEJgyFgd2ANciX+ntbTKB6lVCYeHR6FwlP2f9uewjRhaAMrMwvHWoBbP djhHXoycH4NzsXDFE6OVTK9GPsZgYPCVUBJ6cygGVyLo/SgIH3m8/lHUzGPwuVXGofl/ +Xkh3bz+9m3/yM/es1oqKKGFJ703Rs+8mzFbq12pQ9slEjZHi+m1zMSMt42+PagOf5Ys H4BAw0C1KQ7bEfQfyO4J8iNpdry8+w85IKQ2rcka8Q2L7XpzS3+gxBvBltIzgc/nsgGB CHTmSjwNUI1tBYR3kwZTBXCKthEnpriaazrzc0XMCQa9cATa8g3191WBqIzGkr77JS/x nLMA== X-Gm-Message-State: AA+aEWaQof7SpCSXrGWRyd8blhgkLS/cC53mPV/UdMq/lQZhb0jj3Jd6 4uSbT6Z/iVZW1GP+TdBT4NeAVrOKeqc76w== X-Received: by 2002:a81:4323:: with SMTP id q35mr20246850ywa.119.1544605036992; Wed, 12 Dec 2018 00:57:16 -0800 (PST) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com. [209.85.219.171]) by smtp.gmail.com with ESMTPSA id r193-v6sm5456071ywg.32.2018.12.12.00.57.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Dec 2018 00:57:15 -0800 (PST) Received: by mail-yb1-f171.google.com with SMTP id f4so7354579ybq.4 for ; Wed, 12 Dec 2018 00:57:14 -0800 (PST) X-Received: by 2002:a25:d644:: with SMTP id n65mr3201928ybg.204.1544605034002; Wed, 12 Dec 2018 00:57:14 -0800 (PST) MIME-Version: 1.0 References: <20180821170629.18408-1-matwey@sai.msu.ru> <20180821170629.18408-3-matwey@sai.msu.ru> <2213616.rQm4DhIJ7U@avalon> <20181207152502.GA30455@infradead.org> In-Reply-To: <20181207152502.GA30455@infradead.org> From: Tomasz Figa Date: Wed, 12 Dec 2018 17:57:02 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 2/2] media: usb: pwc: Don't use coherent DMA buffers for ISO transfer To: Christoph Hellwig Cc: Laurent Pinchart , "Matwey V. Kornilov" , Linux Media Mailing List , Linux Kernel Mailing List , "Matwey V. Kornilov" , Alan Stern , Ezequiel Garcia , hdegoede@redhat.com, Hans Verkuil , Mauro Carvalho Chehab , rostedt@goodmis.org, mingo@redhat.com, Mike Isely , Bhumika Goyal , Colin King , Kieran Bingham , keiichiw@chromium.org 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 Christoph, On Sat, Dec 8, 2018 at 12:25 AM Christoph Hellwig wrote: > > Folks, can you take a look at this tree and see if this is useful > for USB: > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-noncoherent-allocator > > The idea is that you use dma_alloc_attrs with the DMA_ATTR_NON_CONSISTENT > now that I've made sure it is avaiable everywhere [1], and we can use > dma_sync_single_* on it. How about dma_sync_sg_*()? I'd expect some drivers to export/import such memory via sg, since that's the typical way of describing memory in DMA-buf. > > The only special case USB will need are the HCD_LOCAL_MEM devices, for > which we must use dma_alloc_coherent (or dma_alloc_attrs without > DMA_ATTR_NON_CONSISTENT) and must skip the dma_sync_single_* calls, > so we'll probably need USB subsystem wrappers for those calls. > > [1] except powerpc in this tree - I have another series to make powerpc > use the generic dma noncoherent code, which would cover it. Sounds good to me. Thanks for working on this. I'd be happy to be on CC and help with review when you post the patches later. Best regards, Tomasz