Merge tag 'sound-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux.git] / arch / openrisc / include / asm / bitops / ffs.h
blobb4c835d6bc8496427c25a2f55bae249a5654d281
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * OpenRISC Linux
5 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
6 */
8 #ifndef __ASM_OPENRISC_FFS_H
9 #define __ASM_OPENRISC_FFS_H
11 #ifdef CONFIG_OPENRISC_HAVE_INST_FF1
13 static inline int ffs(int x)
15 int ret;
17 __asm__ ("l.ff1 %0,%1"
18 : "=r" (ret)
19 : "r" (x));
21 return ret;
24 #else
25 #include <asm-generic/bitops/ffs.h>
26 #endif
28 #endif /* __ASM_OPENRISC_FFS_H */