All of lore.kernel.org
 help / color / mirror / Atom feed
* stable-rc: 5.15: arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared (first use in this function)
@ 2022-09-13 11:27 Naresh Kamboju
  2022-09-13 12:28 ` Claudiu.Beznea
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2022-09-13 11:27 UTC (permalink / raw)
  To: linux-stable, lkft-triage
  Cc: Greg Kroah-Hartman, Sasha Levin, Frederic Schumacher, Claudiu Beznea

On stable-rc 5.15 arm builds failed due to following errors / warnings.

arch/arm/mach-at91/pm.c: In function 'at91_suspend_finish':
arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared
(first use in this function)
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                                                    ^~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:35:51: note: in
definition of macro '__le32_to_cpu'
   35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
      |                                                   ^
arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
  303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
__iormb(); __v; })
      |                                              ^~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                       ^~~~~
arch/arm/mach-at91/pm.c:370:52: note: each undeclared identifier is
reported only once for each function it appears in
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                                                    ^~~~~~~~~~~~~~
include/uapi/linux/byteorder/little_endian.h:35:51: note: in
definition of macro '__le32_to_cpu'
   35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
      |                                                   ^
arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
  303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
__iormb(); __v; })
      |                                              ^~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
  370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
      |                       ^~~~~
arch/arm/mach-at91/pm.c:373:33: error: 'DDR3PHY_ZQ0SR0_PDO_OFF'
undeclared (first use in this function)
  373 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:377:33: error: 'DDR3PHY_ZQ0SR0_PUO_OFF'
undeclared (first use in this function)
  377 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:381:33: error: 'DDR3PHY_ZQ0SR0_PDODT_OFF'
undeclared (first use in this function)
  381 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-at91/pm.c:385:33: error: 'DDR3PHY_ZQ0SRO_PUODT_OFF'
undeclared (first use in this function)
  385 |                 index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:289: arch/arm/mach-at91/pm.o] Error 1

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build link:
 - https://builds.tuxbuild.com/2EfrKWiY7k1znh1Nt7nFQmRuyRc/

# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#

tuxmake --runtime podman --target-arch arm --toolchain gcc-11
--kconfig at91_dt_defconfig

Following patch seems to be causing these build failures on stable-rc 5.15.
---
ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh
[ Upstream commit 7a94b83a7dc551607b6c4400df29151e6a951f07 ]

On SAMA7G5, when resuming from backup and self-refresh, the bootloader
performs DDR PHY recalibration by restoring the value of ZQ0SR0 (stored
in RAM by Linux before going to backup and self-refresh). It has been
discovered that the current procedure doesn't work for all possible values
that might go to ZQ0SR0 due to hardware bug. The workaround to this is to
avoid storing some values in ZQ0SR0. Thus Linux will read the ZQ0SR0
register and cache its value in RAM after processing it (using
modified_gray_code array). The bootloader will restore the processed value.

Fixes: d2d4716d8384 ("ARM: at91: pm: save ddr phy calibration data to securam")
Suggested-by: Frederic Schumacher <frederic.schumacher@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220826083927.3107272-4-claudiu.beznea@microchip.com
Signed-off-by: Sasha Levin <sashal@kernel.org>



--
Linaro LKFT
https://lkft.linaro.org

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

* Re: stable-rc: 5.15: arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared (first use in this function)
  2022-09-13 11:27 stable-rc: 5.15: arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared (first use in this function) Naresh Kamboju
@ 2022-09-13 12:28 ` Claudiu.Beznea
  2022-09-13 13:45   ` Sasha Levin
  0 siblings, 1 reply; 3+ messages in thread
From: Claudiu.Beznea @ 2022-09-13 12:28 UTC (permalink / raw)
  To: naresh.kamboju, stable, lkft-triage; +Cc: gregkh, sashal, Frederic.Schumacher

On 13.09.2022 14:27, Naresh Kamboju wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On stable-rc 5.15 arm builds failed due to following errors / warnings.
> 
> arch/arm/mach-at91/pm.c: In function 'at91_suspend_finish':
> arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared
> (first use in this function)
>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>       |                                                    ^~~~~~~~~~~~~~
> include/uapi/linux/byteorder/little_endian.h:35:51: note: in
> definition of macro '__le32_to_cpu'
>    35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>       |                                                   ^
> arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
>   303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
> __iormb(); __v; })
>       |                                              ^~~~~~~~~~~~~
> arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>       |                       ^~~~~
> arch/arm/mach-at91/pm.c:370:52: note: each undeclared identifier is
> reported only once for each function it appears in
>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>       |                                                    ^~~~~~~~~~~~~~
> include/uapi/linux/byteorder/little_endian.h:35:51: note: in
> definition of macro '__le32_to_cpu'
>    35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>       |                                                   ^
> arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
>   303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
> __iormb(); __v; })
>       |                                              ^~~~~~~~~~~~~
> arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>       |                       ^~~~~
> arch/arm/mach-at91/pm.c:373:33: error: 'DDR3PHY_ZQ0SR0_PDO_OFF'
> undeclared (first use in this function)
>   373 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
>       |                                 ^~~~~~~~~~~~~~~~~~~~~~
> arch/arm/mach-at91/pm.c:377:33: error: 'DDR3PHY_ZQ0SR0_PUO_OFF'
> undeclared (first use in this function)
>   377 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
>       |                                 ^~~~~~~~~~~~~~~~~~~~~~
> arch/arm/mach-at91/pm.c:381:33: error: 'DDR3PHY_ZQ0SR0_PDODT_OFF'
> undeclared (first use in this function)
>   381 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
>       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
> arch/arm/mach-at91/pm.c:385:33: error: 'DDR3PHY_ZQ0SRO_PUODT_OFF'
> undeclared (first use in this function)
>   385 |                 index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
>       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
> make[2]: *** [scripts/Makefile.build:289: arch/arm/mach-at91/pm.o] Error 1
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Build link:
>  - https://builds.tuxbuild.com/2EfrKWiY7k1znh1Nt7nFQmRuyRc/
> 
> # To install tuxmake on your system globally:
> # sudo pip3 install -U tuxmake
> #
> 
> tuxmake --runtime podman --target-arch arm --toolchain gcc-11
> --kconfig at91_dt_defconfig
> 
> Following patch seems to be causing these build failures on stable-rc 5.15.
> ---
> ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh
> [ Upstream commit 7a94b83a7dc551607b6c4400df29151e6a951f07 ]
> 
> On SAMA7G5, when resuming from backup and self-refresh, the bootloader
> performs DDR PHY recalibration by restoring the value of ZQ0SR0 (stored
> in RAM by Linux before going to backup and self-refresh). It has been
> discovered that the current procedure doesn't work for all possible values
> that might go to ZQ0SR0 due to hardware bug. The workaround to this is to
> avoid storing some values in ZQ0SR0. Thus Linux will read the ZQ0SR0
> register and cache its value in RAM after processing it (using
> modified_gray_code array). The bootloader will restore the processed value.
> 
> Fixes: d2d4716d8384 ("ARM: at91: pm: save ddr phy calibration data to securam")
> Suggested-by: Frederic Schumacher <frederic.schumacher@microchip.com>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> Link: https://lore.kernel.org/r/20220826083927.3107272-4-claudiu.beznea@microchip.com
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Hi,

This depends on:

commit dc3005703f8cd893d325081c20b400e08377d9bb
Author: Claudiu Beznea <claudiu.beznea@microchip.com>
Date:   Thu Jan 13 16:48:51 2022 +0200

    ARM: at91: ddr: remove CONFIG_SOC_SAMA7 dependency

    Remove CONFIG_SOC_SAMA7 dependency to avoid having #ifdef preprocessor
    directives in driver code (arch/arm/mach-at91/pm.c). This prepares the
    code for next commits.

    Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
    Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
    Link:
https://lore.kernel.org/r/20220113144900.906370-2-claudiu.beznea@microchip.com

Apologies for not mentioning it.

Thank you,
Claudiu Beznea

> 
> 
> 
> --
> Linaro LKFT
> https://lkft.linaro.org


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

* Re: stable-rc: 5.15: arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared (first use in this function)
  2022-09-13 12:28 ` Claudiu.Beznea
@ 2022-09-13 13:45   ` Sasha Levin
  0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2022-09-13 13:45 UTC (permalink / raw)
  To: Claudiu.Beznea
  Cc: naresh.kamboju, stable, lkft-triage, gregkh, Frederic.Schumacher

On Tue, Sep 13, 2022 at 12:28:31PM +0000, Claudiu.Beznea@microchip.com wrote:
>On 13.09.2022 14:27, Naresh Kamboju wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> On stable-rc 5.15 arm builds failed due to following errors / warnings.
>>
>> arch/arm/mach-at91/pm.c: In function 'at91_suspend_finish':
>> arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared
>> (first use in this function)
>>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>>       |                                                    ^~~~~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:51: note: in
>> definition of macro '__le32_to_cpu'
>>    35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>>       |                                                   ^
>> arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
>>   303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
>> __iormb(); __v; })
>>       |                                              ^~~~~~~~~~~~~
>> arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
>>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>>       |                       ^~~~~
>> arch/arm/mach-at91/pm.c:370:52: note: each undeclared identifier is
>> reported only once for each function it appears in
>>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>>       |                                                    ^~~~~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:51: note: in
>> definition of macro '__le32_to_cpu'
>>    35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>>       |                                                   ^
>> arch/arm/include/asm/io.h:303:46: note: in expansion of macro 'readl_relaxed'
>>   303 | #define readl(c)                ({ u32 __v = readl_relaxed(c);
>> __iormb(); __v; })
>>       |                                              ^~~~~~~~~~~~~
>> arch/arm/mach-at91/pm.c:370:23: note: in expansion of macro 'readl'
>>   370 |                 tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
>>       |                       ^~~~~
>> arch/arm/mach-at91/pm.c:373:33: error: 'DDR3PHY_ZQ0SR0_PDO_OFF'
>> undeclared (first use in this function)
>>   373 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
>>       |                                 ^~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/mach-at91/pm.c:377:33: error: 'DDR3PHY_ZQ0SR0_PUO_OFF'
>> undeclared (first use in this function)
>>   377 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
>>       |                                 ^~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/mach-at91/pm.c:381:33: error: 'DDR3PHY_ZQ0SR0_PDODT_OFF'
>> undeclared (first use in this function)
>>   381 |                 index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
>>       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/mach-at91/pm.c:385:33: error: 'DDR3PHY_ZQ0SRO_PUODT_OFF'
>> undeclared (first use in this function)
>>   385 |                 index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
>>       |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
>> make[2]: *** [scripts/Makefile.build:289: arch/arm/mach-at91/pm.o] Error 1
>>
>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>>
>> Build link:
>>  - https://builds.tuxbuild.com/2EfrKWiY7k1znh1Nt7nFQmRuyRc/
>>
>> # To install tuxmake on your system globally:
>> # sudo pip3 install -U tuxmake
>> #
>>
>> tuxmake --runtime podman --target-arch arm --toolchain gcc-11
>> --kconfig at91_dt_defconfig
>>
>> Following patch seems to be causing these build failures on stable-rc 5.15.
>> ---
>> ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh
>> [ Upstream commit 7a94b83a7dc551607b6c4400df29151e6a951f07 ]
>>
>> On SAMA7G5, when resuming from backup and self-refresh, the bootloader
>> performs DDR PHY recalibration by restoring the value of ZQ0SR0 (stored
>> in RAM by Linux before going to backup and self-refresh). It has been
>> discovered that the current procedure doesn't work for all possible values
>> that might go to ZQ0SR0 due to hardware bug. The workaround to this is to
>> avoid storing some values in ZQ0SR0. Thus Linux will read the ZQ0SR0
>> register and cache its value in RAM after processing it (using
>> modified_gray_code array). The bootloader will restore the processed value.
>>
>> Fixes: d2d4716d8384 ("ARM: at91: pm: save ddr phy calibration data to securam")
>> Suggested-by: Frederic Schumacher <frederic.schumacher@microchip.com>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> Link: https://lore.kernel.org/r/20220826083927.3107272-4-claudiu.beznea@microchip.com
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>Hi,
>
>This depends on:
>
>commit dc3005703f8cd893d325081c20b400e08377d9bb
>Author: Claudiu Beznea <claudiu.beznea@microchip.com>
>Date:   Thu Jan 13 16:48:51 2022 +0200
>
>    ARM: at91: ddr: remove CONFIG_SOC_SAMA7 dependency
>
>    Remove CONFIG_SOC_SAMA7 dependency to avoid having #ifdef preprocessor
>    directives in driver code (arch/arm/mach-at91/pm.c). This prepares the
>    code for next commits.
>
>    Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>    Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>    Link:
>https://lore.kernel.org/r/20220113144900.906370-2-claudiu.beznea@microchip.com
>
>Apologies for not mentioning it.

I've queued it up, thanks!

-- 
Thanks,
Sasha

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

end of thread, other threads:[~2022-09-13 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 11:27 stable-rc: 5.15: arch/arm/mach-at91/pm.c:370:52: error: 'DDR3PHY_ZQ0SR0' undeclared (first use in this function) Naresh Kamboju
2022-09-13 12:28 ` Claudiu.Beznea
2022-09-13 13:45   ` Sasha Levin

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.