All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/5] Compile-test NVIDIA Tegra CPUIDLE driver
@ 2021-06-06 22:28 Dmitry Osipenko
  2021-06-06 22:28 ` [PATCH v1 1/5] soc/tegra: fuse: Add stubs needed for compile testing Dmitry Osipenko
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-06 22:28 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
  Cc: linux-pm, linux-tegra

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(-)

-- 
2.30.2


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

* [PATCH v1 1/5] soc/tegra: fuse: Add stubs needed for compile testing
  2021-06-06 22:28 [PATCH v1 0/5] Compile-test NVIDIA Tegra CPUIDLE driver Dmitry Osipenko
@ 2021-06-06 22:28 ` Dmitry Osipenko
  2021-06-06 22:28 ` [PATCH v1 2/5] soc/tegra: irq: " Dmitry Osipenko
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-06 22:28 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
  Cc: linux-pm, linux-tegra

Add stubs needed for compile-testing of tegra-cpuidle driver.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 include/soc/tegra/fuse.h | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h
index 990701f788bc..67d2bc856fbc 100644
--- a/include/soc/tegra/fuse.h
+++ b/include/soc/tegra/fuse.h
@@ -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);
-- 
2.30.2


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

* [PATCH v1 2/5] soc/tegra: irq: Add stubs needed for compile testing
  2021-06-06 22:28 [PATCH v1 0/5] Compile-test NVIDIA Tegra CPUIDLE driver Dmitry Osipenko
  2021-06-06 22:28 ` [PATCH v1 1/5] soc/tegra: fuse: Add stubs needed for compile testing Dmitry Osipenko
@ 2021-06-06 22:28 ` Dmitry Osipenko
  2021-06-16 19:06   ` Daniel Lezcano
  2021-06-06 22:28 ` [PATCH v1 3/5] soc/tegra: pm: Make stubs usable " Dmitry Osipenko
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-06 22:28 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
  Cc: linux-pm, linux-tegra

Add stubs needed for compile-testing of tegra-cpuidle driver.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 include/soc/tegra/irq.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/soc/tegra/irq.h b/include/soc/tegra/irq.h
index 8eb11a7109e4..94539551c8c1 100644
--- a/include/soc/tegra/irq.h
+++ b/include/soc/tegra/irq.h
@@ -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 */
-- 
2.30.2


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

* [PATCH v1 3/5] soc/tegra: pm: Make stubs usable for compile testing
  2021-06-06 22:28 [PATCH v1 0/5] Compile-test NVIDIA Tegra CPUIDLE driver Dmitry Osipenko
  2021-06-06 22:28 ` [PATCH v1 1/5] soc/tegra: fuse: Add stubs needed for compile testing Dmitry Osipenko
  2021-06-06 22:28 ` [PATCH v1 2/5] soc/tegra: irq: " Dmitry Osipenko
@ 2021-06-06 22:28 ` Dmitry Osipenko
  2021-06-06 22:28 ` [PATCH v1 4/5] clk: tegra: Add stubs needed " Dmitry Osipenko
  2021-06-06 22:28 ` [PATCH v1 5/5] cpuidle: tegra: Enable " Dmitry Osipenko
  4 siblings, 0 replies; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-06 22:28 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
  Cc: linux-pm, linux-tegra

The PM stubs need to depend on ARCH_TEGRA in order to be usable for
compile-testing of tegra-cpuidle driver. Add the dependency.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 include/soc/tegra/pm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/soc/tegra/pm.h b/include/soc/tegra/pm.h
index 08477d7bfab9..81701944fe78 100644
--- a/include/soc/tegra/pm.h
+++ b/include/soc/tegra/pm.h
@@ -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);
 
-- 
2.30.2


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

* [PATCH v1 4/5] clk: tegra: Add stubs needed for compile testing
  2021-06-06 22:28 [PATCH v1 0/5] Compile-test NVIDIA Tegra CPUIDLE driver Dmitry Osipenko
                   ` (2 preceding siblings ...)
  2021-06-06 22:28 ` [PATCH v1 3/5] soc/tegra: pm: Make stubs usable " Dmitry Osipenko
