From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 0D266C4320A for ; Sat, 14 Aug 2021 21:17:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 78D0860F46 for ; Sat, 14 Aug 2021 21:17:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 78D0860F46 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 1A4148D0005; Sat, 14 Aug 2021 17:17:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 12DF66B0075; Sat, 14 Aug 2021 17:17:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE87E8D0005; Sat, 14 Aug 2021 17:17:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id D64846B0074 for ; Sat, 14 Aug 2021 17:17:45 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6E0371813F3D3 for ; Sat, 14 Aug 2021 21:17:45 +0000 (UTC) X-FDA: 78474948090.10.5FDA83C Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf29.hostedemail.com (Postfix) with ESMTP id 194549000671 for ; Sat, 14 Aug 2021 21:17:44 +0000 (UTC) Received: by mail-pl1-f171.google.com with SMTP id a20so16357654plm.0 for ; Sat, 14 Aug 2021 14:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zjHjMKSUrYafXQBIfrva8S6a35AyfuRK8qg7Rl0polw=; b=lJIaNFjwUWv7fuUBudkGt6mc8waeCb9aceY4G3QPFUb3iS96/W9yVkabexSGwy65F3 jrSbsnprb8Rg9BlCrU5ApkLr/5vIaQ9mcwlaM1B+H61hFGwDUimOcKjWRCXXAi330zFq M2raPGH+NmrrfZWE+OOUbhrC8snbRo+eKSyJjrUkWmpfPtGCQ/lBSAYAN63oeWxXjUR/ 0mXl7t3S+NF3uGulXtjIjLxbeHi6+4Wjw4WLY8f5MgrT94AZh6gEkJx04H0+V1+R7NJE 73ho5Sh4k56pCMEwMRMQ5JtylcKuHxfNdo5nc9cqxgiowEEQm9db3K9Yh5IhQbTsM78s TFZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zjHjMKSUrYafXQBIfrva8S6a35AyfuRK8qg7Rl0polw=; b=WMCLB4VLY4+90PxhRJX8w+GZ/Lf22v5X78B1FHrhfBMUJg0CgyeEMbbdCgxEbVaU8f 1ljqWvGmRBVcLocflM2kWOEbLxrMyKe3vxio1EdAVowrIk4wJ8mbxe5dOzdRMyjMN+QE 5nDZOt/EGO3u3gtiJErPsAhza0Xd642sQugRWzc6YzgRua8sdIYokeTQRCj+QTEwUP+U wg7hnWPlcMpR8SqUzTt0Rxjy5RmrMhwEKYsQRuQMHWykOv4SQCU1KAoM45H9DjBCsYFz gXoDTn7y5m6m+KMrNSU7Jye8K1dgzfFvODvV/nxvWwla0plPYR0KSiX4gde8JWjD3Kvo KTTQ== X-Gm-Message-State: AOAM533xbtYhCh2ANaNRoDIK/l80DNSWEr9SgwCF8VJo8Of1x6svlegS qxhJDKcwzC/sxNzNNTJzagA= X-Google-Smtp-Source: ABdhPJwPX2r6DjNrwVNs5c+ziMYGwjNbMhwwwoIF9vZmYZBLoeOOsAEtOV5d7k6Hegpz8QWRUbEHmA== X-Received: by 2002:a65:448a:: with SMTP id l10mr8161035pgq.313.1628975864111; Sat, 14 Aug 2021 14:17:44 -0700 (PDT) Received: from localhost ([12.28.44.171]) by smtp.gmail.com with ESMTPSA id d22sm7480503pgi.73.2021.08.14.14.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Aug 2021 14:17:43 -0700 (PDT) From: Yury Norov To: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mmc@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org, "James E.J. Bottomley" , Alexander Lobakin , Alexander Shishkin , Alexey Klimov , Andrea Merello , Andy Shevchenko , Arnaldo Carvalho de Melo , Arnd Bergmann , Ben Gardon , Benjamin Herrenschmidt , Brian Cain , Catalin Marinas , Christoph Lameter , Daniel Bristot de Oliveira , David Hildenbrand , Dennis Zhou , Geert Uytterhoeven , Heiko Carstens , Ian Rogers , Ingo Molnar , Jaegeuk Kim , Jakub Kicinski , Jiri Olsa , Joe Perches , Jonas Bonn , Leo Yan , Mark Rutland , Namhyung Kim , Palmer Dabbelt , Paolo Bonzini , Peter Xu , Peter Zijlstra , Petr Mladek , Rasmus Villemoes , Rich Felker , Samuel Mendoza-Jonas , Sean Christopherson , Sergey Senozhatsky , Shuah Khan , Stefan Kristiansson , Steven Rostedt , Tejun Heo , Thomas Bogendoerfer , Ulf Hansson , Will Deacon , Wolfram Sang , Yoshinori Sato , Yury Norov Subject: [PATCH 03/17] include: move find.h from asm_generic to linux Date: Sat, 14 Aug 2021 14:16:59 -0700 Message-Id: <20210814211713.180533-4-yury.norov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210814211713.180533-1-yury.norov@gmail.com> References: <20210814211713.180533-1-yury.norov@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 194549000671 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=lJIaNFjw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf29.hostedemail.com: domain of yurynorov@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=yurynorov@gmail.com X-Rspamd-Server: rspam04 X-Stat-Signature: um844gc9fm5ozbikneow1i6ue5xhkxsb X-HE-Tag: 1628975864-38919 Content-Transfer-Encoding: quoted-printable 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: 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. Signed-off-by: Yury Norov Tested-by: Wolfram Sang --- 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 =3D> linux}/find.h | 12 +++++++++--- 24 files changed, 11 insertions(+), 32 deletions(-) rename include/{asm-generic/bitops =3D> linux}/find.h (97%) diff --git a/MAINTAINERS b/MAINTAINERS index b63403793c81..9b62293f7b72 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3271,8 +3271,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 diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bit= ops.h index 5adca78830b5..e1d8483a45f2 100644 --- a/arch/alpha/include/asm/bitops.h +++ b/arch/alpha/include/asm/bitops.h @@ -430,8 +430,6 @@ static inline unsigned int __arch_hweight8(unsigned i= nt w) =20 #endif /* __KERNEL__ */ =20 -#include - #ifdef __KERNEL__ =20 /* diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.= h index a7daaf64ae34..bdb7e190a294 100644 --- a/arch/arc/include/asm/bitops.h +++ b/arch/arc/include/asm/bitops.h @@ -189,7 +189,6 @@ static inline __attribute__ ((const)) unsigned long _= _ffs(unsigned long x) #include #include =20 -#include #include #include =20 diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.= h index c92e42a5c8f7..8e94fe7ab5eb 100644 --- a/arch/arm/include/asm/bitops.h +++ b/arch/arm/include/asm/bitops.h @@ -264,7 +264,6 @@ static inline int find_next_bit_le(const void *p, int= size, int offset) =20 #endif =20 -#include #include =20 /* diff --git a/arch/arm64/include/asm/bitops.h b/arch/arm64/include/asm/bit= ops.h index 81a3e519b07d..9b3c787132d2 100644 --- a/arch/arm64/include/asm/bitops.h +++ b/arch/arm64/include/asm/bitops.h @@ -18,7 +18,6 @@ =20 #include #include -#include =20 #include #include diff --git a/arch/csky/include/asm/bitops.h b/arch/csky/include/asm/bitop= s.h index 91818787d860..9604f47bd850 100644 --- a/arch/csky/include/asm/bitops.h +++ b/arch/csky/include/asm/bitops.h @@ -59,7 +59,6 @@ static __always_inline unsigned long __fls(unsigned lon= g x) =20 #include #include -#include =20 #ifndef _LINUX_BITOPS_H #error only can be included directly diff --git a/arch/h8300/include/asm/bitops.h b/arch/h8300/include/asm/bit= ops.h index c867a80cab5b..4489e3d6edd3 100644 --- a/arch/h8300/include/asm/bitops.h +++ b/arch/h8300/include/asm/bitops.h @@ -168,7 +168,6 @@ static inline unsigned long __ffs(unsigned long word) return result; } =20 -#include #include #include #include diff --git a/arch/hexagon/include/asm/bitops.h b/arch/hexagon/include/asm= /bitops.h index 71429f756af0..75d6ba3643b8 100644 --- a/arch/hexagon/include/asm/bitops.h +++ b/arch/hexagon/include/asm/bitops.h @@ -271,7 +271,6 @@ static inline unsigned long __fls(unsigned long word) } =20 #include -#include =20 #include #include diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitop= s.h index 2f24ee6459d2..577be93c0818 100644 --- a/arch/ia64/include/asm/bitops.h +++ b/arch/ia64/include/asm/bitops.h @@ -441,8 +441,6 @@ static __inline__ unsigned long __arch_hweight64(unsi= gned long x) =20 #endif /* __KERNEL__ */ =20 -#include - #ifdef __KERNEL__ =20 #include diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitop= s.h index 7b414099e5fc..f551a2160294 100644 --- a/arch/m68k/include/asm/bitops.h +++ b/arch/m68k/include/asm/bitops.h @@ -529,6 +529,4 @@ static inline int __fls(int x) #include #endif /* __KERNEL__ */ =20 -#include - #endif /* _M68K_BITOPS_H */ diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitop= s.h index dc2a6234dd3c..c09d57f907f7 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h @@ -446,7 +446,6 @@ static inline int ffs(int word) } =20 #include -#include =20 #ifdef __KERNEL__ =20 diff --git a/arch/openrisc/include/asm/bitops.h b/arch/openrisc/include/a= sm/bitops.h index 7f1ca35213d8..d773ed938acb 100644 --- a/arch/openrisc/include/asm/bitops.h +++ b/arch/openrisc/include/asm/bitops.h @@ -30,7 +30,6 @@ #include #include #include -#include =20 #ifndef _LINUX_BITOPS_H #error only can be included directly diff --git a/arch/parisc/include/asm/bitops.h b/arch/parisc/include/asm/b= itops.h index aa4e883431c1..c7a9997ac9cb 100644 --- a/arch/parisc/include/asm/bitops.h +++ b/arch/parisc/include/asm/bitops.h @@ -208,8 +208,6 @@ static __inline__ int fls(unsigned int x) =20 #endif /* __KERNEL__ */ =20 -#include - #ifdef __KERNEL__ =20 #include diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm= /bitops.h index 299ab33505a6..ce2c1fa1a45d 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h @@ -255,8 +255,6 @@ unsigned long __arch_hweight64(__u64 w); #include #endif =20 -#include - /* wrappers that deal with KASAN instrumentation */ #include #include diff --git a/arch/riscv/include/asm/bitops.h b/arch/riscv/include/asm/bit= ops.h index 396a3303c537..3540b690944b 100644 --- a/arch/riscv/include/asm/bitops.h +++ b/arch/riscv/include/asm/bitops.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #include =20 diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitop= s.h index fd149480b6e2..f7cefdde7c24 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -387,7 +387,6 @@ static inline int fls(unsigned int word) #endif /* CONFIG_HAVE_MARCH_Z9_109_FEATURES */ =20 #include -#include #include #include #include diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h index 3b6c7b5b7ec9..10ceb0d6b5a9 100644 --- a/arch/sh/include/asm/bitops.h +++ b/arch/sh/include/asm/bitops.h @@ -68,6 +68,5 @@ static inline unsigned long __ffs(unsigned long word) #include =20 #include -#include =20 #endif /* __ASM_SH_BITOPS_H */ diff --git a/arch/sparc/include/asm/bitops_32.h b/arch/sparc/include/asm/= bitops_32.h index 0ceff3b915a8..889afa9f990f 100644 --- a/arch/sparc/include/asm/bitops_32.h +++ b/arch/sparc/include/asm/bitops_32.h @@ -100,7 +100,6 @@ static inline void change_bit(unsigned long nr, volat= ile unsigned long *addr) #include #include #include -#include #include #include =20 diff --git a/arch/sparc/include/asm/bitops_64.h b/arch/sparc/include/asm/= bitops_64.h index ca7ea5913494..005a8ae858f1 100644 --- a/arch/sparc/include/asm/bitops_64.h +++ b/arch/sparc/include/asm/bitops_64.h @@ -52,8 +52,6 @@ unsigned int __arch_hweight8(unsigned int w); #include #endif /* __KERNEL__ */ =20 -#include - #ifdef __KERNEL__ =20 #include diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.= h index 0367efdc5b7a..a288ecd230ab 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -380,8 +380,6 @@ static __always_inline int fls64(__u64 x) #include #endif =20 -#include - #include =20 #include diff --git a/arch/xtensa/include/asm/bitops.h b/arch/xtensa/include/asm/b= itops.h index 3f71d364ba90..cd225896c40f 100644 --- a/arch/xtensa/include/asm/bitops.h +++ b/arch/xtensa/include/asm/bitops.h @@ -205,7 +205,6 @@ BIT_OPS(change, "xor", ) #undef BIT_OP #undef TEST_AND_BIT_OP =20 -#include #include =20 #include diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h index df9b5bc3d282..a47b8a71d6fe 100644 --- a/include/asm-generic/bitops.h +++ b/include/asm-generic/bitops.h @@ -20,7 +20,6 @@ #include #include #include -#include =20 #ifndef _LINUX_BITOPS_H #error only can be included directly diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index a36cfcec4e77..3f7c6731b203 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -6,6 +6,7 @@ =20 #include #include +#include #include #include #include diff --git a/include/asm-generic/bitops/find.h b/include/linux/find.h similarity index 97% rename from include/asm-generic/bitops/find.h rename to include/linux/find.h index 91b1b23f2b0c..c5410c243e04 100644 --- a/include/asm-generic/bitops/find.h +++ b/include/linux/find.h @@ -1,6 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ASM_GENERIC_BITOPS_FIND_H_ -#define _ASM_GENERIC_BITOPS_FIND_H_ +#ifndef __LINUX_FIND_H_ +#define __LINUX_FIND_H_ + +#ifndef __LINUX_BITMAP_H +#error only can be included directly +#endif + +#include =20 extern unsigned long _find_next_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, @@ -259,4 +265,4 @@ unsigned long find_next_bit_le(const void *addr, unsi= gned #error "Please fix " #endif =20 -#endif /*_ASM_GENERIC_BITOPS_FIND_H_ */ +#endif /*__LINUX_FIND_H_ */ --=20 2.30.2