2.6.x net driver fixes
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Jeff Garzik
Quoted 4 lines
The weaker ordering constraint is called "
read_barrier_depends()", and should be a no-op on all but alpha. Would you want to use that to fix the alpha case too?What would the proper fix be?
rmb(); read_barrier_depends();
No, just a
index = *indexpointer; read_barrier_depends(); data = dataptr[index];
which on most architectures is a no-op, but in case the hardware might do data or address speculation, and needs a dependent load barrier, it will do the right thing.
For stuff that isn't data dependent, you have to use the full rmb(), which obviously isn't a no-op on most setups.
Linus