@ 2021-06-06 22:28 ` Dmitry Osipenko
  2021-06-16 19:08   ` Daniel Lezcano
  2021-06-06 22:28 ` [PATCH v1 5/5] cpuidle: tegra: Enable " Dmitry Osipenko
  4 siblings, 1 reply; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-06 22:28 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
  Cc: linux-pm, linux-tegra

Add stubs needed for compile-testing of tegra-cpuidle driver.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 include/linux/clk/tegra.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
index d128ad1570aa..9bd06d8a5436 100644
--- a/include/linux/clk/tegra.h
+++ b/include/linux/clk/tegra.h
@@ -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)
 {
-- 
2.30.2


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

* [PATCH v1 5/5] cpuidle: tegra: Enable compile testing
  2021-06-06 22:28 [PATCH v1 0/5] Compile-test NVIDIA Tegra CPUIDLE driver Dmitry Osipenko
                   ` (3 preceding siblings ...)
  2021-06-06 22:28 ` [PATCH v1 4/5] clk: tegra: Add stubs needed " Dmitry Osipenko
@ 2021-06-06 22:28 ` Dmitry Osipenko
  2021-06-16  7:37   ` kernel test robot
  4 siblings, 1 reply; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-06 22:28 UTC (permalink / raw)
  To: Thierry Reding, Jonathan Hunter, Rafael J. Wysocki, Daniel Lezcano
  Cc: linux-pm, linux-tegra

Enable compile testing of tegra-cpuidle driver.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/cpuidle/Kconfig.arm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index 334f83e56120..98f8ee6b3552 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -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
-- 
2.30.2


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

* Re: [PATCH v1 5/5] cpuidle: tegra: Enable compile testing
  2021-06-06 22:28 ` [PATCH v1 5/5] cpuidle: tegra: Enable " Dmitry Osipenko
@ 2021-06-16  7:37   ` kernel test robot
  2021-06-16 19:24     ` Dmitry Osipenko
  0 siblings, 1 reply; 14+ messages in thread
From: kernel test robot @ 2021-06-16  7:37 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding, Jonathan Hunter,
	Rafael J. Wysocki, Daniel Lezcano
  Cc: kbuild-all, linux-pm, linux-tegra

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

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
Reported-by: kernel test robot <lkp@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32855 bytes --]

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

* Re: [PATCH v1 2/5] soc/tegra: irq: Add stubs needed for compile testing
  2021-06-06 22:28 ` [PATCH v1 2/5] soc/tegra: irq: " Dmitry Osipenko
@ 2021-06-16 19:06   ` Daniel Lezcano
  2021-06-16 19:17     ` Dmitry Osipenko
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Lezcano @ 2021-06-16 19:06 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki
  Cc: linux-pm, linux-tegra

On 07/06/2021 00:28, Dmitry Osipenko wrote:
> Add stubs needed for compile-testing of tegra-cpuidle driver.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  include/soc/tegra/irq.h | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/include/soc/tegra/irq.h b/include/soc/tegra/irq.h
> index 8eb11a7109e4..94539551c8c1 100644
> --- a/include/soc/tegra/irq.h
> +++ b/include/soc/tegra/irq.h
> @@ -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 ?

>  bool tegra_pending_sgi(void);
> +#else
> +static inline bool tegra_pending_sgi(void)
> +{
> +	return false;
> +}
>  #endif
>  
>  #endif /* __SOC_TEGRA_IRQ_H */
> 


-- 
<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

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

* Re: [PATCH v1 4/5] clk: tegra: Add stubs needed for compile testing
  2021-06-06 22:28 ` [PATCH v1 4/5] clk: tegra: Add stubs needed " Dmitry Osipenko
@ 2021-06-16 19:08   ` Daniel Lezcano
  2021-06-16 19:35     ` Dmitry Osipenko
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Lezcano @ 2021-06-16 19:08 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki
  Cc: linux-pm, linux-tegra

On 07/06/2021 00:28, Dmitry Osipenko wrote:
> Add stubs needed for compile-testing of tegra-cpuidle driver.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  include/linux/clk/tegra.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
> index d128ad1570aa..9bd06d8a5436 100644
> --- a/include/linux/clk/tegra.h
> +++ b/include/linux/clk/tegra.h
> @@ -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 ?

>  static inline void tegra_wait_cpu_in_reset(u32 cpu)
>  {
> 


-- 
<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

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

* Re: [PATCH v1 2/5] soc/tegra: irq: Add stubs needed for compile testing
  2021-06-16 19:06   ` Daniel Lezcano
@ 2021-06-16 19:17     ` Dmitry Osipenko
  2021-06-16 19:18       ` Daniel Lezcano
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-16 19:17 UTC (permalink / raw)
  To: Daniel Lezcano, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki
  Cc: linux-pm, linux-tegra

16.06.2021 22:06, Daniel Lezcano пишет:
> On 07/06/2021 00:28, Dmitry Osipenko wrote:
>> Add stubs needed for compile-testing of tegra-cpuidle driver.
>>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>  include/soc/tegra/irq.h | 9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/soc/tegra/irq.h b/include/soc/tegra/irq.h
>> index 8eb11a7109e4..94539551c8c1 100644
>> --- a/include/soc/tegra/irq.h
>> +++ b/include/soc/tegra/irq.h
>> @@ -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 ?
> 
>>  bool tegra_pending_sgi(void);

ARM and ARM64, only ARM32 variant builds tegra_pending_sgi().


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

* Re: [PATCH v1 2/5] soc/tegra: irq: Add stubs needed for compile testing
  2021-06-16 19:17     ` Dmitry Osipenko
@ 2021-06-16 19:18       ` Daniel Lezcano
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Lezcano @ 2021-06-16 19:18 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki
  Cc: linux-pm, linux-tegra

On 16/06/2021 21:17, Dmitry Osipenko wrote:
> 16.06.2021 22:06, Daniel Lezcano пишет:
>> On 07/06/2021 00:28, Dmitry Osipenko wrote:
>>> Add stubs needed for compile-testing of tegra-cpuidle driver.
>>>
>>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>>> ---
>>>  include/soc/tegra/irq.h | 9 ++++++++-
>>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/soc/tegra/irq.h b/include/soc/tegra/irq.h
>>> index 8eb11a7109e4..94539551c8c1 100644
>>> --- a/include/soc/tegra/irq.h
>>> +++ b/include/soc/tegra/irq.h
>>> @@ -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 ?
>>
>>>  bool tegra_pending_sgi(void);
> 
> ARM and ARM64, only ARM32 variant builds tegra_pending_sgi().

Ah, I see, thanks!


-- 
<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

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

* Re: [PATCH v1 5/5] cpuidle: tegra: Enable compile testing
  2021-06-16  7:37   ` kernel test robot
@ 2021-06-16 19:24     ` Dmitry Osipenko
  2021-06-16 19:45       ` Dmitry Osipenko
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-16 19:24 UTC (permalink / raw)
  To: kernel test robot, Thierry Reding, Jonathan Hunter,
	Rafael J. Wysocki, Daniel Lezcano
  Cc: kbuild-all, linux-pm, linux-tegra

16.06.2021 10:37, kernel test robot пишет:
> 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
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 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'

I can't find where cpu_sa110_do_resume is specified in kernel.

> 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

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?

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

* Re: [PATCH v1 4/5] clk: tegra: Add stubs needed for compile testing
  2021-06-16 19:08   ` Daniel Lezcano
@ 2021-06-16 19:35     ` Dmitry Osipenko
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-16 19:35 UTC (permalink / raw)
  To: Daniel Lezcano, Thierry Reding, Jonathan Hunter, Rafael J. Wysocki
  Cc: linux-pm, linux-tegra

16.06.2021 22:08, Daniel Lezcano пишет:
> On 07/06/2021 00:28, Dmitry Osipenko wrote:
>> Add stubs needed for compile-testing of tegra-cpuidle driver.
>>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>  include/linux/clk/tegra.h | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
>> index d128ad1570aa..9bd06d8a5436 100644
>> --- a/include/linux/clk/tegra.h
>> +++ b/include/linux/clk/tegra.h
>> @@ -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 ?

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.

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

* Re: [PATCH v1 5/5] cpuidle: tegra: Enable compile testing
  2021-06-16 19:24     ` Dmitry Osipenko
@ 2021-06-16 19:45       ` Dmitry Osipenko
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Osipenko @ 2021-06-16 19:45 UTC (permalink / raw)
  To: kernel test robot, Thierry Reding, Jonathan Hunter,
	Rafael J. Wysocki, Daniel Lezcano
  Cc: kbuild-all, linux-pm, linux-tegra

16.06.2021 22:24, Dmitry Osipenko пишет:
> 16.06.2021 10:37, kernel test robot пишет:
>> 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
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> 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'
> 
> I can't find where cpu_sa110_do_resume is specified in kernel.
> 
>> 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
> 
> 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?

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.

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

end of thread, other threads:[~2021-06-16 19:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06 22:28 [PATCH v1 0/5] Compile-test NVIDIA Tegra CPUIDLE driver Dmitry Osipenko
2021-06-06 22:28 ` [PATCH v1 1/5] soc/tegra: fuse: Add stubs needed for compile testing Dmitry Osipenko
2021-06-06 22:28 ` [PATCH v1 2/5] soc/tegra: irq: " Dmitry Osipenko
2021-06-16 19:06   ` Daniel Lezcano
2021-06-16 19:17     ` Dmitry Osipenko
2021-06-16 19:18       ` Daniel Lezcano
2021-06-06 22:28 ` [PATCH v1 3/5] soc/tegra: pm: Make stubs usable " Dmitry Osipenko
2021-06-06 22:28 ` [PATCH v1 4/5] clk: tegra: Add stubs needed " Dmitry Osipenko
2021-06-16 19:08   ` Daniel Lezcano
2021-06-16 19:35     ` Dmitry Osipenko
2021-06-06 22:28 ` [PATCH v1 5/5] cpuidle: tegra: Enable " Dmitry Osipenko
2021-06-16  7:37   ` kernel test robot
2021-06-16 19:24     ` Dmitry Osipenko
2021-06-16 19:45       ` Dmitry Osipenko

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.