Compile-test NVIDIA Tegra CPUIDLE driver
cover Compile-test NVIDIA Tegra CPUIDLE driver
Add couple missing stubs needed for compile-testing of tegra-cpuidle driver and enable the compile-testing.
Dmitry Osipenko (5):
soc/tegra: fuse: Add stubs needed for compile testing soc/tegra: irq: Add stubs needed for compile testing soc/tegra: pm: Make stubs usable for compile testing
clk: tegra: Add stubs needed for compile testing
cpuidle: tegra: Enable compile testing
drivers/cpuidle/Kconfig.arm | 2 +- include/linux/clk/tegra.h | 4 ++++ include/soc/tegra/fuse.h | 31 ++++++++++++++++++++++++++----- include/soc/tegra/irq.h | 9 ++++++++- include/soc/tegra/pm.h | 2 +- 5 files changed, 40 insertions(+), 8 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/5 soc/tegra: fuse: Add stubs needed for compile testing
Add stubs needed for compile-testing of tegra-cpuidle driver.
--- include/soc/tegra/fuse.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-)
include/soc/tegra/fuse.h +26 -5
@@ -6,6 +6,8 @@#ifndef __SOC_TEGRA_FUSE_H__#define __SOC_TEGRA_FUSE_H__ +#include <linux/types.h> +#define TEGRA20 0x20#define TEGRA30 0x30#define TEGRA114 0x35
@@ -22,11 +24,6 @@#ifndef __ASSEMBLY__ -u32 tegra_read_chipid (void ); -u8 tegra_get_chip_id (void ); -u8 tegra_get_platform (void ); -bool tegra_is_silicon (void ); -enum tegra_revision {TEGRA_REVISION_UNKNOWN =0 , TEGRA_REVISION_A01,
@@ -57,6 +54,10 @@ extern struct tegra_sku_info tegra_sku_info;u32 tegra_read_straps (void );u32 tegra_read_ram_code (void );int tegra_fuse_readl (unsigned long offset,u32 *value); +u32 tegra_read_chipid (void ); +u8 tegra_get_chip_id (void ); +u8 tegra_get_platform (void ); +bool tegra_is_silicon (void );#else static struct tegra_sku_info tegra_sku_info__maybe_unused ;
@@ -74,6 +75,26 @@ static inline int tegra_fuse_readl(unsigned long offset, u32 *value) {return -ENODEV ; } + +static inline u32 tegra_read_chipid (void ) +{ +return 0 ; +} + +static inline u8 tegra_get_chip_id (void ) +{ +return 0 ; +} + +static inline u8 tegra_get_platform (void ) +{ +return 0 ; +} + +static inline bool tegra_is_silicon (void ) +{ +return false; +}#endif struct device *tegra_soc_device_register (void );
Signature · 1 line
2.30.2
PATCH 2/5 soc/tegra: irq: Add stubs needed for compile testing
In reply to Dmitry OsipenkoAdd stubs needed for compile-testing of tegra-cpuidle driver.
--- include/soc/tegra/irq.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
include/soc/tegra/irq.h +8 -1
@@ -6,8 +6,15 @@#ifndef __SOC_TEGRA_IRQ_H#define __SOC_TEGRA_IRQ_H -#if defined(CONFIG_ARM ) +#include <linux/types.h> + +#if defined(CONFIG_ARM ) && defined(CONFIG_ARCH_TEGRA )bool tegra_pending_sgi (void ); +#else +static inline bool tegra_pending_sgi (void ) +{ +return false; +}#endif #endif /* __SOC_TEGRA_IRQ_H */
Signature · 1 line
2.30.2
Re: [PATCH v1 2/5] soc/tegra: irq: Add stubs needed for compile testing
Quoted 12 lines · Dmitry Osipenko
Add stubs needed for compile-testing of tegra-cpuidle driver.
Signed-off-by Dmitry Osipenko <[email protected]>--- include/soc/tegra/irq.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)include/soc/tegra/irq.h +0
-0
include/soc/tegra/irq.h line 11
Quoted 7 lines
include/soc/tegra/irq.h +3
-1@@ -6,8 +6,15 @@#ifndef __SOC_TEGRA_IRQ_H#define __SOC_TEGRA_IRQ_H -#if defined(CONFIG_ARM ) +#include <linux/types.h> + +#if defined(CONFIG_ARM ) && defined(CONFIG_ARCH_TEGRA )
Does not CONFIG_ARCH_TEGRA depends on CONFIG_ARM ?
Quoted 10 lines
include/soc/tegra/irq.h +5
-0bool tegra_pending_sgi (void ); +#else +static inline bool tegra_pending_sgi (void ) +{ +return false; +}#endif #endif /* __SOC_TEGRA_IRQ_H */
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH v1 2/5] soc/tegra: irq: Add stubs needed for compile testing
16.06.2021 22:06, Daniel Lezcano пишет:
Quoted 16 lines · Dmitry Osipenko
Quoted 15 lines
Add stubs needed for compile-testing of tegra-cpuidle driver.
Signed-off-by Dmitry Osipenko <[email protected]>--- include/soc/tegra/irq.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)include/soc/tegra/irq.h +0
-0@@ -6,8 +6,15 @@#ifndef __SOC_TEGRA_IRQ_H#define __SOC_TEGRA_IRQ_H
Quoted 8 lines
include/soc/tegra/irq.h line 11
Quoted 4 lines
include/soc/tegra/irq.h +3
-1-#if defined(CONFIG_ARM ) +#include <linux/types.h> + +#if defined(CONFIG_ARM ) && defined(CONFIG_ARCH_TEGRA )Does not
CONFIG_ARCH_TEGRAdepends onCONFIG_ARM?Quoted 1 line
include/soc/tegra/irq.h +0
-0bool tegra_pending_sgi (void );
ARM and ARM64, only ARM32 variant builds tegra_pending_sgi().
Re: [PATCH v1 2/5] soc/tegra: irq: Add stubs needed for compile testing
Quoted 24 lines · Dmitry Osipenko
16.06.2021 22:06, Daniel Lezcano пишет:
Quoted 23 lines · Dmitry Osipenko
Quoted 12 lines
Add stubs needed for compile-testing of tegra-cpuidle driver.
Signed-off-by Dmitry Osipenko <[email protected]>--- include/soc/tegra/irq.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)include/soc/tegra/irq.h +0
-0include/soc/tegra/irq.h line 11
Quoted 7 lines
include/soc/tegra/irq.h +3
-1@@ -6,8 +6,15 @@#ifndef __SOC_TEGRA_IRQ_H#define __SOC_TEGRA_IRQ_H -#if defined(CONFIG_ARM ) +#include <linux/types.h> + +#if defined(CONFIG_ARM ) && defined(CONFIG_ARCH_TEGRA )Does not
CONFIG_ARCH_TEGRAdepends onCONFIG_ARM?
Quoted 3 lines
Quoted 1 line
include/soc/tegra/irq.h line 12
Quoted 1 line
include/soc/tegra/irq.h +0
-0bool tegra_pending_sgi (void );ARM and ARM64, only ARM32 variant builds
tegra_pending_sgi().
Ah, I see, thanks!
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
PATCH 3/5 soc/tegra: pm: Make stubs usable for compile testing
In reply to Dmitry OsipenkoThe PM stubs need to depend on ARCH_TEGRA in order to be usable for compile-testing of tegra-cpuidle driver. Add the dependency.
--- include/soc/tegra/pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/soc/tegra/pm.h +1 -1
@@ -16,7 +16,7 @@ enum tegra_suspend_mode { TEGRA_MAX_SUSPEND_MODE, }; -#if defined(CONFIG_PM_SLEEP ) && defined(CONFIG_ARM ) +#if defined(CONFIG_PM_SLEEP ) && defined(CONFIG_ARM ) && defined(CONFIG_ARCH_TEGRA )enum tegra_suspend_mode tegra_pm_validate_suspend_mode (enum tegra_suspend_mode mode);
Signature · 1 line
2.30.2
PATCH 4/5 clk: tegra: Add stubs needed for compile testing
In reply to Dmitry OsipenkoAdd stubs needed for compile-testing of tegra-cpuidle driver.
--- include/linux/clk/tegra.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/clk/tegra.h +4 -0
@@ -42,7 +42,11 @@ struct tegra_cpu_car_ops {#endif }; +#ifdef CONFIG_ARCH_TEGRA extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; +#else +static struct tegra_cpu_car_ops *tegra_cpu_car_ops__maybe_unused ; +#endif static inline void tegra_wait_cpu_in_reset (u32 cpu) {
Signature · 1 line
2.30.2
Re: [PATCH v1 4/5] clk: tegra: Add stubs needed for compile testing
Quoted 12 lines · Dmitry Osipenko
Add stubs needed for compile-testing of tegra-cpuidle driver.
Signed-off-by Dmitry Osipenko <[email protected]>--- include/linux/clk/tegra.h | 4 ++++ 1 file changed, 4 insertions(+)include/linux/clk/tegra.h +0
-0
include/linux/clk/tegra.h struct tegra_cpu_car_ops { · line 49
Quoted 8 lines
include/linux/clk/tegra.h +4
-0@@ -42,7 +42,11 @@ struct tegra_cpu_car_ops {#endif }; +#ifdef CONFIG_ARCH_TEGRA extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; +#else +static struct tegra_cpu_car_ops *tegra_cpu_car_ops__maybe_unused ; +#endif
Why not just have __may_be_unused without the #ifdef ?
Quoted 3 lines
include/linux/clk/tegra.h +0
-0static inline void tegra_wait_cpu_in_reset (u32 cpu) {
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH v1 4/5] clk: tegra: Add stubs needed for compile testing
16.06.2021 22:08, Daniel Lezcano пишет:
Quoted 16 lines · Dmitry Osipenko
Quoted 15 lines
Add stubs needed for compile-testing of tegra-cpuidle driver.
Signed-off-by Dmitry Osipenko <[email protected]>--- include/linux/clk/tegra.h | 4 ++++ 1 file changed, 4 insertions(+)include/linux/clk/tegra.h +0
-0@@ -42,7 +42,11 @@ struct tegra_cpu_car_ops {#endif };
Quoted 7 lines
include/linux/clk/tegra.h struct tegra_cpu_car_ops { · line 49
Quoted 5 lines
include/linux/clk/tegra.h +4
-0+#ifdef CONFIG_ARCH_TEGRA extern struct tegra_cpu_car_ops *tegra_cpu_car_ops; +#else +static struct tegra_cpu_car_ops *tegra_cpu_car_ops__maybe_unused ; +#endif Why not just have
__may_be_unusedwithout the #ifdef ?
The first variant is an external symbol. The tegra_cpu_car_ops* must be specified somewhere, otherwise linkage will fail. The __maybe_unused won't help here because symbol must be resolved by linker for the code where it's used.
The latter variant is a static NULL pointer marked as __maybe_unused. This allows to include header file universally without producing compiler warning about the unused static variable during compile-testing.
PATCH 5/5 cpuidle: tegra: Enable compile testing
In reply to Dmitry OsipenkoEnable compile testing of tegra-cpuidle driver.
--- drivers/cpuidle/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpuidle/Kconfig.arm +1 -1
@@ -99,7 +99,7 @@ config ARM_MVEBU_V7_CPUIDLE config ARM_TEGRA_CPUIDLE bool "CPU Idle Driver for NVIDIA Tegra SoCs" - depends on ARCH_TEGRA && !ARM64 + depends on (ARCH_TEGRA || COMPILE_TEST) && !ARM64 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP select ARM_CPU_SUSPEND help
Signature · 1 line
2.30.2
kernel test robot
build botRe: [PATCH v1 5/5] cpuidle: tegra: Enable compile testing
I love your patch! Yet something to improve:
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on next-20210615]
[cannot apply to pm/linux-next daniel.lezcano/clockevents/next v5.13-rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/Compile-test-NVIDIA-Tegra-CPUIDLE-driver/20210607-063217 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next config: arm-randconfig-r005-20210616 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/53a9ab1dfd605ffae44d67f01a07a18b8ecbb1be
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/Compile-test-NVIDIA-Tegra-CPUIDLE-driver/20210607-063217 git checkout 53a9ab1dfd605ffae44d67f01a07a18b8ecbb1be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld: arch/arm/kernel/sleep.o: in function `__cpu_suspend':
>> (.text+0x68): undefined reference to `cpu_sa110_suspend_size' arm-linux-gnueabi-ld: arch/arm/kernel/suspend.o: in function `__cpu_suspend_save': >> suspend.c:(.text+0x118): undefined reference to `cpu_sa110_do_suspend' >> arm-linux-gnueabi-ld: suspend.c:(.text+0x13c): undefined reference to `cpu_sa110_do_resume'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ARM_CPU_SUSPEND
Depends on ARCH_SUSPEND_POSSIBLE
Selected by
- ARM_TEGRA_CPUIDLE && CPU_IDLE && (ARM || ARM64) && (ARCH_TEGRA || COMPILE_TEST && !ARM64
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Re: [PATCH v1 5/5] cpuidle: tegra: Enable compile testing
16.06.2021 10:37, kernel test robot пишет:
Quoted 25 lines
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on next-20210615]
[cannot apply to pm/linux-next daniel.lezcano/clockevents/next v5.13-rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]url: https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/Compile-test-NVIDIA-Tegra-CPUIDLE-driver/20210607-063217 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next config: arm-randconfig-r005-20210616 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/53a9ab1dfd605ffae44d67f01a07a18b8ecbb1be
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/Compile-test-NVIDIA-Tegra-CPUIDLE-driver/20210607-063217 git checkout53a9ab1dfd605ffae44d67f01a07a18b8ecbb1be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
Quoted 10 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld:
arch/arm/kernel/sleep.o: in function `__cpu_suspend':Quoted 1 line
Quoted 1 line
(.text+0x68): undefined reference to `cpu_sa110_suspend_size'
arm-linux-gnueabi-ld:
arch/arm/kernel/suspend.o: in function `__cpu_suspend_save':Quoted 2 lines
Quoted 2 lines
suspend.c:(.text+0x118): undefined reference to `cpu_sa110_do_suspend'
arm-linux-gnueabi-ld: suspend.c:(.text+0x13c): undefined reference to `cpu_sa110_do_resume'
I can't find where cpu_sa110_do_resume is specified in kernel.
Quoted 5 lines
Kconfigwarnings: (for reference only)
WARNING: unmet direct dependencies detected forARM_CPU_SUSPEND
Depends onARCH_SUSPEND_POSSIBLE
Selected by
-ARM_TEGRA_CPUIDLE&&CPU_IDLE&& (ARM || ARM64) && (ARCH_TEGRA||COMPILE_TEST&& !ARM64
There are other Kconfig.arm entries that are compile-tested and select ARM_CPU_SUSPEND. Do they get the same warning? Should I do something about it?
Re: [PATCH v1 5/5] cpuidle: tegra: Enable compile testing
16.06.2021 22:24, Dmitry Osipenko пишет:
Quoted 45 lines
16.06.2021 10:37, kernel test robot пишет:
Quoted 25 lines
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on next-20210615]
[cannot apply to pm/linux-next daniel.lezcano/clockevents/next v5.13-rc6] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]url: https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/Compile-test-NVIDIA-Tegra-CPUIDLE-driver/20210607-063217 base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next config: arm-randconfig-r005-20210616 (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/53a9ab1dfd605ffae44d67f01a07a18b8ecbb1be
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/Compile-test-NVIDIA-Tegra-CPUIDLE-driver/20210607-063217 git checkout53a9ab1dfd605ffae44d67f01a07a18b8ecbb1be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=armQuoted 10 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>All errors (new ones prefixed by >>):
arm-linux-gnueabi-ld:
arch/arm/kernel/sleep.o: in function `__cpu_suspend':Quoted 1 line
Quoted 1 line
(.text+0x68): undefined reference to `cpu_sa110_suspend_size'
arm-linux-gnueabi-ld:
arch/arm/kernel/suspend.o: in function `__cpu_suspend_save':Quoted 2 lines
Quoted 2 lines
suspend.c:(.text+0x118): undefined reference to `cpu_sa110_do_suspend'
arm-linux-gnueabi-ld: suspend.c:(.text+0x13c): undefined reference to `cpu_sa110_do_resume'I can't find where
cpu_sa110_do_resumeis specified in kernel.Quoted 5 lines
Kconfigwarnings: (for reference only)
WARNING: unmet direct dependencies detected forARM_CPU_SUSPEND
Depends onARCH_SUSPEND_POSSIBLE
Selected by
-ARM_TEGRA_CPUIDLE&&CPU_IDLE&& (ARM || ARM64) && (ARCH_TEGRA||COMPILE_TEST&& !ARM64
Quoted 3 lines
There are other
Kconfig.armentries that are compile-tested and selectARM_CPU_SUSPEND. Do they get the same warning? Should I do something about it?
Although, I see now that the other entries have dependencies which should protect them indirectly from this warning. Perhaps adding dependency on MMU, like QCOM driver does it, should help. I'll fix it in the next version.