[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 07:13:40 +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=cs9NRRSUBP7E+7vjS3wmWQVstlG6z+c3dM2qxdPYHgz/rpS876spQQjHOpLH9nt9vINYVsJtIxoPo4o23C4GxedpaJSqWGLKbWejWKaKCfarG6Lo9dZOMvCRwiPIUTUFDmE/I5zQ5c0iZrYpPLezrfBWQZZOcPbOcXcltqqeWWgzfCJM5J4kBBCWTrsLTLpq056W5zq211oDl6WJtUbLZlnp6f8wfV3MAgIAkuadnN69pXF3Tk+Wx1YCbj4301e2XztQXob7cH5MJbpyDWN/v9npbY7+cwawInoMEONuQjA9s/Mnou0FMDhryuKsE2JRnIZdrPZ3PqreNNZi8xFNiw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=akVsiaMZd4RhsTwSIBFMzbQ1DbLxKmeuZ+GuE5oXOLRtcduoiHHIPKItX031b32X+rLNPu31Tjr7Sr2RLuZXXNyCPYp1Ir3Md5M9WGr7WAmvxegRxrxsSLq9wyNuzRXfoyUSQZPXszEmn8tlHYkhF3Afgxd6Bje76UP9ig4Z9zYvdu2zxiSouhh6S4GciaRFOLn6YTP6VDdL4AQI+sGJZgsHVN6oFTImzsju9MQ9Gvbw/lm9fq86363EmjxVDI36/i2+xM+7pB+38A7E5TQ0ikNEy0K1xy6jSLKsstPtk5HAOjDf4i8DyMwoW6jijDgVP0TSSLzTlF7PjzUy7EOiAQ==
- 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 07:13:57 +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.
|