All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the bitmap tree
@ 2022-05-02  8:15 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2022-05-02  8:15 UTC (permalink / raw)
  To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (native perf)
failed like this:

../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int,  int)'
   21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
      |     ^~~~~~~~~~~~~~~~~~~
In file included from ../lib/bitmap.c:6:
tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int,  unsigned int)'
   15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
      |     ^~~~~~~~~~~~~~~~~~~
../lib/bitmap.c: In function '__bitmap_weight_cmp':
../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   26 |                 if (w + bits - k * BITS_PER_LONG < num)
      |                                                  ^
../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   31 |                 if (w > num)
      |                       ^
cc1: all warnings being treated as errors
tools/perf/../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int,  int)'
   21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
      |     ^~~~~~~~~~~~~~~~~~~
In file included from tools/perf/../lib/bitmap.c:6:
tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int,  unsigned int)'
   15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
      |     ^~~~~~~~~~~~~~~~~~~
tools/perf/../lib/bitmap.c: In function '__bitmap_weight_cmp':
tools/perf/../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   26 |                 if (w + bits - k * BITS_PER_LONG < num)
      |                                                  ^
tools/perf/../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   31 |                 if (w > num)
      |                       ^
cc1: all warnings being treated as errors

Probably caused by commit

  4252f3915e02 ("tools: bitmap: sync bitmap_weight")

I have used the bitmap tree from next-20220429 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bitmap tree
  2023-10-20 12:33       ` Yury Norov
@ 2023-11-02 11:41         ` Alexander Lobakin
  0 siblings, 0 replies; 20+ messages in thread
From: Alexander Lobakin @ 2023-11-02 11:41 UTC (permalink / raw)
  To: Yury Norov, Stephen Rothwell
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

From: Yury Norov <yury.norov@gmail.com>
Date: Fri, 20 Oct 2023 05:33:15 -0700

Sorry, was on long vacation :z

> On Fri, Oct 20, 2023 at 03:51:13PM +1100, Stephen Rothwell wrote:
>> Hi Yury,
>>
>> On Thu, 19 Oct 2023 21:24:49 -0700 Yury Norov <yury.norov@gmail.com> wrote:
>>>
>>> On Thu, Oct 19, 2023 at 08:58:24AM -0700, Yury Norov wrote:
>>>> On Thu, Oct 19, 2023 at 05:01:06PM +1100, Stephen Rothwell wrote:  
>>>>>
>>>>> After merging the bitmap tree, today's linux-next build (native perf)
>>>>> failed like this:
>>>>>
>>>>> In file included from /home/sfr/next/next/tools/perf/util/header.h:10,
>>>>>                  from /home/sfr/next/perf/pmu-events/pmu-events.c:3:
>>>>> /home/sfr/next/next/tools/include/linux/bitmap.h:5:10: fatal error: linux/align.h: No such file or directory
>>>>>     5 | #include <linux/align.h>
>>>>>       |          ^~~~~~~~~~~~~~~
>>>>>
>>>>> Caused by commit
>>>>>
>>>>>   ed46ac8199f0 ("bitmap: introduce generic optimized bitmap_size()")
>>>>>
>>>>> I have used the bitmap tree from next-20231018 for today.  
>>>>
>>>> Thanks, Stephen. I'll take a look and let you know when it's resolved.  
>>>
>>> So the problem is that the patch "bitmap: introduce generic optimized
>>> bitmap_size()" adds reference to the linux/align.h, which doesn't exist
>>> in tools.
>>>
>>> I removed tools part of the patch entirely, and now tools/perf, for
>>> example, builds OK for me natively. The tree doesn't touch tools at
>>> all now, except for moving BYTES_TO_BITS() from a source file to a
>>> header, which looks safe.
>>
>> Almost - see my other email.
>>
>>> Can you please try the latest bitmap-for-next?
>>
>> See above.
>>
>> My "native" is PowerPC 64 LE.
> 
> I tried arm64. Anyways, it's clear that the series is not ready yet.
> I'll drop it from bitmap_for_next. Sorry for this mess.

Sorry for that, it was working for me. I'll resubmit once the window opens.

Thanks,
Olek

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

* Re: linux-next: build failure after merge of the bitmap tree
  2023-10-20  4:51     ` Stephen Rothwell
@ 2023-10-20 12:33       ` Yury Norov
  2023-11-02 11:41         ` Alexander Lobakin
  0 siblings, 1 reply; 20+ messages in thread
From: Yury Norov @ 2023-10-20 12:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Alexander Lobakin, Linux Kernel Mailing List, Linux Next Mailing List

On Fri, Oct 20, 2023 at 03:51:13PM +1100, Stephen Rothwell wrote:
> Hi Yury,
> 
> On Thu, 19 Oct 2023 21:24:49 -0700 Yury Norov <yury.norov@gmail.com> wrote:
> >
> > On Thu, Oct 19, 2023 at 08:58:24AM -0700, Yury Norov wrote:
> > > On Thu, Oct 19, 2023 at 05:01:06PM +1100, Stephen Rothwell wrote:  
> > > > 
> > > > After merging the bitmap tree, today's linux-next build (native perf)
> > > > failed like this:
> > > > 
> > > > In file included from /home/sfr/next/next/tools/perf/util/header.h:10,
> > > >                  from /home/sfr/next/perf/pmu-events/pmu-events.c:3:
> > > > /home/sfr/next/next/tools/include/linux/bitmap.h:5:10: fatal error: linux/align.h: No such file or directory
> > > >     5 | #include <linux/align.h>
> > > >       |          ^~~~~~~~~~~~~~~
> > > > 
> > > > Caused by commit
> > > > 
> > > >   ed46ac8199f0 ("bitmap: introduce generic optimized bitmap_size()")
> > > > 
> > > > I have used the bitmap tree from next-20231018 for today.  
> > > 
> > > Thanks, Stephen. I'll take a look and let you know when it's resolved.  
> > 
> > So the problem is that the patch "bitmap: introduce generic optimized
> > bitmap_size()" adds reference to the linux/align.h, which doesn't exist
> > in tools.
> > 
> > I removed tools part of the patch entirely, and now tools/perf, for
> > example, builds OK for me natively. The tree doesn't touch tools at
> > all now, except for moving BYTES_TO_BITS() from a source file to a
> > header, which looks safe.
> 
> Almost - see my other email.
> 
> > Can you please try the latest bitmap-for-next?
> 
> See above.
> 
> My "native" is PowerPC 64 LE.

I tried arm64. Anyways, it's clear that the series is not ready yet.
I'll drop it from bitmap_for_next. Sorry for this mess.

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

* Re: linux-next: build failure after merge of the bitmap tree
  2023-10-20  4:24   ` Yury Norov
@ 2023-10-20  4:51     ` Stephen Rothwell
  2023-10-20 12:33       ` Yury Norov
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2023-10-20  4:51 UTC (permalink / raw)
  To: Yury Norov
  Cc: Alexander Lobakin, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi Yury,

