(head * readl(&pqhdr->SignalSize));
memcpy_toio(psignal, pSignal, readl(&pqhdr->SignalSize));
- VolatileBarrier();
+ mb(); /* channel synch */
writel(head, &pqhdr->Head);
writeq(readq(&pqhdr->NumSignalsSent) + 1, &pqhdr->NumSignalsSent);
(tail * readl(&pqhdr->SignalSize));
memcpy_fromio(pSignal, psource, readl(&pqhdr->SignalSize));
- VolatileBarrier();
+ mb(); /* channel synch */
writel(tail, &pqhdr->Tail);
writeq(readq(&pqhdr->NumSignalsReceived) + 1,
memcpy((char *) pSignal + (pqhdr->SignalSize * signalCount),
psource, pqhdr->SignalSize);
- VolatileBarrier();
+ mb(); /* channel synch */
pqhdr->Tail = tail;
signalCount++;
PathName_Last_N_Nodes(__FILE__, 4), __LINE__); \
writel(newstate, &((CHANNEL_HEADER __iomem *) \
(pChan))->CliStateOS); \
- MEMORYBARRIER; \
+ mb(); /* required for channel synch */ \
} while (0)
#define ULTRA_CHANNEL_CLIENT_ACQUIRE_OS(pChan, chanId, logCtx) \
CHANNELCLI_OWNED,
PathName_Last_N_Nodes((u8 *) file, 4), line);
writel(CHANNELCLI_OWNED, &pChan->CliStateOS);
- MEMORYBARRIER;
+ mb(); /* required for channel synch */
}
if (readl(&pChan->CliStateOS) == CHANNELCLI_OWNED) {
if (readb(&pChan->CliErrorOS) != 0) {
return 0;
}
writel(CHANNELCLI_BUSY, &pChan->CliStateOS);
- MEMORYBARRIER;
+ mb(); /* required for channel synch */
if (readl(&pChan->CliStateBoot) == CHANNELCLI_BUSY) {
if ((readb(&pChan->CliErrorOS)
& ULTRA_CLIERROROS_THROTTLEMSG_BUSY) == 0) {
}
/* reset busy */
writel(CHANNELCLI_ATTACHED, &pChan->CliStateOS);
- MEMORYBARRIER;
+ mb(); /* required for channel synch */
return 0;
}
if (readb(&pChan->CliErrorOS) != 0) {
#define INLINE inline
#define OFFSETOF offsetof
-#define MEMORYBARRIER mb()
-
#define CHANNEL_GUID_MISMATCH(chType, chName, field, expected, actual, fil, \
lin, logCtx) \
do { \
LineNumber, Str, args...) \
pr_info(Str, ## args)
-#define VolatileBarrier() MEMORYBARRIER
-
#endif
/* For each data field in SIGNAL_QUEUE_HEADER that was modified,
* update host memory.
*/
- MEMORYBARRIER;
+ mb(); /* required for channel synch */
if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, Tail)) {
ERRDRV("visor_memregion_write of Tail failed: (status=%d)\n",
rc);
/* For each data field in SIGNAL_QUEUE_HEADER that was modified,
* update host memory.
*/
- MEMORYBARRIER;
+ mb(); /* required for channel synch */
if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, Head)) {
ERRDRV("visor_memregion_write of Head failed: (status=%d)\n",
rc);