Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5483512pxu; Tue, 22 Dec 2020 19:39:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzj4s2RcV+yyVQQCNo3NqaHEF/mhowGOG8gCSJwGETvjE/kRelSK4ciexDOsKf/SViK4dGg X-Received: by 2002:a05:6402:149a:: with SMTP id e26mr23828149edv.150.1608694793712; Tue, 22 Dec 2020 19:39:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608694793; cv=none; d=google.com; s=arc-20160816; b=VuAI/hCM63sxSxvu/CYD84FVDThAD/BGmrmRub9VJbOLTJRnnvDD4u7Ib+xWmLKFXW t7eJ/grsULEmblm6bS0sZDOvD9TkGiT8gvREKf7ZhB48FW1QJ5vDvO3LQ8fJwL6RE9BO T2beZbgemINDpSuenJ/V9NFv3qrmlYFdGHNTJBfnxIjVy3K5XfdePWlC57J1kRtKuOC1 /OWLBiXnhaZVB18BKk9k6Y4XuIsK1AZD438dpi7phN5qdk14jiiet4t+kGvNjpwfMTDD OleeadrSqHfBFd9EVGwS4n4UjoV+BoRmr+wszyNsNtqQ6DgR9m4U3a/8j4n78h44+8lh AhAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=LuJaSbVapuF1xE4c0AaAdxE/WvHPBsVQQdMUsaXqhfE=; b=KFa9c8k3YOMfh85YrknlzkIzLhxjo28gXCkEfe+YejKPN/XQYKIL8ONP211L6LEUaZ vk0RfnQYyddWoDfqtnWEqIMns6rysF8ckegTzTgRBjoVTEYdfnzeklaxmxFh5IO9yjsl l8s/bMCnlN4W6qyJ0h3aRNVZvWPdBwB8HeRF3x95SB5VDnXgCQRbt7+m8Fe4XfBFFzhv Cmycq1KsTj2AbQ/A+L1pJmuGWZ9CK2PpJBONaNc5FteuqlBDZ2kZQobOQy+HWdZ4K6Ie EThgvsN5UeQ6+k8IXMoYmCL1LxjnryfjMTyo05+E1ZEQepkN2Ms12gyZhlxGKxHZGebb eWLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FAMg0YDv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si12823100edp.251.2020.12.22.19.39.32; Tue, 22 Dec 2020 19:39:53 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FAMg0YDv; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727396AbgLWDiH (ORCPT + 99 others); Tue, 22 Dec 2020 22:38:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbgLWDiG (ORCPT ); Tue, 22 Dec 2020 22:38:06 -0500 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 749DBC0613D6 for ; Tue, 22 Dec 2020 19:37:26 -0800 (PST) Received: by mail-pf1-x434.google.com with SMTP id 11so9604976pfu.4 for ; Tue, 22 Dec 2020 19:37:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LuJaSbVapuF1xE4c0AaAdxE/WvHPBsVQQdMUsaXqhfE=; b=FAMg0YDv6wy5gFci9qPmyQjcSul42HXIsFUkS+010t9Ycefb++aqK8Poc4Nq3Nmuc3 kEtS52ZVO1njFByrEDowe46cV71dNua4319OnFEpoPMdE/S3qmkzIw/QF4vdM21IDTsi 8uhWrzosTH4kW4LjEGBmHvRzuXwCGMw4FhCw+aRCaMEACSAHb96JbcLw0pQycERMxm8u TV8Kx9MBIH9BWJ+HlGp6tv57rUFMXpdE7vhly6YPxAzHywQSQ+Z4f5iNRc8BXPOj5YUN +HM+89Odz/GOQ7MHmdPRwZ0ZvT7bCIAJ32bGcpLdeCeUqgg/fea63vQPkVwB5fQpOKvo aicA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LuJaSbVapuF1xE4c0AaAdxE/WvHPBsVQQdMUsaXqhfE=; b=dNNZrHeNZCIYjUzPMAiVkGzDAT9TZomQeus3l740ft8aBv2s/AflsUXdNDkxs16zha 9EVhL8b9zJdNYfIcpuzJRg22rr0Ex4dNfg3mkdFN303d2leCA6jvFGXeo7jVh0eyHLN5 4AbWwGemhQVyHLH4D0bnnFAYwTkUCK0a4HldnrdovXvJLAXUDb5/o+gqCGY6kNfmcojL 2x6H6NiF2nPYavajty7N3q4BcF8NbIgjriDfxIV7JP0+slXKzHdhoZEqRSO5/Yo4MPA2 AjmHtvpbBrRcp49gR5+M2rHtrE2wL7HlsE9UKNGsxxgZIbY2dMSvZmGssHcHx0/2gT2s nL6w== X-Gm-Message-State: AOAM532GMwmh+0skgBFiix17awae0zcq2M1tyQkSoFw5J3RHVftFupJ2 uiNB+mBygZ5TZ8RMWn+pKI+7mkZdYcg= X-Received: by 2002:aa7:9d81:0:b029:19d:ca64:3c62 with SMTP id f1-20020aa79d810000b029019dca643c62mr364266pfq.16.1608694645437; Tue, 22 Dec 2020 19:37:25 -0800 (PST) Received: from [10.230.29.166] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id z11sm20522360pjn.5.2020.12.22.19.37.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Dec 2020 19:37:24 -0800 (PST) Subject: Re: [PATCH v4 2/2] firmware: arm_scmi: Augment SMC/HVC to allow optional interrupt To: Jim Quinlan , Sudeep Holla , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com Cc: "open list:SYSTEM CONTROL & POWER/MANAGEMENT INTERFACE Mes..." , open list References: <20201222145603.40192-1-jim2101024@gmail.com> <20201222145603.40192-3-jim2101024@gmail.com> From: Florian Fainelli Message-ID: Date: Tue, 22 Dec 2020 19:37:22 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201222145603.40192-3-jim2101024@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/22/2020 6:56 AM, Jim Quinlan wrote: > The SMC/HVC SCMI transport is modified to allow the completion of an SCMI > message to be indicated by an interrupt rather than the return of the smc > call. This accommodates the existing behavior of the BrcmSTB SCMI > "platform" whose SW is already out in the field and cannot be changed. > > Signed-off-by: Jim Quinlan This looks good to me, just one question below: [snip] > @@ -111,6 +145,8 @@ static int smc_send_message(struct scmi_chan_info *cinfo, > shmem_tx_prepare(scmi_info->shmem, xfer); > > arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res); > + if (scmi_info->irq) > + wait_for_completion(&scmi_info->tx_complete); Do we need this to have a preceding call to reinit_completion()? It does not look like this is going to make any practical difference but there are drivers doing that for correctness. -- Florian