On Thu, 19 Oct 2023 21:24:49 -0700 Yury Norov <yury.norov@gmail.com> wrote:
>
> On Thu, Oct 19, 2023 at 08:58:24AM -0700, Yury Norov wrote:
> > On Thu, Oct 19, 2023 at 05:01:06PM +1100, Stephen Rothwell wrote:  
> > > 
> > > After merging the bitmap tree, today's linux-next build (native perf)
> > > failed like this:
> > > 
> > > In file included from /home/sfr/next/next/tools/perf/util/header.h:10,
> > >                  from /home/sfr/next/perf/pmu-events/pmu-events.c:3:
> > > /home/sfr/next/next/tools/include/linux/bitmap.h:5:10: fatal error: linux/align.h: No such file or directory
> > >     5 | #include <linux/align.h>
> > >       |          ^~~~~~~~~~~~~~~
> > > 
> > > Caused by commit
> > > 
> > >   ed46ac8199f0 ("bitmap: introduce generic optimized bitmap_size()")
> > > 
> > > I have used the bitmap tree from next-20231018 for today.  
> > 
> > Thanks, Stephen. I'll take a look and let you know when it's resolved.  
> 
> So the problem is that the patch "bitmap: introduce generic optimized
> bitmap_size()" adds reference to the linux/align.h, which doesn't exist
> in tools.
> 
> I removed tools part of the patch entirely, and now tools/perf, for
> example, builds OK for me natively. The tree doesn't touch tools at
> all now, except for moving BYTES_TO_BITS() from a source file to a
> header, which looks safe.

Almost - see my other email.

> Can you please try the latest bitmap-for-next?

See above.

My "native" is PowerPC 64 LE.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bitmap tree
@ 2023-10-20  4:49 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2023-10-20  4:49 UTC (permalink / raw)
  To: Yury Norov
  Cc: Alexander Lobakin, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (native perf)
failed like this:

util/probe-finder.c: In function 'convert_variable_type':
util/probe-finder.c:336:51: error: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'int' [-Werror=format=]
  336 |                 ret = snprintf(buf, 16, "b%d@%d/%zd", bsize, boffs,
      |                                                 ~~^
      |                                                   |
      |                                                   long int
      |                                                 %d
cc1: all warnings being treated as errors

Caused by commit

  f14eba432b67 ("bitops: make BYTES_TO_BITS() treewide-available")

I have used the bitmap tree from next-20231018 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bitmap tree
  2023-10-19 15:58 ` Yury Norov
@ 2023-10-20  4:24   ` Yury Norov
  2023-10-20  4:51     ` Stephen Rothwell
  0 siblings, 1 reply; 20+ messages in thread
From: Yury Norov @ 2023-10-20  4:24 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Alexander Lobakin, Linux Kernel Mailing List, Linux Next Mailing List

On Thu, Oct 19, 2023 at 08:58:24AM -0700, Yury Norov wrote:
> On Thu, Oct 19, 2023 at 05:01:06PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > After merging the bitmap tree, today's linux-next build (native perf)
> > failed like this:
> > 
> > In file included from /home/sfr/next/next/tools/perf/util/header.h:10,
> >                  from /home/sfr/next/perf/pmu-events/pmu-events.c:3:
> > /home/sfr/next/next/tools/include/linux/bitmap.h:5:10: fatal error: linux/align.h: No such file or directory
> >     5 | #include <linux/align.h>
> >       |          ^~~~~~~~~~~~~~~
> > 
> > Caused by commit
> > 
> >   ed46ac8199f0 ("bitmap: introduce generic optimized bitmap_size()")
> > 
> > I have used the bitmap tree from next-20231018 for today.
> 
> Thanks, Stephen. I'll take a look and let you know when it's resolved.

Hi Stephen,

So the problem is that the patch "bitmap: introduce generic optimized
bitmap_size()" adds reference to the linux/align.h, which doesn't exist
in tools.

I removed tools part of the patch entirely, and now tools/perf, for
example, builds OK for me natively. The tree doesn't touch tools at
all now, except for moving BYTES_TO_BITS() from a source file to a
header, which looks safe.

Can you please try the latest bitmap-for-next?

Alexander, when you touch tools, it's can you build something from
it as part of your testing? I usually build tools/perf.

Thanks,
Yury

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

* Re: linux-next: build failure after merge of the bitmap tree
  2023-10-19  6:01 Stephen Rothwell
@ 2023-10-19 15:58 ` Yury Norov
  2023-10-20  4:24   ` Yury Norov
  0 siblings, 1 reply; 20+ messages in thread
From: Yury Norov @ 2023-10-19 15:58 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Alexander Lobakin, Linux Kernel Mailing List, Linux Next Mailing List

On Thu, Oct 19, 2023 at 05:01:06PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the bitmap tree, today's linux-next build (native perf)
> failed like this:
> 
> In file included from /home/sfr/next/next/tools/perf/util/header.h:10,
>                  from /home/sfr/next/perf/pmu-events/pmu-events.c:3:
> /home/sfr/next/next/tools/include/linux/bitmap.h:5:10: fatal error: linux/align.h: No such file or directory
>     5 | #include <linux/align.h>
>       |          ^~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   ed46ac8199f0 ("bitmap: introduce generic optimized bitmap_size()")
> 
> I have used the bitmap tree from next-20231018 for today.

Thanks, Stephen. I'll take a look and let you know when it's resolved.

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

* linux-next: build failure after merge of the bitmap tree
@ 2023-10-19  6:01 Stephen Rothwell
  2023-10-19 15:58 ` Yury Norov
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2023-10-19  6:01 UTC (permalink / raw)
  To: Yury Norov
  Cc: Alexander Lobakin, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (native perf)
failed like this:

In file included from /home/sfr/next/next/tools/perf/util/header.h:10,
                 from /home/sfr/next/perf/pmu-events/pmu-events.c:3:
/home/sfr/next/next/tools/include/linux/bitmap.h:5:10: fatal error: linux/align.h: No such file or directory
    5 | #include <linux/align.h>
      |          ^~~~~~~~~~~~~~~

Caused by commit

  ed46ac8199f0 ("bitmap: introduce generic optimized bitmap_size()")

I have used the bitmap tree from next-20231018 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bitmap tree
  2022-09-27  0:37 ` Yury Norov
@ 2022-09-27 18:56   ` Mark Brown
  0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2022-09-27 18:56 UTC (permalink / raw)
  To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

On Mon, Sep 26, 2022 at 05:37:46PM -0700, Yury Norov wrote:
> On Tue, Sep 27, 2022 at 12:53:48AM +0100, broonie@kernel.org wrote:

> > After merging the bitmap tree, today's linux-next build (x86
> > allmodconfig) failed like this:

> Hmm, this weird. I checked the next-20220923, and the drivers' code
> mentioned in the log differs from what I see, and looks correct.
> bitmap_weight() definition hasn't been changed in bitmap-for-next
> patches.

> Allmodconfig build looks good to me.

> Check what I see in next-20220923 below.

I'm seeing the same issue again today, the driver hasn't changed here -
the 

