mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: pmc: fix #ifdef block in header
@ 2026-06-18 14:36 Arnd Bergmann
  2026-06-22  6:53 ` Thierry Reding
  2026-06-22  6:54 ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-06-18 14:36 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter; +Cc: Arnd Bergmann, linux-tegra, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

When build testing on ARM without the PMC driver, the other drivers
fail to link:

ld.lld: error: undefined symbol: tegra_pmc_core_domain_state_synced
>>> referenced by regulators-tegra30.c
>>>               drivers/soc/tegra/regulators-tegra30.o:(tegra30_regulator_balance_voltage) in archive vmlinux.a
>>> referenced by regulators-tegra20.c
>>>               drivers/soc/tegra/regulators-tegra20.o:(tegra20_core_rtc_update) in archive vmlinux.a

Adapt the checks in the header to cover both cases on other architectures
and without PMC.

Fixes: 8318af5dd29c ("soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/soc/tegra/pmc.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index 4bcbf19d75ac..53f6d02889db 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -210,7 +210,6 @@ tegra_pmc_io_pad_power_disable(struct tegra_pmc *pmc, enum tegra_io_pad id)
 bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
 int tegra_pmc_cpu_power_on(unsigned int cpuid);
 int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
-bool tegra_pmc_core_domain_state_synced(void);
 
 #if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
 enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
@@ -230,6 +229,10 @@ static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
 {
 }
 #endif
+#endif
+
+#if defined(CONFIG_ARM) && defined(CONFIG_SOC_TEGRA_PMC)
+bool tegra_pmc_core_domain_state_synced(void);
 #else
 /* needed for COMPILE_TEST */
 static inline bool tegra_pmc_core_domain_state_synced(void)
-- 
2.39.5


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

* Re: [PATCH] soc/tegra: pmc: fix #ifdef block in header
  2026-06-18 14:36 [PATCH] soc/tegra: pmc: fix #ifdef block in header Arnd Bergmann
@ 2026-06-22  6:53 ` Thierry Reding
  2026-06-22  6:54 ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2026-06-22  6:53 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Jonathan Hunter, Arnd Bergmann, linux-tegra, linux-kernel

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

On Thu, Jun 18, 2026 at 04:36:50PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When build testing on ARM without the PMC driver, the other drivers
> fail to link:
> 
> ld.lld: error: undefined symbol: tegra_pmc_core_domain_state_synced
> >>> referenced by regulators-tegra30.c
> >>>               drivers/soc/tegra/regulators-tegra30.o:(tegra30_regulator_balance_voltage) in archive vmlinux.a
> >>> referenced by regulators-tegra20.c
> >>>               drivers/soc/tegra/regulators-tegra20.o:(tegra20_core_rtc_update) in archive vmlinux.a
> 
> Adapt the checks in the header to cover both cases on other architectures
> and without PMC.
> 
> Fixes: 8318af5dd29c ("soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/soc/tegra/pmc.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Heh... guess that was just one combination too much for me. Thanks for
catching this.

Thierry

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

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

* Re: [PATCH] soc/tegra: pmc: fix #ifdef block in header
  2026-06-18 14:36 [PATCH] soc/tegra: pmc: fix #ifdef block in header Arnd Bergmann
  2026-06-22  6:53 ` Thierry Reding
@ 2026-06-22  6:54 ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2026-06-22  6:54 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Arnd Bergmann
  Cc: Arnd Bergmann, linux-tegra, linux-kernel

From: Thierry Reding <treding@nvidia.com>


On Thu, 18 Jun 2026 16:36:50 +0200, Arnd Bergmann wrote:
> When build testing on ARM without the PMC driver, the other drivers
> fail to link:
> 
> ld.lld: error: undefined symbol: tegra_pmc_core_domain_state_synced
> >>> referenced by regulators-tegra30.c
> >>>               drivers/soc/tegra/regulators-tegra30.o:(tegra30_regulator_balance_voltage) in archive vmlinux.a
> >>> referenced by regulators-tegra20.c
> >>>               drivers/soc/tegra/regulators-tegra20.o:(tegra20_core_rtc_update) in archive vmlinux.a
> 
> [...]

Applied, thanks!

[1/1] soc/tegra: pmc: fix #ifdef block in header
      commit: 813e034925814858cc52e7de321ec4848314e15d

Best regards,
-- 
Thierry Reding <treding@nvidia.com>

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

* [PATCH] soc/tegra: pmc: fix #ifdef block in header
@ 2026-06-16 19:57 Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2026-06-16 19:57 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter; +Cc: Arnd Bergmann, linux-tegra, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

When build testing on ARM without the PMC driver, the other drivers
fail to link:

ld.lld: error: undefined symbol: tegra_pmc_core_domain_state_synced
>>> referenced by regulators-tegra30.c
>>>               drivers/soc/tegra/regulators-tegra30.o:(tegra30_regulator_balance_voltage) in archive vmlinux.a
>>> referenced by regulators-tegra20.c
>>>               drivers/soc/tegra/regulators-tegra20.o:(tegra20_core_rtc_update) in archive vmlinux.a

Adapt the checks in the header to cover both cases on other architectures
and without PMC.

Fixes: 8318af5dd29c ("soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/soc/tegra/pmc.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index 4bcbf19d75ac..53f6d02889db 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -210,7 +210,6 @@ tegra_pmc_io_pad_power_disable(struct tegra_pmc *pmc, enum tegra_io_pad id)
 bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
 int tegra_pmc_cpu_power_on(unsigned int cpuid);
 int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
-bool tegra_pmc_core_domain_state_synced(void);
 
 #if defined(CONFIG_SOC_TEGRA_PMC) && defined(CONFIG_PM_SLEEP)
 enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
@@ -230,6 +229,10 @@ static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
 {
 }
 #endif
+#endif
+
+#if defined(CONFIG_ARM) && defined(CONFIG_SOC_TEGRA_PMC)
+bool tegra_pmc_core_domain_state_synced(void);
 #else
 /* needed for COMPILE_TEST */
 static inline bool tegra_pmc_core_domain_state_synced(void)
-- 
2.39.5


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

end of thread, other threads:[~2026-06-22  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-18 14:36 [PATCH] soc/tegra: pmc: fix #ifdef block in header Arnd Bergmann
2026-06-22  6:53 ` Thierry Reding
2026-06-22  6:54 ` Thierry Reding
  -- strict thread matches above, loose matches on Subject: below --
2026-06-16 19:57 Arnd Bergmann

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

Powered by JetHome