Stephen Rothwell [Wed, 16 Feb 2022 22:59:53 +0000 (09:59 +1100)]
Merge branch 'ksmbd-for-next' of https://github.com/smfrench/smb3-kernel.git
Stephen Rothwell [Wed, 16 Feb 2022 22:59:52 +0000 (09:59 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/gfs2/linux-gfs2.git
Stephen Rothwell [Wed, 16 Feb 2022 22:59:52 +0000 (09:59 +1100)]
Merge branch 'dev' of git://git./linux/kernel/git/jaegeuk/f2fs.git
Stephen Rothwell [Wed, 16 Feb 2022 22:59:51 +0000 (09:59 +1100)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6.git
Stephen Rothwell [Wed, 16 Feb 2022 22:59:51 +0000 (09:59 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/kdave/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:59:50 +0000 (09:59 +1100)]
Merge branch 'master' of git://git./fs/fscrypt/fscrypt.git
Stephen Rothwell [Wed, 16 Feb 2022 22:59:50 +0000 (09:59 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/brauner/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:45 +0000 (09:43 +1100)]
Merge branch 'xtensa-for-next' of git://github.com/jcmvbkbc/linux-xtensa.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:44 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/s390/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:44 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/riscv/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:44 +0000 (09:43 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/leo/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:43 +0000 (09:43 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/powerpc/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:43 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/deller/parisc-linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:43 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://github.com/openrisc/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:42 +0000 (09:43 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/greentime/linux.git
# Conflicts:
# arch/nds32/Kbuild
# arch/nds32/Kconfig
Stephen Rothwell [Wed, 16 Feb 2022 22:43:41 +0000 (09:43 +1100)]
Merge branch 'mips-next' of git://git./linux/kernel/git/mips/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:41 +0000 (09:43 +1100)]
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:41 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/gerg/m68knommu.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:41 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/geert/linux-m68k.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:40 +0000 (09:43 +1100)]
Merge branch 'h8300-next' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:40 +0000 (09:43 +1100)]
Merge branch 'renesas-clk' of git://git./linux/kernel/git/geert/renesas-drivers.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/abelvesa/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'clk-next' of git://git./linux/kernel/git/clk/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://github.com/Xilinx/linux-xlnx.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:39 +0000 (09:43 +1100)]
Merge branch 'ti-next' of git://git./linux/kernel/git/ti/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/tegra/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'next' of https://git.linaro.org/people/jens.wiklander/linux-tee.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'sunxi/for-next' of git://git./linux/kernel/git/sunxi/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:38 +0000 (09:43 +1100)]
Merge branch 'stm32-next' of git://git./linux/kernel/git/atorgue/stm32.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:37 +0000 (09:43 +1100)]
Merge branch 'for-linux-next' of git://git./linux/kernel/git/sudeep.holla/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:37 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/krzk/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:37 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/mmind/linux-rockchip.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:36 +0000 (09:43 +1100)]
Merge branch 'reset/next' of https://git.pengutronix.de/git/pza/linux
Stephen Rothwell [Wed, 16 Feb 2022 22:43:36 +0000 (09:43 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/geert/renesas-devel.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:36 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/nsaenz/linux-rpi.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:35 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/qcom/linux.git
# Conflicts:
# arch/arm64/configs/defconfig
Stephen Rothwell [Wed, 16 Feb 2022 22:43:35 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/tmlind/linux-omap.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:34 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/gclement/mvebu.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:34 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/matthias.bgg/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:34 +0000 (09:43 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/ssantosh/linux-keystone.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:33 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/shawnguo/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:33 +0000 (09:43 +1100)]
Merge branch 'for-next' of https://git./linux/kernel/git/krzk/linux-mem-ctrl.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:31 +0000 (09:43 +1100)]
Merge branch 'at91-next' of git://git./linux/kernel/git/at91/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:31 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/joel/bmc.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:31 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/amlogic/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:30 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/mani/linux-actions.git
Stephen Rothwell [Wed, 16 Feb 2022 22:43:30 +0000 (09:43 +1100)]
Merge branch 'for-next/core' of git://git./linux/kernel/git/arm64/linux
Stephen Rothwell [Wed, 16 Feb 2022 22:43:30 +0000 (09:43 +1100)]
Merge branch 'for-next' of git://git.armlinux.org.uk/~rmk/linux-arm.git
# Conflicts:
# arch/arm/Kconfig
Stephen Rothwell [Wed, 16 Feb 2022 22:41:24 +0000 (09:41 +1100)]
Merge branch 'for-next' of git://git.infradead.org/users/hch/dma-mapping.git
Stephen Rothwell [Wed, 16 Feb 2022 22:40:13 +0000 (09:40 +1100)]
Merge branch 'perf/core' of git://git./linux/kernel/git/acme/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:39:01 +0000 (09:39 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/masahiroy/linux-kbuild.git
Stephen Rothwell [Wed, 16 Feb 2022 22:33:55 +0000 (09:33 +1100)]
Merge branch 'for-next/kspp' of git://git./linux/kernel/git/gustavoars/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:17:43 +0000 (09:17 +1100)]
Merge branch 'for-next/kspp' of git://git./linux/kernel/git/kees/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:49 +0000 (09:04 +1100)]
Merge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc
Stephen Rothwell [Wed, 16 Feb 2022 22:04:49 +0000 (09:04 +1100)]
Merge branch 'zstd-linus' of https://github.com/terrelln/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:48 +0000 (09:04 +1100)]
Merge branch 'perf/urgent' of git://git./linux/kernel/git/acme/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:48 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/rw/ubifs.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:47 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/pinctrl/intel.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:47 +0000 (09:04 +1100)]
Merge branch 'gpio/for-current' of git://git./linux/kernel/git/brgl/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:47 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/riscv/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:46 +0000 (09:04 +1100)]
Merge branch 'rtc-fixes' of git://git./linux/kernel/git/abelloni/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:46 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/ulfh/mmc.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:46 +0000 (09:04 +1100)]
Merge branch 'for-linux-next-fixes' of git://anongit.freedesktop.org/drm-intel
Stephen Rothwell [Wed, 16 Feb 2022 22:04:45 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/mkp/scsi.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:45 +0000 (09:04 +1100)]
Merge branch 'dt/linus' of git://git./linux/kernel/git/robh/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:45 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/pdx86/platform-drivers-x86.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:44 +0000 (09:04 +1100)]
Merge branch 'next-fixes' of git://git./linux/kernel/git/kdave/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:44 +0000 (09:04 +1100)]
Merge branch 'hwmon' of git://git./linux/kernel/git/groeck/linux-staging.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:44 +0000 (09:04 +1100)]
Merge branch 'at91-fixes' of git://git./linux/kernel/git/at91/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:43 +0000 (09:04 +1100)]
Merge branch 'mips-fixes' of git://git./linux/kernel/git/mips/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:43 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://linuxtv.org/mchehab/media-next.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:43 +0000 (09:04 +1100)]
Merge branch 'mtd/fixes' of git://git./linux/kernel/git/mtd/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:42 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/vkoul/dmaengine.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:42 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/shuah/linux-kselftest.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:42 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:41 +0000 (09:04 +1100)]
Merge branch 'fixes-togreg' of git://git./linux/kernel/git/jic23/iio.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:41 +0000 (09:04 +1100)]
Merge branch 'staging-linus' of git://git./linux/kernel/git/gregkh/staging.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:41 +0000 (09:04 +1100)]
Merge branch 'for-usb-fixes' of git://git./linux/kernel/git/peter.chen/usb.git
# Conflicts:
# drivers/usb/chipidea/ci_hdrc_imx.c
Stephen Rothwell [Wed, 16 Feb 2022 22:04:40 +0000 (09:04 +1100)]
Merge branch 'usb-linus' of git://git./linux/kernel/git/gregkh/usb.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:40 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/helgaas/pci.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/spi.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regulator.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/sound.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:39 +0000 (09:04 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:38 +0000 (09:04 +1100)]
Merge branch 'main' of git git://git./linux/kernel/git/wireless/wireless.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:38 +0000 (09:04 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/klassert/ipsec.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:38 +0000 (09:04 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/bpf/bpf.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:37 +0000 (09:04 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/netdev/net.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:37 +0000 (09:04 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/powerpc/linux.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:37 +0000 (09:04 +1100)]
Merge branch 'fixes' of https://git.linaro.org/people/jens.wiklander/linux-tee.git
Stephen Rothwell [Wed, 16 Feb 2022 22:04:36 +0000 (09:04 +1100)]
Merge branch 'for-next/fixes' of git://git./linux/kernel/git/arm64/linux
Stephen Rothwell [Wed, 16 Feb 2022 22:04:36 +0000 (09:04 +1100)]
Merge branch 'for-curr' of git://git./linux/kernel/git/vgupta/arc.git
Helge Deller [Tue, 15 Feb 2022 19:56:27 +0000 (20:56 +0100)]
parisc: Always use the self-extracting kernel feature
This patch drops the CONFIG_PARISC_SELF_EXTRACT option.
The palo boot loader is able to decompress a kernel which was compressed
with gzip. That possibility was useful when the Linux kernel
self-extracting feature wasn't implemented yet.
Beside the fact that the self-extracting feature offers much better
compression rates, we do support self-extracting kernels already since
kernel v4.14, so now it's really time to get rid of that old option and
always use the self-extractor.
Signed-off-by: Helge Deller <deller@gmx.de>
Helge Deller [Thu, 13 Jan 2022 15:35:53 +0000 (16:35 +0100)]
video/fbdev/stifb: Implement the stifb_fillrect() function
The stifb driver (for Artist/HCRX graphics on PA-RISC) was missing
the fillrect function.
Tested on a 715/64 PA-RISC machine and in qemu.
Signed-off-by: Helge Deller <deller@gmx.de>
Helge Deller [Wed, 8 Dec 2021 10:06:52 +0000 (11:06 +0100)]
parisc: Add vDSO support
Add minimal vDSO support, which provides the signal trampoline helpers,
but none of the userspace syscall helpers like time wrappers.
The big benefit of this vDSO implementation is, that we now don't need
an executeable stack any longer. PA-RISC is one of the last
architectures where an executeable stack was needed in oder to implement
the signal trampolines by putting assembly instructions on the stack
which then gets executed. Instead the kernel will provide the relevant
code in the vDSO page and only put the pointers to the signal
information on the stack.
By dropping the need for executable stacks we avoid running into issues
with applications which want non executable stacks for security reasons.
Additionally, alternative stacks on memory areas without exec
permissions are supported too.
This code is based on an initial implementation by Randolph Chung from 2006:
https://lore.kernel.org/linux-parisc/
4544A34A.
6080700@tausq.org/
I did the porting and lifted the code to current code base. Dave fixed
the unwind code so that gdb and glibc are able to backtrace through the
code. An additional patch to gdb will be pushed upstream by Dave.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dave Anglin <dave.anglin@bell.net>
Cc: Randolph Chung <randolph@tausq.org>
Kumar Kartikeya Dwivedi [Wed, 16 Feb 2022 20:19:43 +0000 (01:49 +0530)]
bpf: Fix crash due to out of bounds access into reg2btf_ids.
When commit
e6ac2450d6de ("bpf: Support bpf program calling kernel function") added
kfunc support, it defined reg2btf_ids as a cheap way to translate the verifier
reg type to the appropriate btf_vmlinux BTF ID, however
commit
c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL")
moved the __BPF_REG_TYPE_MAX from the last member of bpf_reg_type enum to after
the base register types, and defined other variants using type flag
composition. However, now, the direct usage of reg->type to index into
reg2btf_ids may no longer fall into __BPF_REG_TYPE_MAX range, and hence lead to
out of bounds access and kernel crash on dereference of bad pointer.
Fixes:
c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220216201943.624869-1-memxor@gmail.com
Gustavo A. R. Silva [Wed, 16 Feb 2022 20:25:50 +0000 (14:25 -0600)]
Merge branch 'for-next/kspp-fam0' into for-next/kspp
Gustavo A. R. Silva [Tue, 15 Feb 2022 01:11:44 +0000 (19:11 -0600)]
treewide: Replace zero-length arrays with flexible-array members
There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].
This code was transformed with the help of Coccinelle:
(next-
20220214$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch)
@@
identifier S, member, array;
type T1, T2;
@@
struct S {
...
T1 member;
T2 array[
- 0
];
};
UAPI and wireless changes were intentionally excluded from this patch
and will be sent out separately.
[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/78
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Alexander Lobakin [Sat, 12 Feb 2022 22:21:11 +0000 (22:21 +0000)]
MIPS: smp: fill in sibling and core maps earlier
After enabling CONFIG_SCHED_CORE (landed during 5.14 cycle),
2-core 2-thread-per-core interAptiv (CPS-driven) started emitting
the following:
[ 0.025698] CPU1 revision is:
0001a120 (MIPS interAptiv (multi))
[ 0.048183] ------------[ cut here ]------------
[ 0.048187] WARNING: CPU: 1 PID: 0 at kernel/sched/core.c:6025 sched_core_cpu_starting+0x198/0x240
[ 0.048220] Modules linked in:
[ 0.048233] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.17.0-rc3+ #35
b7b319f24073fd9a3c2aa7ad15fb7993eec0b26f
[ 0.048247] Stack :
817f0000 00000004 327804c8 810eb050 00000000 00000004 00000000 c314fdd1
[ 0.048278]
830cbd64 819c0000 81800000 817f0000 83070bf4 00000001 830cbd08 00000000
[ 0.048307]
00000000 00000000 815fcbc4 00000000 00000000 00000000 00000000 00000000
[ 0.048334]
00000000 00000000 00000000 00000000 817f0000 00000000 00000000 817f6f34
[ 0.048361]
817f0000 818a3c00 817f0000 00000004 00000000 00000000 4dc33260 0018c933
[ 0.048389] ...
[ 0.048396] Call Trace:
[ 0.048399] [<
8105a7bc>] show_stack+0x3c/0x140
[ 0.048424] [<
8131c2a0>] dump_stack_lvl+0x60/0x80
[ 0.048440] [<
8108b5c0>] __warn+0xc0/0xf4
[ 0.048454] [<
8108b658>] warn_slowpath_fmt+0x64/0x10c
[ 0.048467] [<
810bd418>] sched_core_cpu_starting+0x198/0x240
[ 0.048483] [<
810c6514>] sched_cpu_starting+0x14/0x80
[ 0.048497] [<
8108c0f8>] cpuhp_invoke_callback_range+0x78/0x140
[ 0.048510] [<
8108d914>] notify_cpu_starting+0x94/0x140
[ 0.048523] [<
8106593c>] start_secondary+0xbc/0x280
[ 0.048539]
[ 0.048543] ---[ end trace
0000000000000000 ]---
[ 0.048636] Synchronize counters for CPU 1: done.
...for each but CPU 0/boot.
Basic debug printks right before the mentioned line say:
[ 0.048170] CPU: 1, smt_mask:
So smt_mask, which is sibling mask obviously, is empty when entering
the function.
This is critical, as sched_core_cpu_starting() calculates
core-scheduling parameters only once per CPU start, and it's crucial
to have all the parameters filled in at that moment (at least it
uses cpu_smt_mask() which in fact is `&cpu_sibling_map[cpu]` on
MIPS).
A bit of debugging led me to that set_cpu_sibling_map() performing
the actual map calculation, was being invocated after
notify_cpu_start(), and exactly the latter function starts CPU HP
callback round (sched_core_cpu_starting() is basically a CPU HP
callback).
While the flow is same on ARM64 (maps after the notifier, although
before calling set_cpu_online()), x86 started calculating sibling
maps earlier than starting the CPU HP callbacks in Linux 4.14 (see
[0] for the reference). Neither me nor my brief tests couldn't find
any potential caveats in calculating the maps right after performing
delay calibration, but the WARN splat is now gone.
The very same debug prints now yield exactly what I expected from
them:
[ 0.048433] CPU: 1, smt_mask: 0-1
[0] https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=
76ce7cfe35ef
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Chuanhong Guo [Fri, 11 Feb 2022 00:13:44 +0000 (08:13 +0800)]
MIPS: ralink: mt7621: do memory detection on KSEG1
It's reported that current memory detection code occasionally detects
larger memory under some bootloaders.
Current memory detection code tests whether address space wraps around
on KSEG0, which is unreliable because it's cached.
Rewrite memory size detection to perform the same test on KSEG1 instead.
While at it, this patch also does the following two things:
1. use a fixed pattern instead of a random function pointer as the magic
value.
2. add an additional memory write and a second comparison as part of the
test to prevent possible smaller memory detection result due to
leftover values in memory.
Fixes:
139c949f7f0a MIPS: ("ralink: mt7621: add memory detection support")
Reported-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Tested-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>