From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [norov:aass 1/2] include/linux/bitmap.h:722: multiple definition of `bitmap_remap'; arch/s390/kernel/vdso64/vdso64_generic.o:include/linux/bitmap.h:722: first defined here
Date: Sun, 27 Aug 2023 18:26:27 +0800 [thread overview]
Message-ID: <202308271841.ALJ6CGcX-lkp@intel.com> (raw)
tree: https://github.com/norov/linux aass
head: ad585573c81bc132c3f64aae4eef20d68484abfb
commit: 09c5536da36c57d74f151b53a4b810a46fc63948 [1/2] fixq
config: s390-defconfig (https://download.01.org/0day-ci/archive/20230827/202308271841.ALJ6CGcX-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230827/202308271841.ALJ6CGcX-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308271841.ALJ6CGcX-lkp@intel.com/
Note: the norov/aass HEAD ad585573c81bc132c3f64aae4eef20d68484abfb builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
In file included from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/percpu.h:7,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/s390/kernel/asm-offsets.c:11:
include/linux/bitmap.h:720:6: warning: no previous prototype for 'bitmap_remap' [-Wmissing-prototypes]
720 | void bitmap_remap(unsigned long *dst, const unsigned long *src,
| ^~~~~~~~~~~~
include/linux/bitmap.h: In function 'bitmap_remap':
include/linux/bitmap.h:724:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
724 | if (*src & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h:725:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
725 | *old & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h:726:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
726 | *new & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h: At top level:
include/linux/bitmap.h:747:5: warning: no previous prototype for 'bitmap_bitremap' [-Wmissing-prototypes]
747 | int bitmap_bitremap(int oldbit,
| ^~~~~~~~~~~~~~~
In file included from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/s390/include/asm/syscall.h:13,
from arch/s390/include/asm/vdso/gettimeofday.h:9,
from include/vdso/datapage.h:137,
from arch/s390/kernel/vdso64/../../../../lib/vdso/gettimeofday.c:5,
from arch/s390/kernel/vdso64/vdso64_generic.c:2:
include/linux/bitmap.h:720:6: warning: no previous prototype for 'bitmap_remap' [-Wmissing-prototypes]
720 | void bitmap_remap(unsigned long *dst, const unsigned long *src,
| ^~~~~~~~~~~~
include/linux/bitmap.h: In function 'bitmap_remap':
include/linux/bitmap.h:724:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
724 | if (*src & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h:725:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
725 | *old & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h:726:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
726 | *new & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h: At top level:
include/linux/bitmap.h:747:5: warning: no previous prototype for 'bitmap_bitremap' [-Wmissing-prototypes]
747 | int bitmap_bitremap(int oldbit,
| ^~~~~~~~~~~~~~~
In file included from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/s390/include/asm/syscall.h:13,
from arch/s390/include/asm/vdso/gettimeofday.h:9,
from include/vdso/datapage.h:137,
from arch/s390/kernel/vdso64/vdso.h:5,
from arch/s390/kernel/vdso64/getcpu.c:7:
include/linux/bitmap.h:720:6: warning: no previous prototype for 'bitmap_remap' [-Wmissing-prototypes]
720 | void bitmap_remap(unsigned long *dst, const unsigned long *src,
| ^~~~~~~~~~~~
include/linux/bitmap.h: In function 'bitmap_remap':
include/linux/bitmap.h:724:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
724 | if (*src & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h:725:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
725 | *old & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h:726:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
726 | *new & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
| ^
include/linux/bitmap.h: At top level:
include/linux/bitmap.h:747:5: warning: no previous prototype for 'bitmap_bitremap' [-Wmissing-prototypes]
747 | int bitmap_bitremap(int oldbit,
| ^~~~~~~~~~~~~~~
s390-linux-ld: arch/s390/kernel/vdso64/getcpu.o: in function `bitmap_remap':
>> include/linux/bitmap.h:722: multiple definition of `bitmap_remap'; arch/s390/kernel/vdso64/vdso64_generic.o:include/linux/bitmap.h:722: first defined here
s390-linux-ld: arch/s390/kernel/vdso64/getcpu.o: in function `bitmap_bitremap':
>> include/linux/bitmap.h:765: multiple definition of `bitmap_bitremap'; arch/s390/kernel/vdso64/vdso64_generic.o:include/linux/bitmap.h:765: first defined here
make[3]: *** [arch/s390/kernel/vdso64/Makefile:53: arch/s390/kernel/vdso64/vdso64.so.dbg] Error 1
make[3]: Target 'include/generated/vdso64-offsets.h' not remade because of errors.
make[2]: *** [arch/s390/Makefile:160: vdso_prepare] Error 2
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:234: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +722 include/linux/bitmap.h
7a9339c834ec53 Yury Norov 2023-08-10 674
7fb65ed43cfb3a Yury Norov 2023-08-26 675 /**
7fb65ed43cfb3a Yury Norov 2023-08-26 676 * bitmap_remap - Apply map defined by a pair of bitmaps to another bitmap
7fb65ed43cfb3a Yury Norov 2023-08-26 677 * @dst: remapped result
7fb65ed43cfb3a Yury Norov 2023-08-26 678 * @src: subset to be remapped
7fb65ed43cfb3a Yury Norov 2023-08-26 679 * @old: defines domain of map
7fb65ed43cfb3a Yury Norov 2023-08-26 680 * @new: defines range of map
7fb65ed43cfb3a Yury Norov 2023-08-26 681 * @nbits: number of bits in each of these bitmaps
7fb65ed43cfb3a Yury Norov 2023-08-26 682 *
7fb65ed43cfb3a Yury Norov 2023-08-26 683 * Let @old and @new define a mapping of bit positions, such that
7fb65ed43cfb3a Yury Norov 2023-08-26 684 * whatever position is held by the n-th set bit in @old is mapped
7fb65ed43cfb3a Yury Norov 2023-08-26 685 * to the n-th set bit in @new. For example lets say that @old has
7fb65ed43cfb3a Yury Norov 2023-08-26 686 * bits 2 through 4 set, and @new has bits 3 through 5 set:
7fb65ed43cfb3a Yury Norov 2023-08-26 687 *
7fb65ed43cfb3a Yury Norov 2023-08-26 688 * old: 00011100
7fb65ed43cfb3a Yury Norov 2023-08-26 689 * |||///||
7fb65ed43cfb3a Yury Norov 2023-08-26 690 * new: 00111000
7fb65ed43cfb3a Yury Norov 2023-08-26 691 *
7fb65ed43cfb3a Yury Norov 2023-08-26 692 * This defines the mapping of bit position 2 to 3, 3 to 4 and 4 to 5,
7fb65ed43cfb3a Yury Norov 2023-08-26 693 * and of all other bit positions unchanged. So if say @src comes into
7fb65ed43cfb3a Yury Norov 2023-08-26 694 * this routine with bits 1, 3 and 5 set, then @dst should leave with
7fb65ed43cfb3a Yury Norov 2023-08-26 695 * bits 1, 4 and 5 set:
7fb65ed43cfb3a Yury Norov 2023-08-26 696 *
7fb65ed43cfb3a Yury Norov 2023-08-26 697 * src: 00101010
7fb65ed43cfb3a Yury Norov 2023-08-26 698 * v v v
7fb65ed43cfb3a Yury Norov 2023-08-26 699 * old: 00011100
7fb65ed43cfb3a Yury Norov 2023-08-26 700 * |||///||
7fb65ed43cfb3a Yury Norov 2023-08-26 701 * new: 00111000
7fb65ed43cfb3a Yury Norov 2023-08-26 702 * vv v
7fb65ed43cfb3a Yury Norov 2023-08-26 703 * dst: 00110010
7fb65ed43cfb3a Yury Norov 2023-08-26 704 *
7fb65ed43cfb3a Yury Norov 2023-08-26 705 * In the more general case, allowing for the possibility that the weight
7fb65ed43cfb3a Yury Norov 2023-08-26 706 * 'w' of @new is less than the weight of @old, map the position of the
7fb65ed43cfb3a Yury Norov 2023-08-26 707 * n-th set bit in @old to the position of the m-th set bit in @new, where
7fb65ed43cfb3a Yury Norov 2023-08-26 708 * m == n % w.
7fb65ed43cfb3a Yury Norov 2023-08-26 709 *
7fb65ed43cfb3a Yury Norov 2023-08-26 710 * If either of the @old and @new bitmaps are empty, or if @src and
7fb65ed43cfb3a Yury Norov 2023-08-26 711 * @dst point to the same location, then this routine copies @src
7fb65ed43cfb3a Yury Norov 2023-08-26 712 * to @dst.
7fb65ed43cfb3a Yury Norov 2023-08-26 713 *
7fb65ed43cfb3a Yury Norov 2023-08-26 714 * The positions of unset bits in @old are mapped to themselves
7fb65ed43cfb3a Yury Norov 2023-08-26 715 * (the identity map).
7fb65ed43cfb3a Yury Norov 2023-08-26 716 *
7fb65ed43cfb3a Yury Norov 2023-08-26 717 * Apply the above specified mapping to @src, placing the result in
7fb65ed43cfb3a Yury Norov 2023-08-26 718 * @dst, clearing any bits previously set in @dst.
7fb65ed43cfb3a Yury Norov 2023-08-26 719 */
7fb65ed43cfb3a Yury Norov 2023-08-26 720 void bitmap_remap(unsigned long *dst, const unsigned long *src,
7fb65ed43cfb3a Yury Norov 2023-08-26 721 const unsigned long *old, const unsigned long *new, unsigned int nbits)
7fb65ed43cfb3a Yury Norov 2023-08-26 @722 {
7fb65ed43cfb3a Yury Norov 2023-08-26 723 if (small_const_nbits(nbits)) {
7fb65ed43cfb3a Yury Norov 2023-08-26 724 if (*src & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
7fb65ed43cfb3a Yury Norov 2023-08-26 725 *old & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
7fb65ed43cfb3a Yury Norov 2023-08-26 726 *new & BITMAP_LAST_WORD_MASK(nbits) == 0 ||
7fb65ed43cfb3a Yury Norov 2023-08-26 727 (*new ^ *old) & BITMAP_LAST_WORD_MASK(nbits)) {
7fb65ed43cfb3a Yury Norov 2023-08-26 728 *dst = *src & BITMAP_LAST_WORD_MASK(nbits);
7fb65ed43cfb3a Yury Norov 2023-08-26 729 return;
7fb65ed43cfb3a Yury Norov 2023-08-26 730 }
7fb65ed43cfb3a Yury Norov 2023-08-26 731 }
7fb65ed43cfb3a Yury Norov 2023-08-26 732
7fb65ed43cfb3a Yury Norov 2023-08-26 733 __bitmap_remap(dst, src, old, new, nbits);
7fb65ed43cfb3a Yury Norov 2023-08-26 734 }
7fb65ed43cfb3a Yury Norov 2023-08-26 735
2b2196b70138e8 Yury Norov 2023-08-26 736 /**
2b2196b70138e8 Yury Norov 2023-08-26 737 * bitmap_bitremap - Apply map defined by a pair of bitmaps to a single bit
2b2196b70138e8 Yury Norov 2023-08-26 738 * @oldbit: bit position to be mapped
2b2196b70138e8 Yury Norov 2023-08-26 739 * @old: defines domain of map
2b2196b70138e8 Yury Norov 2023-08-26 740 * @new: defines range of map
2b2196b70138e8 Yury Norov 2023-08-26 741 * @bits: number of bits in each of these bitmaps
2b2196b70138e8 Yury Norov 2023-08-26 742 *
2b2196b70138e8 Yury Norov 2023-08-26 743 * A special case of bitmap_remap(), when a single bit remapping is needed.
2b2196b70138e8 Yury Norov 2023-08-26 744 *
2b2196b70138e8 Yury Norov 2023-08-26 745 * Returns: position of remapped bit
2b2196b70138e8 Yury Norov 2023-08-26 746 */
2b2196b70138e8 Yury Norov 2023-08-26 747 int bitmap_bitremap(int oldbit,
2b2196b70138e8 Yury Norov 2023-08-26 748 const unsigned long *old, const unsigned long *new, int bits)
2b2196b70138e8 Yury Norov 2023-08-26 749 {
09c5536da36c57 ynorov 2023-08-26 750 if (small_const_nbits(bits)) {
2b2196b70138e8 Yury Norov 2023-08-26 751 unsigned int w, n;
2b2196b70138e8 Yury Norov 2023-08-26 752
09c5536da36c57 ynorov 2023-08-26 753 if ((*old & BIT(oldbit)) == 0 ||
09c5536da36c57 ynorov 2023-08-26 754 (*old & BITMAP_LAST_WORD_MASK(bits)) == 0 ||
09c5536da36c57 ynorov 2023-08-26 755 (*new & BITMAP_LAST_WORD_MASK(bits)) == 0 ||
09c5536da36c57 ynorov 2023-08-26 756 ((*new ^ *old) & BITMAP_LAST_WORD_MASK(bits)) == 0) {
2b2196b70138e8 Yury Norov 2023-08-26 757 return oldbit;
2b2196b70138e8 Yury Norov 2023-08-26 758 }
2b2196b70138e8 Yury Norov 2023-08-26 759
2b2196b70138e8 Yury Norov 2023-08-26 760 w = bitmap_weight(new, bits);
2b2196b70138e8 Yury Norov 2023-08-26 761 n = bitmap_weight(old, bits);
09c5536da36c57 ynorov 2023-08-26 762 return find_nth_bit(new, bits, n % w);
2b2196b70138e8 Yury Norov 2023-08-26 763 }
2b2196b70138e8 Yury Norov 2023-08-26 764
09c5536da36c57 ynorov 2023-08-26 @765 return __bitmap_bitremap(oldbit, old, new, bits);
2b2196b70138e8 Yury Norov 2023-08-26 766 }
2b2196b70138e8 Yury Norov 2023-08-26 767
:::::: The code at line 722 was first introduced by commit
:::::: 7fb65ed43cfb3add68a884fd6722a6a1ad0f3ed8 bitmap: add small_cont_nbits() optimization for bitmap_remap()
:::::: TO: Yury Norov <yury.norov@gmail.com>
:::::: CC: Yury Norov <yury.norov@gmail.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-08-27 10:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308271841.ALJ6CGcX-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.