Linux Power Management development
 help / color / mirror / Atom feed
* Re: linux-next: build failure after merge of the pmdomain-fixes tree
       [not found] <avNHazNbGtMQJ5pV@sirena.org.uk>
@ 2026-11-10 17:02 ` Sasha Levin
  2026-11-10 17:07   ` Mark Brown
  2026-11-11 12:03   ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Sasha Levin @ 2026-11-10 17:02 UTC (permalink / raw)
  To: Mark Brown
  Cc: Ulf Hansson, Ulf Hansson, Guangshuo Li, Andy Shevchenko, linux-pm,
	imx, Linux Kernel Mailing List, Linux Next Mailing List

On Tue, Nov 10, 2026 at 04:33:47PM +0000, Mark Brown wrote:
>AFAICT this is caused by commit
>
>   d7262971a2acc (pmdomain: imx: gpc: remove all initialized power domains)
>
>though I don't really see how.  I have used the tree from next-20261109
>instead.

The while loop that commit adds to imx_gpc_remove() is never closed, so
the function is still open at the end of the file:

		while (num_domains--) {
			ret = pm_genpd_remove(&imx_gpc_domains[num_domains].base);
			if (ret) {
				...
				return;
			}

		if (num_domains == GPC_PGC_DOMAIN_PU)
			imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
	}

The patch was posted that way [1]. gpc.c is only built with
HAVE_IMX_GPC, which only SOC_IMX6 on 32-bit ARM selects, so x86 and
arm64 builds do not see it.

With the brace added, gpc.o builds with imx_v6_v7_defconfig:

--- a/drivers/pmdomain/imx/gpc.c
+++ b/drivers/pmdomain/imx/gpc.c
@@ -536,8 +536,9 @@
 				return;
 			}
 
-		if (num_domains == GPC_PGC_DOMAIN_PU)
-			imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
+			if (num_domains == GPC_PGC_DOMAIN_PU)
+				imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
+		}
 	}
 
 	of_node_put(pgc_node);

[1] https://lore.kernel.org/all/20260924142520.1594149-1-lgs201920130244@gmail.com/

-- 
Thanks,
Sasha

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

* Re: linux-next: build failure after merge of the pmdomain-fixes tree
  2026-11-10 17:02 ` linux-next: build failure after merge of the pmdomain-fixes tree Sasha Levin
@ 2026-11-10 17:07   ` Mark Brown
  2026-11-11 12:03   ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-11-10 17:07 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Ulf Hansson, Ulf Hansson, Guangshuo Li, Andy Shevchenko, linux-pm,
	imx, Linux Kernel Mailing List, Linux Next Mailing List

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

On Tue, Nov 10, 2026 at 12:02:53PM -0500, Sasha Levin wrote:
> On Tue, Nov 10, 2026 at 04:33:47PM +0000, Mark Brown wrote:
> >AFAICT this is caused by commit
> >
> >   d7262971a2acc (pmdomain: imx: gpc: remove all initialized power domains)
> >
> >though I don't really see how.  I have used the tree from next-20261109
> >instead.

> The while loop that commit adds to imx_gpc_remove() is never closed, so
> the function is still open at the end of the file:

Ah, that'd do it.  I didn't look terribly hard.

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

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

* Re: linux-next: build failure after merge of the pmdomain-fixes tree
  2026-11-10 17:02 ` linux-next: build failure after merge of the pmdomain-fixes tree Sasha Levin
  2026-11-10 17:07   ` Mark Brown
@ 2026-11-11 12:03   ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2026-11-11 12:03 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Mark Brown, Ulf Hansson, Ulf Hansson, Guangshuo Li,
	Andy Shevchenko, linux-pm, imx, Linux Kernel Mailing List,
	Linux Next Mailing List

On Tue, Nov 10, 2026 at 6:02 PM Sasha Levin <sashal@kernel.org> wrote:
>
> On Tue, Nov 10, 2026 at 04:33:47PM +0000, Mark Brown wrote:
> >AFAICT this is caused by commit
> >
> >   d7262971a2acc (pmdomain: imx: gpc: remove all initialized power domains)
> >
> >though I don't really see how.  I have used the tree from next-20261109
> >instead.
>
> The while loop that commit adds to imx_gpc_remove() is never closed, so
> the function is still open at the end of the file:
>
>                 while (num_domains--) {
>                         ret = pm_genpd_remove(&imx_gpc_domains[num_domains].base);
>                         if (ret) {
>                                 ...
>                                 return;
>                         }
>
>                 if (num_domains == GPC_PGC_DOMAIN_PU)
>                         imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
>         }
>
> The patch was posted that way [1]. gpc.c is only built with
> HAVE_IMX_GPC, which only SOC_IMX6 on 32-bit ARM selects, so x86 and
> arm64 builds do not see it.
>
> With the brace added, gpc.o builds with imx_v6_v7_defconfig:
>
> --- a/drivers/pmdomain/imx/gpc.c
> +++ b/drivers/pmdomain/imx/gpc.c
> @@ -536,8 +536,9 @@
>                                 return;
>                         }
>
> -               if (num_domains == GPC_PGC_DOMAIN_PU)
> -                       imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
> +                       if (num_domains == GPC_PGC_DOMAIN_PU)
> +                               imx_pgc_put_clocks(&imx_gpc_domains[num_domains]);
> +               }
>         }
>
>         of_node_put(pgc_node);
>
> [1] https://lore.kernel.org/all/20260924142520.1594149-1-lgs201920130244@gmail.com/
>
> --
> Thanks,
> Sasha

Thanks, I amended the change like that and rebased my branch.

Kind regards
Uffe

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

end of thread, other threads:[~2026-11-11 12:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <avNHazNbGtMQJ5pV@sirena.org.uk>
2026-11-10 17:02 ` linux-next: build failure after merge of the pmdomain-fixes tree Sasha Levin
2026-11-10 17:07   ` Mark Brown
2026-11-11 12:03   ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox