linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: perf/core] tools headers: Synchronize linux/bits.h with the kernel sources
       [not found] <tip-1if3iga5r3di6oyddgxsr225@git.kernel.org>
@ 2019-08-23  2:44 ` tip-bot2 for Arnaldo Carvalho de Melo
  2019-08-25 18:36   ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: tip-bot2 for Arnaldo Carvalho de Melo @ 2019-08-23  2:44 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Namhyung Kim,
	Masahiro Yamada, Jiri Olsa, Adrian Hunter

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     b658911731d41a91b9de5458d6f38d6e1c90a453
Gitweb:        https://git.kernel.org/tip/b658911731d41a91b9de5458d6f38d6e1c90a453
Author:        Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate:    Mon, 19 Aug 2019 11:14:28 -03:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Tue, 20 Aug 2019 12:09:21 -03:00

tools headers: Synchronize linux/bits.h with the kernel sources

To pick up the changes in this cset:

  95b980d62d52 ("linux/bits.h: make BIT(), GENMASK(), and friends available in assembly")

To address this tools/perf build warning:

  Warning: Kernel ABI header at 'tools/include/linux/bits.h' differs from latest version at 'include/linux/bits.h'
  diff -u tools/include/linux/bits.h include/linux/bits.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-1if3iga5r3di6oyddgxsr225@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/linux/bits.h | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/tools/include/linux/bits.h b/tools/include/linux/bits.h
index 2b7b532..669d694 100644
--- a/tools/include/linux/bits.h
+++ b/tools/include/linux/bits.h
@@ -1,13 +1,15 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #ifndef __LINUX_BITS_H
 #define __LINUX_BITS_H
+
+#include <linux/const.h>
 #include <asm/bitsperlong.h>
 
-#define BIT(nr)			(1UL << (nr))
-#define BIT_ULL(nr)		(1ULL << (nr))
-#define BIT_MASK(nr)		(1UL << ((nr) % BITS_PER_LONG))
+#define BIT(nr)			(UL(1) << (nr))
+#define BIT_ULL(nr)		(ULL(1) << (nr))
+#define BIT_MASK(nr)		(UL(1) << ((nr) % BITS_PER_LONG))
 #define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
-#define BIT_ULL_MASK(nr)	(1ULL << ((nr) % BITS_PER_LONG_LONG))
+#define BIT_ULL_MASK(nr)	(ULL(1) << ((nr) % BITS_PER_LONG_LONG))
 #define BIT_ULL_WORD(nr)	((nr) / BITS_PER_LONG_LONG)
 #define BITS_PER_BYTE		8
 
@@ -17,10 +19,11 @@
  * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
  */
 #define GENMASK(h, l) \
-	(((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
+	(((~UL(0)) - (UL(1) << (l)) + 1) & \
+	 (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
 
 #define GENMASK_ULL(h, l) \
-	(((~0ULL) - (1ULL << (l)) + 1) & \
-	 (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
+	(((~ULL(0)) - (ULL(1) << (l)) + 1) & \
+	 (~ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))
 
 #endif	/* __LINUX_BITS_H */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [tip: perf/core] tools headers: Synchronize linux/bits.h with the kernel sources
  2019-08-23  2:44 ` [tip: perf/core] tools headers: Synchronize linux/bits.h with the kernel sources tip-bot2 for Arnaldo Carvalho de Melo
@ 2019-08-25 18:36   ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-08-25 18:36 UTC (permalink / raw)
  To: tip-bot2 for Arnaldo Carvalho de Melo
  Cc: kbuild-all, linux-tip-commits, linux-kernel,
	Arnaldo Carvalho de Melo, Namhyung Kim, Masahiro Yamada,
	Jiri Olsa, Adrian Hunter

