Skip to content

Commit

Permalink
asm-generic/bitops: Update stale comment
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Will Deacon authored and Peter Zijlstra committed Mar 6, 2020
1 parent 4b39f99 commit 5d0c9b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/asm-generic/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 5d0c9b0

Please sign in to comment.