From 227a20fe31c6a03795a202f95af95fb371951963 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 16 Jul 2014 09:40:30 +0200 Subject: consistently use the same bitops.h file We have many variants of the same bitops.h file. Consistently use the same file for all architectures which completely use the generic bitops versions. Some architectures had static inline versions of functions identically to the generic versions, these are removed and the generic versions are used directly now. Also several architectures depend on the generic find_*_bit functions but didn't have the GENERIC_FIND_NEXT_BIT Kconfig option selected. This is added where needed. Signed-off-by: Sascha Hauer --- arch/openrisc/Kconfig | 1 + arch/openrisc/include/asm/bitops.h | 29 ++++++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) (limited to 'arch/openrisc') diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index d8d4ee9b6d..e21010bd60 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -2,6 +2,7 @@ config OPENRISC bool select HAVE_CONFIGURABLE_MEMORY_LAYOUT select HAVE_DEFAULT_ENVIRONMENT_NEW + select GENERIC_FIND_NEXT_BIT default y # not used diff --git a/arch/openrisc/include/asm/bitops.h b/arch/openrisc/include/asm/bitops.h index fa57901476..e77ab83202 100644 --- a/arch/openrisc/include/asm/bitops.h +++ b/arch/openrisc/include/asm/bitops.h @@ -1,6 +1,4 @@ /* - * (C) Copyright 2011, Stefan Kristiansson - * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of @@ -11,14 +9,27 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * + * */ -#ifndef __ASM_OPENRISC_BITOPS_H -#define __ASM_OPENRISC_BITOPS_H +#ifndef _ASM_BITOPS_H_ +#define _ASM_BITOPS_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include -#define PLATFORM_FLS -#include -#define PLATFORM_FFS -#include +#define set_bit(x, y) __set_bit(x, y) +#define clear_bit(x, y) __clear_bit(x, y) +#define change_bit(x, y) __change_bit(x, y) +#define test_and_set_bit(x, y) __test_and_set_bit(x, y) +#define test_and_clear_bit(x, y) __test_and_clear_bit(x, y) +#define test_and_change_bit(x, y) __test_and_change_bit(x, y) -#endif /* __ASM_GENERIC_BITOPS_H */ +#endif /* _ASM_BITOPS_H_ */ -- cgit v1.2.3