From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8797C3F2D1 for ; Wed, 4 Mar 2020 10:40:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1E552072D for ; Wed, 4 Mar 2020 10:40:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AiReCY1k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1E552072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IwVHWRJNlFWct3FUMoquWDVIRYWjaKggO3yuDgBg7hQ=; b=AiReCY1kIR5MwL nl1tQIxgjiCQgQeYuZ2fT/6AGlksd5sIOcyvID0EwSDrsg3xkTkeQMzNAuctT6RlALK6+dgBEluqw OQEuArWmfM7cEjnTmbVeV4X5hXa/20vneGQCE8EB2GbgIyIJbDsEDsNCO57gLsjbm0zwdibmOAiNB crKstWBCBpOov/Jwjc5ptIRH2Dj4Hi757rk5zHNz9WbT6imO5mqyBvo3RoliNmtZF9UsIyR+P4K7y DI/kGjl2LoPgOZLhCmw+XFSfTVg6QZ1euNFreq4/Q0oLjCzT4BB+8dajR5O6yyvoX8HvD+aNga07q iqN50TlbOq0A4GVUK68A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j9RRu-0006k0-LY; Wed, 04 Mar 2020 10:40:22 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j9RRr-0006j7-PI for linux-arm-kernel@lists.infradead.org; Wed, 04 Mar 2020 10:40:21 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EBDD530E; Wed, 4 Mar 2020 02:40:13 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B7FC03F534; Wed, 4 Mar 2020 02:40:12 -0800 (PST) Date: Wed, 4 Mar 2020 10:40:05 +0000 From: Sudeep Holla To: peng.fan@nxp.com Subject: Re: [PATCH V4 2/2] firmware: arm_scmi: add smc/hvc transport Message-ID: <20200304103954.GA25004@bogus> References: <1583201219-15839-1-git-send-email-peng.fan@nxp.com> <1583201219-15839-3-git-send-email-peng.fan@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1583201219-15839-3-git-send-email-peng.fan@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200304_024019_867485_BF620787 X-CRM114-Status: UNSURE ( 8.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, f.fainelli@gmail.com, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, Sudeep Holla , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 03, 2020 at 10:06:59AM +0800, peng.fan@nxp.com wrote: > From: Peng Fan > > Take arm,smc-id as the 1st arg, leave the other args as zero for now. > There is no Rx, only Tx because of smc/hvc not support Rx. > > Signed-off-by: Peng Fan [...] > +static int smc_send_message(struct scmi_chan_info *cinfo, > + struct scmi_xfer *xfer) > +{ > + struct scmi_smc *scmi_info = cinfo->transport_info; > + struct arm_smccc_res res; > + > + shmem_tx_prepare(scmi_info->shmem, xfer); How do we protect another thread/process on another CPU going and modifying the same shmem with another request ? We may need notion of channel with associated shmem and it is protected with some lock. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel