On stable-rc 5.4 arm and arm64 builds failed due to following errors / warnings.
kernel/cgroup/cgroup.c:2404:2: error: implicit declaration of function
'cpus_read_lock' [-Werror,-Wimplicit-function-declaration]
cpus_read_lock();
^
kernel/cgroup/cgroup.c:2404:2: note: did you mean 'cpuset_read_lock'?
include/linux/cpuset.h:58:13: note: 'cpuset_read_lock' declared here
extern void cpuset_read_lock(void);
^
kernel/cgroup/cgroup.c:2417:2: error: implicit declaration of function
'cpus_read_unlock' [-Werror,-Wimplicit-function-declaration]
cpus_read_unlock();
^
kernel/cgroup/cgroup.c:2417:2: note: did you mean 'cpuset_read_unlock'?
include/linux/cpuset.h:59:13: note: 'cpuset_read_unlock' declared here
extern void cpuset_read_unlock(void);
^
2 errors generated.
drivers/gpu/drm/drm_lock.c:363:6: warning: misleading indentation;
statement is not part of the previous 'if' [-Wmisleading-indentation]
*/ mutex_lock(&dev->struct_mutex);
^
drivers/gpu/drm/drm_lock.c:357:2: note: previous statement is here
if (!drm_core_check_feature(dev, DRIVER_LEGACY))
^
1 warning generated.
Build link:
- https://builds.tuxbuild.com/2EfrNYbejRQczhhqndawRkHARHZ/
Steps to reproduce:
-------------------
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
tuxmake --runtime podman --target-arch arm64 --toolchain clang-nightly
--kconfig defconfig LLVM=1 LLVM_IAS=1
Following patch might be the reason for these build errors:
---
cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock
[ Upstream commit 4f7e7236435ca0abe005c674ebd6892c6e83aeb3 ]
Bringing up a CPU may involve creating and destroying tasks which requires
read-locking threadgroup_rwsem, so threadgroup_rwsem nests inside
cpus_read_lock(). However, cpuset's ->attach(), which may be called with
thredagroup_rwsem write-locked, also wants to disable CPU hotplug and
acquires cpus_read_lock(), leading to a deadlock.
Fix it by guaranteeing that ->attach() is always called with CPU hotplug
disabled and removing cpus_read_lock() call from cpuset_attach().
Signed-off-by: Tejun Heo <tj(a)kernel.org>
Reviewed-and-tested-by: Imran Khan <imran.f.khan(a)oracle.com>
Reported-and-tested-by: Xuewen Yan <xuewen.yan(a)unisoc.com>
Fixes: 05c7b7a92cc8 ("cgroup/cpuset: Fix a race between
cpuset_attach() and cpu hotplug")
Cc: stable(a)vger.kernel.org # v5.17+
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
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(a)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(a)microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea(a)microchip.com>
Link: https://lore.kernel.org/r/20220826083927.3107272-4-claudiu.beznea@microchip…
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
--
Linaro LKFT
https://lkft.linaro.org