soc/tegra: pmc: Drop SMP dependency from CPU APIs
Jon Hunter
maintainerPATCH 1/1 soc/tegra: pmc: Drop SMP dependency from CPU APIs
When CONFIG_SMP is disabled, the tegra clk driver now fails to build:
drivers/clk/tegra/clk-tegra30.c: In function ‘tegra30_cpu_rail_off_ready’:drivers/clk/tegra/clk-tegra30.c:1151:2: error: implicit declaration of function ‘tegra_pmc_cpu_is_powered’ [-Werror=implicit-function-declaration]
cpu_pwr_status = tegra_pmc_cpu_is_powered(1) ||
^
Fix the above error by removing the CONFIG_SMP ifdef around the declaration around the PMC CPU APIs because although these are not needed for non-SMP configurations, there is no harm in including these for non-SMP builds either.
--- drivers/soc/tegra/pmc.c | 2 -- include/soc/tegra/pmc.h | 2 -- 2 files changed, 4 deletions(-)
drivers/soc/tegra/pmc.c +0 -2
@@ -689,7 +689,6 @@ int tegra_powergate_sequence_power_up(unsigned int id, struct clk *clk, }EXPORT_SYMBOL (tegra_powergate_sequence_power_up); -#ifdef CONFIG_SMP /** * tegra_get_cpu_powergate_id() - convert from CPU ID to partition ID * @cpuid: CPU partition ID
@@ -749,7 +748,6 @@ int tegra_pmc_cpu_remove_clamping(unsigned int cpuid)return tegra_powergate_remove_clamping (id); } -#endif /* CONFIG_SMP */ static int tegra_pmc_restart_notify (struct notifier_block *this,unsigned long action,void *data)
include/soc/tegra/pmc.h +0 -2
@@ -26,11 +26,9 @@struct clk ;struct reset_control ; -#ifdef CONFIG_SMP 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); -#endif /* CONFIG_SMP */ /* * powergate and I/O rail APIs
Signature · 1 line
2.7.4
Quoting Jon Hunter (2018-12-13 01:46:14)
Quoted 6 lines
When
CONFIG_SMPis disabled, the tegra clk driver now fails to build:
drivers/clk/tegra/clk-tegra30.c: In function ‘tegra30_cpu_rail_off_ready’:drivers/clk/tegra/clk-tegra30.c:1151:2: error: implicit declaration of function ‘tegra_pmc_cpu_is_powered’ [-Werror=implicit-function-declaration]
cpu_pwr_status=tegra_pmc_cpu_is_powered(1)||^
Quoted 8 lines
Fix the above error by removing the
CONFIG_SMPifdef around the declaration around the PMC CPU APIs because although these are not needed for non-SMP configurations, there is no harm in including these for non-SMP builds either.Fixes 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper function")Reported-by Arnd Bergmann <[email protected]>Signed-off-by Jon Hunter <[email protected]>
Can I pick this into clk tree? That would make the compilation bisection hole very small. I could even reorder the clk-tegra branch to have this before the user so the bisection hole doesn't exist.
Thierry Reding
Acked-byQuoted 12 lines · Stephen Boyd
Quoting Jon Hunter (2018-12-13 01:46:14)
Quoted 11 lines
When
CONFIG_SMPis disabled, the tegra clk driver now fails to build:
drivers/clk/tegra/clk-tegra30.c: In function ‘tegra30_cpu_rail_off_ready’:drivers/clk/tegra/clk-tegra30.c:1151:2: error: implicit declaration of function ‘tegra_pmc_cpu_is_powered’ [-Werror=implicit-function-declaration]
cpu_pwr_status=tegra_pmc_cpu_is_powered(1)||^Fix the above error by removing the
CONFIG_SMPifdef around the declaration around the PMC CPU APIs because although these are not needed for non-SMP configurations, there is no harm in including these for non-SMP builds either.
Quoted 7 lines
Quoted 3 lines
Fixes 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper function")Reported-by Arnd Bergmann <[email protected]>Signed-off-by Jon Hunter <[email protected]>Can I pick this into clk tree? That would make the compilation bisection hole very small. I could even reorder the clk-tegra branch to have this before the user so the bisection hole doesn't exist.
Fine with me:
Quoting Thierry Reding (2018-12-13 08:07:46)
Quoted 17 lines · Stephen Boyd
Quoted 16 lines
Quoting Jon Hunter (2018-12-13 01:46:14)
Quoted 14 lines
When
CONFIG_SMPis disabled, the tegra clk driver now fails to build:
drivers/clk/tegra/clk-tegra30.c: In function ‘tegra30_cpu_rail_off_ready’:drivers/clk/tegra/clk-tegra30.c:1151:2: error: implicit declaration of function ‘tegra_pmc_cpu_is_powered’ [-Werror=implicit-function-declaration]
cpu_pwr_status=tegra_pmc_cpu_is_powered(1)||^Fix the above error by removing the
CONFIG_SMPifdef around the declaration around the PMC CPU APIs because although these are not needed for non-SMP configurations, there is no harm in including these for non-SMP builds either.Fixes 61866523ed6e ("clk: tegra30: Use Tegra CPU powergate helper function")Reported-by Arnd Bergmann <[email protected]>Signed-off-by Jon Hunter <[email protected]>
Quoted 7 lines
Quoted 3 lines
Can I pick this into clk tree? That would make the compilation bisection hole very small. I could even reorder the clk-tegra branch to have this before the user so the bisection hole doesn't exist.
Fine with me:
Acked-by Thierry Reding <[email protected]>
Ok thanks. I'll reorder things soon, but for now I'll just pick this atop the tegra branch and merge it up to next.