2024-05-15 14:19:26

by Naresh Kamboju

[permalink] [raw]
Subject: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

The riscv builds failed on Linux next-20240515 tag due to following build
warnings / errors with gcc-13 and clang toolchain.

Reported-by: Linux Kernel Functional Testing <[email protected]>

Build Log:
-----
drivers/irqchip/irq-riscv-imsic-early.c: In function 'imsic_ipi_domain_init':
drivers/irqchip/irq-riscv-imsic-early.c:52:9: error: too many
arguments to function 'riscv_ipi_set_virq_range'
52 | riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI, true);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/smp.h:119,
from include/linux/lockdep.h:14,
from include/linux/spinlock.h:63,
from include/linux/sched.h:2142,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from drivers/irqchip/irq-riscv-imsic-early.c:8:
arch/riscv/include/asm/smp.h:52:6: note: declared here
52 | void riscv_ipi_set_virq_range(int virq, int nr);
| ^~~~~~~~~~~~~~~~~~~~~~~~

metadata:
git_describe: next-20240515
git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
git_sha: 82d92a9a1b9ea0ea52aff27cddd05009b4edad49
git_short_log: 82d92a9a1b9e ("Add linux-next specific files for 20240515")

Links:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/details/
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2gUiKdxX7qM27ritMJT5pRyZhyi/
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/history/

--
Linaro LKFT
https://lkft.linaro.org


2024-05-15 14:37:10

by Conor Dooley

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

Palmer,
This is the issue I point out to you on the call earlier:

On Wed, May 15, 2024 at 04:18:58PM +0200, Naresh Kamboju wrote:
> The riscv builds failed on Linux next-20240515 tag due to following build
> warnings / errors with gcc-13 and clang toolchain.
>
> Reported-by: Linux Kernel Functional Testing <[email protected]>
>
> Build Log:
> -----
> drivers/irqchip/irq-riscv-imsic-early.c: In function 'imsic_ipi_domain_init':
> drivers/irqchip/irq-riscv-imsic-early.c:52:9: error: too many
> arguments to function 'riscv_ipi_set_virq_range'
> 52 | riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI, true);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from include/linux/smp.h:119,
> from include/linux/lockdep.h:14,
> from include/linux/spinlock.h:63,
> from include/linux/sched.h:2142,
> from include/linux/ratelimit.h:6,
> from include/linux/dev_printk.h:16,
> from include/linux/device.h:15,
> from include/linux/node.h:18,
> from include/linux/cpu.h:17,
> from drivers/irqchip/irq-riscv-imsic-early.c:8:
> arch/riscv/include/asm/smp.h:52:6: note: declared here
> 52 | void riscv_ipi_set_virq_range(int virq, int nr);
> | ^~~~~~~~~~~~~~~~~~~~~~~~
>
> metadata:
> git_describe: next-20240515
> git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
> git_sha: 82d92a9a1b9ea0ea52aff27cddd05009b4edad49
> git_short_log: 82d92a9a1b9e ("Add linux-next specific files for 20240515")
>
> Links:
> - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/details/
> - https://storage.tuxsuite.com/public/linaro/lkft/builds/2gUiKdxX7qM27ritMJT5pRyZhyi/
> - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/history/
>
> --
> Linaro LKFT
> https://lkft.linaro.org
>


Attachments:
(No filename) (2.02 kB)
signature.asc (235.00 B)
Download all attachments

2024-05-15 17:10:41

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

On Wed, 15 May 2024 07:36:33 PDT (-0700), Conor Dooley wrote:
> Palmer,
> This is the issue I point out to you on the call earlier:

Ya, thanks, I just hit it. Looks like it's a semantic conflict between
21a8f8a0eb35 ("irqchip: Add RISC-V incoming MSI controller early
driver") and dc892fb44322 ("riscv: Use IPIs for remote cache/TLB flushes
by default"). I think all we need is

diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c
index 886418ec06cb..4fbb37074d29 100644
--- a/drivers/irqchip/irq-riscv-imsic-early.c
+++ b/drivers/irqchip/irq-riscv-imsic-early.c
@@ -49,7 +49,7 @@ static int __init imsic_ipi_domain_init(void)
return virq < 0 ? virq : -ENOMEM;

/* Set vIRQ range */
- riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI, true);
+ riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI);

