 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [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.
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |