Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2229953yba; Fri, 17 May 2019 12:57:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwplfQKvWKbZ+Jq0hlBb4am2F18miurpps5pLXvw0NuARlkdtBdfdxkX0DgRW2gnfBx/2z2 X-Received: by 2002:aa7:8251:: with SMTP id e17mr8553094pfn.147.1558123046794; Fri, 17 May 2019 12:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558123046; cv=none; d=google.com; s=arc-20160816; b=Vsq8QLzhEhVe66BQa/QxDXQRmbaXh7v+MCmy+o79VHfsfg0LA7RR4UgYWS/EnasqG9 DWVt3EBMiCa06s7t9NKDHBI+6CK+oo6sxHEVuGSQi6Rf1See2j8IYoZtTZoX36hmXlFp shZwnQVvXC+1hoerM2Zt9csqMUVV7U1mx5gZdD9mCPG4QhFQH8/Mx7o+WVDQQX5Rk5RZ l53LtNP9L76SdOofacLoLv+uqTURTxRGkpuHdeDEmdjLgdy1gASz9uMr95GtIfUn3eop B9Zss43W/q6PjOiIS8dDZ/Iotd3KPy/go3YME9XmwMCsqJ3uuMR10bEA1Ui1YztPiLjQ ioBQ== 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:from:references:cc:to:subject:dkim-signature; bh=2aEY7eAQvZ+DH9KTif1OtLivF3PEC9S4LqizD0kDgwI=; b=VDnnCVtkOySmbYEapD6a5jdmxA5pahhHgOcWdjJojQme9uT5TCXUtxNZatMRkvqgaK fi9jqH1C0dtxFyCToE60j7FwejbjdCQhq0gaEox1kMo0HK8XXgRNotjLRiIMqiLsmnOU OTWJo2POtqsmugiOgdXZG2TiLLttpfijQ8+wBvPEx3HrUZEKdDPCh5i0JcwmDo2xrCWh AF8e/vOUuWrGFDftqN9UasVNJeBy0EkAMENZpdz2ZQdmpUcKOBG6ji0AuUKSgkrh79JF KH8ZIV2rk+0VznxDFlCxur2t6jUclRn3w3vTDRvOA6Y+fQ6plKQO3p704Dff0HFduv1x dGXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L7IkwYQo; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m189si10049891pfb.74.2019.05.17.12.57.11; Fri, 17 May 2019 12:57:26 -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=pass header.i=@linaro.org header.s=google header.b=L7IkwYQo; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729145AbfEQSI3 (ORCPT + 99 others); Fri, 17 May 2019 14:08:29 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:53694 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbfEQSI2 (ORCPT ); Fri, 17 May 2019 14:08:28 -0400 Received: by mail-it1-f193.google.com with SMTP id m141so13373639ita.3 for ; Fri, 17 May 2019 11:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2aEY7eAQvZ+DH9KTif1OtLivF3PEC9S4LqizD0kDgwI=; b=L7IkwYQoyruj1kcToFk3llJ/wvrHsEq88TWxzTYXgo9ksbnoF12nD7eGVzZvNhOTDw N1HImXNNWsBw5VeJAHSGGxKl0SrQGaAZgt6tN1rX7sgl9doC1aNuxJU9oj20WCcnlurO Kkeqj6F20KogMHQ4BfSaw+vZqHgymnyYyWLHy2OwR3tt4edNKICT8ZGxIbdWAV/l4eW8 UIq/TG1NNtgSHZpUGW7mBF6HNgUrN+sS5UyUMTUITLbptpUi3Un8jhX+fZbSW44yjeDY vCXm2xgZ8r0I6tJ4WMwb4meauwDsqU/lJBsSd0i7kXQt7sy+cY4HHXpN2+19yuBvxMSd 9eig== 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=2aEY7eAQvZ+DH9KTif1OtLivF3PEC9S4LqizD0kDgwI=; b=pPLAHxud+y89Lrr1lNPsdDNxSF3XJgStC4ZaDDua/9/INfQuXaGugBdc4Cnyq8MoW7 R1onrPyGTvYJvUnlh9Kjd7IC4hJZW2Y0PVbryFPZkGvw85OXVHZ6n2lRpKAD1hbRFfME Cf0Fdpn37T48IoxglcIB9L23taNXzbtyzR9DpCG7cIye1alHdXsLy5wpPnHE0E5aR4CS 44bCxpAuhSOpVcV3lbSfxwoTb8R9zoWNWGlp3050f8F9HNZ1850sAASdAh2QulA8mnkK nN/5TPiSIlSlhSMONxSGmtU3qu2NnqoMtu7GEPcSgnkGz5wdsYAy67/qTdCrJbFjidrH CaNQ== X-Gm-Message-State: APjAAAW/xmGdyROKRi5U7enpOCRKbsEgjrz95UP6t1rJ6s3vTODDw1yy xYkY163IqMoaNuNTudHT4FOthx/Jdns= X-Received: by 2002:a02:c64a:: with SMTP id k10mr17897522jan.30.1558116507475; Fri, 17 May 2019 11:08:27 -0700 (PDT) Received: from [172.22.22.26] (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.googlemail.com with ESMTPSA id r6sm2828922iog.38.2019.05.17.11.08.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2019 11:08:26 -0700 (PDT) Subject: Re: [PATCH 09/18] soc: qcom: ipa: GSI transactions To: Arnd Bergmann Cc: David Miller , Bjorn Andersson , Ilias Apalodimas , syadagir@codeaurora.org, mjavid@codeaurora.org, evgreen@chromium.org, benchan@google.com, ejcaruso@google.com, abhishek.esse@gmail.com, Linux Kernel Mailing List References: <20190512012508.10608-1-elder@linaro.org> <20190512012508.10608-10-elder@linaro.org> From: Alex Elder Message-ID: <14a040b6-8187-3fbc-754d-2e267d587858@linaro.org> Date: Fri, 17 May 2019 13:08:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/15/19 2:34 AM, Arnd Bergmann wrote: >> +static void gsi_trans_tre_fill(struct gsi_tre *dest_tre, dma_addr_t addr, >> + u32 len, bool last_tre, bool bei, >> + enum ipa_cmd_opcode opcode) >> +{ >> + struct gsi_tre tre; >> + >> + tre.addr = cpu_to_le64(addr); >> + tre.len_opcode = gsi_tre_len_opcode(opcode, len); >> + tre.reserved = 0; >> + tre.flags = gsi_tre_flags(last_tre, bei, opcode); >> + >> + *dest_tre = tre; /* Write TRE as a single (16-byte) unit */ >> +} > Have you checked that the atomic write is actually what happens here, > but looking at the compiler output? You might need to add a 'volatile' > qualifier to the dest_tre argument so the temporary structure doesn't > get optimized away here. Currently, the assignment *does* become a "stp" instruction. But I don't know that we can *force* the compiler to write it as a pair of registers, so I'll soften the comment with "Attempt to write" or something similar. To my knowledge, adding a volatile qualifier only prevents the compiler from performing funny optimizations, but that has no effect on whether the 128-bit assignment is made as a single unit. Do you know otherwise? -Alex