Linux Tegra architecture development
 help / color / mirror / Atom feed
* [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two)
@ 2026-08-21  8:53 Geert Uytterhoeven
  2026-08-21  8:53 ` [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized Geert Uytterhoeven
                   ` (44 more replies)
  0 siblings, 45 replies; 56+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21  8:53 UTC (permalink / raw)
  To: Ryan Chen, Joel Stanley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Andrew Jeffery, Billy Tsai, Nicolas Ferre,
	Alexandre Belloni, Claudiu Beznea, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Taichi Sugaya, Takao Orito,
	Linus Walleij, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Sudeep Holla,
	Cristian Marussi, David Lechner, Abel Vesa, Peng Fan, Frank Li,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Paul Cercueil, Santosh Shilimkar, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Vladimir Zapolskiy, Heiko Stuebner,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Peter Griffin, Alim Akhtar, Dinh Nguyen, Viresh Kumar,
	Maxime Coquelin, Alexandre Torgue, Emilio López,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Kunihiko Hayashi,
	Masami Hiramatsu, Ulf Hansson, Liviu Dudau, Lorenzo Pieralisi,
	Michal Simek, Matthias Brugger
  Cc: linux-clk, linux-aspeed, linux-arm-kernel, linux-kernel, openbmc,
	arm-scmi, imx, linux-mips, linux-renesas-soc, linux-rockchip,
	linux-samsung-soc, soc, linux-stm32, linux-sunxi, linux-tegra,
	linux-mediatek, Geert Uytterhoeven

	Hi all,

The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need.  However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.

Hence this series aims to make sure all members are fully initialized,
to avoid such bugs, and to prevent future breakage when converting
drivers to a different method for specifying the parents.

Part One[1] fixed all cases that I identified to be real bugs, in
response to a crash I saw on BeagleBone Black.

This series is the clock subpart of Part Two, which fixes remaining
cases that are currently harmless.  These are still fragile, and may
cause future breakage when converting drivers to a different method for
specifying the parents.

Thanks for your comments!

[1] "[PATCH treewide 0/5] clk: Make sure clk_init_data is fully
     initialized (part 1)"
    https://lore.kernel.org/cover.1787165329.git.geert+renesas@glider.be

Geert Uytterhoeven (45):
  clk: aspeed: Make sure clk_init_data is fully initialized
  clk: at91: Make sure clk_init_data is fully initialized
  clk: bcm: iproc: Make sure clk_init_data is fully initialized
  clk: berlin: Make sure clk_init_data is fully initialized
  clk: cdce925: Make sure clk_init_data is fully initialized
  clk: clk-axi-clkgen: Make sure clk_init_data is fully initialized
  clk: cs2000-cp: Make sure clk_init_data is fully initialized
  clk: davinci: Make sure clk_init_data is fully initialized
  clk: fractional-divider: Make sure clk_init_data is fully initialized
  clk: gemini: Make sure clk_init_data is fully initialized
  clk: highbank: Make sure clk_init_data is fully initialized
  clk: hisilicon: Make sure clk_init_data is fully initialized
  clk: imx: Make sure clk_init_data is fully initialized
  clk: ingenic: Make sure clk_init_data is fully initialized
  clk: keystone: Make sure clk_init_data is fully initialized
  clk: lmk04832: Make sure clk_init_data is fully initialized
  clk: mediatek: Make sure clk_init_data is fully initialized
  clk: milbeaut: Make sure clk_init_data is fully initialized
  clk: mmp: Make sure clk_init_data is fully initialized
  clk: mvebu: Make sure clk_init_data is fully initialized
  clk: mxs: Make sure clk_init_data is fully initialized
  clk: nomadik: Make sure clk_init_data is fully initialized
  clk: npcm7xx: Make sure clk_init_data is fully initialized
  clk: nxp: Make sure clk_init_data is fully initialized
  clk: pistachio: Make sure clk_init_data is fully initialized
  clk: pwm: Make sure clk_init_data is fully initialized
  clk: renesas: Make sure clk_init_data is fully initialized
  clk: rockchip: Make sure clk_init_data is fully initialized
  clk: samsung: Make sure clk_init_data is fully initialized
  clk: scpi: Make sure clk_init_data is fully initialized
  clk: silabs: Make sure clk_init_data is fully initialized
  clk: socfpga: Make sure clk_init_data is fully initialized
  clk: spear: Make sure clk_init_data is fully initialized
  clk: stm32: Make sure clk_init_data is fully initialized
  clk: st: Make sure clk_init_data is fully initialized
  clk: sunxi: Make sure clk_init_data is fully initialized
  clk: tegra: Make sure clk_init_data is fully initialized
  clk: uniphier: Make sure clk_init_data is fully initialized
  clk: ux500: Make sure clk_init_data is fully initialized
  clk: versatile: Make sure clk_init_data is fully initialized
  clk: vt8500: Make sure clk_init_data is fully initialized
  clk: x86: Make sure clk_init_data is fully initialized
  clk: xgene: Make sure clk_init_data is fully initialized
  clk: xilinx: Make sure clk_init_data is fully initialized
  clk: zynqmp: Make sure clk_init_data is fully initialized

 drivers/clk/aspeed/clk-aspeed.c                |  2 +-
 drivers/clk/aspeed/clk-ast2600.c               |  2 +-
 drivers/clk/aspeed/clk-ast2700.c               |  2 +-
 drivers/clk/at91/clk-audio-pll.c               |  4 ++--
 drivers/clk/at91/clk-h32mx.c                   |  2 +-
 drivers/clk/at91/clk-main.c                    |  2 +-
 drivers/clk/at91/clk-pll.c                     |  2 +-
 drivers/clk/at91/clk-plldiv.c                  |  2 +-
 drivers/clk/at91/clk-slow.c                    |  2 +-
 drivers/clk/at91/clk-smd.c                     |  2 +-
 drivers/clk/at91/clk-usb.c                     |  6 +++---
 drivers/clk/at91/sckc.c                        |  2 +-
 drivers/clk/bcm/clk-iproc-armpll.c             |  2 +-
 drivers/clk/bcm/clk-iproc-asiu.c               |  2 +-
 drivers/clk/bcm/clk-iproc-pll.c                |  2 +-
 drivers/clk/berlin/berlin2-avpll.c             |  4 ++--
 drivers/clk/berlin/berlin2-pll.c               |  2 +-
 drivers/clk/clk-axi-clkgen.c                   |  2 +-
 drivers/clk/clk-cdce925.c                      |  2 +-
 drivers/clk/clk-cs2000-cp.c                    |  2 +-
 drivers/clk/clk-fractional-divider.c           |  2 +-
 drivers/clk/clk-gemini.c                       |  2 +-
 drivers/clk/clk-highbank.c                     |  2 +-
 drivers/clk/clk-lmk04832.c                     |  6 +++---
 drivers/clk/clk-milbeaut.c                     |  4 ++--
 drivers/clk/clk-nomadik.c                      |  4 ++--
 drivers/clk/clk-npcm7xx.c                      |  2 +-
 drivers/clk/clk-pwm.c                          |  2 +-
 drivers/clk/clk-scpi.c                         |  2 +-
 drivers/clk/clk-si514.c                        |  2 +-
 drivers/clk/clk-si5341.c                       |  2 +-
 drivers/clk/clk-si544.c                        |  2 +-
 drivers/clk/clk-si570.c                        |  2 +-
 drivers/clk/clk-stm32f4.c                      |  4 ++--
 drivers/clk/clk-stm32h7.c                      |  2 +-
 drivers/clk/clk-vt8500.c                       |  4 ++--
 drivers/clk/clk-xgene.c                        |  6 +++---
 drivers/clk/davinci/da8xx-cfgchip.c            |  4 ++--
 drivers/clk/davinci/pll.c                      |  2 +-
 drivers/clk/davinci/psc.c                      |  2 +-
 drivers/clk/hisilicon/clk-hi3559a.c            |  2 +-
 drivers/clk/hisilicon/clk-hi3620.c             |  2 +-
 drivers/clk/hisilicon/clk-hi6220-stub.c        |  2 +-
 drivers/clk/hisilicon/clk-hisi-phase.c         |  2 +-
 drivers/clk/hisilicon/clk-hix5hd2.c            |  2 +-
 drivers/clk/hisilicon/clkdivider-hi6220.c      |  2 +-
 drivers/clk/hisilicon/clkgate-separated.c      |  2 +-
 drivers/clk/imx/clk-busy.c                     |  4 ++--
 drivers/clk/imx/clk-cpu.c                      |  2 +-
 drivers/clk/imx/clk-divider-gate.c             |  2 +-
 drivers/clk/imx/clk-fixup-div.c                |  2 +-
 drivers/clk/imx/clk-fixup-mux.c                |  2 +-
 drivers/clk/imx/clk-frac-pll.c                 |  2 +-
 drivers/clk/imx/clk-fracn-gppll.c              |  2 +-
 drivers/clk/imx/clk-gate-93.c                  |  2 +-
 drivers/clk/imx/clk-gate-exclusive.c           |  2 +-
 drivers/clk/imx/clk-gate2.c                    |  2 +-
 drivers/clk/imx/clk-lpcg-scu.c                 |  2 +-
 drivers/clk/imx/clk-pfd.c                      |  2 +-
 drivers/clk/imx/clk-pfdv2.c                    |  2 +-
 drivers/clk/imx/clk-pll14xx.c                  |  2 +-
 drivers/clk/imx/clk-pllv1.c                    |  2 +-
 drivers/clk/imx/clk-pllv2.c                    |  2 +-
 drivers/clk/imx/clk-pllv3.c                    |  2 +-
 drivers/clk/imx/clk-pllv4.c                    |  2 +-
 drivers/clk/imx/clk-scu.c                      |  4 ++--
 drivers/clk/imx/clk-sscg-pll.c                 |  2 +-
 drivers/clk/ingenic/cgu.c                      |  2 +-
 drivers/clk/keystone/gate.c                    |  2 +-
 drivers/clk/keystone/pll.c                     |  2 +-
 drivers/clk/keystone/syscon-clk.c              |  2 +-
 drivers/clk/mediatek/clk-cpumux.c              |  2 +-
 drivers/clk/mmp/clk-apbc.c                     |  2 +-
 drivers/clk/mmp/clk-apmu.c                     |  2 +-
 drivers/clk/mmp/clk-frac.c                     |  2 +-
 drivers/clk/mmp/clk-gate.c                     |  2 +-
 drivers/clk/mmp/clk-mix.c                      |  2 +-
 drivers/clk/mmp/clk-pll.c                      |  2 +-
 drivers/clk/mvebu/ap-cpu-clk.c                 |  2 +-
 drivers/clk/mvebu/clk-corediv.c                |  2 +-
 drivers/clk/mvebu/clk-cpu.c                    |  2 +-
 drivers/clk/mxs/clk-div.c                      |  2 +-
 drivers/clk/mxs/clk-frac.c                     |  2 +-
 drivers/clk/mxs/clk-pll.c                      |  2 +-
 drivers/clk/mxs/clk-ref.c                      |  2 +-
 drivers/clk/nxp/clk-lpc18xx-creg.c             |  2 +-
 drivers/clk/pistachio/clk-pll.c                |  2 +-
 drivers/clk/renesas/rzg2l-cpg.c                | 18 +++++++++---------
 drivers/clk/renesas/rzv2h-cpg.c                |  8 ++++----
 drivers/clk/rockchip/clk-cpu.c                 |  2 +-
 drivers/clk/rockchip/clk-ddr.c                 |  2 +-
 drivers/clk/rockchip/clk-gate-grf.c            |  2 +-
 drivers/clk/rockchip/clk-inverter.c            |  2 +-
 drivers/clk/rockchip/clk-mmc-phase.c           |  2 +-
 drivers/clk/rockchip/clk-muxgrf.c              |  2 +-
 drivers/clk/rockchip/clk-pll.c                 |  2 +-
 drivers/clk/rockchip/clk.c                     |  2 +-
 drivers/clk/samsung/clk-cpu.c                  |  2 +-
 drivers/clk/samsung/clk-pll.c                  |  2 +-
 drivers/clk/socfpga/clk-gate-a10.c             |  2 +-
 drivers/clk/socfpga/clk-gate-s10.c             |  6 +++---
 drivers/clk/socfpga/clk-gate.c                 |  2 +-
 drivers/clk/socfpga/clk-periph-a10.c           |  2 +-
 drivers/clk/socfpga/clk-periph-s10.c           |  8 ++++----
 drivers/clk/socfpga/clk-periph.c               |  2 +-
 drivers/clk/socfpga/clk-pll-a10.c              |  2 +-
 drivers/clk/socfpga/clk-pll-s10.c              |  8 ++++----
 drivers/clk/socfpga/clk-pll.c                  |  2 +-
 drivers/clk/spear/clk-aux-synth.c              |  2 +-
 drivers/clk/spear/clk-frac-synth.c             |  2 +-
 drivers/clk/spear/clk-gpt-synth.c              |  2 +-
 drivers/clk/spear/clk-vco-pll.c                |  2 +-
 drivers/clk/st/clk-flexgen.c                   |  2 +-
 drivers/clk/st/clkgen-fsyn.c                   |  4 ++--
 drivers/clk/st/clkgen-pll.c                    |  2 +-
 drivers/clk/stm32/clk-stm32mp1.c               |  4 ++--
 drivers/clk/sunxi/clk-sun4i-tcon-ch1.c         |  2 +-
 drivers/clk/tegra/clk-audio-sync.c             |  2 +-
 drivers/clk/tegra/clk-divider.c                |  2 +-
 drivers/clk/tegra/clk-periph-fixed.c           |  2 +-
 drivers/clk/tegra/clk-periph-gate.c            |  2 +-
 drivers/clk/tegra/clk-periph.c                 |  2 +-
 drivers/clk/tegra/clk-pll-out.c                |  2 +-
 drivers/clk/tegra/clk-pll.c                    |  2 +-
 drivers/clk/tegra/clk-sdmmc-mux.c              |  2 +-
 drivers/clk/tegra/clk-super.c                  |  4 ++--
 drivers/clk/tegra/clk-tegra-super-cclk.c       |  2 +-
 drivers/clk/tegra/clk-tegra124-emc.c           |  2 +-
 drivers/clk/tegra/clk-tegra20-emc.c            |  2 +-
 drivers/clk/tegra/clk-tegra210-emc.c           |  2 +-
 drivers/clk/uniphier/clk-uniphier-cpugear.c    |  2 +-
 .../clk/uniphier/clk-uniphier-fixed-factor.c   |  2 +-
 drivers/clk/uniphier/clk-uniphier-fixed-rate.c |  2 +-
 drivers/clk/uniphier/clk-uniphier-gate.c       |  2 +-
 drivers/clk/uniphier/clk-uniphier-mux.c        |  2 +-
 drivers/clk/ux500/clk-prcc.c                   |  2 +-
 drivers/clk/ux500/clk-prcmu.c                  |  4 ++--
 drivers/clk/ux500/clk-sysctrl.c                |  2 +-
 drivers/clk/versatile/clk-icst.c               |  2 +-
 drivers/clk/versatile/clk-sp810.c              |  2 +-
 drivers/clk/versatile/clk-vexpress-osc.c       |  2 +-
 drivers/clk/x86/clk-pmc-atom.c                 |  2 +-
 drivers/clk/xilinx/clk-xlnx-clock-wizard.c     |  6 +++---
 drivers/clk/xilinx/xlnx_vcu.c                  |  2 +-
 drivers/clk/zynqmp/clk-gate-zynqmp.c           |  2 +-
 drivers/clk/zynqmp/clk-mux-zynqmp.c            |  2 +-
 drivers/clk/zynqmp/divider.c                   |  2 +-
 drivers/clk/zynqmp/pll.c                       |  2 +-
 148 files changed, 188 insertions(+), 188 deletions(-)