/* Announce that IMSIC is providing IPIs */
pr_info("%pfwP: providing IPIs using interrupt %d\n", imsic->fwnode, IMSIC_IPI_ID);

as a conflict resolution, which IIUC should happen when Linus merges my
next PR. So I'll try and remember to call that out.

>
> On Wed, May 15, 2024 at 04:18:58PM +0200, Naresh Kamboju wrote:
>> The riscv builds failed on Linux next-20240515 tag due to following build
>> warnings / errors with gcc-13 and clang toolchain.
>>
>> Reported-by: Linux Kernel Functional Testing <[email protected]>
>>
>> Build Log:
>> -----
>> drivers/irqchip/irq-riscv-imsic-early.c: In function 'imsic_ipi_domain_init':
>> drivers/irqchip/irq-riscv-imsic-early.c:52:9: error: too many
>> arguments to function 'riscv_ipi_set_virq_range'
>> 52 | riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI, true);
>> | ^~~~~~~~~~~~~~~~~~~~~~~~
>> In file included from include/linux/smp.h:119,
>> from include/linux/lockdep.h:14,
>> from include/linux/spinlock.h:63,
>> from include/linux/sched.h:2142,
>> from include/linux/ratelimit.h:6,
>> from include/linux/dev_printk.h:16,
>> from include/linux/device.h:15,
>> from include/linux/node.h:18,
>> from include/linux/cpu.h:17,
>> from drivers/irqchip/irq-riscv-imsic-early.c:8:
>> arch/riscv/include/asm/smp.h:52:6: note: declared here
>> 52 | void riscv_ipi_set_virq_range(int virq, int nr);
>> | ^~~~~~~~~~~~~~~~~~~~~~~~
>>
>> metadata:
>> git_describe: next-20240515
>> git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
>> git_sha: 82d92a9a1b9ea0ea52aff27cddd05009b4edad49
>> git_short_log: 82d92a9a1b9e ("Add linux-next specific files for 20240515")
>>
>> Links:
>> - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/details/
>> - https://storage.tuxsuite.com/public/linaro/lkft/builds/2gUiKdxX7qM27ritMJT5pRyZhyi/
>> - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/history/
>>
>> --
>> Linaro LKFT
>> https://lkft.linaro.org
>>

2024-05-15 17:13:39

by Anup Patel

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

On Wed, May 15, 2024 at 10:36 PM Palmer Dabbelt <[email protected]> wrote:
>
> On Wed, 15 May 2024 07:36:33 PDT (-0700), Conor Dooley wrote:
> > Palmer,
> > This is the issue I point out to you on the call earlier:
>
> Ya, thanks, I just hit it. Looks like it's a semantic conflict between
> 21a8f8a0eb35 ("irqchip: Add RISC-V incoming MSI controller early
> driver") and dc892fb44322 ("riscv: Use IPIs for remote cache/TLB flushes
> by default"). I think all we need is
>
> diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c
> index 886418ec06cb..4fbb37074d29 100644
> --- a/drivers/irqchip/irq-riscv-imsic-early.c
> +++ b/drivers/irqchip/irq-riscv-imsic-early.c
> @@ -49,7 +49,7 @@ static int __init imsic_ipi_domain_init(void)
> return virq < 0 ? virq : -ENOMEM;
>
> /* Set vIRQ range */
> - riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI, true);
> + riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI);
>
> /* Announce that IMSIC is providing IPIs */
> pr_info("%pfwP: providing IPIs using interrupt %d\n", imsic->fwnode, IMSIC_IPI_ID);
>
> as a conflict resolution, which IIUC should happen when Linus merges my
> next PR. So I'll try and remember to call that out.

