Re: HELP: Is writeq an atomic operation??

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Roland Dreier
Date: Friday, May 2, 2008 - 4:21 pm

> Yeah,  I forgot I have a #ifndef writeq, then defined the x86_64 version
 > of that.   I've not tested on x86, so I'm not sure whether it works.
 > How are you handling writeq when its not defined, as the case in x86?

Write two writel() inside a spinlock to avoid any transactions in the
middle (the HW I'm dealing with can deal with two 32-bit transactions,
as long as nothing comes in the middle).  If your hardware demands a
single 64-bit transaction, you may be in trouble, because I'm not sure
all 32-bit systems can generate such a PCIe transaction.

You can see include/linux/mlx4/doorbell.h for exactly what I did.

 - R.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: HELP: Is writeq an atomic operation??, David Miller, (Fri May 2, 3:32 pm)
Re: HELP: Is writeq an atomic operation??, Roland Dreier, (Fri May 2, 3:43 pm)
Re: HELP: Is writeq an atomic operation??, David Miller, (Fri May 2, 3:49 pm)
RE: HELP: Is writeq an atomic operation??, Moore, Eric, (Fri May 2, 3:49 pm)
Re: HELP: Is writeq an atomic operation??, Roland Dreier, (Fri May 2, 3:53 pm)
RE: HELP: Is writeq an atomic operation??, Moore, Eric, (Fri May 2, 4:13 pm)
Re: HELP: Is writeq an atomic operation??, Roland Dreier, (Fri May 2, 4:21 pm)
RE: HELP: Is writeq an atomic operation??, Moore, Eric, (Fri May 2, 4:31 pm)