Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp716423imm; Wed, 8 Aug 2018 04:39:40 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy27+gjQCan+XbEAeEvKmmhb7aGHUIKi8CJzBGjvQeLuBDwOMAkfxZjLak2IL0usQO8HH46 X-Received: by 2002:a63:3e4d:: with SMTP id l74-v6mr2279961pga.355.1533728380618; Wed, 08 Aug 2018 04:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533728380; cv=none; d=google.com; s=arc-20160816; b=z+UAop891d81CtRZoAFF3VvxXNdqArFRrdN3TKyFFPxgyD2KTinmTBzxAUKh0g6Ubn oSs8OX90qKHZRg156TPv2Y2L1v858myDQYF31Zfuk/F4l84SJrxC9IdTzYbrkitm3xuG kiII1JdGLfMVn7dhIk98GEcyKHdI2ylPzRWeP108Qerjemfo2bSmz/qIH6vx+9zZNhHz ZyULfFKPZca19TdNBWnE4NyGblNjyvzU6FReLQF0Hc/h7XbIrNK+rkR5ft83Y09/zppB eiE4RmDY68WiP8/UL5HcqG9C/PunTQB6oBz/RHJfffNY+LBME9nsjvwGNaeN3uNS83VK ROxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=Cv+Tn3WHkfXrn/SQlAhjidlfalrP8jIrTTc8zGGVA4A=; b=R4K/vAGAJsFiwByqpzEc49FEgcdtm3eBhGctS3xG0GMWmkC8qNVMqyACl6AVbqZ49o 9E+PnFltWxKgaRBwIK9GFryZ2kgwQ1XZOAWJ9HVAyiQjS26d3PbHq9kTEkA3vYnJtM90 a4AsuAMp+AlNj5crKVpbkm1yt2e01ckg4SsB3u60oK7eft0l4tD5O7sA3FELHqYVhT2n FL2B0g0tuX0Osn/xzOO8otfiKq7iA8JIJb3qI9NxbKKuHqFwZCrh0oAvsu8bMoSnPL4L TQWF21hKEggSz104iAwKq5CNS+r666xbmhtIIEU23fmsFDu6HEtbcDsvOjLmWxjZCA7C 4mpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b="p/Bw2F6N"; 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 d35-v6si3075940pla.116.2018.08.08.04.39.25; Wed, 08 Aug 2018 04:39:40 -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; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b="p/Bw2F6N"; 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 S1727039AbeHHN5x (ORCPT + 99 others); Wed, 8 Aug 2018 09:57:53 -0400 Received: from mail.kapsi.fi ([91.232.154.25]:40555 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726733AbeHHN5x (ORCPT ); Wed, 8 Aug 2018 09:57:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:References:Cc:To:From:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Cv+Tn3WHkfXrn/SQlAhjidlfalrP8jIrTTc8zGGVA4A=; b=p/Bw2F6NA/pHOA5A9rH/SYvz0d 995FGin0KTgpeHt83oOEho9lQLtsMI4BGDjYNnYu7eFyNGBxAxlKWPkZqyU4KvzeGuDgNpXZbpn6P Yl06P+BzPiYHimX4ReAM3rTpbOkZVP8Ar8g6Y7D/vTtWP0QQX3RYb4o8uylyost7ZG1YU612O2Zx6 7v1aYUCCGmLT3QTZFF7ahwcOSvSszXTeOSjTK+i1NU6nci8+09g0FzYxo5ZUuGAfrfX2BeZ5hfYzd tFE4BlEjZz1wulkyIIZxuQmChDLXfYTuh72XH0lAmv2IwkjQW976HMKd/k1+tDqPEWrhdQIUKpvYT Nn/N5+hw==; Received: from [193.209.96.43] (helo=[10.21.26.144]) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1fnMnM-0004h8-BC; Wed, 08 Aug 2018 14:38:28 +0300 Subject: Re: [PATCH v3 3/8] mailbox: Add transmit done by blocking option From: Mikko Perttunen To: Jassi Brar , Mikko Perttunen Cc: Greg KH , Thierry Reding , Jon Hunter , Devicetree List , linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org, ", linux-arm-kernel"@lists.infradead.org, linux-mediatek@lists.infradead.org, srv_heupstream , Linux Kernel Mailing List References: <20180702114033.15654-1-mperttunen@nvidia.com> <20180702114033.15654-4-mperttunen@nvidia.com> <907bac36-0c54-8f38-0f5e-f59196d414c6@kapsi.fi> Message-ID: Date: Wed, 8 Aug 2018 14:38:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <907bac36-0c54-8f38-0f5e-f59196d414c6@kapsi.fi> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 193.209.96.43 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.08.2018 13:45, Mikko Perttunen wrote: > On 08/03/2018 03:54 PM, Jassi Brar wrote: >> On Mon, Jul 2, 2018 at 5:10 PM, Mikko Perttunen >> wrote: >>> Add a new TXDONE option, TXDONE_BY_BLOCK. With this option, the >>> send_data function of the mailbox driver is expected to block until >>> the message has been sent. The new option is used with the Tegra >>> Combined UART driver to minimize unnecessary overhead when transmitting >>> data. >>> >> 1) TXDONE_BY_BLOCK flag :- >>          Have you tried setting the flag >> mbox_chan->mbox_client->tx_block ? > > No - I suppose I should have done that. I'm a bit concerned about > overhead as send_data may be called thousands of times per second, so I > tried to make it as close as possible to the downstream driver that just > pokes the mailbox register directly. I tried using polling in the mailbox framework. Some printing is done from atomic context so it seems tx_block cannot be used - wait_for_completion_timeout understandably does not work in atomic context. I also tried without tx_block, in which case I got some horribly garbled output, but "Try increasing MBOX_TX_QUEUE_LEN" was readable there. Any opinions? Thanks, Mikko > >> >> 2) Implementing TEGRA_HSP_MBOX_TYPE_SM :- >>         In mailbox framework, a controller is a collection of identical >> channels. That is, instances of the same class. >>         So ideally, in probe you should populate a controller for each >> type of channel, i.e, DB, SM, SS and AS. > > Hmm, yes, I guess this would be possible if I change the mailbox core to > allow registering multiple controllers per device. > > Thanks! > Mikko > >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at  http://vger.kernel.org/majordomo-info.html >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at  http://vger.kernel.org/majordomo-info.html