Yes, your conflict resolution is correct.

Thanks,
Anup

>
> >
> > On Wed, May 15, 2024 at 04:18:58PM +0200, Naresh Kamboju wrote:
> >> The riscv builds failed on Linux next-20240515 tag due to following build
> >> warnings / errors with gcc-13 and clang toolchain.
> >>
> >> Reported-by: Linux Kernel Functional Testing <[email protected]>
> >>
> >> Build Log:
> >> -----
> >> drivers/irqchip/irq-riscv-imsic-early.c: In function 'imsic_ipi_domain_init':
> >> drivers/irqchip/irq-riscv-imsic-early.c:52:9: error: too many
> >> arguments to function 'riscv_ipi_set_virq_range'
> >> 52 | riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI, true);
> >> | ^~~~~~~~~~~~~~~~~~~~~~~~
> >> In file included from include/linux/smp.h:119,
> >> from include/linux/lockdep.h:14,
> >> from include/linux/spinlock.h:63,
> >> from include/linux/sched.h:2142,
> >> from include/linux/ratelimit.h:6,
> >> from include/linux/dev_printk.h:16,
> >> from include/linux/device.h:15,
> >> from include/linux/node.h:18,
> >> from include/linux/cpu.h:17,
> >> from drivers/irqchip/irq-riscv-imsic-early.c:8:
> >> arch/riscv/include/asm/smp.h:52:6: note: declared here
> >> 52 | void riscv_ipi_set_virq_range(int virq, int nr);
> >> | ^~~~~~~~~~~~~~~~~~~~~~~~
> >>
> >> metadata:
> >> git_describe: next-20240515
> >> git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
> >> git_sha: 82d92a9a1b9ea0ea52aff27cddd05009b4edad49
> >> git_short_log: 82d92a9a1b9e ("Add linux-next specific files for 20240515")
> >>
> >> Links:
> >> - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/details/
> >> - https://storage.tuxsuite.com/public/linaro/lkft/builds/2gUiKdxX7qM27ritMJT5pRyZhyi/
> >> - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240515/testrun/23894295/suite/build/test/gcc-13-lkftconfig/history/
> >>
> >> --
> >> Linaro LKFT
> >> https://lkft.linaro.org
> >>

2024-05-24 15:11:17

by Guenter Roeck

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

On Wed, May 15, 2024 at 10:05:59AM -0700, Palmer Dabbelt wrote:
> On Wed, 15 May 2024 07:36:33 PDT (-0700), Conor Dooley wrote:
> > Palmer,
> > This is the issue I point out to you on the call earlier:
>
> Ya, thanks, I just hit it. Looks like it's a semantic conflict between
> 21a8f8a0eb35 ("irqchip: Add RISC-V incoming MSI controller early driver")
> and dc892fb44322 ("riscv: Use IPIs for remote cache/TLB flushes by
> default"). I think all we need is
>
> diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c
> index 886418ec06cb..4fbb37074d29 100644
> --- a/drivers/irqchip/irq-riscv-imsic-early.c
> +++ b/drivers/irqchip/irq-riscv-imsic-early.c
> @@ -49,7 +49,7 @@ static int __init imsic_ipi_domain_init(void)
> return virq < 0 ? virq : -ENOMEM;
>
> /* Set vIRQ range */
> - riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI, true);
> + riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI);
>
> /* Announce that IMSIC is providing IPIs */
> pr_info("%pfwP: providing IPIs using interrupt %d\n", imsic->fwnode, IMSIC_IPI_ID);
>
> as a conflict resolution, which IIUC should happen when Linus merges my next
> PR. So I'll try and remember to call that out.
>

Unfortunately it looks like the conflict resolution did not happen,
and mainline builds are now affected.

Guenter

2024-05-24 17:18:52

by Thomas Gleixner

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