> > /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:3: note: in expansion of macro 'dev_err'
> >   492 |   dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
> >       |   ^~~~~~~
> > /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:51: note: format string is defined here
> >   492 |   dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
> >       |                                                 ~~^
> >       |                                                   |
> >       |                                                   long unsigned int
> >       |                                                 %u

>                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
>                         __func__, bitmap_weight(table->id_bmap, table->tot_ids));

This is coming from a patch Stephen had in his tree "fix up for
bitmap_weight return value changing" which had been in -next, apparently
fixing some other issue which had been in your tree.  With that removed
things seem fine.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bitmap tree
  2022-09-26 23:53 broonie
@ 2022-09-27  0:37 ` Yury Norov
  2022-09-27 18:56   ` Mark Brown
  0 siblings, 1 reply; 20+ messages in thread
From: Yury Norov @ 2022-09-27  0:37 UTC (permalink / raw)
  To: broonie; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Sep 27, 2022 at 12:53:48AM +0100, broonie@kernel.org wrote:
> Hi all,
> 
> After merging the bitmap tree, today's linux-next build (x86
> allmodconfig) failed like this:

Hmm, this weird. I checked the next-20220923, and the drivers' code
mentioned in the log differs from what I see, and looks correct.
bitmap_weight() definition hasn't been changed in bitmap-for-next
patches.

Allmodconfig build looks good to me.

Check what I see in next-20220923 below.

Thanks,
Yury
 
> /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:3: note: in expansion of macro 'dev_err'
>   492 |   dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
>       |   ^~~~~~~
> /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:51: note: format string is defined here
>   492 |   dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
>       |                                                 ~~^
>       |                                                   |
>       |                                                   long unsigned int
>       |                                                 %u

                dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
                        __func__, bitmap_weight(table->id_bmap, table->tot_ids));

> /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:22: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
>   525 |   dev_info(rvu->dev, "%s: No space in exact cam table, weight=%lu\n", __func__,
>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
                         bitmap_weight(table->cam_table.bmap, table->cam_table.depth));jj

> /tmp/next/build/drivers/gpu/drm/i915/gt/intel_sseu.c:867:39: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
>   867 |   seq_printf(m, "  %s Geometry DSS: %lu\n", type,
>       |                                     ~~^
>       |                                       |
>       |                                       long unsigned int
>       |                                     %u
>   868 |       bitmap_weight(sseu->geometry_subslice_mask.xehp,
>       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |       |
>       |       unsigned int
>   869 |       XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));

                seq_printf(m, "  %s Geometry DSS: %u\n", type,
                           bitmap_weight(sseu->geometry_subslice_mask.xehp,
                                         XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));


>       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/drivers/gpu/drm/i915/gt/intel_sseu.c:870:38: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
>   870 |   seq_printf(m, "  %s Compute DSS: %lu\n", type,
>       |                                    ~~^
>       |                                      |
>       |                                      long unsigned int
>       |                                    %u
>   871 |       bitmap_weight(sseu->compute_subslice_mask.xehp,
>       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |       |
>       |       unsigned int
>   872 |       XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));

                           bitmap_weight(sseu->compute_subslice_mask.xehp,
                                         XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));

>       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> These look like they have probably been there for a while but I've used
> a slightly different compiler version to Stephen so they're showing up
> now once the bitmap tree is merged.  I will have a proper look tomorrow
> hopefully but for now I've dropped the bitmap tree as it's getting very
> late and it is likely I'll not finish the -next run today at all.

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

* linux-next: build failure after merge of the bitmap tree
@ 2022-09-26 23:53 broonie
  2022-09-27  0:37 ` Yury Norov
  0 siblings, 1 reply; 20+ messages in thread
From: broonie @ 2022-09-26 23:53 UTC (permalink / raw)
  To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

Hi all,

After merging the bitmap tree, today's linux-next build (x86
allmodconfig) failed like this:

In file included from /tmp/next/build/include/linux/printk.h:573,
                 from /tmp/next/build/include/linux/kernel.h:29,
                 from /tmp/next/build/arch/x86/include/asm/percpu.h:27,
                 from /tmp/next/build/arch/x86/include/asm/nospec-branch.h:14,
                 from /tmp/next/build/arch/x86/include/asm/paravirt_types.h:40,
                 from /tmp/next/build/arch/x86/include/asm/ptrace.h:97,
                 from /tmp/next/build/arch/x86/include/asm/math_emu.h:5,
                 from /tmp/next/build/arch/x86/include/asm/processor.h:13,
                 from /tmp/next/build/arch/x86/include/asm/timex.h:5,
                 from /tmp/next/build/include/linux/timex.h:67,
                 from /tmp/next/build/include/linux/time32.h:13,
                 from /tmp/next/build/include/linux/time.h:60,
                 from /tmp/next/build/include/linux/stat.h:19,
                 from /tmp/next/build/include/linux/module.h:13,
                 from /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:9:
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_mem_table_entry':
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:20: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format=]
  454 |  dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%lu\n", __func__,
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dynamic_debug.h:223:15: note: in definition of macro '__dynamic_func_call_cls'
  223 |   func(&id, ##__VA_ARGS__);   \
      |               ^~~~~~~~~~~
/tmp/next/build/include/linux/dynamic_debug.h:249:2: note: in expansion of macro '_dynamic_func_call_cls'
  249 |  _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dynamic_debug.h:272:2: note: in expansion of macro '_dynamic_func_call'
  272 |  _dynamic_func_call(fmt, __dynamic_dev_dbg,   \
      |  ^~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dev_printk.h:155:2: note: in expansion of macro 'dynamic_dev_dbg'
  155 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dev_printk.h:155:23: note: in expansion of macro 'dev_fmt'
  155 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                       ^~~~~~~
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:2: note: in expansion of macro 'dev_dbg'
  454 |  dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%lu\n", __func__,
      |  ^~~~~~~
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:63: note: format string is defined here
  454 |  dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%lu\n", __func__,
      |                                                             ~~^
      |                                                               |
      |                                                               long unsigned int
      |                                                             %u
In file included from /tmp/next/build/include/linux/device.h:15,
                 from /tmp/next/build/include/linux/pci.h:37,
                 from /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_id':
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
  492 |   dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dev_printk.h:110:16: note: in definition of macro 'dev_printk_index_wrap'
  110 |   _p_func(dev, fmt, ##__VA_ARGS__);   \
      |                ^~~
/tmp/next/build/include/linux/dev_printk.h:144:49: note: in expansion of macro 'dev_fmt'
  144 |  dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                 ^~~~~~~
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:3: note: in expansion of macro 'dev_err'
  492 |   dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
      |   ^~~~~~~
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:51: note: format string is defined here
  492 |   dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
      |                                                 ~~^
      |                                                   |
      |                                                   long unsigned int
      |                                                 %u
In file included from /tmp/next/build/include/linux/device.h:15,
                 from /tmp/next/build/include/linux/pci.h:37,
                 from /tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_cam_table_entry':
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:22: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
  525 |   dev_info(rvu->dev, "%s: No space in exact cam table, weight=%lu\n", __func__,
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/dev_printk.h:110:16: note: in definition of macro 'dev_printk_index_wrap'
  110 |   _p_func(dev, fmt, ##__VA_ARGS__);   \
      |                ^~~
/tmp/next/build/include/linux/dev_printk.h:150:51: note: in expansion of macro 'dev_fmt'
  150 |  dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                   ^~~~~~~
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:3: note: in expansion of macro 'dev_info'
  525 |   dev_info(rvu->dev, "%s: No space in exact cam table, weight=%lu\n", __func__,
      |   ^~~~~~~~
/tmp/next/build/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:65: note: format string is defined here
  525 |   dev_info(rvu->dev, "%s: No space in exact cam table, weight=%lu\n", __func__,
      |                                                               ~~^
      |                                                                 |
      |                                                                 long unsigned int
      |                                                               %u
cc1: all warnings being treated as errors
make[8]: *** [/tmp/next/build/scripts/Makefile.build:249: drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.o] Error 1
make[7]: *** [/tmp/next/build/scripts/Makefile.build:440: drivers/net/ethernet/marvell/octeontx2/af] Error 2
make[6]: *** [/tmp/next/build/scripts/Makefile.build:440: drivers/net/ethernet/marvell/octeontx2] Error 2
make[5]: *** [/tmp/next/build/scripts/Makefile.build:440: drivers/net/ethernet/marvell] Error 2
make[5]: *** Waiting for unfinished jobs....
/tmp/next/build/drivers/gpu/drm/i915/gt/intel_sseu.c: In function 'intel_sseu_print_ss_info':
/tmp/next/build/drivers/gpu/drm/i915/gt/intel_sseu.c:867:39: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
  867 |   seq_printf(m, "  %s Geometry DSS: %lu\n", type,
      |                                     ~~^
      |                                       |
      |                                       long unsigned int
      |                                     %u
  868 |       bitmap_weight(sseu->geometry_subslice_mask.xehp,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |       |
      |       unsigned int
  869 |       XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/next/build/drivers/gpu/drm/i915/gt/intel_sseu.c:870:38: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format=]
  870 |   seq_printf(m, "  %s Compute DSS: %lu\n", type,
      |                                    ~~^
      |                                      |
      |                                      long unsigned int
      |                                    %u
  871 |       bitmap_weight(sseu->compute_subslice_mask.xehp,
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |       |
      |       unsigned int
  872 |       XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

These look like they have probably been there for a while but I've used
a slightly different compiler version to Stephen so they're showing up
now once the bitmap tree is merged.  I will have a proper look tomorrow
hopefully but for now I've dropped the bitmap tree as it's getting very
late and it is likely I'll not finish the -next run today at all.

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

* Re: linux-next: build failure after merge of the bitmap tree
  2022-09-20  8:08 Stephen Rothwell
@ 2022-09-20 14:49 ` Yury Norov
  0 siblings, 0 replies; 20+ messages in thread
