linux-stable/arch
Alexander Lobakin 0e862838f2 bitops: unify non-atomic bitops prototypes across architectures
Currently, there is a mess with the prototypes of the non-atomic
bitops across the different architectures:

ret	bool, int, unsigned long
nr	int, long, unsigned int, unsigned long
addr	volatile unsigned long *, volatile void *

Thankfully, it doesn't provoke any bugs, but can sometimes make
the compiler angry when it's not handy at all.
Adjust all the prototypes to the following standard:

ret	bool				retval can be only 0 or 1
nr	unsigned long			native; signed makes no sense
addr	volatile unsigned long *	bitmaps are arrays of ulongs

Next, some architectures don't define 'arch_' versions as they don't
support instrumentation, others do. To make sure there is always the
same set of callables present and to ease any potential future
changes, make them all follow the rule:
 * architecture-specific files define only 'arch_' versions;
 * non-prefixed versions can be defined only in asm-generic files;
and place the non-prefixed definitions into a new file in
asm-generic to be included by non-instrumented architectures.

Finally, add some static assertions in order to prevent people from
making a mess in this room again.
I also used the %__always_inline attribute consistently, so that
they always get resolved to the actual operations.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
2022-06-30 19:52:41 -07:00
..
alpha bitops: unify non-atomic bitops prototypes across architectures 2022-06-30 19:52:41 -07:00
arc This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
arm ARM: dts: at91: ksz9477_evb: fix port/phy validation 2022-06-14 22:11:02 -07:00
arm64 arm64 fixes for 5.19-rc3: 2022-06-17 13:55:19 -05:00
csky This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
hexagon bitops: unify non-atomic bitops prototypes across architectures 2022-06-30 19:52:41 -07:00
ia64 bitops: unify non-atomic bitops prototypes across architectures 2022-06-30 19:52:41 -07:00
loongarch LoongArch: vmlinux.lds.S: Add missing ELF_DETAILS 2022-06-17 22:09:05 +08:00
m68k bitops: unify non-atomic bitops prototypes across architectures 2022-06-30 19:52:41 -07:00
microblaze This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
mips This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
nios2 This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
openrisc This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
parisc Kbuild updates for v5.19 (2nd) 2022-06-05 09:06:03 -07:00
powerpc powerpc fixes for 5.19 #2 2022-06-09 12:17:43 -07:00
riscv RISC-V Fixes for 5.19-rc3 2022-06-17 13:45:47 -05:00
s390 bitops: unify non-atomic bitops prototypes across architectures 2022-06-30 19:52:41 -07:00
sh bitops: unify non-atomic bitops prototypes across architectures 2022-06-30 19:52:41 -07:00
sparc This set of changes updates init and user mode helper tasks to be 2022-06-03 16:03:05 -07:00
um um: virt-pci: set device ready in probe() 2022-06-10 20:38:06 -04:00
x86 bitops: unify non-atomic bitops prototypes across architectures 2022-06-30 19:52:41 -07:00
xtensa While looking at the ptrace problems with PREEMPT_RT and the problems 2022-06-03 16:13:25 -07:00
.gitignore
Kconfig A set of objtool fixes: 2022-06-05 09:45:27 -07:00