diff options
author | Will Deacon <will@kernel.org> | 2020-02-13 09:39:27 +0000 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-03-06 11:06:19 +0100 |
commit | 5d0c9b0eb8ab2dd540919174abe75aa3b86b802f (patch) | |
tree | 2057b4bfebb6f553043160215cb193b1082bc7f4 /include/asm-generic/bitops.h | |
parent | 4b39f99c222a2aff6a52fddfa6d8d4aef1771737 (diff) | |
download | linux-stable-5d0c9b0eb8ab2dd540919174abe75aa3b86b802f.tar.gz linux-stable-5d0c9b0eb8ab2dd540919174abe75aa3b86b802f.tar.bz2 linux-stable-5d0c9b0eb8ab2dd540919174abe75aa3b86b802f.zip |
asm-generic/bitops: Update stale comment
The comment in 'asm-generic/bitops.h' states that you should "recode
these in the native assembly language, if at all possible". This is
pretty crappy advice now that the generic implementation is defined in
terms of atomic_long_t rather than a spinlock, so update the comment and
hopefully save future architecture maintainers a bit of work.
Reported-by: Stefan Asserhall <stefana@xilinx.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200213093927.1836-1-will@kernel.org
Diffstat (limited to 'include/asm-generic/bitops.h')
-rw-r--r-- | include/asm-generic/bitops.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h index bfc96bf6606e..df9b5bc3d282 100644 --- a/include/asm-generic/bitops.h +++ b/include/asm-generic/bitops.h @@ -4,8 +4,9 @@ /* * For the benefit of those who are trying to port Linux to another - * architecture, here are some C-language equivalents. You should - * recode these in the native assembly language, if at all possible. + * architecture, here are some C-language equivalents. They should + * generate reasonable code, so take a look at what your compiler spits + * out before rolling your own buggy implementation in assembly language. * * C language equivalents written by Theodore Ts'o, 9/26/92 */ |