Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1815109imm; Thu, 9 Aug 2018 02:24:53 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz5KRibmjAifXjn5WXc6viUNPsgXTx5Hmn24YvNGmwTWyVBGw0u0Z9/2srfsNz+6pc78/R1 X-Received: by 2002:a63:f043:: with SMTP id s3-v6mr1342820pgj.94.1533806692932; Thu, 09 Aug 2018 02:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533806692; cv=none; d=google.com; s=arc-20160816; b=ATUgtyARnSmzT4TtTbAgsi91b6OANXAi+WVvpc9sY8s6RnHDJgvvr2alb4z5w028iQ acL1bzt5YYGx7oxNADS+1HIT9wb1XnYOD/qxuoI8aubochmq7O8PmdsBdmUhmPbwGTYK lszNE0vqRHqTnLiu5yLefSNDFi0qI3vOfFjIKGDmGjyAxLtzEVRnNRonv6ZolGK6InVy cuqYa1ESqIzihSesVCvPneOxv6gvvXkovV4Le6Dr6TiKFzjjdm0xqC/IlaJ88nd6rhFL X+/Ymzrwcu7g3KVufq/kvi9rZKAjWRZ+iBU6cDzzJ041cnkqKgIVCrAsxmZHPcBAPg6v tAFg== 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:arc-authentication-results; bh=mejCBFjTsU0ybN9uok85YpwhLL9zU3JpKOwcLcxmYis=; b=LbWzegLTvtzyRO5dYaP12a82lkgOFZIRSw1o+pU36EkAXJfXoc7ebNjzeod2UlVtsj uVI38xgeyGw0+KHk+fUYGIMTtWyziH4KySn174qQ9TYPyPxbKa5L1suKxGrOqbGksuhF iaNVNtbO7sLMVn+jlIKDOxsqpOy6cYSI10PIlgl4SuONDVIdXC0DrFZ+8bFTPLPvvENb 4iv6pyyQ+QOV739hEo/QIISFdYYMBo1HDGMzz0LSOR4Tonv1IJhGcCeifLUbsMHsggSN aTUUDromEvF7rYlApyckO8CXj+N78vlY92rIRd65ELGyAQ64PyB4MeK+FO4m/qoFAuOh 22kw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18-v6si6053030pgd.185.2018.08.09.02.24.38; Thu, 09 Aug 2018 02:24:52 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730377AbeHILrk (ORCPT + 99 others); Thu, 9 Aug 2018 07:47:40 -0400 Received: from sauhun.de ([88.99.104.3]:43478 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbeHILrk (ORCPT ); Thu, 9 Aug 2018 07:47:40 -0400 Received: from localhost (p54B3374D.dip0.t-ipconnect.de [84.179.55.77]) by pokefinder.org (Postfix) with ESMTPSA id A5A126DE8BC; Thu, 9 Aug 2018 11:23:40 +0200 (CEST) Date: Thu, 9 Aug 2018 11:23:40 +0200 From: Wolfram Sang To: Yingjoe Chen Cc: Jun Gao , devicetree@vger.kernel.org, srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling Message-ID: <20180809092340.rm4ywre543hpejne@katana> References: <1530955795-17714-1-git-send-email-jun.gao@mediatek.com> <1530955795-17714-3-git-send-email-jun.gao@mediatek.com> <20180808205752.llowh4bvu2wkuhga@ninjato> <1533806000.3347.6.camel@mtksdaap41> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s2qszosqjjnv6gdb" Content-Disposition: inline In-Reply-To: <1533806000.3347.6.camel@mtksdaap41> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --s2qszosqjjnv6gdb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > I believe the reason for these api is because some arch changed to can > not do DMA on stack recently. Maybe we should have dma_mapping to bounce It is not only arch dependent. You can enable virtual stacks in Kconfig, too. > buffer like it bounce un-dma-able address for those arch? or we should > have a common driver API for this, not just for i2c? I gave a talk about this problem recently and everyone in the room agreed the best thing would be to have annotated buffers which can be used kernel-wide. Someone mentioned DMABUF could be a candidate, but I haven't looked further into that. So, yes, a bigger solution is needed but I don't see that coming soon, so I implemented the I2C part for better safety now. I'd be happy to remove all that again once we have the annotated buffers. But it is an effort... Regards, Wolfram --s2qszosqjjnv6gdb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAltsCBcACgkQFA3kzBSg KbZVzxAAnp4w8fWF7ktxYnYvC9JFp+Buy8W8d+Qz/WV6hTvKLPiS643wtUno8JxV lVauE1NnUkoWNxeBv/69HERf0xUBPTRhp41dcMTrWsGdcdDfYNalxTnRjwFrsenQ n4bqifiwvfuaG4VocYFc4q90lKznz0fjQxAUUkFu3w06LbPNyUXKEQW90QVcePGI Am/uhr4u6OVDOAq99KUNu0dyykS+2zYYsxNQyCskUQl/Le30MVW/UF8+zBS4NePF ClZDSm+VQfVsMEo0QvEmGWITY2PsUAIIzzXXQXL+vB5cjn6HZWPaOHbuvyTZPS5E 8w2uGICNtlkHBkBW3h7cNIkq2SMF2Q/6eh8iKfo92KsLz+0+44usgilTgt0fmubj yohov8vh13Cryzw0zlVVWS7v7ffFV0Yz0hpJY55T2TKJAmz32UKyLGb11dNMtB1+ UbKs/wznm/AjGsMeojP8oLqDurOyXwC7nF2Q3c2dsRFK4mCII87T7+zEPYKAV8dE hOGP+QhBODTg/ZRt/gCJUHYitFz6ye4rQDa1QGezTqf2t5AcpZJEqlEhb6SmG1s/ WN2RHho6lGiknRteeJ/K3Lmt/eRKzTIVN+YoGtgA6dAmndzm3B+PGwvph4kTf98p l1gmLpenGuAXB9g6IVtndNCtM4cAOTMmq+nYR+St2nIlQJgcdW0= =juxY -----END PGP SIGNATURE----- --s2qszosqjjnv6gdb--