2020-03-26 02:54:41

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the tip tree

Hi all,

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

drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]
38 | cpu_down(cpu);
| ^~~~~~~~

Caused by commit

33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")

interacting with commit

274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")

from the battery tree.

I have added the following merge fix patch:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Mar 2020 13:42:00 +1100
Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/power/reset/sc27xx-poweroff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c
index 69863074daf6..90287c31992c 100644
--- a/drivers/power/reset/sc27xx-poweroff.c
+++ b/drivers/power/reset/sc27xx-poweroff.c
@@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)

for_each_online_cpu(cpu) {
if (cpu != smp_processor_id())
- cpu_down(cpu);
+ remove_cpu(cpu);
}
#endif
}
--
2.25.0

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-03-26 10:59:48

by Qais Yousef

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi Stephen

On 03/26/20 13:52, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
> drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]
> 38 | cpu_down(cpu);
> | ^~~~~~~~
>
> Caused by commit
>
> 33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")
>
> interacting with commit
>
> 274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")
>
> from the battery tree.
>
> I have added the following merge fix patch:

Your merge fix looks correct.

Though the original code is missing error handling if offlining the cpu failed
for one reason or another.

I don't know the details, but something feels off about the driver having to
bring cpus down.

Thanks

--
Qais Yousef

>
> From: Stephen Rothwell <[email protected]>
> Date: Thu, 26 Mar 2020 13:42:00 +1100
> Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> drivers/power/reset/sc27xx-poweroff.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c
> index 69863074daf6..90287c31992c 100644
> --- a/drivers/power/reset/sc27xx-poweroff.c
> +++ b/drivers/power/reset/sc27xx-poweroff.c
> @@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
>
> for_each_online_cpu(cpu) {
> if (cpu != smp_processor_id())
> - cpu_down(cpu);
> + remove_cpu(cpu);
> }
> #endif
> }
> --
> 2.25.0
>
> --
> Cheers,
> Stephen Rothwell


2020-04-01 01:23:19

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi all,

On Thu, 26 Mar 2020 13:52:58 +1100 Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
> drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]
> 38 | cpu_down(cpu);
> | ^~~~~~~~
>
> Caused by commit
>
> 33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")
>
> interacting with commit
>
> 274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")
>
> from the battery tree.
>
> I have added the following merge fix patch:
>
> From: Stephen Rothwell <[email protected]>
> Date: Thu, 26 Mar 2020 13:42:00 +1100
> Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> drivers/power/reset/sc27xx-poweroff.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c
> index 69863074daf6..90287c31992c 100644
> --- a/drivers/power/reset/sc27xx-poweroff.c
> +++ b/drivers/power/reset/sc27xx-poweroff.c
> @@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
>
> for_each_online_cpu(cpu) {
> if (cpu != smp_processor_id())
> - cpu_down(cpu);
> + remove_cpu(cpu);
> }
> #endif
> }
> --
> 2.25.0

This fixup is now needed when the battery tree is merged into Linus' tree.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-04-03 08:16:38

by Baolin Wang

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Wed, Apr 1, 2020 at 9:14 AM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> On Thu, 26 Mar 2020 13:52:58 +1100 Stephen Rothwell <[email protected]> wrote:
> >
> > Hi all,
> >
> > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> >
> > drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
> > drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]
> > 38 | cpu_down(cpu);
> > | ^~~~~~~~
> >
> > Caused by commit
> >
> > 33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")
> >
> > interacting with commit
> >
> > 274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")
> >
> > from the battery tree.
> >
> > I have added the following merge fix patch:
> >
> > From: Stephen Rothwell <[email protected]>
> > Date: Thu, 26 Mar 2020 13:42:00 +1100
> > Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down
> >
> > Signed-off-by: Stephen Rothwell <[email protected]>
> > ---
> > drivers/power/reset/sc27xx-poweroff.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c
> > index 69863074daf6..90287c31992c 100644
> > --- a/drivers/power/reset/sc27xx-poweroff.c
> > +++ b/drivers/power/reset/sc27xx-poweroff.c
> > @@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
> >
> > for_each_online_cpu(cpu) {
> > if (cpu != smp_processor_id())
> > - cpu_down(cpu);
> > + remove_cpu(cpu);
> > }
> > #endif
> > }
> > --
> > 2.25.0
>
> This fixup is now needed when the battery tree is merged into Linus' tree.

Thanks Stephen.

Sebastian, could you pick up this patch to avoid the compiling issue? Thanks.

--
Baolin Wang

2020-04-03 10:03:35

by Sebastian Reichel

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi,

On Fri, Apr 03, 2020 at 04:15:11PM +0800, Baolin Wang wrote:
> On Wed, Apr 1, 2020 at 9:14 AM Stephen Rothwell <[email protected]> wrote:
> > On Thu, 26 Mar 2020 13:52:58 +1100 Stephen Rothwell <[email protected]> wrote:
> > >
> > > Hi all,
> > >
> > > After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> > > failed like this:
> > >
> > > drivers/power/reset/sc27xx-poweroff.c: In function 'sc27xx_poweroff_shutdown':
> > > drivers/power/reset/sc27xx-poweroff.c:38:4: error: implicit declaration of function 'cpu_down' [-Werror=implicit-function-declaration]
> > > 38 | cpu_down(cpu);
> > > | ^~~~~~~~
> > >
> > > Caused by commit
> > >
> > > 33c3736ec888 ("cpu/hotplug: Hide cpu_up/down()")
> > >
> > > interacting with commit
> > >
> > > 274afbc3ad33 ("power: reset: sc27xx: Change to use cpu_down()")
> > >
> > > from the battery tree.
> > >
> > > I have added the following merge fix patch:
> > >
> > > From: Stephen Rothwell <[email protected]>
> > > Date: Thu, 26 Mar 2020 13:42:00 +1100
> > > Subject: [PATCH] power: reset: sc27xx: use remove_cpu instead of cpu_down
> > >
> > > Signed-off-by: Stephen Rothwell <[email protected]>
> > > ---
> > > drivers/power/reset/sc27xx-poweroff.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c
> > > index 69863074daf6..90287c31992c 100644
> > > --- a/drivers/power/reset/sc27xx-poweroff.c
> > > +++ b/drivers/power/reset/sc27xx-poweroff.c
> > > @@ -35,7 +35,7 @@ static void sc27xx_poweroff_shutdown(void)
> > >
> > > for_each_online_cpu(cpu) {
> > > if (cpu != smp_processor_id())
> > > - cpu_down(cpu);
> > > + remove_cpu(cpu);
> > > }
> > > #endif
> > > }
> > > --
> > > 2.25.0
> >
> > This fixup is now needed when the battery tree is merged into Linus' tree.

Thanks for the reminder.

> Thanks Stephen.
>
> Sebastian, could you pick up this patch to avoid the compiling issue? Thanks.

I will point Linus to this patch when I send my pull request.

-- Sebastian


Attachments:
(No filename) (2.17 kB)
signature.asc (849.00 B)
Download all attachments