Merge tag 'sound-6.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux.git] / arch / openrisc / include / asm / bitops / fls.h
blob6b77f6556fb9c1dc8a586e6896e5704c5959cb58
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_FLS_H
9 #define __ASM_OPENRISC_FLS_H
12 #ifdef CONFIG_OPENRISC_HAVE_INST_FL1
14 static inline int fls(unsigned int x)
16 int ret;
18 __asm__ ("l.fl1 %0,%1"
19 : "=r" (ret)
20 : "r" (x));
22 return ret;
25 #else
26 #include <asm-generic/bitops/fls.h>
27 #endif
29 #endif /* __ASM_OPENRISC_FLS_H */