[-- Attachment #1: Type: text/plain, Size: 12404 bytes --]

Hi tip-bot2,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc5 next-20190823]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/tip-bot2-for-Arnaldo-Carvalho-de-Melo/tools-headers-Synchronize-linux-bits-h-with-the-kernel-sources/20190826-001511
config: x86_64-randconfig-a004-201934 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from builtin-check.c:18:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from builtin-check.c:18:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from builtin-orc.c:17:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from builtin-orc.c:17:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   cc1: all warnings being treated as errors
   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from check.c:10:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from check.c:10:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from orc_gen.c:10:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from check.h:10,
                    from orc_gen.c:10:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   mv: cannot stat 'tools/objtool/.builtin-check.o.tmp': No such file or directory
   make[4]: *** [tools/objtool/builtin-check.o] Error 1
   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from elf.c:19:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from elf.c:19:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from warn.h:14,
                    from orc_dump.c:8:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from warn.h:14,
                    from orc_dump.c:8:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   cc1: all warnings being treated as errors
   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from special.h:10,
                    from special.c:15:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from elf.h:12,
                    from special.h:10,
                    from special.c:15:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   mv: cannot stat 'tools/objtool/.builtin-orc.o.tmp': No such file or directory
   make[4]: *** [tools/objtool/builtin-orc.o] Error 1
   cc1: all warnings being treated as errors
   In file included from tools/include/linux/bitops.h:13:0,
                    from tools/include/linux/hashtable.h:13,
                    from arch/x86/../../elf.h:12,
                    from arch/x86/decode.c:14:
   tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
    #define BIT_MASK(nr)  (UL(1) << ((nr) % BITS_PER_LONG))
                           ^
   tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
     unsigned long mask = BIT_MASK(nr);
                          ^~~~~~~~
   In file included from tools/include/asm-generic/bitops.h:30:0,
                    from tools/include/linux/bitops.h:32,
                    from tools/include/linux/hashtable.h:13,
                    from arch/x86/../../elf.h:12,
                    from arch/x86/decode.c:14:
   tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
     unsigned long mask = BIT_MASK(nr);
     ^~~~~~~~
   mv: cannot stat 'tools/objtool/.special.o.tmp': No such file or directory
   make[4]: *** [tools/objtool/special.o] Error 1
   cc1: all warnings being treated as errors
   mv: cannot stat 'tools/objtool/.orc_dump.o.tmp': No such file or directory
   make[4]: *** [tools/objtool/orc_dump.o] Error 1
   cc1: all warnings being treated as errors
   mv: cannot stat 'tools/objtool/.orc_gen.o.tmp': No such file or directory
   make[4]: *** [tools/objtool/orc_gen.o] Error 1
   cc1: all warnings being treated as errors
   mv: cannot stat 'tools/objtool/.elf.o.tmp': No such file or directory
   make[4]: *** [tools/objtool/elf.o] Error 1
   cc1: all warnings being treated as errors
   mv: cannot stat 'tools/objtool/arch/x86/.decode.o.tmp': No such file or directory
   make[5]: *** [tools/objtool/arch/x86/decode.o] Error 1
   make[5]: Target '__build' not remade because of errors.
   make[4]: *** [arch/x86] Error 2
   cc1: all warnings being treated as errors
   mv: cannot stat 'tools/objtool/.check.o.tmp': No such file or directory
   make[4]: *** [tools/objtool/check.o] Error 1
   make[4]: Target '__build' not remade because of errors.
   make[3]: *** [tools/objtool/objtool-in.o] Error 2
   make[3]: Target 'all' not remade because of errors.
   make[2]: *** [objtool] Error 2
   make[1]: *** [tools/objtool] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2
   34 real  23 user  10 sys  100.03% cpu 	make prepare

vim +/UL +10 tools/include/linux/bits.h

     7	
     8	#define BIT(nr)			(UL(1) << (nr))
     9	#define BIT_ULL(nr)		(ULL(1) << (nr))
  > 10	#define BIT_MASK(nr)		(UL(1) << ((nr) % BITS_PER_LONG))
    11	#define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
    12	#define BIT_ULL_MASK(nr)	(ULL(1) << ((nr) % BITS_PER_LONG_LONG))
    13	#define BIT_ULL_WORD(nr)	((nr) / BITS_PER_LONG_LONG)
    14	#define BITS_PER_BYTE		8
    15	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33719 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-25 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tip-1if3iga5r3di6oyddgxsr225@git.kernel.org>
2019-08-23  2:44 ` [tip: perf/core] tools headers: Synchronize linux/bits.h with the kernel sources tip-bot2 for Arnaldo Carvalho de Melo
2019-08-25 18:36   ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).