On Fri, May 24 2024 at 08:10, Guenter Roeck wrote:
> On Wed, May 15, 2024 at 10:05:59AM -0700, Palmer Dabbelt wrote:
>> as a conflict resolution, which IIUC should happen when Linus merges my next
>> PR. So I'll try and remember to call that out.
>>
>
> Unfortunately it looks like the conflict resolution did not happen,
> and mainline builds are now affected.

Fix is queued and goes to Linus tomorrow.

2024-05-24 17:35:25

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

On Fri, 24 May 2024 10:18:42 PDT (-0700), [email protected] wrote:
> On Fri, May 24 2024 at 08:10, Guenter Roeck wrote:
>> On Wed, May 15, 2024 at 10:05:59AM -0700, Palmer Dabbelt wrote:
>>> as a conflict resolution, which IIUC should happen when Linus merges my next
>>> PR. So I'll try and remember to call that out.
>>>
>>
>> Unfortunately it looks like the conflict resolution did not happen,
>> and mainline builds are now affected.
>
> Fix is queued and goes to Linus tomorrow.

Sorry I misesd this. The PR I sent Linus this morning contains my fix
from earlier this week:
https://lore.kernel.org/linux-riscv/171647463438.13050.6219786365640043025.git-patchwork-notify@kernel.org/T/#t
.

2024-05-24 19:46:02

by Thomas Gleixner

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

On Fri, May 24 2024 at 10:35, Palmer Dabbelt wrote:
> On Fri, 24 May 2024 10:18:42 PDT (-0700), [email protected] wrote:
>> On Fri, May 24 2024 at 08:10, Guenter Roeck wrote:
>>> On Wed, May 15, 2024 at 10:05:59AM -0700, Palmer Dabbelt wrote:
>>>> as a conflict resolution, which IIUC should happen when Linus merges my next
>>>> PR. So I'll try and remember to call that out.
>>>>
>>>
>>> Unfortunately it looks like the conflict resolution did not happen,
>>> and mainline builds are now affected.
>>
>> Fix is queued and goes to Linus tomorrow.
>
> Sorry I misesd this. The PR I sent Linus this morning contains my fix
> from earlier this week:
> https://lore.kernel.org/linux-riscv/171647463438.13050.6219786365640043025.git-patchwork-notify@kernel.org/T/#t

Happens. I don't rebase my try. I just mention it to Linus when I
send the pull request. It's the same change so the result is a NOOP and
not another conflict :)

Thanks,

tglx

2024-05-24 20:24:24

by Guenter Roeck

[permalink] [raw]
Subject: Re: riscv: irq-riscv-imsic-early.c:52:9: error: too many arguments to function 'riscv_ipi_set_virq_range'

On 5/24/24 12:36, Thomas Gleixner wrote:
> On Fri, May 24 2024 at 10:35, Palmer Dabbelt wrote:
>> On Fri, 24 May 2024 10:18:42 PDT (-0700), [email protected] wrote:
>>> On Fri, May 24 2024 at 08:10, Guenter Roeck wrote:
>>>> On Wed, May 15, 2024 at 10:05:59AM -0700, Palmer Dabbelt wrote:
>>>>> as a conflict resolution, which IIUC should happen when Linus merges my next
>>>>> PR. So I'll try and remember to call that out.
>>>>>
>>>>
>>>> Unfortunately it looks like the conflict resolution did not happen,
>>>> and mainline builds are now affected.
>>>
>>> Fix is queued and goes to Linus tomorrow.
>>
>> Sorry I misesd this. The PR I sent Linus this morning contains my fix
>> from earlier this week:
>> https://lore.kernel.org/linux-riscv/171647463438.13050.6219786365640043025.git-patchwork-notify@kernel.org/T/#t
>
> Happens. I don't rebase my try. I just mention it to Linus when I
> send the pull request. It's the same change so the result is a NOOP and
> not another conflict :)
>

For my part I did try to find out if a fix had been submitted before sending
my note. Unfortunately I missed it. The problem is now fixed upstream.
Sorry for the noise.

Guenter