All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: Dmitry Osipenko <digetx@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Stephen Boyd <sboyd@kernel.org>, Tony Lindgren <tony@atomide.com>,
	Arnd Bergmann <arnd@arndb.de>, Paul Burton <paul.burton@mips.com>,
	John Crispin <john@phrozen.org>,
	"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-tegra <linux-tegra@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	"open list:TI ETHERNET SWITCH DRIVER (CPSW)" 
	<linux-omap@vger.kernel.org>
Subject: Re: [PATCH v1] kbuild: Disable compile testing if HAVE_LEGACY_CLK enabled
Date: Tue, 25 May 2021 14:19:01 +0200	[thread overview]
Message-ID: <CAMuHMdW_G259Nwx1EEf38h0AcVH8yjmjqp9Mh-vQ4LJJMzD8Dg@mail.gmail.com> (raw)
In-Reply-To: <f12b4622-6cea-ac65-2d94-f50a85c29215@canonical.com>

Hi Krzysztof,

On Tue, May 25, 2021 at 2:04 PM Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
> On 24/05/2021 08:39, Dmitry Osipenko wrote:
> > 24.05.2021 11:54, Geert Uytterhoeven пишет:
> >> On Mon, May 24, 2021 at 1:26 AM Dmitry Osipenko <digetx@gmail.com> wrote:
> >>> There are couple older platforms that can't be compile-tested because they
> >>> partially implement CLK API. It causes build failure of kernel drivers due
> >>> to the missing symbols of the unimplemented part of CLK API.
> >>>
> >>> These platforms are: ARM EP93XX, ARM OMAP1, m68k ColdFire, MIPS AR7,
> >>>                      MIPS Ralink.
> >>>
> >>> Disable compile-testing for HAVE_LEGACY_CLK=y.
> >>>
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> >>
> >> Thanks for your patch!
> >>
> >>> --- a/init/Kconfig
> >>> +++ b/init/Kconfig
> >>> @@ -131,7 +131,7 @@ config INIT_ENV_ARG_LIMIT
> >>>
> >>>  config COMPILE_TEST
> >>>         bool "Compile also drivers which will not load"
> >>> -       depends on HAS_IOMEM
> >>> +       depends on HAS_IOMEM && !HAVE_LEGACY_CLK
> >>
> >> That sounds a bit drastic to me.  Usually we just try to implement the
> >> missing functionality, or provide stubs.
> >> Which functions are missing?
> >
> > Everything that belongs to CONFIG_COMMON_CLK needs stubs.
> >
> > That is everything under CONFIG_HAVE_CLK [1], excluding functions
> > belonging to clk-devres.o and clk-bulk.o [2]. The HAVE_LEGACY_CLK
> > selects HAVE_CLK, but the COMMON_CLK is under HAVE_CLK too.
> >
> > [1]
> > https://elixir.bootlin.com/linux/v5.13-rc3/source/include/linux/clk.h#L786
> > [2]
> > https://elixir.bootlin.com/linux/v5.13-rc3/source/drivers/clk/Makefile#L3
> >
> > This problem is repeated over and over again for the past years. Some
> > maintainers are adding "depends on COMMON_CLK" for COMPILE_TEST of each
> > driver, but this doesn't solve the root of the problem, and thus, it's
> > constantly reoccurring.
> >
> > Recently Krzysztof Kozlowski added couple more clk stubs for MIPS, but
> > still lots of stubs are missing. Some platforms don't have any stubs at
> > all and apparently nobody cares to fix them.
> >
> > There 3 possible solutions:
> >
> > 1. Factor out COMMON_CLK from HAVE_LEGACY_CLK, if this is possible
> > 2. Build stubs universally, maybe using weak functions.
>
> I vote for this one - global stubs.

Yep.

> Or for a new one:
> 4. Disable COMPILE_TEST for specific platforms (mentioned in commit
> msg). Eventually could be like:
> config RALINK
>         depends !COMPILE_TEST || (COMPILE_TEST && COMMON_CLK)

That's a neat idea!

Of course there's a fifth option:

5. Convert legacy platforms to COMMON_CLK.

Which is already happening for ARM EP93XX.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: Dmitry Osipenko <digetx@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	 Jonathan Hunter <jonathanh@nvidia.com>,
	Stephen Boyd <sboyd@kernel.org>,
	 Tony Lindgren <tony@atomide.com>, Arnd Bergmann <arnd@arndb.de>,
	Paul Burton <paul.burton@mips.com>,
	John Crispin <john@phrozen.org>,
	 "open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 linux-m68k <linux-m68k@lists.linux-m68k.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-tegra <linux-tegra@vger.kernel.org>,
	 linux-clk <linux-clk@vger.kernel.org>,
	 "open list:TI ETHERNET SWITCH DRIVER (CPSW)"
	<linux-omap@vger.kernel.org>