From: Yury Norov @ 2022-09-20 14:49 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Sep 20, 2022 at 06:08:39PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the bitmap tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> ld: arch/powerpc/kernel/head_64.o: in function `generic_secondary_common_init':
> (.text+0x545e): undefined reference to `nr_cpu_ids'
> 
> Caused by commit
> 
>   c90c5bd9f2d6 ("lib/cpumask: add FORCE_NR_CPUS config option")
> 
> This build has CONFIG_FORCE_NR_CPUS set but the (assembler) code expects
> nr_cpu_ids to be a variable ...
> 
> I have reverted that commit for today.

Thanks for report, Stephen.

I did PPC build for bitmap-for-next, and it was OK on top of
v6-rc4. On today's -next I can reproduce the failure. It's weird
because the code in trouble was added at 2011 in 768d18ad6d5e6
("powerpc: Don't search for paca in freed memory").

Anyways, the fix is straightforward. I updated the bitmap-for-next
with it, and will send it for review shortly.
--

diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index cf2c08902c05..7cb97881635e 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -400,7 +400,11 @@ generic_secondary_common_init:
 #else
        LOAD_REG_ADDR(r8, paca_ptrs)    /* Load paca_ptrs pointe         */
        ld      r8,0(r8)                /* Get base vaddr of array       */
+#if (NR_CPUS == 1) || defined(CONFIG_FORCE_NR_CPUS)
+       LOAD_REG_IMMEDIATE(r7, NR_CPUS)
+#else
        LOAD_REG_ADDR(r7, nr_cpu_ids)   /* Load nr_cpu_ids address       */
+#endif
        lwz     r7,0(r7)                /* also the max paca allocated   */
        li      r5,0                    /* logical cpu id                */
 1:


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

* linux-next: build failure after merge of the bitmap tree
@ 2022-09-20  8:08 Stephen Rothwell
  2022-09-20 14:49 ` Yury Norov
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2022-09-20  8:08 UTC (permalink / raw)
  To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (powerpc
allyesconfig) failed like this:

ld: arch/powerpc/kernel/head_64.o: in function `generic_secondary_common_init':
(.text+0x545e): undefined reference to `nr_cpu_ids'

Caused by commit

  c90c5bd9f2d6 ("lib/cpumask: add FORCE_NR_CPUS config option")

This build has CONFIG_FORCE_NR_CPUS set but the (assembler) code expects
nr_cpu_ids to be a variable ...

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bitmap tree
@ 2022-07-27 10:29 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2022-07-27 10:29 UTC (permalink / raw)
  To: Yury Norov
  Cc: Michael Ellerman, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ERROR: modpost: ".arch_get_random_seed_longs" [arch/powerpc/kvm/kvm-hv.ko] undefined!

Caused by commit

  c3aaaf9e2ada ("powerpc: drop dependency on <asm/machdep.h> in archrandom.h")

It seems that the EXPORT was needed.  I applied the following for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 27 Jul 2022 20:21:53 +1000
Subject: [PATCH] fixup for "powerpc: drop dependency on <asm/machdep.h> in
 archrandom.h"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/setup-common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 91f8982c61a0..463072ed40e8 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -177,6 +177,7 @@ size_t arch_get_random_seed_longs(unsigned long *v, size_t max_longs)
 		return 1;
 	return 0;
 }
+EXPORT_SYMBOL_GPL(arch_get_random_seed_longs);
 
 void machine_halt(void)
 {
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the bitmap tree
  2022-07-22  9:16 Stephen Rothwell
@ 2022-07-22 19:29 ` Yury Norov
  0 siblings, 0 replies; 20+ messages in thread
From: Yury Norov @ 2022-07-22 19:29 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

On Fri, Jul 22, 2022 at 07:16:57PM +1000, Stephen Rothwell wrote:
> Hi all,
 ...

> I am not sure which commit caused this.  Though I suspect
> 
>   bbe8fb1a3c53 ("lib/nodemask: inline next_node_in() and node_random()")
> 
> which added the include of random.h to nodemask.h
> 
> I have used the bitmap tree from next-20220721 for today.

