[PATCH 0/4] MIPS: sysmips(MIPS_ATOMIC_SET, ...) fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These patches fix a few issues with the sysmips(MIPS_ATOMIC_SET, ...)
system call. This system call is pretty much deprecated and no longer
used by glibc, however it is still provided for compatibility so we
should keep it working.

Patch 1 fixes a longstanding broken atomic retry condition which results
in the loop retrying until the the operation was *NOT* atomic:
- The new (instead of old) value will usually be returned.
- If the operation fails first time it won't be repeated (otherwise
  it'll repeat until it does fail, which is slow).

Patch 2 fixes a similarly longstanding clobbering of callee saved
registers in the common path, which tends to crash userland soon
afterwards.

Patch 3 fixes an EVA specific issue where normal LL/SC instructions are
used instead of the EVA specific LLE/SCE instructions.

Finally patch 4 simplifies the assembly slightly to avoid the apparently
redundant branch via a subsection. If anybody knows why this was there
and whether it is still needed I'm all ears. This is the only patch not
tagged for stable.

Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
Cc: stable@xxxxxxxxxxxxxxx

James Hogan (4):
  MIPS: Fix mips_atomic_set() retry condition
  MIPS: Save static registers before sysmips
  MIPS: Fix mips_atomic_set() with EVA
  MIPS: Branch straight to ll in mips_atomic_set()

 arch/mips/kernel/scall32-o32.S |  2 +-
 arch/mips/kernel/scall64-64.S  |  2 +-
 arch/mips/kernel/scall64-n32.S |  2 +-
 arch/mips/kernel/scall64-o32.S |  2 +-
 arch/mips/kernel/syscall.c     | 19 ++++++++++++-------
 5 files changed, 16 insertions(+), 11 deletions(-)

-- 
git-series 0.8.10




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux