[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64


  • To: Razvan Virtan <virtanrazvan@xxxxxxxxx>
  • From: Justin He <Justin.He@xxxxxxx>
  • Date: Fri, 14 May 2021 06:22:53 +0000
  • Accept-language: en-US, zh-CN
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NL5Rr9O7tv3UIoTEjrEY6AZOeqKl6FexkuwiPJsnZhE=; b=VoBPlnO0N9M5sCxwzIb/sQH6pUoXnOQGjp48K6CFm5jGdXAzkCPZJ777RCdqhUF1Y7Fq9i6ib4JJ8RHjovhs1i4FQAuYJ9LUTpMxJSjaBnba0nCfAzEiA7R9TzxjyKoUwYCz2VnJ5B6H6E8XoXzsvv6IkZ2HIaoHcm5LhFoD3V5nx1U6OZigpGKAFUai62uZgag9C8iB5t5aN6rC6jfL30na9D7Qb1SfepfYPnfwxQt4cngAa34P6NKWRpghFkTsWgYCk3LMb5Rs6tYTWa7WkKhEAFUh5wE3hMNHcloOT9G+02+uygK7/OK7rCk4ySriLGGjv6vv15f9xi4U1b/aEw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D+x+PMt7mbugnEHl5ucbpgzap2/TWIsW0EU17xK035Yt2NrsnlOwyiFfUPMqdAZJZYOd4DjYeknlhbeY+gLlZeW2MOH/0WgbC68ATSe/Xx1Rd/XCcwUU8eo99oHWSptgLOL4B3tN+06z/NtxdN2NCNdTDGUCiSuO5tnatSa9+mzoTErd/metYZ+PNdoa9asEL+Jsb4hURCKmAglCwSGAwCRS4bKmRVPC8cQFGg+hVpgjYLHU70vFfGw/kikTkzLWyIbaCVXTeDjr+0Jv0fwyyHCZNSvaRCE4ykQ/ZmljtB3Nqf/AOWz+WmH8PzzHZzdke/slMSAUYops3Fua2GMVfA==
  • Authentication-results-original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Cc: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 14 May 2021 06:23:16 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXIYEtLGKtjDHWKUad6KkAewbSNKrixpPw
  • Thread-topic: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64

Hi Razvan

> -----Original Message-----
> From: Razvan Virtan <virtanrazvan@xxxxxxxxx>
> Sent: Thursday, March 25, 2021 10:14 PM
> To: Justin He <Justin.He@xxxxxxx>
> Cc: minios-devel@xxxxxxxxxxxxx
> Subject: Re: [RFCv4,26/35] plat/virtio: Use better iormb/iowmb on arm64
>
> Hi, Justin.
> What is the purpose of the inline assembly part from the read barrier
> __iormb()?
> I understand that the "memory" clobber acts as a compiler memory barrier,
> but I
> couldn't get the role of the actual assembly code.
> Also, don't we need a "memory" clobber for __iowmb() too?
>
> +#define __iormb(v)                                                   \
> +({                                                                   \
> +     unsigned long tmp;                                              \
> +     dmb(oshld);                                                     \
> +                                                                     \
> +     asm volatile("eor       %0, %1, %1\n"                           \
> +                  "cbnz      %0, ."                                  \
> +                  : "=r" (tmp) : "r" ((unsigned long)(v))            \
> +                  : "memory");                                       \
> +})
> +
> +#define __iowmb()            dmb(oshst)
>
Here, it created a dummy control dependency. Given that there is
no devices on Arm now using udelay() btw 2 mmio writes.
This seems to be not necessary.
I will drop this patch


--
Cheers,
Justin (Jia He)


IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.