Hi Stephen,

You're right. The problem in the last patch of the series. I've got
the fix already, and testing it now.

I'll drop the bbe8fb1a3c53 and submit it separately together with
header fix.

Thanks,
Yury

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

* linux-next: build failure after merge of the bitmap tree
@ 2022-07-22  9:16 Stephen Rothwell
  2022-07-22 19:29 ` Yury Norov
  0 siblings, 1 reply; 20+ messages in thread
From: Stephen Rothwell @ 2022-07-22  9:16 UTC (permalink / raw)
  To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from include/linux/cred.h:16,
                 from include/linux/seq_file.h:13,
                 from arch/powerpc/include/asm/machdep.h:6,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/sched.h:1203:9: error: unknown type name 'nodemask_t'
 1203 |         nodemask_t                      mems_allowed;
      |         ^~~~~~~~~~
In file included from include/linux/gfp.h:7,
                 from include/linux/percpu_counter.h:16,
                 from include/linux/sched/user.h:7,
                 from include/linux/cred.h:17,
                 from include/linux/seq_file.h:13,
                 from arch/powerpc/include/asm/machdep.h:6,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/mmzone.h:1166:41: error: unknown type name 'nodemask_t'
 1166 |                                         nodemask_t *nodes);
      |                                         ^~~~~~~~~~
In file included from include/linux/gfp.h:7,
                 from include/linux/percpu_counter.h:16,
                 from include/linux/sched/user.h:7,
                 from include/linux/cred.h:17,
                 from include/linux/seq_file.h:13,
                 from arch/powerpc/include/asm/machdep.h:6,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/mmzone.h:1185:41: error: unknown type name 'nodemask_t'
 1185 |                                         nodemask_t *nodes)
      |                                         ^~~~~~~~~~
include/linux/mmzone.h:1211:41: error: unknown type name 'nodemask_t'
 1211 |                                         nodemask_t *nodes)
      |                                         ^~~~~~~~~~
include/linux/mmzone.h:1254:39: error: unknown type name 'nodemask_t'
 1254 | static inline bool movable_only_nodes(nodemask_t *nodes)
      |                                       ^~~~~~~~~~
In file included from include/linux/percpu_counter.h:16,
                 from include/linux/sched/user.h:7,
                 from include/linux/cred.h:17,
                 from include/linux/seq_file.h:13,
                 from arch/powerpc/include/asm/machdep.h:6,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/gfp.h:198:17: error: unknown type name 'nodemask_t'
  198 |                 nodemask_t *nodemask);
      |                 ^~~~~~~~~~
include/linux/gfp.h:200:17: error: unknown type name 'nodemask_t'
  200 |                 nodemask_t *nodemask);
      |                 ^~~~~~~~~~
include/linux/gfp.h:203:33: error: unknown type name 'nodemask_t'
  203 |                                 nodemask_t *nodemask, int nr_pages,
      |                                 ^~~~~~~~~~
include/linux/gfp.h: In function 'alloc_pages_bulk_list':
include/linux/gfp.h:215:16: error: implicit declaration of function '__alloc_pages_bulk'; did you mean 'alloc_pages_bulk_list'? [-Werror=implicit-function-declaration]
  215 |         return __alloc_pages_bulk(gfp, numa_mem_id(), NULL, nr_pages, list, NULL);
      |                ^~~~~~~~~~~~~~~~~~
      |                alloc_pages_bulk_list
In file included from include/linux/container_of.h:5,
                 from include/linux/list.h:5,
                 from include/linux/preempt.h:11,
                 from include/linux/spinlock.h:55,
                 from include/linux/ipc.h:5,
                 from include/uapi/linux/sem.h:5,
                 from include/linux/sem.h:5,
                 from include/linux/compat.h:14,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/gfp.h: In function '__alloc_pages_node':
include/linux/gfp.h:241:52: error: implicit declaration of function 'node_online'; did you mean 'node_zonelist'? [-Werror=implicit-function-declaration]
  241 |         VM_WARN_ON((gfp_mask & __GFP_THISNODE) && !node_online(nid));
      |                                                    ^~~~~~~~~~~
include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
   30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
      |                                                               ^
include/linux/gfp.h:241:9: note: in expansion of macro 'VM_WARN_ON'
  241 |         VM_WARN_ON((gfp_mask & __GFP_THISNODE) && !node_online(nid));
      |         ^~~~~~~~~~
In file included from include/linux/percpu_counter.h:16,
                 from include/linux/sched/user.h:7,
                 from include/linux/cred.h:17,
                 from include/linux/seq_file.h:13,
                 from arch/powerpc/include/asm/machdep.h:6,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/gfp.h:243:16: error: implicit declaration of function '__alloc_pages'; did you mean '__add_pages'? [-Werror=implicit-function-declaration]
  243 |         return __alloc_pages(gfp_mask, order, nid, NULL);
      |                ^~~~~~~~~~~~~
      |                __add_pages
include/linux/gfp.h:243:16: warning: returning 'int' from a function with return type 'struct page *' makes pointer from integer without a cast [-Wint-conversion]
  243 |         return __alloc_pages(gfp_mask, order, nid, NULL);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/gfp.h: In function '__folio_alloc_node':
include/linux/gfp.h:252:16: error: implicit declaration of function '__folio_alloc'; did you mean '__folio_alloc_node'? [-Werror=implicit-function-declaration]
  252 |         return __folio_alloc(gfp, order, nid, NULL);
      |                ^~~~~~~~~~~~~
      |                __folio_alloc_node
include/linux/gfp.h:252:16: warning: returning 'int' from a function with return type 'struct folio *' makes pointer from integer without a cast [-Wint-conversion]
  252 |         return __folio_alloc(gfp, order, nid, NULL);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/gfp.h: At top level:
include/linux/gfp.h:366:49: error: unknown type name 'nodemask_t'
  366 |                                        int nid, nodemask_t *nodemask);
      |                                                 ^~~~~~~~~~
In file included from include/linux/mm.h:703,
                 from include/linux/scatterlist.h:8,
                 from include/linux/dma-mapping.h:10,
                 from arch/powerpc/include/asm/machdep.h:8,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/huge_mm.h: In function '__transparent_hugepage_enabled':
include/linux/huge_mm.h:166:13: error: implicit declaration of function 'vma_is_dax' [-Werror=implicit-function-declaration]
  166 |         if (vma_is_dax(vma))
      |             ^~~~~~~~~~
include/linux/huge_mm.h: In function 'file_thp_enabled':
include/linux/huge_mm.h:183:29: error: invalid use of undefined type 'struct file'
  183 |         inode = vma->vm_file->f_inode;
      |                             ^~
include/linux/huge_mm.h:187:17: error: implicit declaration of function 'inode_is_open_for_write' [-Werror=implicit-function-declaration]
  187 |                !inode_is_open_for_write(inode) && S_ISREG(inode->i_mode);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/stat.h:7,
                 from include/linux/compat.h:12,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/huge_mm.h:187:64: error: invalid use of undefined type 'struct inode'
  187 |                !inode_is_open_for_write(inode) && S_ISREG(inode->i_mode);
      |                                                                ^~
include/uapi/linux/stat.h:22:28: note: in definition of macro 'S_ISREG'
   22 | #define S_ISREG(m)      (((m) & S_IFMT) == S_IFREG)
      |                            ^
In file included from include/linux/scatterlist.h:8,
                 from include/linux/dma-mapping.h:10,
                 from arch/powerpc/include/asm/machdep.h:8,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/mm.h: At top level:
include/linux/mm.h:1833:49: error: unknown type name 'nodemask_t'
 1833 | extern void show_free_areas(unsigned int flags, nodemask_t *nodemask);
      |                                                 ^~~~~~~~~~
include/linux/mm.h: In function 'get_num_physpages':
include/linux/mm.h:2518:9: error: implicit declaration of function 'for_each_online_node'; did you mean 'for_each_online_pgdat'? [-Werror=implicit-function-declaration]
 2518 |         for_each_online_node(nid)
      |         ^~~~~~~~~~~~~~~~~~~~
      |         for_each_online_pgdat
include/linux/mm.h:2518:34: error: expected ';' before 'phys_pages'
 2518 |         for_each_online_node(nid)
      |                                  ^
      |                                  ;
 2519 |                 phys_pages += node_present_pages(nid);
      |                 ~~~~~~~~~~        
include/linux/mm.h: At top level:
include/linux/mm.h:2569:42: error: unknown type name 'nodemask_t'
 2569 | extern void show_mem(unsigned int flags, nodemask_t *nodemask);
      |                                          ^~~~~~~~~~
include/linux/mm.h:2578:33: error: unknown type name 'nodemask_t'
 2578 | void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...);
      |                                 ^~~~~~~~~~
include/linux/mm.h: In function 'seal_check_future_write':
include/linux/mm.h:3411:21: error: 'F_SEAL_FUTURE_WRITE' undeclared (first use in this function)
 3411 |         if (seals & F_SEAL_FUTURE_WRITE) {
      |                     ^~~~~~~~~~~~~~~~~~~
include/linux/mm.h:3411:21: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/fs.h: At top level:
include/linux/fs.h:2977:20: error: conflicting types for 'inode_is_open_for_write'; have 'bool(const struct inode *)' {aka '_Bool(const struct inode *)'}
 2977 | static inline bool inode_is_open_for_write(const struct inode *inode)
      |                    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/mm.h:703,
                 from include/linux/scatterlist.h:8,
                 from include/linux/dma-mapping.h:10,
                 from arch/powerpc/include/asm/machdep.h:8,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/huge_mm.h:187:17: note: previous implicit declaration of 'inode_is_open_for_write' with type 'int()'
  187 |                !inode_is_open_for_write(inode) && S_ISREG(inode->i_mode);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/fs.h:3364:20: error: conflicting types for 'vma_is_dax'; have 'bool(const struct vm_area_struct *)' {aka '_Bool(const struct vm_area_struct *)'}
 3364 | static inline bool vma_is_dax(const struct vm_area_struct *vma)
      |                    ^~~~~~~~~~
In file included from include/linux/mm.h:703,
                 from include/linux/scatterlist.h:8,
                 from include/linux/dma-mapping.h:10,
                 from arch/powerpc/include/asm/machdep.h:8,
                 from arch/powerpc/include/asm/archrandom.h:5,
                 from include/linux/random.h:109,
                 from include/linux/nodemask.h:97,
                 from include/linux/list_lru.h:12,
                 from include/linux/fs.h:13,
                 from include/linux/compat.h:17,
                 from arch/powerpc/kernel/asm-offsets.c:12:
include/linux/huge_mm.h:166:13: note: previous implicit declaration of 'vma_is_dax' with type 'int()'
  166 |         if (vma_is_dax(vma))
      |             ^~~~~~~~~~

I am not sure which commit caused this.  Though I suspect

  bbe8fb1a3c53 ("lib/nodemask: inline next_node_in() and node_random()")

which added the include of random.h to nodemask.h

I have used the bitmap tree from next-20220721 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bitmap tree
@ 2022-07-15 10:29 ` Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2022-07-15 10:29 UTC (permalink / raw)
  To: Yury Norov, Dave Airlie, David Miller
  Cc: Networking, DRI, Matt Roper, Jakub Kicinski, Ratheesh Kannoth,
	Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/gpu/drm/i915/gt/intel_sseu.c: In function 'intel_sseu_print_ss_info':
