From: Greg Kroah-Hartman Date: Wed, 19 Apr 2023 13:19:58 +0000 (+0200) Subject: drop more riscv patches X-Git-Tag: v4.14.313~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6696f3cfad9408753cd06e519382c4bebf871ce1;p=thirdparty%2Fkernel%2Fstable-queue.git drop more riscv patches --- diff --git a/queue-5.15/kbuild-use-more-subdir-for-visiting-subdirectories-w.patch b/queue-5.15/kbuild-use-more-subdir-for-visiting-subdirectories-w.patch deleted file mode 100644 index f2204b99721..00000000000 --- a/queue-5.15/kbuild-use-more-subdir-for-visiting-subdirectories-w.patch +++ /dev/null @@ -1,678 +0,0 @@ -From 90e1d062db3a94d30ad294eb8a7cba4401765875 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 13 Oct 2021 15:36:22 +0900 -Subject: kbuild: use more subdir- for visiting subdirectories while cleaning - -From: Masahiro Yamada - -[ Upstream commit 8212f8986d311ccf6a72305e6bdbd814691701d6 ] - -Documentation/kbuild/makefiles.rst suggests to use "archclean" for -cleaning arch/$(SRCARCH)/boot/, but it is not a hard requirement. - -Since commit d92cc4d51643 ("kbuild: require all architectures to have -arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for -all architectures. This can take advantage of the parallel option (-j) -for "make clean". - -I also cleaned up the comments in arch/$(SRCARCH)/Makefile. The "archdep" -target no longer exists. - -Signed-off-by: Masahiro Yamada -Reviewed-by: Kees Cook -Acked-by: Geert Uytterhoeven -Acked-by: Michael Ellerman (powerpc) -Stable-dep-of: d83806c4c0cc ("purgatory: fix disabling debug info") -Signed-off-by: Sasha Levin ---- - Documentation/kbuild/makefiles.rst | 17 ++--------------- - arch/alpha/Kbuild | 3 +++ - arch/alpha/Makefile | 3 --- - arch/arc/Kbuild | 3 +++ - arch/arc/Makefile | 3 --- - arch/arm/Kbuild | 3 +++ - arch/arm/Makefile | 4 ---- - arch/arm64/Kbuild | 3 +++ - arch/arm64/Makefile | 7 ------- - arch/arm64/kernel/Makefile | 3 +++ - arch/csky/Kbuild | 3 +++ - arch/csky/Makefile | 3 --- - arch/h8300/Kbuild | 3 +++ - arch/h8300/Makefile | 3 --- - arch/ia64/Makefile | 2 -- - arch/m68k/Makefile | 4 +--- - arch/microblaze/Kbuild | 3 +++ - arch/microblaze/Makefile | 3 --- - arch/mips/Kbuild | 3 +++ - arch/mips/Makefile | 8 +------- - arch/mips/boot/Makefile | 3 +++ - arch/nds32/Kbuild | 3 +++ - arch/nds32/Makefile | 3 --- - arch/nios2/Kbuild | 3 +++ - arch/nios2/Makefile | 6 +----- - arch/openrisc/Kbuild | 3 +++ - arch/openrisc/Makefile | 7 +------ - arch/parisc/Kbuild | 3 +++ - arch/parisc/Makefile | 7 +------ - arch/powerpc/Kbuild | 3 +++ - arch/powerpc/Makefile | 7 +------ - arch/riscv/Kbuild | 3 +++ - arch/riscv/Makefile | 7 +------ - arch/s390/Kbuild | 3 +++ - arch/s390/Makefile | 8 +------- - arch/sh/Kbuild | 3 +++ - arch/sh/Makefile | 3 --- - arch/sparc/Kbuild | 3 +++ - arch/sparc/Makefile | 3 --- - arch/x86/Kbuild | 3 +++ - arch/x86/Makefile | 2 -- - arch/xtensa/Makefile | 4 +--- - 42 files changed, 71 insertions(+), 103 deletions(-) - -diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst -index db3af0b45bafa..b008b90b92c9f 100644 ---- a/Documentation/kbuild/makefiles.rst -+++ b/Documentation/kbuild/makefiles.rst -@@ -1050,22 +1050,9 @@ is not sufficient this sometimes needs to be explicit. - The above assignment instructs kbuild to descend down in the - directory compressed/ when "make clean" is executed. - --To support the clean infrastructure in the Makefiles that build the --final bootimage there is an optional target named archclean: -- -- Example:: -- -- #arch/x86/Makefile -- archclean: -- $(Q)$(MAKE) $(clean)=arch/x86/boot -- --When "make clean" is executed, make will descend down in arch/x86/boot, --and clean as usual. The Makefile located in arch/x86/boot/ may use --the subdir- trick to descend further down. -- - Note 1: arch/$(SRCARCH)/Makefile cannot use "subdir-", because that file is --included in the top level makefile, and the kbuild infrastructure --is not operational at that point. -+included in the top level makefile. Instead, arch/$(SRCARCH)/Kbuild can use -+"subdir-". - - Note 2: All directories listed in core-y, libs-y, drivers-y and net-y will - be visited during "make clean". -diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild -index c2302017403a9..345d79df24bb9 100644 ---- a/arch/alpha/Kbuild -+++ b/arch/alpha/Kbuild -@@ -1,3 +1,6 @@ - # SPDX-License-Identifier: GPL-2.0-only - obj-y += kernel/ mm/ - obj-$(CONFIG_MATHEMU) += math-emu/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile -index 52529ee42dac9..881cb913e23ab 100644 ---- a/arch/alpha/Makefile -+++ b/arch/alpha/Makefile -@@ -55,9 +55,6 @@ $(boot)/vmlinux.gz: vmlinux - bootimage bootpfile bootpzfile: vmlinux - $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - archheaders: - $(Q)$(MAKE) $(build)=arch/alpha/kernel/syscalls all - -diff --git a/arch/arc/Kbuild b/arch/arc/Kbuild -index 699d8cae9b1fc..b94102fff68b4 100644 ---- a/arch/arc/Kbuild -+++ b/arch/arc/Kbuild -@@ -1,3 +1,6 @@ - # SPDX-License-Identifier: GPL-2.0 - obj-y += kernel/ - obj-y += mm/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/arc/Makefile b/arch/arc/Makefile -index 8782a03f24a8e..f252e7b924e96 100644 ---- a/arch/arc/Makefile -+++ b/arch/arc/Makefile -@@ -112,6 +112,3 @@ uImage: $(uimage-default-y) - @$(kecho) ' Image $(boot)/uImage is ready' - - CLEAN_FILES += $(boot)/uImage -- --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -diff --git a/arch/arm/Kbuild b/arch/arm/Kbuild -index 5208f7061524b..b506622e7e23a 100644 ---- a/arch/arm/Kbuild -+++ b/arch/arm/Kbuild -@@ -9,3 +9,6 @@ obj-y += kernel/ mm/ common/ - obj-y += probes/ - obj-y += net/ - obj-y += crypto/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/arm/Makefile b/arch/arm/Makefile -index fa45837b8065c..0fa2a6218e5eb 100644 ---- a/arch/arm/Makefile -+++ b/arch/arm/Makefile -@@ -317,10 +317,6 @@ ifeq ($(CONFIG_VDSO),y) - $(Q)$(MAKE) $(build)=arch/arm/vdso $@ - endif - --# We use MRPROPER_FILES and CLEAN_FILES now --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - # My testing targets (bypasses dependencies) - bp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage - -diff --git a/arch/arm64/Kbuild b/arch/arm64/Kbuild -index ea7ab4ca81f92..5bfbf7d79c99b 100644 ---- a/arch/arm64/Kbuild -+++ b/arch/arm64/Kbuild -@@ -4,3 +4,6 @@ obj-$(CONFIG_KVM) += kvm/ - obj-$(CONFIG_XEN) += xen/ - obj-$(subst m,y,$(CONFIG_HYPERV)) += hyperv/ - obj-$(CONFIG_CRYPTO) += crypto/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index c744b1e7b3569..e8cfc5868aa8e 100644 ---- a/arch/arm64/Makefile -+++ b/arch/arm64/Makefile -@@ -182,13 +182,6 @@ ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS),y) - endif - endif - -- --# We use MRPROPER_FILES and CLEAN_FILES now --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- $(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso -- $(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso32 -- - ifeq ($(KBUILD_EXTMOD),) - # We need to generate vdso-offsets.h before compiling certain files in kernel/. - # In order to do that, we should use the archprepare target, but we can't since -diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile -index 749e31475e413..db557856854e7 100644 ---- a/arch/arm64/kernel/Makefile -+++ b/arch/arm64/kernel/Makefile -@@ -85,3 +85,6 @@ extra-y += $(head-y) vmlinux.lds - ifeq ($(CONFIG_DEBUG_EFI),y) - AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\"" - endif -+ -+# for cleaning -+subdir- += vdso vdso32 -diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild -index a4e40e534e6a8..4e39f7abdeb6d 100644 ---- a/arch/csky/Kbuild -+++ b/arch/csky/Kbuild -@@ -1 +1,4 @@ - # SPDX-License-Identifier: GPL-2.0-only -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/csky/Makefile b/arch/csky/Makefile -index 37f593a4bf536..8668050776364 100644 ---- a/arch/csky/Makefile -+++ b/arch/csky/Makefile -@@ -76,9 +76,6 @@ all: zImage - zImage Image uImage: vmlinux - $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - define archhelp - echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' - echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' -diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild -index b2583e7efbd1d..e4703f3534cca 100644 ---- a/arch/h8300/Kbuild -+++ b/arch/h8300/Kbuild -@@ -1,2 +1,5 @@ - # SPDX-License-Identifier: GPL-2.0-only - obj-y += kernel/ mm/ boot/dts/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile -index eb4cb8f6830c5..807f41e60ee4a 100644 ---- a/arch/h8300/Makefile -+++ b/arch/h8300/Makefile -@@ -34,9 +34,6 @@ libs-y += arch/$(ARCH)/lib/ - - boot := arch/h8300/boot - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux - $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ - -diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile -index 7e548c654a290..3b3ac3e1f2728 100644 ---- a/arch/ia64/Makefile -+++ b/arch/ia64/Makefile -@@ -67,8 +67,6 @@ vmlinux.bin: vmlinux FORCE - unwcheck: vmlinux - -$(Q)READELF=$(READELF) $(PYTHON3) $(srctree)/arch/ia64/scripts/unwcheck.py $< - --archclean: -- - archheaders: - $(Q)$(MAKE) $(build)=arch/ia64/kernel/syscalls all - -diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile -index dd0c0ec67f670..740fc97b9c0f0 100644 ---- a/arch/m68k/Makefile -+++ b/arch/m68k/Makefile -@@ -2,9 +2,7 @@ - # m68k/Makefile - # - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" and "archdep" for cleaning up and making dependencies for --# this architecture -+# architecture-specific flags and dependencies. - # - # This file is subject to the terms and conditions of the GNU General Public - # License. See the file "COPYING" in the main directory of this archive -diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild -index a1c5978893198..077a0b8e96157 100644 ---- a/arch/microblaze/Kbuild -+++ b/arch/microblaze/Kbuild -@@ -3,3 +3,6 @@ obj-y += kernel/ - obj-y += mm/ - obj-$(CONFIG_PCI) += pci/ - obj-y += boot/dts/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile -index 9adc6b6434dfe..e775a696aa6fc 100644 ---- a/arch/microblaze/Makefile -+++ b/arch/microblaze/Makefile -@@ -60,9 +60,6 @@ export DTB - - all: linux.bin - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - archheaders: - $(Q)$(MAKE) $(build)=arch/microblaze/kernel/syscalls all - -diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild -index d5d6ef9bb9867..9e8071f0e58ff 100644 ---- a/arch/mips/Kbuild -+++ b/arch/mips/Kbuild -@@ -25,3 +25,6 @@ obj-y += vdso/ - ifdef CONFIG_KVM - obj-y += kvm/ - endif -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/mips/Makefile b/arch/mips/Makefile -index f7b58da2f3889..ace7f033de07c 100644 ---- a/arch/mips/Makefile -+++ b/arch/mips/Makefile -@@ -8,8 +8,7 @@ - # Copyright (C) 2002, 2003, 2004 Maciej W. Rozycki - # - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" cleaning up for this architecture. -+# architecture-specific flags and dependencies. - # - - archscripts: scripts_basic -@@ -428,11 +427,6 @@ endif - $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE) - $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE) - --archclean: -- $(Q)$(MAKE) $(clean)=arch/mips/boot -- $(Q)$(MAKE) $(clean)=arch/mips/boot/compressed -- $(Q)$(MAKE) $(clean)=arch/mips/boot/tools -- - archheaders: - $(Q)$(MAKE) $(build)=arch/mips/kernel/syscalls all - -diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile -index a3da2c5d63c21..196c44fa72d90 100644 ---- a/arch/mips/boot/Makefile -+++ b/arch/mips/boot/Makefile -@@ -171,3 +171,6 @@ $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE - - $(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE - $(call if_changed,itb-image,$<) -+ -+# for cleaning -+subdir- += compressed tools -diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild -index a4e40e534e6a8..4e39f7abdeb6d 100644 ---- a/arch/nds32/Kbuild -+++ b/arch/nds32/Kbuild -@@ -1 +1,4 @@ - # SPDX-License-Identifier: GPL-2.0-only -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile -index ccdca71420201..1aa8659786096 100644 ---- a/arch/nds32/Makefile -+++ b/arch/nds32/Makefile -@@ -62,9 +62,6 @@ prepare: vdso_prepare - vdso_prepare: prepare0 - $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - define archhelp - echo ' Image - kernel image (arch/$(ARCH)/boot/Image)' - endef -diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild -index a4e40e534e6a8..4e39f7abdeb6d 100644 ---- a/arch/nios2/Kbuild -+++ b/arch/nios2/Kbuild -@@ -1 +1,4 @@ - # SPDX-License-Identifier: GPL-2.0-only -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile -index 52c03e60b114d..ef41d1446302f 100644 ---- a/arch/nios2/Makefile -+++ b/arch/nios2/Makefile -@@ -8,8 +8,7 @@ - # Written by Fredrik Markstrom - # - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" cleaning up for this architecture. -+# architecture-specific flags and dependencies. - # - # Nios2 port by Wind River Systems Inc trough: - # fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com -@@ -53,9 +52,6 @@ core-y += $(nios2-boot)/dts/ - - all: vmImage - --archclean: -- $(Q)$(MAKE) $(clean)=$(nios2-boot) -- - $(BOOT_TARGETS): vmlinux - $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@ - -diff --git a/arch/openrisc/Kbuild b/arch/openrisc/Kbuild -index 4234b4c03e725..b0b0f2b03f872 100644 ---- a/arch/openrisc/Kbuild -+++ b/arch/openrisc/Kbuild -@@ -1,3 +1,6 @@ - # SPDX-License-Identifier: GPL-2.0 - obj-y += lib/ kernel/ mm/ - obj-y += boot/dts/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile -index c52de526e5189..760b734fb8227 100644 ---- a/arch/openrisc/Makefile -+++ b/arch/openrisc/Makefile -@@ -1,9 +1,7 @@ - # BK Id: %F% %I% %G% %U% %#% - # - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" and "archdep" for cleaning up and making dependencies for --# this architecture -+# architecture-specific flags and dependencies. - # - # This file is subject to the terms and conditions of the GNU General Public - # License. See the file "COPYING" in the main directory of this archive -@@ -48,6 +46,3 @@ PHONY += vmlinux.bin - - vmlinux.bin: vmlinux - $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ -- --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild -index 3c068b700a810..a6d3b280ba0c2 100644 ---- a/arch/parisc/Kbuild -+++ b/arch/parisc/Kbuild -@@ -1,2 +1,5 @@ - # SPDX-License-Identifier: GPL-2.0-only - obj-y += mm/ kernel/ math-emu/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile -index fadb098de1545..82d77f4b0d083 100644 ---- a/arch/parisc/Makefile -+++ b/arch/parisc/Makefile -@@ -2,9 +2,7 @@ - # parisc/Makefile - # - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" and "archdep" for cleaning up and making dependencies for --# this architecture -+# architecture-specific flags and dependencies. - # - # This file is subject to the terms and conditions of the GNU General Public - # License. See the file "COPYING" in the main directory of this archive -@@ -186,8 +184,5 @@ define archhelp - @echo ' zinstall - Install compressed vmlinuz kernel' - endef - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - archheaders: - $(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all -diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild -index 5e2f9eaa3ee7d..22cd0d55a8924 100644 ---- a/arch/powerpc/Kbuild -+++ b/arch/powerpc/Kbuild -@@ -16,3 +16,6 @@ obj-$(CONFIG_KVM) += kvm/ - obj-$(CONFIG_PERF_EVENTS) += perf/ - obj-$(CONFIG_KEXEC_CORE) += kexec/ - obj-$(CONFIG_KEXEC_FILE) += purgatory/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile -index a8e52e64c1a5b..3353188f1defb 100644 ---- a/arch/powerpc/Makefile -+++ b/arch/powerpc/Makefile -@@ -1,7 +1,5 @@ - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" and "archdep" for cleaning up and making dependencies for --# this architecture. -+# architecture-specific flags and dependencies. - # - # This file is subject to the terms and conditions of the GNU General Public - # License. See the file "COPYING" in the main directory of this archive -@@ -387,9 +385,6 @@ install: - sh -x $(srctree)/$(boot)/install.sh "$(KERNELRELEASE)" vmlinux \ - System.map "$(INSTALL_PATH)" - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - ifeq ($(KBUILD_EXTMOD),) - # We need to generate vdso-offsets.h before compiling certain files in kernel/. - # In order to do that, we should use the archprepare target, but we can't since -diff --git a/arch/riscv/Kbuild b/arch/riscv/Kbuild -index 4614c01ba5b32..fb3397223d520 100644 ---- a/arch/riscv/Kbuild -+++ b/arch/riscv/Kbuild -@@ -2,3 +2,6 @@ - - obj-y += kernel/ mm/ net/ - obj-$(CONFIG_BUILTIN_DTB) += boot/dts/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile -index 0f17c6b6b7294..96772a32a87db 100644 ---- a/arch/riscv/Makefile -+++ b/arch/riscv/Makefile -@@ -1,7 +1,5 @@ - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" and "archdep" for cleaning up and making dependencies for --# this architecture -+# architecture-specific flags and dependencies. - # - # This file is subject to the terms and conditions of the GNU General Public - # License. See the file "COPYING" in the main directory of this archive -@@ -157,6 +155,3 @@ zinstall: install-image = Image.gz - install zinstall: - $(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \ - $(boot)/$(install-image) System.map "$(INSTALL_PATH)" -- --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -diff --git a/arch/s390/Kbuild b/arch/s390/Kbuild -index 8b98c501142df..76e3622771791 100644 ---- a/arch/s390/Kbuild -+++ b/arch/s390/Kbuild -@@ -8,3 +8,6 @@ obj-$(CONFIG_APPLDATA_BASE) += appldata/ - obj-y += net/ - obj-$(CONFIG_PCI) += pci/ - obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += purgatory/ -+ -+# for cleaning -+subdir- += boot tools -diff --git a/arch/s390/Makefile b/arch/s390/Makefile -index c7b7a60f6405d..6e42252214dd8 100644 ---- a/arch/s390/Makefile -+++ b/arch/s390/Makefile -@@ -3,9 +3,7 @@ - # s390/Makefile - # - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" and "archdep" for cleaning up and making dependencies for --# this architecture -+# architecture-specific flags and dependencies. - # - # Copyright (C) 1994 by Linus Torvalds - # -@@ -159,10 +157,6 @@ zfcpdump: - vdso_install: - $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@ - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- $(Q)$(MAKE) $(clean)=$(tools) -- - archheaders: - $(Q)$(MAKE) $(build)=$(syscalls) uapi - -diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild -index 48c2a091a0720..be171880977e5 100644 ---- a/arch/sh/Kbuild -+++ b/arch/sh/Kbuild -@@ -2,3 +2,6 @@ - obj-y += kernel/ mm/ boards/ - obj-$(CONFIG_SH_FPU_EMU) += math-emu/ - obj-$(CONFIG_USE_BUILTIN_DTB) += boot/dts/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/sh/Makefile b/arch/sh/Makefile -index 7814639006213..b39412bf91fb0 100644 ---- a/arch/sh/Makefile -+++ b/arch/sh/Makefile -@@ -198,9 +198,6 @@ compressed: zImage - archprepare: - $(Q)$(MAKE) $(build)=arch/sh/tools include/generated/machtypes.h - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - archheaders: - $(Q)$(MAKE) $(build)=arch/sh/kernel/syscalls all - -diff --git a/arch/sparc/Kbuild b/arch/sparc/Kbuild -index c9e574906a9b9..71cb3d934bf6c 100644 ---- a/arch/sparc/Kbuild -+++ b/arch/sparc/Kbuild -@@ -9,3 +9,6 @@ obj-y += math-emu/ - obj-y += net/ - obj-y += crypto/ - obj-$(CONFIG_SPARC64) += vdso/ -+ -+# for cleaning -+subdir- += boot -diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile -index 24fb5a99f4394..c7008bbebc4cd 100644 ---- a/arch/sparc/Makefile -+++ b/arch/sparc/Makefile -@@ -75,9 +75,6 @@ install: - sh $(srctree)/$(boot)/install.sh $(KERNELRELEASE) $(KBUILD_IMAGE) \ - System.map "$(INSTALL_PATH)" - --archclean: -- $(Q)$(MAKE) $(clean)=$(boot) -- - archheaders: - $(Q)$(MAKE) $(build)=arch/sparc/kernel/syscalls all - -diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild -index 30dec019756b9..f384cb1a4f7a8 100644 ---- a/arch/x86/Kbuild -+++ b/arch/x86/Kbuild -@@ -25,3 +25,6 @@ obj-y += platform/ - obj-y += net/ - - obj-$(CONFIG_KEXEC_FILE) += purgatory/ -+ -+# for cleaning -+subdir- += boot tools -diff --git a/arch/x86/Makefile b/arch/x86/Makefile -index 9c09bbd390cec..15c54fa1b435d 100644 ---- a/arch/x86/Makefile -+++ b/arch/x86/Makefile -@@ -287,8 +287,6 @@ endif - archclean: - $(Q)rm -rf $(objtree)/arch/i386 - $(Q)rm -rf $(objtree)/arch/x86_64 -- $(Q)$(MAKE) $(clean)=$(boot) -- $(Q)$(MAKE) $(clean)=arch/x86/tools - - define archhelp - echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' -diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile -index 96714ef7c89e3..9778216d6e09d 100644 ---- a/arch/xtensa/Makefile -+++ b/arch/xtensa/Makefile -@@ -7,9 +7,7 @@ - # Copyright (C) 2014 Cadence Design Systems Inc. - # - # This file is included by the global makefile so that you can add your own --# architecture-specific flags and dependencies. Remember to do have actions --# for "archclean" and "archdep" for cleaning up and making dependencies for --# this architecture -+# architecture-specific flags and dependencies. - - # Core configuration. - # (Use VAR= to use another default compiler.) --- -2.39.2 - diff --git a/queue-5.15/purgatory-fix-disabling-debug-info.patch b/queue-5.15/purgatory-fix-disabling-debug-info.patch deleted file mode 100644 index 4d61f3111fb..00000000000 --- a/queue-5.15/purgatory-fix-disabling-debug-info.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 618ea690941689fe28fa9c150f90bb096db5f8a5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sun, 26 Mar 2023 18:21:21 +0000 -Subject: purgatory: fix disabling debug info - -From: Alyssa Ross - -[ Upstream commit d83806c4c0cccc0d6d3c3581a11983a9c186a138 ] - -Since 32ef9e5054ec, -Wa,-gdwarf-2 is no longer used in KBUILD_AFLAGS. -Instead, it includes -g, the appropriate -gdwarf-* flag, and also the --Wa versions of both of those if building with Clang and GNU as. As a -result, debug info was being generated for the purgatory objects, even -though the intention was that it not be. - -Fixes: 32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files") -Signed-off-by: Alyssa Ross -Cc: stable@vger.kernel.org -Acked-by: Nick Desaulniers -Signed-off-by: Masahiro Yamada -Signed-off-by: Sasha Levin ---- - arch/x86/purgatory/Makefile | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile -index 95ea17a9d20cb..1d6ccd4214d5a 100644 ---- a/arch/x86/purgatory/Makefile -+++ b/arch/x86/purgatory/Makefile -@@ -64,8 +64,7 @@ CFLAGS_sha256.o += $(PURGATORY_CFLAGS) - CFLAGS_REMOVE_string.o += $(PURGATORY_CFLAGS_REMOVE) - CFLAGS_string.o += $(PURGATORY_CFLAGS) - --AFLAGS_REMOVE_setup-x86_$(BITS).o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_entry64.o += -Wa,-gdwarf-2 -+asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x)) - - $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE - $(call if_changed,ld) --- -2.39.2 - diff --git a/queue-5.15/series b/queue-5.15/series index 7c7df19d65a..a12c90bcccd 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -70,9 +70,6 @@ sched-fair-move-calculate-of-avg_load-to-a-better-lo.patch sched-fair-fix-imbalance-overflow.patch x86-rtc-remove-__init-for-runtime-functions.patch i2c-ocores-generate-stop-condition-after-timeout-in-.patch -sh-remove-meaningless-archclean-line.patch -kbuild-use-more-subdir-for-visiting-subdirectories-w.patch -purgatory-fix-disabling-debug-info.patch nvme-pci-add-nvme_quirk_bogus_nid-for-adata-xpg-gamm.patch nvme-pci-avoid-the-deepest-sleep-state-on-zhitai-tip.patch nvme-pci-crucial-p2-has-bogus-namespace-ids.patch diff --git a/queue-5.15/sh-remove-meaningless-archclean-line.patch b/queue-5.15/sh-remove-meaningless-archclean-line.patch deleted file mode 100644 index 35b28df11fa..00000000000 --- a/queue-5.15/sh-remove-meaningless-archclean-line.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 7bc030eb406f9fbfed89e07d6cc215eb323a05d5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 13 Oct 2021 15:36:21 +0900 -Subject: sh: remove meaningless archclean line - -From: Masahiro Yamada - -[ Upstream commit 10c6ae274fe29f732ca9bbcd7016e9827673c954 ] - -The vsyscall directory is cleaned up by the ordinary way -via arch/sh/kernel/Makefile: - - obj-$(CONFIG_VSYSCALL) += vsyscall/ - -Signed-off-by: Masahiro Yamada -Stable-dep-of: d83806c4c0cc ("purgatory: fix disabling debug info") -Signed-off-by: Sasha Levin ---- - arch/sh/Makefile | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/arch/sh/Makefile b/arch/sh/Makefile -index 88ddb6f1c75b0..7814639006213 100644 ---- a/arch/sh/Makefile -+++ b/arch/sh/Makefile -@@ -200,7 +200,6 @@ archprepare: - - archclean: - $(Q)$(MAKE) $(clean)=$(boot) -- $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall - - archheaders: - $(Q)$(MAKE) $(build)=arch/sh/kernel/syscalls all --- -2.39.2 - diff --git a/queue-6.1/purgatory-fix-disabling-debug-info.patch b/queue-6.1/purgatory-fix-disabling-debug-info.patch deleted file mode 100644 index a03194f2ead..00000000000 --- a/queue-6.1/purgatory-fix-disabling-debug-info.patch +++ /dev/null @@ -1,61 +0,0 @@ -From c8f04f3ea2ffd7d22b3539d9487fc8505d341988 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sun, 26 Mar 2023 18:21:21 +0000 -Subject: purgatory: fix disabling debug info - -From: Alyssa Ross - -[ Upstream commit d83806c4c0cccc0d6d3c3581a11983a9c186a138 ] - -Since 32ef9e5054ec, -Wa,-gdwarf-2 is no longer used in KBUILD_AFLAGS. -Instead, it includes -g, the appropriate -gdwarf-* flag, and also the --Wa versions of both of those if building with Clang and GNU as. As a -result, debug info was being generated for the purgatory objects, even -though the intention was that it not be. - -Fixes: 32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files") -Signed-off-by: Alyssa Ross -Cc: stable@vger.kernel.org -Acked-by: Nick Desaulniers -Signed-off-by: Masahiro Yamada -Signed-off-by: Sasha Levin ---- - arch/riscv/purgatory/Makefile | 7 +------ - arch/x86/purgatory/Makefile | 3 +-- - 2 files changed, 2 insertions(+), 8 deletions(-) - -diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Makefile -index d16bf715a586b..5730797a6b402 100644 ---- a/arch/riscv/purgatory/Makefile -+++ b/arch/riscv/purgatory/Makefile -@@ -84,12 +84,7 @@ CFLAGS_string.o += $(PURGATORY_CFLAGS) - CFLAGS_REMOVE_ctype.o += $(PURGATORY_CFLAGS_REMOVE) - CFLAGS_ctype.o += $(PURGATORY_CFLAGS) - --AFLAGS_REMOVE_entry.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_memcpy.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_memset.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_strcmp.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_strlen.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_strncmp.o += -Wa,-gdwarf-2 -+asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x)) - - $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE - $(call if_changed,ld) -diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile -index 17f09dc263811..82fec66d46d29 100644 ---- a/arch/x86/purgatory/Makefile -+++ b/arch/x86/purgatory/Makefile -@@ -69,8 +69,7 @@ CFLAGS_sha256.o += $(PURGATORY_CFLAGS) - CFLAGS_REMOVE_string.o += $(PURGATORY_CFLAGS_REMOVE) - CFLAGS_string.o += $(PURGATORY_CFLAGS) - --AFLAGS_REMOVE_setup-x86_$(BITS).o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_entry64.o += -Wa,-gdwarf-2 -+asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x)) - - $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE - $(call if_changed,ld) --- -2.39.2 - diff --git a/queue-6.1/risc-v-add-infrastructure-to-allow-different-str-imp.patch b/queue-6.1/risc-v-add-infrastructure-to-allow-different-str-imp.patch deleted file mode 100644 index 85bd0afb6bb..00000000000 --- a/queue-6.1/risc-v-add-infrastructure-to-allow-different-str-imp.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 3018f540f2064a9c0d2e59c56e84b398b3a6b0cb Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 13 Jan 2023 22:23:00 +0100 -Subject: RISC-V: add infrastructure to allow different str* implementations - -From: Heiko Stuebner - -[ Upstream commit 56e0790c7f9e59ba6a0f4b59981d1d6fbf43efb0 ] - -Depending on supported extensions on specific RISC-V cores, -optimized str* functions might make sense. - -This adds basic infrastructure to allow patching the function calls -via alternatives later on. - -The Linux kernel provides standard implementations for string functions -but when architectures want to extend them, they need to provide their -own. - -The added generic string functions are done in assembler (taken from -disassembling the main-kernel functions for now) to allow us to control -the used registers and extend them with optimized variants. - -This doesn't override the compiler's use of builtin replacements. So still -first of all the compiler will select if a builtin will be better suitable -i.e. for known strings. For all regular cases we will want to later -select possible optimized variants and in the worst case fall back to the -generic implemention added with this change. - -Reviewed-by: Andrew Jones -Signed-off-by: Heiko Stuebner -Reviewed-by: Conor Dooley -Link: https://lore.kernel.org/r/20230113212301.3534711-2-heiko@sntech.de -Signed-off-by: Palmer Dabbelt -Stable-dep-of: d83806c4c0cc ("purgatory: fix disabling debug info") -Signed-off-by: Sasha Levin ---- - arch/riscv/include/asm/string.h | 10 ++++++++ - arch/riscv/kernel/riscv_ksyms.c | 3 +++ - arch/riscv/lib/Makefile | 3 +++ - arch/riscv/lib/strcmp.S | 36 +++++++++++++++++++++++++++++ - arch/riscv/lib/strlen.S | 28 ++++++++++++++++++++++ - arch/riscv/lib/strncmp.S | 41 +++++++++++++++++++++++++++++++++ - arch/riscv/purgatory/Makefile | 13 +++++++++++ - 7 files changed, 134 insertions(+) - create mode 100644 arch/riscv/lib/strcmp.S - create mode 100644 arch/riscv/lib/strlen.S - create mode 100644 arch/riscv/lib/strncmp.S - -diff --git a/arch/riscv/include/asm/string.h b/arch/riscv/include/asm/string.h -index 9090493665555..a96b1fea24fe4 100644 ---- a/arch/riscv/include/asm/string.h -+++ b/arch/riscv/include/asm/string.h -@@ -18,6 +18,16 @@ extern asmlinkage void *__memcpy(void *, const void *, size_t); - #define __HAVE_ARCH_MEMMOVE - extern asmlinkage void *memmove(void *, const void *, size_t); - extern asmlinkage void *__memmove(void *, const void *, size_t); -+ -+#define __HAVE_ARCH_STRCMP -+extern asmlinkage int strcmp(const char *cs, const char *ct); -+ -+#define __HAVE_ARCH_STRLEN -+extern asmlinkage __kernel_size_t strlen(const char *); -+ -+#define __HAVE_ARCH_STRNCMP -+extern asmlinkage int strncmp(const char *cs, const char *ct, size_t count); -+ - /* For those files which don't want to check by kasan. */ - #if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__) - #define memcpy(dst, src, len) __memcpy(dst, src, len) -diff --git a/arch/riscv/kernel/riscv_ksyms.c b/arch/riscv/kernel/riscv_ksyms.c -index 5ab1c7e1a6ed5..a72879b4249a5 100644 ---- a/arch/riscv/kernel/riscv_ksyms.c -+++ b/arch/riscv/kernel/riscv_ksyms.c -@@ -12,6 +12,9 @@ - EXPORT_SYMBOL(memset); - EXPORT_SYMBOL(memcpy); - EXPORT_SYMBOL(memmove); -+EXPORT_SYMBOL(strcmp); -+EXPORT_SYMBOL(strlen); -+EXPORT_SYMBOL(strncmp); - EXPORT_SYMBOL(__memset); - EXPORT_SYMBOL(__memcpy); - EXPORT_SYMBOL(__memmove); -diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile -index 25d5c9664e57e..6c74b0bedd60d 100644 ---- a/arch/riscv/lib/Makefile -+++ b/arch/riscv/lib/Makefile -@@ -3,6 +3,9 @@ lib-y += delay.o - lib-y += memcpy.o - lib-y += memset.o - lib-y += memmove.o -+lib-y += strcmp.o -+lib-y += strlen.o -+lib-y += strncmp.o - lib-$(CONFIG_MMU) += uaccess.o - lib-$(CONFIG_64BIT) += tishift.o - -diff --git a/arch/riscv/lib/strcmp.S b/arch/riscv/lib/strcmp.S -new file mode 100644 -index 0000000000000..8babd712b9587 ---- /dev/null -+++ b/arch/riscv/lib/strcmp.S -@@ -0,0 +1,36 @@ -+/* SPDX-License-Identifier: GPL-2.0-only */ -+ -+#include -+#include -+#include -+ -+/* int strcmp(const char *cs, const char *ct) */ -+SYM_FUNC_START(strcmp) -+ /* -+ * Returns -+ * a0 - comparison result, value like strcmp -+ * -+ * Parameters -+ * a0 - string1 -+ * a1 - string2 -+ * -+ * Clobbers -+ * t0, t1 -+ */ -+1: -+ lbu t0, 0(a0) -+ lbu t1, 0(a1) -+ addi a0, a0, 1 -+ addi a1, a1, 1 -+ bne t0, t1, 2f -+ bnez t0, 1b -+ li a0, 0 -+ ret -+2: -+ /* -+ * strcmp only needs to return (< 0, 0, > 0) values -+ * not necessarily -1, 0, +1 -+ */ -+ sub a0, t0, t1 -+ ret -+SYM_FUNC_END(strcmp) -diff --git a/arch/riscv/lib/strlen.S b/arch/riscv/lib/strlen.S -new file mode 100644 -index 0000000000000..0a3b11853efdb ---- /dev/null -+++ b/arch/riscv/lib/strlen.S -@@ -0,0 +1,28 @@ -+/* SPDX-License-Identifier: GPL-2.0-only */ -+ -+#include -+#include -+#include -+ -+/* int strlen(const char *s) */ -+SYM_FUNC_START(strlen) -+ /* -+ * Returns -+ * a0 - string length -+ * -+ * Parameters -+ * a0 - String to measure -+ * -+ * Clobbers: -+ * t0, t1 -+ */ -+ mv t1, a0 -+1: -+ lbu t0, 0(t1) -+ beqz t0, 2f -+ addi t1, t1, 1 -+ j 1b -+2: -+ sub a0, t1, a0 -+ ret -+SYM_FUNC_END(strlen) -diff --git a/arch/riscv/lib/strncmp.S b/arch/riscv/lib/strncmp.S -new file mode 100644 -index 0000000000000..1f644d0a93f68 ---- /dev/null -+++ b/arch/riscv/lib/strncmp.S -@@ -0,0 +1,41 @@ -+/* SPDX-License-Identifier: GPL-2.0-only */ -+ -+#include -+#include -+#include -+ -+/* int strncmp(const char *cs, const char *ct, size_t count) */ -+SYM_FUNC_START(strncmp) -+ /* -+ * Returns -+ * a0 - comparison result, value like strncmp -+ * -+ * Parameters -+ * a0 - string1 -+ * a1 - string2 -+ * a2 - number of characters to compare -+ * -+ * Clobbers -+ * t0, t1, t2 -+ */ -+ li t2, 0 -+1: -+ beq a2, t2, 2f -+ lbu t0, 0(a0) -+ lbu t1, 0(a1) -+ addi a0, a0, 1 -+ addi a1, a1, 1 -+ bne t0, t1, 3f -+ addi t2, t2, 1 -+ bnez t0, 1b -+2: -+ li a0, 0 -+ ret -+3: -+ /* -+ * strncmp only needs to return (< 0, 0, > 0) values -+ * not necessarily -1, 0, +1 -+ */ -+ sub a0, t0, t1 -+ ret -+SYM_FUNC_END(strncmp) -diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Makefile -index dd58e1d993972..d16bf715a586b 100644 ---- a/arch/riscv/purgatory/Makefile -+++ b/arch/riscv/purgatory/Makefile -@@ -2,6 +2,7 @@ - OBJECT_FILES_NON_STANDARD := y - - purgatory-y := purgatory.o sha256.o entry.o string.o ctype.o memcpy.o memset.o -+purgatory-y += strcmp.o strlen.o strncmp.o - - targets += $(purgatory-y) - PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y)) -@@ -18,6 +19,15 @@ $(obj)/memcpy.o: $(srctree)/arch/riscv/lib/memcpy.S FORCE - $(obj)/memset.o: $(srctree)/arch/riscv/lib/memset.S FORCE - $(call if_changed_rule,as_o_S) - -+$(obj)/strcmp.o: $(srctree)/arch/riscv/lib/strcmp.S FORCE -+ $(call if_changed_rule,as_o_S) -+ -+$(obj)/strlen.o: $(srctree)/arch/riscv/lib/strlen.S FORCE -+ $(call if_changed_rule,as_o_S) -+ -+$(obj)/strncmp.o: $(srctree)/arch/riscv/lib/strncmp.S FORCE -+ $(call if_changed_rule,as_o_S) -+ - $(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE - $(call if_changed_rule,cc_o_c) - -@@ -77,6 +87,9 @@ CFLAGS_ctype.o += $(PURGATORY_CFLAGS) - AFLAGS_REMOVE_entry.o += -Wa,-gdwarf-2 - AFLAGS_REMOVE_memcpy.o += -Wa,-gdwarf-2 - AFLAGS_REMOVE_memset.o += -Wa,-gdwarf-2 -+AFLAGS_REMOVE_strcmp.o += -Wa,-gdwarf-2 -+AFLAGS_REMOVE_strlen.o += -Wa,-gdwarf-2 -+AFLAGS_REMOVE_strncmp.o += -Wa,-gdwarf-2 - - $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE - $(call if_changed,ld) --- -2.39.2 - diff --git a/queue-6.1/riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch b/queue-6.1/riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch deleted file mode 100644 index 18cc4698545..00000000000 --- a/queue-6.1/riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch +++ /dev/null @@ -1,36 +0,0 @@ -From f1581626071c8e37c58c5e8f0b4126b17172a211 Mon Sep 17 00:00:00 2001 -From: Alexandre Ghiti -Date: Wed, 29 Mar 2023 10:19:31 +0200 -Subject: riscv: Do not set initial_boot_params to the linear address of the dtb - -From: Alexandre Ghiti - -commit f1581626071c8e37c58c5e8f0b4126b17172a211 upstream. - -early_init_dt_verify() is already called in parse_dtb() and since the dtb -address does not change anymore (it is now in the fixmap region), no need -to reset initial_boot_params by calling early_init_dt_verify() again. - -Signed-off-by: Alexandre Ghiti -Link: https://lore.kernel.org/r/20230329081932.79831-3-alexghiti@rivosinc.com -Cc: stable@vger.kernel.org -Signed-off-by: Palmer Dabbelt -Signed-off-by: Greg Kroah-Hartman ---- - arch/riscv/kernel/setup.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - ---- a/arch/riscv/kernel/setup.c -+++ b/arch/riscv/kernel/setup.c -@@ -278,10 +278,7 @@ void __init setup_arch(char **cmdline_p) - #if IS_ENABLED(CONFIG_BUILTIN_DTB) - unflatten_and_copy_device_tree(); - #else -- if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa)))) -- unflatten_device_tree(); -- else -- pr_err("No DTB found in kernel mappings\n"); -+ unflatten_device_tree(); - #endif - early_init_fdt_scan_reserved_mem(); - misc_mem_init(); diff --git a/queue-6.1/series b/queue-6.1/series index 021085e883c..ee7c591efed 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -100,7 +100,6 @@ tracing-add-trace_array_puts-to-write-into-instance.patch tracing-have-tracing_snapshot_instance_cond-write-er.patch maple_tree-fix-write-memory-barrier-of-nodes-once-de.patch ksmbd-avoid-out-of-bounds-access-in-decode_preauth_ctxt.patch -riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch riscv-add-icache-flush-for-nommu-sigreturn-trampoline.patch hid-intel-ish-hid-fix-kernel-panic-during-warm-reset.patch net-sfp-initialize-sfp-i2c_block_size-at-sfp-allocation.patch @@ -123,8 +122,6 @@ sched-fair-fix-imbalance-overflow.patch x86-rtc-remove-__init-for-runtime-functions.patch i2c-ocores-generate-stop-condition-after-timeout-in-.patch cifs-fix-negotiate-context-parsing.patch -risc-v-add-infrastructure-to-allow-different-str-imp.patch -purgatory-fix-disabling-debug-info.patch nvme-pci-mark-lexar-nm760-as-ignore_dev_subnqn.patch nvme-pci-add-nvme_quirk_bogus_nid-for-t-force-z330-s.patch cgroup-cpuset-skip-spread-flags-update-on-v2.patch diff --git a/queue-6.2/purgatory-fix-disabling-debug-info.patch b/queue-6.2/purgatory-fix-disabling-debug-info.patch deleted file mode 100644 index ed0978ae71e..00000000000 --- a/queue-6.2/purgatory-fix-disabling-debug-info.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 598f37968b8bfdb766c16198bfc662a374c5e220 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sun, 26 Mar 2023 18:21:21 +0000 -Subject: purgatory: fix disabling debug info - -From: Alyssa Ross - -[ Upstream commit d83806c4c0cccc0d6d3c3581a11983a9c186a138 ] - -Since 32ef9e5054ec, -Wa,-gdwarf-2 is no longer used in KBUILD_AFLAGS. -Instead, it includes -g, the appropriate -gdwarf-* flag, and also the --Wa versions of both of those if building with Clang and GNU as. As a -result, debug info was being generated for the purgatory objects, even -though the intention was that it not be. - -Fixes: 32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files") -Signed-off-by: Alyssa Ross -Cc: stable@vger.kernel.org -Acked-by: Nick Desaulniers -Signed-off-by: Masahiro Yamada -Signed-off-by: Sasha Levin ---- - arch/riscv/purgatory/Makefile | 7 +------ - arch/x86/purgatory/Makefile | 3 +-- - 2 files changed, 2 insertions(+), 8 deletions(-) - -diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Makefile -index d16bf715a586b..5730797a6b402 100644 ---- a/arch/riscv/purgatory/Makefile -+++ b/arch/riscv/purgatory/Makefile -@@ -84,12 +84,7 @@ CFLAGS_string.o += $(PURGATORY_CFLAGS) - CFLAGS_REMOVE_ctype.o += $(PURGATORY_CFLAGS_REMOVE) - CFLAGS_ctype.o += $(PURGATORY_CFLAGS) - --AFLAGS_REMOVE_entry.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_memcpy.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_memset.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_strcmp.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_strlen.o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_strncmp.o += -Wa,-gdwarf-2 -+asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x)) - - $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE - $(call if_changed,ld) -diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile -index 17f09dc263811..82fec66d46d29 100644 ---- a/arch/x86/purgatory/Makefile -+++ b/arch/x86/purgatory/Makefile -@@ -69,8 +69,7 @@ CFLAGS_sha256.o += $(PURGATORY_CFLAGS) - CFLAGS_REMOVE_string.o += $(PURGATORY_CFLAGS_REMOVE) - CFLAGS_string.o += $(PURGATORY_CFLAGS) - --AFLAGS_REMOVE_setup-x86_$(BITS).o += -Wa,-gdwarf-2 --AFLAGS_REMOVE_entry64.o += -Wa,-gdwarf-2 -+asflags-remove-y += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x)) - - $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE - $(call if_changed,ld) --- -2.39.2 - diff --git a/queue-6.2/risc-v-add-infrastructure-to-allow-different-str-imp.patch b/queue-6.2/risc-v-add-infrastructure-to-allow-different-str-imp.patch deleted file mode 100644 index cf44046f6dd..00000000000 --- a/queue-6.2/risc-v-add-infrastructure-to-allow-different-str-imp.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 2a28b42819c86b1c46e790a94840fea8e3195e99 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 13 Jan 2023 22:23:00 +0100 -Subject: RISC-V: add infrastructure to allow different str* implementations - -From: Heiko Stuebner - -[ Upstream commit 56e0790c7f9e59ba6a0f4b59981d1d6fbf43efb0 ] - -Depending on supported extensions on specific RISC-V cores, -optimized str* functions might make sense. - -This adds basic infrastructure to allow patching the function calls -via alternatives later on. - -The Linux kernel provides standard implementations for string functions -but when architectures want to extend them, they need to provide their -own. - -The added generic string functions are done in assembler (taken from -disassembling the main-kernel functions for now) to allow us to control -the used registers and extend them with optimized variants. - -This doesn't override the compiler's use of builtin replacements. So still -first of all the compiler will select if a builtin will be better suitable -i.e. for known strings. For all regular cases we will want to later -select possible optimized variants and in the worst case fall back to the -generic implemention added with this change. - -Reviewed-by: Andrew Jones -Signed-off-by: Heiko Stuebner -Reviewed-by: Conor Dooley -Link: https://lore.kernel.org/r/20230113212301.3534711-2-heiko@sntech.de -Signed-off-by: Palmer Dabbelt -Stable-dep-of: d83806c4c0cc ("purgatory: fix disabling debug info") -Signed-off-by: Sasha Levin ---- - arch/riscv/include/asm/string.h | 10 ++++++++ - arch/riscv/kernel/riscv_ksyms.c | 3 +++ - arch/riscv/lib/Makefile | 3 +++ - arch/riscv/lib/strcmp.S | 36 +++++++++++++++++++++++++++++ - arch/riscv/lib/strlen.S | 28 ++++++++++++++++++++++ - arch/riscv/lib/strncmp.S | 41 +++++++++++++++++++++++++++++++++ - arch/riscv/purgatory/Makefile | 13 +++++++++++ - 7 files changed, 134 insertions(+) - create mode 100644 arch/riscv/lib/strcmp.S - create mode 100644 arch/riscv/lib/strlen.S - create mode 100644 arch/riscv/lib/strncmp.S - -diff --git a/arch/riscv/include/asm/string.h b/arch/riscv/include/asm/string.h -index 9090493665555..a96b1fea24fe4 100644 ---- a/arch/riscv/include/asm/string.h -+++ b/arch/riscv/include/asm/string.h -@@ -18,6 +18,16 @@ extern asmlinkage void *__memcpy(void *, const void *, size_t); - #define __HAVE_ARCH_MEMMOVE - extern asmlinkage void *memmove(void *, const void *, size_t); - extern asmlinkage void *__memmove(void *, const void *, size_t); -+ -+#define __HAVE_ARCH_STRCMP -+extern asmlinkage int strcmp(const char *cs, const char *ct); -+ -+#define __HAVE_ARCH_STRLEN -+extern asmlinkage __kernel_size_t strlen(const char *); -+ -+#define __HAVE_ARCH_STRNCMP -+extern asmlinkage int strncmp(const char *cs, const char *ct, size_t count); -+ - /* For those files which don't want to check by kasan. */ - #if defined(CONFIG_KASAN) && !defined(__SANITIZE_ADDRESS__) - #define memcpy(dst, src, len) __memcpy(dst, src, len) -diff --git a/arch/riscv/kernel/riscv_ksyms.c b/arch/riscv/kernel/riscv_ksyms.c -index 5ab1c7e1a6ed5..a72879b4249a5 100644 ---- a/arch/riscv/kernel/riscv_ksyms.c -+++ b/arch/riscv/kernel/riscv_ksyms.c -@@ -12,6 +12,9 @@ - EXPORT_SYMBOL(memset); - EXPORT_SYMBOL(memcpy); - EXPORT_SYMBOL(memmove); -+EXPORT_SYMBOL(strcmp); -+EXPORT_SYMBOL(strlen); -+EXPORT_SYMBOL(strncmp); - EXPORT_SYMBOL(__memset); - EXPORT_SYMBOL(__memcpy); - EXPORT_SYMBOL(__memmove); -diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile -index 25d5c9664e57e..6c74b0bedd60d 100644 ---- a/arch/riscv/lib/Makefile -+++ b/arch/riscv/lib/Makefile -@@ -3,6 +3,9 @@ lib-y += delay.o - lib-y += memcpy.o - lib-y += memset.o - lib-y += memmove.o -+lib-y += strcmp.o -+lib-y += strlen.o -+lib-y += strncmp.o - lib-$(CONFIG_MMU) += uaccess.o - lib-$(CONFIG_64BIT) += tishift.o - -diff --git a/arch/riscv/lib/strcmp.S b/arch/riscv/lib/strcmp.S -new file mode 100644 -index 0000000000000..8babd712b9587 ---- /dev/null -+++ b/arch/riscv/lib/strcmp.S -@@ -0,0 +1,36 @@ -+/* SPDX-License-Identifier: GPL-2.0-only */ -+ -+#include -+#include -+#include -+ -+/* int strcmp(const char *cs, const char *ct) */ -+SYM_FUNC_START(strcmp) -+ /* -+ * Returns -+ * a0 - comparison result, value like strcmp -+ * -+ * Parameters -+ * a0 - string1 -+ * a1 - string2 -+ * -+ * Clobbers -+ * t0, t1 -+ */ -+1: -+ lbu t0, 0(a0) -+ lbu t1, 0(a1) -+ addi a0, a0, 1 -+ addi a1, a1, 1 -+ bne t0, t1, 2f -+ bnez t0, 1b -+ li a0, 0 -+ ret -+2: -+ /* -+ * strcmp only needs to return (< 0, 0, > 0) values -+ * not necessarily -1, 0, +1 -+ */ -+ sub a0, t0, t1 -+ ret -+SYM_FUNC_END(strcmp) -diff --git a/arch/riscv/lib/strlen.S b/arch/riscv/lib/strlen.S -new file mode 100644 -index 0000000000000..0a3b11853efdb ---- /dev/null -+++ b/arch/riscv/lib/strlen.S -@@ -0,0 +1,28 @@ -+/* SPDX-License-Identifier: GPL-2.0-only */ -+ -+#include -+#include -+#include -+ -+/* int strlen(const char *s) */ -+SYM_FUNC_START(strlen) -+ /* -+ * Returns -+ * a0 - string length -+ * -+ * Parameters -+ * a0 - String to measure -+ * -+ * Clobbers: -+ * t0, t1 -+ */ -+ mv t1, a0 -+1: -+ lbu t0, 0(t1) -+ beqz t0, 2f -+ addi t1, t1, 1 -+ j 1b -+2: -+ sub a0, t1, a0 -+ ret -+SYM_FUNC_END(strlen) -diff --git a/arch/riscv/lib/strncmp.S b/arch/riscv/lib/strncmp.S -new file mode 100644 -index 0000000000000..1f644d0a93f68 ---- /dev/null -+++ b/arch/riscv/lib/strncmp.S -@@ -0,0 +1,41 @@ -+/* SPDX-License-Identifier: GPL-2.0-only */ -+ -+#include -+#include -+#include -+ -+/* int strncmp(const char *cs, const char *ct, size_t count) */ -+SYM_FUNC_START(strncmp) -+ /* -+ * Returns -+ * a0 - comparison result, value like strncmp -+ * -+ * Parameters -+ * a0 - string1 -+ * a1 - string2 -+ * a2 - number of characters to compare -+ * -+ * Clobbers -+ * t0, t1, t2 -+ */ -+ li t2, 0 -+1: -+ beq a2, t2, 2f -+ lbu t0, 0(a0) -+ lbu t1, 0(a1) -+ addi a0, a0, 1 -+ addi a1, a1, 1 -+ bne t0, t1, 3f -+ addi t2, t2, 1 -+ bnez t0, 1b -+2: -+ li a0, 0 -+ ret -+3: -+ /* -+ * strncmp only needs to return (< 0, 0, > 0) values -+ * not necessarily -1, 0, +1 -+ */ -+ sub a0, t0, t1 -+ ret -+SYM_FUNC_END(strncmp) -diff --git a/arch/riscv/purgatory/Makefile b/arch/riscv/purgatory/Makefile -index dd58e1d993972..d16bf715a586b 100644 ---- a/arch/riscv/purgatory/Makefile -+++ b/arch/riscv/purgatory/Makefile -@@ -2,6 +2,7 @@ - OBJECT_FILES_NON_STANDARD := y - - purgatory-y := purgatory.o sha256.o entry.o string.o ctype.o memcpy.o memset.o -+purgatory-y += strcmp.o strlen.o strncmp.o - - targets += $(purgatory-y) - PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y)) -@@ -18,6 +19,15 @@ $(obj)/memcpy.o: $(srctree)/arch/riscv/lib/memcpy.S FORCE - $(obj)/memset.o: $(srctree)/arch/riscv/lib/memset.S FORCE - $(call if_changed_rule,as_o_S) - -+$(obj)/strcmp.o: $(srctree)/arch/riscv/lib/strcmp.S FORCE -+ $(call if_changed_rule,as_o_S) -+ -+$(obj)/strlen.o: $(srctree)/arch/riscv/lib/strlen.S FORCE -+ $(call if_changed_rule,as_o_S) -+ -+$(obj)/strncmp.o: $(srctree)/arch/riscv/lib/strncmp.S FORCE -+ $(call if_changed_rule,as_o_S) -+ - $(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE - $(call if_changed_rule,cc_o_c) - -@@ -77,6 +87,9 @@ CFLAGS_ctype.o += $(PURGATORY_CFLAGS) - AFLAGS_REMOVE_entry.o += -Wa,-gdwarf-2 - AFLAGS_REMOVE_memcpy.o += -Wa,-gdwarf-2 - AFLAGS_REMOVE_memset.o += -Wa,-gdwarf-2 -+AFLAGS_REMOVE_strcmp.o += -Wa,-gdwarf-2 -+AFLAGS_REMOVE_strlen.o += -Wa,-gdwarf-2 -+AFLAGS_REMOVE_strncmp.o += -Wa,-gdwarf-2 - - $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE - $(call if_changed,ld) --- -2.39.2 - diff --git a/queue-6.2/riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch b/queue-6.2/riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch deleted file mode 100644 index 18cc4698545..00000000000 --- a/queue-6.2/riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch +++ /dev/null @@ -1,36 +0,0 @@ -From f1581626071c8e37c58c5e8f0b4126b17172a211 Mon Sep 17 00:00:00 2001 -From: Alexandre Ghiti -Date: Wed, 29 Mar 2023 10:19:31 +0200 -Subject: riscv: Do not set initial_boot_params to the linear address of the dtb - -From: Alexandre Ghiti - -commit f1581626071c8e37c58c5e8f0b4126b17172a211 upstream. - -early_init_dt_verify() is already called in parse_dtb() and since the dtb -address does not change anymore (it is now in the fixmap region), no need -to reset initial_boot_params by calling early_init_dt_verify() again. - -Signed-off-by: Alexandre Ghiti -Link: https://lore.kernel.org/r/20230329081932.79831-3-alexghiti@rivosinc.com -Cc: stable@vger.kernel.org -Signed-off-by: Palmer Dabbelt -Signed-off-by: Greg Kroah-Hartman ---- - arch/riscv/kernel/setup.c | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - ---- a/arch/riscv/kernel/setup.c -+++ b/arch/riscv/kernel/setup.c -@@ -278,10 +278,7 @@ void __init setup_arch(char **cmdline_p) - #if IS_ENABLED(CONFIG_BUILTIN_DTB) - unflatten_and_copy_device_tree(); - #else -- if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa)))) -- unflatten_device_tree(); -- else -- pr_err("No DTB found in kernel mappings\n"); -+ unflatten_device_tree(); - #endif - early_init_fdt_scan_reserved_mem(); - misc_mem_init(); diff --git a/queue-6.2/series b/queue-6.2/series index 4f926e410a6..d29e149f98b 100644 --- a/queue-6.2/series +++ b/queue-6.2/series @@ -101,7 +101,6 @@ tracing-add-trace_array_puts-to-write-into-instance.patch tracing-have-tracing_snapshot_instance_cond-write-er.patch maple_tree-fix-write-memory-barrier-of-nodes-once-de.patch ksmbd-avoid-out-of-bounds-access-in-decode_preauth_ctxt.patch -riscv-do-not-set-initial_boot_params-to-the-linear-address-of-the-dtb.patch riscv-add-icache-flush-for-nommu-sigreturn-trampoline.patch hid-intel-ish-hid-fix-kernel-panic-during-warm-reset.patch net-sfp-initialize-sfp-i2c_block_size-at-sfp-allocation.patch @@ -132,7 +131,5 @@ sched-fair-fix-imbalance-overflow.patch x86-rtc-remove-__init-for-runtime-functions.patch i2c-ocores-generate-stop-condition-after-timeout-in-.patch cifs-fix-negotiate-context-parsing.patch -risc-v-add-infrastructure-to-allow-different-str-imp.patch -purgatory-fix-disabling-debug-info.patch nvme-pci-mark-lexar-nm760-as-ignore_dev_subnqn.patch nvme-pci-add-nvme_quirk_bogus_nid-for-t-force-z330-s.patch