From patchwork Wed Sep 8 02:59:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12480007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35DD8C433EF for ; Wed, 8 Sep 2021 02:59:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D80DF61100 for ; Wed, 8 Sep 2021 02:59:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D80DF61100 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 795DB940041; Tue, 7 Sep 2021 22:59:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 744B5900003; Tue, 7 Sep 2021 22:59:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 65A7F940041; Tue, 7 Sep 2021 22:59:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 56E25900003 for ; Tue, 7 Sep 2021 22:59:06 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 20C281802ACB5 for ; Wed, 8 Sep 2021 02:59:06 +0000 (UTC) X-FDA: 78562899492.29.2A9C90E Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf27.hostedemail.com (Postfix) with ESMTP id BDFE7700009E for ; Wed, 8 Sep 2021 02:59:05 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 995C261131; Wed, 8 Sep 2021 02:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1631069945; bh=4MUyZ5fBTCXqA9qz3u3fXepw/nu66zAxnZ8Deg/oivg=; h=Date:From:To:Subject:In-Reply-To:From; b=cCbkLKqfN8g8VMEhz0iBWyV8BNDHb/FEg30eTGWKoJEdzG7/0uv0ItK9viI+7H0n5 hsQhPej8QJqlJUkHgq+Sp5e0dDQ8RxV1tk4S6ngY2YXn+xIuOyy8tP1VPDvaWTUfqD GLxVEshu842vbYQ0loN09shAfCtCoKwHsn1LUJSM= Date: Tue, 07 Sep 2021 19:59:04 -0700 From: Andrew Morton To: aklimov@redhat.com, akpm@linux-foundation.org, alobakin@pm.me, andriy.shevchenko@linux.intel.com, dennis@kernel.org, jolsa@redhat.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, ulf.hansson@linaro.org, will@kernel.org, wsa+renesas@sang-engineering.com, yury.norov@gmail.com Subject: [patch 109/147] include: move find.h from asm_generic to linux Message-ID: <20210908025904.mie2fTUKk%akpm@linux-foundation.org> In-Reply-To: <20210907195226.14b1d22a07c085b22968b933@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=cCbkLKqf; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: BDFE7700009E X-Stat-Signature: ab9ky56jzhuc579szdmzkee899mznq5g X-HE-Tag: 1631069945-164688 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Yury Norov Subject: include: move find.h from asm_generic to linux find_bit API and bitmap API are closely related, but inclusion paths are different - include/asm-generic and include/linux, correspondingly. In the past it made a lot of troubles due to circular dependencies and/or undefined symbols. Fix this by moving find.h under include/linux. Link: https://lkml.kernel.org/r/20210814211713.180533-4-yury.norov@gmail.com Signed-off-by: Yury Norov Tested-by: Wolfram Sang Cc: Alexander Lobakin Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Dennis Zhou Cc: Jiri Olsa Cc: Ulf Hansson Cc: Will Deacon Signed-off-by: Andrew Morton --- MAINTAINERS | 2 arch/alpha/include/asm/bitops.h | 2 arch/arc/include/asm/bitops.h | 1 arch/arm/include/asm/bitops.h | 1 arch/arm64/include/asm/bitops.h | 1 arch/csky/include/asm/bitops.h | 1 arch/h8300/include/asm/bitops.h | 1 arch/hexagon/include/asm/bitops.h | 1 arch/ia64/include/asm/bitops.h | 2 arch/m68k/include/asm/bitops.h | 2 arch/mips/include/asm/bitops.h | 1 arch/openrisc/include/asm/bitops.h | 1 arch/parisc/include/asm/bitops.h | 2 arch/powerpc/include/asm/bitops.h | 2 arch/riscv/include/asm/bitops.h | 1 arch/s390/include/asm/bitops.h | 1 arch/sh/include/asm/bitops.h | 1 arch/sparc/include/asm/bitops_32.h | 1 arch/sparc/include/asm/bitops_64.h | 2 arch/x86/include/asm/bitops.h | 2 arch/xtensa/include/asm/bitops.h | 1 include/asm-generic/bitops.h | 1 include/linux/bitmap.h | 1 include/{asm-generic/bitops => linux}/find.h | 12 +++++++++--- 25 files changed, 270 insertions(+), 291 deletions(-) --- a/arch/alpha/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/alpha/include/asm/bitops.h @@ -430,8 +430,6 @@ static inline unsigned int __arch_hweigh #endif /* __KERNEL__ */ -#include - #ifdef __KERNEL__ /* --- a/arch/arc/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/arc/include/asm/bitops.h @@ -369,7 +369,6 @@ static inline __attribute__ ((const)) un #include #include -#include #include #include --- a/arch/arm64/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/arm64/include/asm/bitops.h @@ -18,7 +18,6 @@ #include #include -#include #include #include --- a/arch/arm/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/arm/include/asm/bitops.h @@ -264,7 +264,6 @@ static inline int find_next_bit_le(const #endif -#include #include /* --- a/arch/csky/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/csky/include/asm/bitops.h @@ -59,7 +59,6 @@ static __always_inline unsigned long __f #include #include -#include #ifndef _LINUX_BITOPS_H #error only can be included directly --- a/arch/h8300/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/h8300/include/asm/bitops.h @@ -168,7 +168,6 @@ static inline unsigned long __ffs(unsign return result; } -#include #include #include #include --- a/arch/hexagon/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/hexagon/include/asm/bitops.h @@ -271,7 +271,6 @@ static inline unsigned long __fls(unsign } #include -#include #include #include --- a/arch/ia64/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/ia64/include/asm/bitops.h @@ -441,8 +441,6 @@ static __inline__ unsigned long __arch_h #endif /* __KERNEL__ */ -#include - #ifdef __KERNEL__ #include --- a/arch/m68k/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/m68k/include/asm/bitops.h @@ -529,6 +529,4 @@ static inline int __fls(int x) #include #endif /* __KERNEL__ */ -#include - #endif /* _M68K_BITOPS_H */ --- a/arch/mips/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/mips/include/asm/bitops.h @@ -446,7 +446,6 @@ static inline int ffs(int word) } #include -#include #ifdef __KERNEL__ --- a/arch/openrisc/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/openrisc/include/asm/bitops.h @@ -30,7 +30,6 @@ #include #include #include -#include #ifndef _LINUX_BITOPS_H #error only can be included directly --- a/arch/parisc/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/parisc/include/asm/bitops.h @@ -208,8 +208,6 @@ static __inline__ int fls(unsigned int x #endif /* __KERNEL__ */ -#include - #ifdef __KERNEL__ #include --- a/arch/powerpc/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/powerpc/include/asm/bitops.h @@ -255,8 +255,6 @@ unsigned long __arch_hweight64(__u64 w); #include #endif -#include - /* wrappers that deal with KASAN instrumentation */ #include #include --- a/arch/riscv/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/riscv/include/asm/bitops.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #include --- a/arch/s390/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/s390/include/asm/bitops.h @@ -387,7 +387,6 @@ static inline int fls(unsigned int word) #endif /* CONFIG_HAVE_MARCH_Z9_109_FEATURES */ #include -#include #include #include #include --- a/arch/sh/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/sh/include/asm/bitops.h @@ -68,6 +68,5 @@ static inline unsigned long __ffs(unsign #include #include -#include #endif /* __ASM_SH_BITOPS_H */ --- a/arch/sparc/include/asm/bitops_32.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/sparc/include/asm/bitops_32.h @@ -100,7 +100,6 @@ static inline void change_bit(unsigned l #include #include #include -#include #include #include --- a/arch/sparc/include/asm/bitops_64.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/sparc/include/asm/bitops_64.h @@ -52,8 +52,6 @@ unsigned int __arch_hweight8(unsigned in #include #endif /* __KERNEL__ */ -#include - #ifdef __KERNEL__ #include --- a/arch/x86/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/x86/include/asm/bitops.h @@ -380,8 +380,6 @@ static __always_inline int fls64(__u64 x #include #endif -#include - #include #include --- a/arch/xtensa/include/asm/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/arch/xtensa/include/asm/bitops.h @@ -205,7 +205,6 @@ BIT_OPS(change, "xor", ) #undef BIT_OP #undef TEST_AND_BIT_OP -#include #include #include --- a/include/asm-generic/bitops.h~include-move-findh-from-asm_generic-to-linux +++ a/include/asm-generic/bitops.h @@ -20,7 +20,6 @@ #include #include #include -#include #ifndef _LINUX_BITOPS_H #error only can be included directly --- a/include/linux/bitmap.h~include-move-findh-from-asm_generic-to-linux +++ a/include/linux/bitmap.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include --- a/MAINTAINERS~include-move-findh-from-asm_generic-to-linux +++ a/MAINTAINERS @@ -3262,8 +3262,8 @@ M: Yury Norov R: Andy Shevchenko R: Rasmus Villemoes S: Maintained -F: include/asm-generic/bitops/find.h F: include/linux/bitmap.h +F: include/linux/find.h F: lib/bitmap.c F: lib/find_bit.c F: lib/find_bit_benchmark.c