drivers/gpu/drm/i915/gt/intel_sseu.c:868:52: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  868 |                 seq_printf(m, "  %s Geometry DSS: %u\n", type,
      |                                                   ~^
      |                                                    |
      |                                                    unsigned int
      |                                                   %lu
  869 |                            bitmap_weight(sseu->geometry_subslice_mask.xehp,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            long unsigned int
  870 |                                          XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_sseu.c:871:51: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  871 |                 seq_printf(m, "  %s Compute DSS: %u\n", type,
      |                                                  ~^
      |                                                   |
      |                                                   unsigned int
      |                                                  %lu
  872 |                            bitmap_weight(sseu->compute_subslice_mask.xehp,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            long unsigned int
  873 |                                          XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
In file included from include/linux/printk.h:573,
                 from include/linux/kernel.h:29,
                 from arch/x86/include/asm/percpu.h:27,
                 from arch/x86/include/asm/nospec-branch.h:14,
                 from arch/x86/include/asm/paravirt_types.h:40,
                 from arch/x86/include/asm/ptrace.h:97,
                 from arch/x86/include/asm/math_emu.h:5,
                 from arch/x86/include/asm/processor.h:13,
                 from arch/x86/include/asm/timex.h:5,
                 from include/linux/timex.h:67,
                 from include/linux/time32.h:13,
                 from include/linux/time.h:60,
                 from include/linux/stat.h:19,
                 from include/linux/module.h:13,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:9:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_mem_table_entry':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:27: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Werror=format=]
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:9: note: in expansion of macro 'dev_dbg'
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |         ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:69: note: format string is defined here
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |                                                                    ~^
      |                                                                     |
      |                                                                     unsigned int
      |                                                                    %lu
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_id':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:35: error: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
  144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                        ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:17: note: in expansion of macro 'dev_err'
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                 ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:64: note: format string is defined here
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                                                               ~^
      |                                                                |
      |                                                                int
      |                                                               %ld
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_cam_table_entry':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:36: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
  150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                          ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:17: note: in expansion of macro 'dev_info'
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                 ^~~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:78: note: format string is defined here
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                                                                             ~^
      |                                                                              |
      |                                                                              unsigned int
      |                                                                             %lu
cc1: all warnings being treated as errors

Caused by commit

  31563fb891aa ("lib/bitmap: change type of bitmap_weight to unsigned long")

interacting with commits

  b87d39019651 ("drm/i915/sseu: Disassociate internal subslice mask representation from uapi")

from the drm tree and

  b747923afff8 ("octeontx2-af: Exact match support")

from the net-next tree.

I have applied the following merge resolution patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 15 Jul 2022 20:20:15 +1000
Subject: [PATCH] fix up for bitmap_weight return value changing

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/gt/intel_sseu.c                     | 4 ++--
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
index c6d3050604c8..79fa564785b6 100644
--- a/drivers/gpu/drm/i915/gt/intel_sseu.c
+++ b/drivers/gpu/drm/i915/gt/intel_sseu.c
@@ -865,10 +865,10 @@ void intel_sseu_print_ss_info(const char *type,
 	int s;
 
 	if (sseu->has_xehp_dss) {
-		seq_printf(m, "  %s Geometry DSS: %u\n", type,
+		seq_printf(m, "  %s Geometry DSS: %lu\n", type,
 			   bitmap_weight(sseu->geometry_subslice_mask.xehp,
 					 XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));
-		seq_printf(m, "  %s Compute DSS: %u\n", type,
+		seq_printf(m, "  %s Compute DSS: %lu\n", type,
 			   bitmap_weight(sseu->compute_subslice_mask.xehp,
 					 XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));
 	} else {
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
index 1195b690f483..2f4ce41df83c 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
@@ -451,7 +451,7 @@ static int rvu_npc_exact_alloc_mem_table_entry(struct rvu *rvu, u8 *way,
 	}
 	mutex_unlock(&table->lock);
 
-	dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
+	dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%lu\n", __func__,
 		bitmap_weight(table->mem_table.bmap, table->mem_table.depth));
 	return -ENOSPC;
 }
@@ -489,7 +489,7 @@ static bool rvu_npc_exact_alloc_id(struct rvu *rvu, u32 *seq_id)
 	idx = find_first_zero_bit(table->id_bmap, table->tot_ids);
 	if (idx == table->tot_ids) {
 		mutex_unlock(&table->lock);
-		dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
+		dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
 			__func__, bitmap_weight(table->id_bmap, table->tot_ids));
 
 		return false;
@@ -522,7 +522,7 @@ static int rvu_npc_exact_alloc_cam_table_entry(struct rvu *rvu, int *index)
 	idx = find_first_zero_bit(table->cam_table.bmap, table->cam_table.depth);
 	if (idx == table->cam_table.depth) {
 		mutex_unlock(&table->lock);
-		dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
+		dev_info(rvu->dev, "%s: No space in exact cam table, weight=%lu\n", __func__,
 			 bitmap_weight(table->cam_table.bmap, table->cam_table.depth));
 		return -ENOSPC;
 	}
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bitmap tree
@ 2022-07-15 10:29 ` Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2022-07-15 10:29 UTC (permalink / raw)
  To: Yury Norov, Dave Airlie, David Miller
  Cc: Ratheesh Kannoth, Networking, Linux Kernel Mailing List, DRI,
	Linux Next Mailing List, Jakub Kicinski

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

Hi all,

After merging the bitmap tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/gpu/drm/i915/gt/intel_sseu.c: In function 'intel_sseu_print_ss_info':
drivers/gpu/drm/i915/gt/intel_sseu.c:868:52: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  868 |                 seq_printf(m, "  %s Geometry DSS: %u\n", type,
      |                                                   ~^
      |                                                    |
      |                                                    unsigned int
      |                                                   %lu
  869 |                            bitmap_weight(sseu->geometry_subslice_mask.xehp,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            long unsigned int
  870 |                                          XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gt/intel_sseu.c:871:51: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  871 |                 seq_printf(m, "  %s Compute DSS: %u\n", type,
      |                                                  ~^
      |                                                   |
      |                                                   unsigned int
      |                                                  %lu
  872 |                            bitmap_weight(sseu->compute_subslice_mask.xehp,
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            long unsigned int
  873 |                                          XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));
      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
In file included from include/linux/printk.h:573,
                 from include/linux/kernel.h:29,
                 from arch/x86/include/asm/percpu.h:27,
                 from arch/x86/include/asm/nospec-branch.h:14,
                 from arch/x86/include/asm/paravirt_types.h:40,
                 from arch/x86/include/asm/ptrace.h:97,
                 from arch/x86/include/asm/math_emu.h:5,
                 from arch/x86/include/asm/processor.h:13,
                 from arch/x86/include/asm/timex.h:5,
                 from include/linux/timex.h:67,
                 from include/linux/time32.h:13,
                 from include/linux/time.h:60,
                 from include/linux/stat.h:19,
                 from include/linux/module.h:13,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:9:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_mem_table_entry':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:27: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Werror=format=]
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:9: note: in expansion of macro 'dev_dbg'
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |         ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:454:69: note: format string is defined here
  454 |         dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
      |                                                                    ~^
      |                                                                     |
      |                                                                     unsigned int
      |                                                                    %lu
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_id':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:35: error: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
  144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                        ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:17: note: in expansion of macro 'dev_err'
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                 ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:492:64: note: format string is defined here
  492 |                 dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
      |                                                               ~^
      |                                                                |
      |                                                                int
      |                                                               %ld
In file included from include/linux/device.h:15,
                 from include/linux/pci.h:37,
                 from drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:10:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c: In function 'rvu_npc_exact_alloc_cam_table_entry':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:36: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=]
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
include/linux/dev_printk.h:150:58: note: in expansion of macro 'dev_fmt'
  150 |         dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                          ^~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:17: note: in expansion of macro 'dev_info'
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                 ^~~~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c:525:78: note: format string is defined here
  525 |                 dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
      |                                                                             ~^
      |                                                                              |
      |                                                                              unsigned int
      |                                                                             %lu
cc1: all warnings being treated as errors

Caused by commit

  31563fb891aa ("lib/bitmap: change type of bitmap_weight to unsigned long")

interacting with commits

  b87d39019651 ("drm/i915/sseu: Disassociate internal subslice mask representation from uapi")

from the drm tree and

  b747923afff8 ("octeontx2-af: Exact match support")

from the net-next tree.

I have applied the following merge resolution patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 15 Jul 2022 20:20:15 +1000
Subject: [PATCH] fix up for bitmap_weight return value changing

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/i915/gt/intel_sseu.c                     | 4 ++--
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.c b/drivers/gpu/drm/i915/gt/intel_sseu.c
index c6d3050604c8..79fa564785b6 100644
--- a/drivers/gpu/drm/i915/gt/intel_sseu.c
+++ b/drivers/gpu/drm/i915/gt/intel_sseu.c
@@ -865,10 +865,10 @@ void intel_sseu_print_ss_info(const char *type,
 	int s;
 
 	if (sseu->has_xehp_dss) {
-		seq_printf(m, "  %s Geometry DSS: %u\n", type,
+		seq_printf(m, "  %s Geometry DSS: %lu\n", type,
 			   bitmap_weight(sseu->geometry_subslice_mask.xehp,
 					 XEHP_BITMAP_BITS(sseu->geometry_subslice_mask)));
-		seq_printf(m, "  %s Compute DSS: %u\n", type,
+		seq_printf(m, "  %s Compute DSS: %lu\n", type,
 			   bitmap_weight(sseu->compute_subslice_mask.xehp,
 					 XEHP_BITMAP_BITS(sseu->compute_subslice_mask)));
 	} else {
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
index 1195b690f483..2f4ce41df83c 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
@@ -451,7 +451,7 @@ static int rvu_npc_exact_alloc_mem_table_entry(struct rvu *rvu, u8 *way,
 	}
 	mutex_unlock(&table->lock);
 
-	dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%u\n", __func__,
+	dev_dbg(rvu->dev, "%s: No space in 4 way exact way, weight=%lu\n", __func__,
 		bitmap_weight(table->mem_table.bmap, table->mem_table.depth));
 	return -ENOSPC;
 }
@@ -489,7 +489,7 @@ static bool rvu_npc_exact_alloc_id(struct rvu *rvu, u32 *seq_id)
 	idx = find_first_zero_bit(table->id_bmap, table->tot_ids);
 	if (idx == table->tot_ids) {
 		mutex_unlock(&table->lock);
-		dev_err(rvu->dev, "%s: No space in id bitmap (%d)\n",
+		dev_err(rvu->dev, "%s: No space in id bitmap (%lu)\n",
 			__func__, bitmap_weight(table->id_bmap, table->tot_ids));
 
 		return false;
@@ -522,7 +522,7 @@ static int rvu_npc_exact_alloc_cam_table_entry(struct rvu *rvu, int *index)
 	idx = find_first_zero_bit(table->cam_table.bmap, table->cam_table.depth);
 	if (idx == table->cam_table.depth) {
 		mutex_unlock(&table->lock);
-		dev_info(rvu->dev, "%s: No space in exact cam table, weight=%u\n", __func__,
+		dev_info(rvu->dev, "%s: No space in exact cam table, weight=%lu\n", __func__,
 			 bitmap_weight(table->cam_table.bmap, table->cam_table.depth));
 		return -ENOSPC;
 	}
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bitmap tree
@ 2022-07-08  7:47 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2022-07-08  7:47 UTC (permalink / raw)
  To: Yury Norov
  Cc: Paul Menzel, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

lib/bitmap.c:351:6: error: conflicting types for '__bitmap_set'; have 'void(long unsigned int *, unsigned int,  unsigned int)'
  351 | void __bitmap_set(unsigned long *map, unsigned int start, unsigned int len)
      |      ^~~~~~~~~~~~
In file included from lib/bitmap.c:7:
include/linux/bitmap.h:167:6: note: previous declaration of '__bitmap_set' with type 'void(long unsigned int *, unsigned int,  int)'
  167 | void __bitmap_set(unsigned long *map, unsigned int start, int len);
      |      ^~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
                 from include/linux/printk.h:8,
                 from include/asm-generic/bug.h:22,
                 from arch/powerpc/include/asm/bug.h:158,
                 from include/linux/bug.h:5,
                 from lib/bitmap.c:9:
lib/bitmap.c:370:15: error: conflicting types for '__bitmap_set'; have 'void(long unsigned int *, unsigned int,  unsigned int)'
  370 | EXPORT_SYMBOL(__bitmap_set);
      |               ^~~~~~~~~~~~
include/linux/export.h:87:28: note: in definition of macro '___EXPORT_SYMBOL'
   87 |         extern typeof(sym) sym;                                                 \
      |                            ^~~
include/linux/export.h:147:41: note: in expansion of macro '__EXPORT_SYMBOL'
  147 | #define _EXPORT_SYMBOL(sym, sec)        __EXPORT_SYMBOL(sym, sec, "")
      |                                         ^~~~~~~~~~~~~~~
include/linux/export.h:150:41: note: in expansion of macro '_EXPORT_SYMBOL'
  150 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
      |                                         ^~~~~~~~~~~~~~
lib/bitmap.c:370:1: note: in expansion of macro 'EXPORT_SYMBOL'
  370 | EXPORT_SYMBOL(__bitmap_set);
      | ^~~~~~~~~~~~~
In file included from lib/bitmap.c:7:
include/linux/bitmap.h:167:6: note: previous declaration of '__bitmap_set' with type 'void(long unsigned int *, unsigned int,  int)'
  167 | void __bitmap_set(unsigned long *map, unsigned int start, int len);
      |      ^~~~~~~~~~~~

Caused by commit

  aaa4ab5ec044 ("lib/bitmap: Make length parameter `len` unsigned")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: build failure after merge of the bitmap tree
@ 2022-04-19  4:29 Stephen Rothwell
  0 siblings, 0 replies; 20+ messages in thread
From: Stephen Rothwell @ 2022-04-19  4:29 UTC (permalink / raw)
  To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the bitmap tree, today's linux-next build (native powerpcle
perf) failed like this:

../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int,  int)'
   21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
      |     ^~~~~~~~~~~~~~~~~~~
In file included from ../lib/bitmap.c:6:
tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int,  unsigned int)'
   15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
      |     ^~~~~~~~~~~~~~~~~~~
../lib/bitmap.c: In function '__bitmap_weight_cmp':
../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   26 |                 if (w + bits - k * BITS_PER_LONG < num)
      |                                                  ^
../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   31 |                 if (w > num)
      |                       ^
cc1: all warnings being treated as errors
tools/perf/../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int,  int)'
   21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
      |     ^~~~~~~~~~~~~~~~~~~
In file included from tools/perf/../lib/bitmap.c:6:
tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int,  unsigned int)'
   15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
      |     ^~~~~~~~~~~~~~~~~~~
tools/perf/../lib/bitmap.c: In function '__bitmap_weight_cmp':
tools/perf/../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   26 |                 if (w + bits - k * BITS_PER_LONG < num)
      |                                                  ^
tools/perf/../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
   31 |                 if (w > num)
      |                       ^
cc1: all warnings being treated as errors

Caused by commit

  bf04367e90b2 ("tools: bitmap: sync bitmap_weight")

I have dropped the bitmap tree for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2023-11-02 11:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02  8:15 linux-next: build failure after merge of the bitmap tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2023-10-20  4:49 Stephen Rothwell
2023-10-19  6:01 Stephen Rothwell
2023-10-19 15:58 ` Yury Norov
2023-10-20  4:24   ` Yury Norov
2023-10-20  4:51     ` Stephen Rothwell
2023-10-20 12:33       ` Yury Norov
2023-11-02 11:41         ` Alexander Lobakin
2022-09-26 23:53 broonie
2022-09-27  0:37 ` Yury Norov
2022-09-27 18:56   ` Mark Brown
2022-09-20  8:08 Stephen Rothwell
2022-09-20 14:49 ` Yury Norov
2022-07-27 10:29 Stephen Rothwell
2022-07-22  9:16 Stephen Rothwell
2022-07-22 19:29 ` Yury Norov
2022-07-15 10:29 Stephen Rothwell
2022-07-15 10:29 ` Stephen Rothwell
2022-07-08  7:47 Stephen Rothwell
2022-04-19  4:29 Stephen Rothwell

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.