-- 
2.43.0

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

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

end of thread, other threads:[~2026-08-21 14:05 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21  8:53 [PATCH 00/45] clk: Make sure clk_init_data is fully initialized (part two) Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 01/45] clk: aspeed: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 02/45] clk: at91: " Geert Uytterhoeven
2026-08-21 13:39   ` Nicolas Ferre
2026-08-21  8:53 ` [PATCH 03/45] clk: bcm: iproc: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 04/45] clk: berlin: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 05/45] clk: cdce925: " Geert Uytterhoeven
2026-08-21 11:25   ` Liviu Dudau
2026-08-21  8:53 ` [PATCH 06/45] clk: clk-axi-clkgen: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 07/45] clk: cs2000-cp: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 08/45] clk: davinci: " Geert Uytterhoeven
2026-08-21 13:45   ` David Lechner
2026-08-21  8:53 ` [PATCH 09/45] clk: fractional-divider: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 10/45] clk: gemini: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 11/45] clk: highbank: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 12/45] clk: hisilicon: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 13/45] clk: imx: " Geert Uytterhoeven
2026-08-21 11:44   ` Abel Vesa
2026-08-21  8:53 ` [PATCH 14/45] clk: ingenic: " Geert Uytterhoeven
2026-08-21 10:57   ` Paul Cercueil
2026-08-21  8:53 ` [PATCH 15/45] clk: keystone: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 16/45] clk: lmk04832: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 17/45] clk: mediatek: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 18/45] clk: milbeaut: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 19/45] clk: mmp: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 20/45] clk: mvebu: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 21/45] clk: mxs: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 22/45] clk: nomadik: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 23/45] clk: npcm7xx: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 24/45] clk: nxp: " Geert Uytterhoeven
2026-08-21 11:52   ` Vladimir Zapolskiy
2026-08-21  8:53 ` [PATCH 25/45] clk: pistachio: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 26/45] clk: pwm: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 27/45] clk: renesas: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 28/45] clk: rockchip: " Geert Uytterhoeven
2026-08-21 14:04   ` Sebastian Reichel
2026-08-21  8:53 ` [PATCH 29/45] clk: samsung: " Geert Uytterhoeven
2026-08-21 11:04   ` Krzysztof Kozlowski
2026-08-21  8:53 ` [PATCH 30/45] clk: scpi: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 31/45] clk: silabs: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 32/45] clk: socfpga: " Geert Uytterhoeven
2026-08-21 13:31   ` Dinh Nguyen
2026-08-21  8:53 ` [PATCH 33/45] clk: spear: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 34/45] clk: stm32: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 35/45] clk: st: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 36/45] clk: sunxi: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 37/45] clk: tegra: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 38/45] clk: uniphier: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 39/45] clk: ux500: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 40/45] clk: versatile: " Geert Uytterhoeven
2026-08-21 11:28   ` Liviu Dudau
2026-08-21  8:53 ` [PATCH 41/45] clk: vt8500: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 42/45] clk: x86: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 43/45] clk: xgene: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 44/45] clk: xilinx: " Geert Uytterhoeven
2026-08-21  8:53 ` [PATCH 45/45] clk: zynqmp: " Geert Uytterhoeven

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