Subject: Re: [PATCH v1] kbuild: Disable compile testing if HAVE_LEGACY_CLK enabled
Date: Tue, 25 May 2021 14:19:01 +0200	[thread overview]
Message-ID: <CAMuHMdW_G259Nwx1EEf38h0AcVH8yjmjqp9Mh-vQ4LJJMzD8Dg@mail.gmail.com> (raw)
In-Reply-To: <f12b4622-6cea-ac65-2d94-f50a85c29215@canonical.com>

Hi Krzysztof,

On Tue, May 25, 2021 at 2:04 PM Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
> On 24/05/2021 08:39, Dmitry Osipenko wrote:
> > 24.05.2021 11:54, Geert Uytterhoeven пишет:
> >> On Mon, May 24, 2021 at 1:26 AM Dmitry Osipenko <digetx@gmail.com> wrote:
> >>> There are couple older platforms that can't be compile-tested because they
> >>> partially implement CLK API. It causes build failure of kernel drivers due
> >>> to the missing symbols of the unimplemented part of CLK API.
> >>>
> >>> These platforms are: ARM EP93XX, ARM OMAP1, m68k ColdFire, MIPS AR7,
> >>>                      MIPS Ralink.
> >>>
> >>> Disable compile-testing for HAVE_LEGACY_CLK=y.
> >>>
> >>> Reported-by: kernel test robot <lkp@intel.com>
> >>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> >>
> >> Thanks for your patch!
> >>
> >>> --- a/init/Kconfig
> >>> +++ b/init/Kconfig
> >>> @@ -131,7 +131,7 @@ config INIT_ENV_ARG_LIMIT
> >>>
> >>>  config COMPILE_TEST
> >>>         bool "Compile also drivers which will not load"
> >>> -       depends on HAS_IOMEM
> >>> +       depends on HAS_IOMEM && !HAVE_LEGACY_CLK
> >>
> >> That sounds a bit drastic to me.  Usually we just try to implement the
> >> missing functionality, or provide stubs.
> >> Which functions are missing?
> >
> > Everything that belongs to CONFIG_COMMON_CLK needs stubs.
> >
> > That is everything under CONFIG_HAVE_CLK [1], excluding functions
> > belonging to clk-devres.o and clk-bulk.o [2]. The HAVE_LEGACY_CLK
> > selects HAVE_CLK, but the COMMON_CLK is under HAVE_CLK too.
> >
> > [1]
> > https://elixir.bootlin.com/linux/v5.13-rc3/source/include/linux/clk.h#L786
> > [2]
> > https://elixir.bootlin.com/linux/v5.13-rc3/source/drivers/clk/Makefile#L3
> >
> > This problem is repeated over and over again for the past years. Some
> > maintainers are adding "depends on COMMON_CLK" for COMPILE_TEST of each
> > driver, but this doesn't solve the root of the problem, and thus, it's
> > constantly reoccurring.
> >
> > Recently Krzysztof Kozlowski added couple more clk stubs for MIPS, but
> > still lots of stubs are missing. Some platforms don't have any stubs at
> > all and apparently nobody cares to fix them.
> >
> > There 3 possible solutions:
> >
> > 1. Factor out COMMON_CLK from HAVE_LEGACY_CLK, if this is possible
> > 2. Build stubs universally, maybe using weak functions.
>
> I vote for this one - global stubs.

Yep.

> Or for a new one:
> 4. Disable COMPILE_TEST for specific platforms (mentioned in commit
> msg). Eventually could be like:
> config RALINK
>         depends !COMPILE_TEST || (COMPILE_TEST && COMMON_CLK)

That's a neat idea!

Of course there's a fifth option:

5. Convert legacy platforms to COMMON_CLK.

Which is already happening for ARM EP93XX.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-05-25 12:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23 23:25 [PATCH v1] kbuild: Disable compile testing if HAVE_LEGACY_CLK enabled Dmitry Osipenko
2021-05-23 23:25 ` Dmitry Osipenko
2021-05-24  8:54 ` Geert Uytterhoeven
2021-05-24  8:54   ` Geert Uytterhoeven
2021-05-24 12:39   ` Dmitry Osipenko
2021-05-24 12:39     ` Dmitry Osipenko
2021-05-25 12:03     ` Krzysztof Kozlowski
2021-05-25 12:03       ` Krzysztof Kozlowski
2021-05-25 12:19       ` Geert Uytterhoeven [this message]
2021-05-25 12:19         ` Geert Uytterhoeven
2021-05-25 21:29         ` Dmitry Osipenko
2021-05-25 21:29           ` Dmitry Osipenko
2021-05-26  0:39           ` Randy Dunlap
2021-05-26  0:39             ` Randy Dunlap
2021-05-28  9:27             ` Arnd Bergmann
2021-05-28  9:27               ` Arnd Bergmann
2021-05-28  9:24     ` Arnd Bergmann
2021-05-28  9:24       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdW_G259Nwx1EEf38h0AcVH8yjmjqp9Mh-vQ4LJJMzD8Dg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=digetx@gmail.com \
    --cc=john@phrozen.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=paul.burton@mips.com \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.