summaryrefslogtreecommitdiff
path: root/include/asm-generic/qrwlock.h
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@rivosinc.com>2022-04-14 19:34:29 +0300
committerPalmer Dabbelt <palmer@rivosinc.com>2022-05-11 21:49:54 +0300
commit493e2ba27635971565a991dc9f689553242890a4 (patch)
treeb86081c54b778aa2af78209ab46f99bf9ac947e3 /include/asm-generic/qrwlock.h
parenta8ad07e5240c9e78633270be2fa2356b7e0f0af5 (diff)
downloadlinux-493e2ba27635971565a991dc9f689553242890a4.tar.xz
asm-generic: qrwlock: Document the spinlock fairness requirements
I could only find the fairness requirements documented as the C code, this calls them out in a comment just to be a bit more explicit. Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'include/asm-generic/qrwlock.h')
-rw-r--r--include/asm-generic/qrwlock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/qrwlock.h b/include/asm-generic/qrwlock.h
index 7ae0ece07b4e..24ae09c1db9f 100644
--- a/include/asm-generic/qrwlock.h
+++ b/include/asm-generic/qrwlock.h
@@ -2,6 +2,10 @@
/*
* Queue read/write lock
*
+ * These use generic atomic and locking routines, but depend on a fair spinlock
+ * implementation in order to be fair themselves. The implementation in
+ * asm-generic/spinlock.h meets these requirements.
+ *
* (C) Copyright 2013-2014 Hewlett-Packard Development Company, L.P.
*
* Authors: Waiman Long <waiman.long@hp.com>