aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/0001-drm-fb-helper-move-zeroing-code-to-drm_fb_helper_fil.patch98
-rw-r--r--arch/arm/arm-ARM-EABI-socketcall.patch10
-rw-r--r--arch/arm/arm-Makefile-Fix-systemtap.patch60
-rw-r--r--arch/arm/arm.cfg4
-rw-r--r--arch/arm/arm.scc4
-rw-r--r--arch/arm/arm64-16kb-pages.cfg1
-rw-r--r--arch/arm/arm64-16kb-pages.scc4
-rw-r--r--arch/arm/arm64-4kb-pages.cfg1
-rw-r--r--arch/arm/arm64-4kb-pages.scc4
-rw-r--r--arch/arm/arm64-64kb-pages.cfg1
-rw-r--r--arch/arm/arm64-64kb-pages.scc4
-rw-r--r--arch/arm/arm64-defconfig-cleanup-config-options.patch49
-rw-r--r--arch/arm/arm64-defconfig-remove-CONFIG_IPQ_APSS_5018.patch29
-rw-r--r--arch/microblaze/microblaze.cfg2
-rw-r--r--arch/mips/mips-Kconfig-add-QEMUMIPS64-option.patch21
-rw-r--r--arch/mips/mips-make-current_cpu_data-preempt-safe.patch68
-rw-r--r--arch/mips/mips-vdso-fix-jalr-t9-crash-in-vdso-code.patch50
-rw-r--r--arch/mips/mips.scc5
-rw-r--r--arch/mips/staging-octeon-Add-a-workaround-for-the-issue-of-GCC.patch42
-rw-r--r--arch/powerpc/crtsavres-fixups-for-5.4.patch27
-rw-r--r--arch/powerpc/powerpc-Add-unwind-information-for-SPE-registers-of-.patch73
-rw-r--r--arch/powerpc/powerpc-Disable-attribute-alias-warnings-from-gcc8.patch32
-rw-r--r--arch/powerpc/powerpc-add-crtsavres.o-to-archprepare-for-kbuild.patch38
-rw-r--r--arch/powerpc/powerpc-debug.cfg1
-rw-r--r--arch/powerpc/powerpc-debug.scc3
-rw-r--r--arch/powerpc/powerpc-kexec-fix-for-powerpc64.patch30
-rw-r--r--arch/powerpc/powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch29
-rw-r--r--arch/powerpc/powerpc.scc6
-rw-r--r--arch/x86/x86.scc1
-rw-r--r--arch/x86/x86_64_defconfig-Fix-warnings.patch109
30 files changed, 446 insertions, 360 deletions
diff --git a/arch/arm/0001-drm-fb-helper-move-zeroing-code-to-drm_fb_helper_fil.patch b/arch/arm/0001-drm-fb-helper-move-zeroing-code-to-drm_fb_helper_fil.patch
new file mode 100644
index 00000000..8282d25d
--- /dev/null
+++ b/arch/arm/0001-drm-fb-helper-move-zeroing-code-to-drm_fb_helper_fil.patch
@@ -0,0 +1,98 @@
+From 72bad8cd7540f07ab54e08b83ad106dec0df123c Mon Sep 17 00:00:00 2001
+From: Jon Mason <jon.mason@arm.com>
+Date: Tue, 8 Aug 2023 16:38:37 -0400
+Subject: [PATCH] drm/fb-helper: move zeroing code to drm_fb_helper_fill_var
+
+__fill_var is used by both drm_fb_helper_check_var and
+drm_fb_helper_fill_var. In drm_fb_helper_check_var, it is possible that
+some of the variables in fb_info-> var which are currently being zero'ed
+have pre-existing values. Zeroing these causes some fb tests to fail
+with (from the Xorg.log):
+
+[ 9.897] (II) Module fbdevhw: vendor="X.Org Foundation"
+[ 9.897] compiled for 1.21.1.8, module version = 0.0.2
+[ 9.897] ABI class: X.Org Video Driver, version 25.2
+[ 9.898] (II) FBDEV(0): using default device
+[ 9.901] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
+[ 9.902] (==) FBDEV(0): RGB weight 888
+[ 9.902] (==) FBDEV(0): Default visual is TrueColor
+[ 9.902] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
+[ 9.902] (II) FBDEV(0): hardware: virtio_gpudrmfb (video memory:
+4000kB)
+[ 9.902] (DB) xf86MergeOutputClassOptions unsupported bus type 0
+[ 9.903] (II) FBDEV(0): checking modes against framebuffer device...
+[ 9.904] (II) FBDEV(0): mode "640x480" test failed
+[ 9.904] (II) FBDEV(0): mode "640x480" test failed
+[ 9.904] (II) FBDEV(0): mode "640x480" test failed
+[ 9.904] (II) FBDEV(0): mode "640x480" test failed
+[ 9.904] (II) FBDEV(0): mode "640x480" not found
+[ 9.904] (II) FBDEV(0): checking modes against monitor...
+[ 9.905] (II) FBDEV(0): Virtual size is 1280x800 (pitch 1280)
+[ 9.905] (**) FBDEV(0): Built-in mode "current"
+[ 9.905] (==) FBDEV(0): DPI set to (96, 96)
+
+Previously, these values were not modified. Moving the zero'ing of the
+variables to drm_fb_helper_fill_var resolves the issue.
+
+Fixes: ee4cce0a8f03 ("drm/fb-helper: fix input validation gaps in check_var")
+Signed-off-by: Jon Mason <jon.mason@arm.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ drivers/gpu/drm/drm_fb_helper.c | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
+index fd27f1978635..ddc12c080dcc 100644
+--- a/drivers/gpu/drm/drm_fb_helper.c
++++ b/drivers/gpu/drm/drm_fb_helper.c
+@@ -1548,8 +1548,6 @@ static void drm_fb_helper_fill_pixel_fmt(struct fb_var_screeninfo *var,
+ static void __fill_var(struct fb_var_screeninfo *var, struct fb_info *info,
+ struct drm_framebuffer *fb)
+ {
+- int i;
+-
+ var->xres_virtual = fb->width;
+ var->yres_virtual = fb->height;
+ var->accel_flags = 0;
+@@ -1557,15 +1555,6 @@ static void __fill_var(struct fb_var_screeninfo *var, struct fb_info *info,
+
+ var->height = info->var.height;
+ var->width = info->var.width;
+-
+- var->left_margin = var->right_margin = 0;
+- var->upper_margin = var->lower_margin = 0;
+- var->hsync_len = var->vsync_len = 0;
+- var->sync = var->vmode = 0;
+- var->rotate = 0;
+- var->colorspace = 0;
+- for (i = 0; i < 4; i++)
+- var->reserved[i] = 0;
+ }
+
+ /**
+@@ -2059,6 +2048,7 @@ static void drm_fb_helper_fill_var(struct fb_info *info,
+ {
+ struct drm_framebuffer *fb = fb_helper->fb;
+ const struct drm_format_info *format = fb->format;
++ int i;
+
+ switch (format->format) {
+ case DRM_FORMAT_C1:
+@@ -2076,6 +2066,14 @@ static void drm_fb_helper_fill_var(struct fb_info *info,
+ info->pseudo_palette = fb_helper->pseudo_palette;
+ info->var.xoffset = 0;
+ info->var.yoffset = 0;
++ info->var.left_margin = info->var.right_margin = 0;
++ info->var.upper_margin = info->var.lower_margin = 0;
++ info->var.hsync_len = info->var.vsync_len = 0;
++ info->var.sync = info->var.vmode = 0;
++ info->var.rotate = 0;
++ info->var.colorspace = 0;
++ for (i = 0; i < 4; i++)
++ info->var.reserved[i] = 0;
+ __fill_var(&info->var, info, fb);
+ info->var.activate = FB_ACTIVATE_NOW;
+
+--
+2.34.1
+
diff --git a/arch/arm/arm-ARM-EABI-socketcall.patch b/arch/arm/arm-ARM-EABI-socketcall.patch
index a24b8767..53173c96 100644
--- a/arch/arm/arm-ARM-EABI-socketcall.patch
+++ b/arch/arm/arm-ARM-EABI-socketcall.patch
@@ -1,4 +1,4 @@
-From 1f05ef36493eb57d2b7bc4201b6bc105869ea702 Mon Sep 17 00:00:00 2001
+From 3502bc5ce0d25aae81727455869af362099c15bf Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Tue, 15 Jul 2008 15:49:27 -0400
Subject: [PATCH] arm: ARM EABI socketcall
@@ -14,13 +14,13 @@ Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com>
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
-index eb5cd77bf1d8..41021ceedca4 100644
+index 7f0b7aba1498..49719a7d721c 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
-@@ -316,7 +316,8 @@ ENTRY(\sym)
+@@ -352,7 +352,8 @@ ENTRY(\sym)
+ * With EABI a couple syscalls are obsolete and defined as sys_ni_syscall.
*/
syscall_table_start sys_call_table
- #define COMPAT(nr, native, compat) syscall nr, native
-#ifdef CONFIG_AEABI
+
+#if defined(CONFIG_AEABI) && !defined(CONFIG_OABI_COMPAT)
@@ -28,5 +28,5 @@ index eb5cd77bf1d8..41021ceedca4 100644
#else
#include <calls-oabi.S>
--
-2.5.0
+2.19.1
diff --git a/arch/arm/arm-Makefile-Fix-systemtap.patch b/arch/arm/arm-Makefile-Fix-systemtap.patch
deleted file mode 100644
index 163f12cb..00000000
--- a/arch/arm/arm-Makefile-Fix-systemtap.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 37c8f2a3df1e3154087538a27228fad0c6e172c5 Mon Sep 17 00:00:00 2001
-From: Richard Purdie <richard.purdie@linuxfoundation.org>
-Date: Sun, 10 Mar 2019 06:43:15 +0000
-Subject: [PATCH] arm/Makefile: Fix systemtap
-
-Currently systemtap fails to operate correctly on armv7 systems such as beaglebone and
-soon, qemuarm.
-
-root@qemuarm:/usr/src/kernel# env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin make -C /lib/modules/4.19.19-yocto-standard/build M=/tmp/staptcNU6M modules CONFIG_DEBUG_INFO= CONFIG_STACK_VALIDATION= ARCH=arm stap_4321_src.i --no-print-directory -j2 V=1
-test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
-echo >&2; \
-echo >&2 " ERROR: Kernel configuration is invalid."; \
-echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
-echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
-echo >&2 ; \
-/bin/false)
-mkdir -p /tmp/staptcNU6M/.tmp_versions ; rm -f /tmp/staptcNU6M/.tmp_versions/*
-make -f ./scripts/Makefile.build obj=/tmp/staptcNU6M
-(cat /dev/null; echo kernel//tmp/staptcNU6M/stap_4321.ko;) > /tmp/staptcNU6M/modules.order
- gcc -Wp,-MD,/tmp/staptcNU6M/.stap_4321_src.o.d -nostdinc -isystem /usr/lib/gcc/arm-poky-linux-gnueabi/8.3.0/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv5t -Wa,-march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -Iinclude2/asm/mach-default -I/lib/modules/4.19.19-yocto-standard/build -include /tmp/staptcNU6M/stapconf_4321.h -D "STP_NO_VELREL_CHECK" -freorder-blocks -fasynchronous-unwind-tables -Wframe-larger-than=512 -fno-ipa-icf -Wno-unused -Wno-tautological-compare -Werror -I/usr/share/systemtap/runtime -DMODULE -DKBUILD_BASENAME='"stap_4321_src"' -DKBUILD_MODNAME='"stap_4321"' -c -o /tmp/staptcNU6M/stap_4321_src.o /tmp/staptcNU6M/stap_4321_src.c
-/tmp/ccaE9CMG.s: Assembler messages:
-/tmp/ccaE9CMG.s:49: Error: selected processor does not support `dmb ish' in ARM mode
-/tmp/ccaE9CMG.s:52: Error: architectural extension `mp' is not allowed for the current b
-
-(which was from running the stap command with -v -v -v -k and then being able to run the command individually)
-
-Note that it says armv5t above.
-
-That comes from the code this patch changes
-
-root@qemuarm:/usr/src/kernel# gcc -march=armv7-a /tmp/staptcNU6M/stap_4321_aux_0.c
-cc1: error: -mfloat-abi=hard: selected processor lacks an FPU
-
-which makes me wonder if cc-option fails unless -mfpu-vfp is on the commandline too.
-
-Since we have a gcc which accepts the armv7-a arch, just remove the cc-option
-wrapper unconditionally here.
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
----
- arch/arm/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/Makefile b/arch/arm/Makefile
-index 1f95ede8063f..9253b7533cb1 100644
---- a/arch/arm/Makefile
-+++ b/arch/arm/Makefile
-@@ -64,7 +64,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra)
- # macro, but instead defines a whole series of macros which makes
- # testing for a specific architecture or later rather impossible.
- arch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m
--arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
-+arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 -march=armv7-a -Wa$(comma)-march=armv7-a
- arch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
- # Only override the compiler option if ARMv6. The ARMv6K extensions are
- # always available in ARMv7
---
-2.19.1
-
diff --git a/arch/arm/arm.cfg b/arch/arm/arm.cfg
index d5380436..f2b36dca 100644
--- a/arch/arm/arm.cfg
+++ b/arch/arm/arm.cfg
@@ -2,8 +2,6 @@
# Build EABI kernels that support EABI system calls.
CONFIG_AEABI=y
-# Provide support for the old ABI's system calls.
-CONFIG_OABI_COMPAT=y
CONFIG_ARM_THUMB=y
# Failure to use this on ARM results in lots of interesting runtime bugs.
@@ -11,4 +9,4 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
#
CONFIG_UNWINDER_ARM=y
-# CONFIG_FUNCTION_GRAPH_TRACER is not set
+CONFIG_FUNCTION_GRAPH_TRACER=n
diff --git a/arch/arm/arm.scc b/arch/arm/arm.scc
index cfac7f13..39e0e6d7 100644
--- a/arch/arm/arm.scc
+++ b/arch/arm/arm.scc
@@ -10,4 +10,6 @@ include v7-A15/v7-A15.scc
patch arm-ARM-EABI-socketcall.patch
patch vexpress-Pass-LOADADDR-to-Makefile.patch
-patch arm-Makefile-Fix-systemtap.patch
+patch arm64-defconfig-cleanup-config-options.patch
+patch 0001-drm-fb-helper-move-zeroing-code-to-drm_fb_helper_fil.patch
+patch arm64-defconfig-remove-CONFIG_IPQ_APSS_5018.patch
diff --git a/arch/arm/arm64-16kb-pages.cfg b/arch/arm/arm64-16kb-pages.cfg
new file mode 100644
index 00000000..a83e1a50
--- /dev/null
+++ b/arch/arm/arm64-16kb-pages.cfg
@@ -0,0 +1 @@
+CONFIG_ARM64_16K_PAGES=y
diff --git a/arch/arm/arm64-16kb-pages.scc b/arch/arm/arm64-16kb-pages.scc
new file mode 100644
index 00000000..d2706c08
--- /dev/null
+++ b/arch/arm/arm64-16kb-pages.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Use 16KB pages"
+define KFEATURE_COMPATIBILITY arch
+
+kconf hardware arm64-16kb-pages.cfg
diff --git a/arch/arm/arm64-4kb-pages.cfg b/arch/arm/arm64-4kb-pages.cfg
new file mode 100644
index 00000000..5df91df1
--- /dev/null
+++ b/arch/arm/arm64-4kb-pages.cfg
@@ -0,0 +1 @@
+CONFIG_ARM64_4K_PAGES=y
diff --git a/arch/arm/arm64-4kb-pages.scc b/arch/arm/arm64-4kb-pages.scc
new file mode 100644
index 00000000..4ee7cac2
--- /dev/null
+++ b/arch/arm/arm64-4kb-pages.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Use 4KB pages"
+define KFEATURE_COMPATIBILITY arch
+
+kconf hardware arm64-4kb-pages.cfg
diff --git a/arch/arm/arm64-64kb-pages.cfg b/arch/arm/arm64-64kb-pages.cfg
new file mode 100644
index 00000000..bda5426d
--- /dev/null
+++ b/arch/arm/arm64-64kb-pages.cfg
@@ -0,0 +1 @@
+CONFIG_ARM64_64K_PAGES=y
diff --git a/arch/arm/arm64-64kb-pages.scc b/arch/arm/arm64-64kb-pages.scc
new file mode 100644
index 00000000..efe60dae
--- /dev/null
+++ b/arch/arm/arm64-64kb-pages.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Use 64KB pages"
+define KFEATURE_COMPATIBILITY arch
+
+kconf hardware arm64-64kb-pages.cfg
diff --git a/arch/arm/arm64-defconfig-cleanup-config-options.patch b/arch/arm/arm64-defconfig-cleanup-config-options.patch
new file mode 100644
index 00000000..46023e3c
--- /dev/null
+++ b/arch/arm/arm64-defconfig-cleanup-config-options.patch
@@ -0,0 +1,49 @@
+From 14e71de7e9d610c2ce6d2cfa064e6c392304bd38 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross@burtonini.com>
+Date: Tue, 11 Jan 2022 12:02:36 +0000
+Subject: [PATCH] arm64: defconfig: cleanup config options
+
+arm64: defconfig: drop unused POWER_AVS option
+Commit 785b5bb41b0a ("PM: AVS: Drop the avs directory and the
+corresponding Kconfig") moved AVS code to SOC-specific folders, and
+removed corresponding Kconfig from drivers/power, leaving original
+POWER_AVS config option enabled in some defconfigs.
+Remove the options, which have no references in the tree anymore.
+
+arm64: defconfig: set CONFIG_USB_CONN_GPIO=y
+Since 10a7b37b5b ("arm64: Update default configuration") PHY_TEGRA_XUSB
+is set to y. That option needs USB_CONN_GPIO to also be y not m, so
+set USB_CONN_GPIO explicitly to y to reflect reality.
+
+arm64: defconfig: remove obsolete CONFIG_ARCH_AGILEX and CONFIG_ARCH_N5X
+These config options were removed in 4a9a1a5602 ("arm64: socfpga: merge
+Agilex and N5X into ARCH_INTEL_SOCFPGA"), so remove them from the
+defconfig.
+
+arm64: defconfig: don't set CONFIG_ACPI_APEI_PCIEAER
+Since 8c8ff55 ("PCI/AER: Don't select CONFIG_PCIEAER by default"), PCIe
+Advanced Error Reporting isn't enabled by default.. As this means just
+enabling CONFIG_CPI_APEI_PCIEAR does not have an effect, remove it from
+the defconfig for clarity.
+
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ arch/arm64/configs/defconfig | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
+index 50aa3d75ab4f..cd1b2d865baf 100644
+--- a/arch/arm64/configs/defconfig
++++ b/arch/arm64/configs/defconfig
+@@ -103,7 +103,6 @@ CONFIG_QORIQ_CPUFREQ=y
+ CONFIG_ACPI=y
+ CONFIG_ACPI_APEI=y
+ CONFIG_ACPI_APEI_GHES=y
+-CONFIG_ACPI_APEI_PCIEAER=y
+ CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+ CONFIG_ACPI_APEI_EINJ=y
+ CONFIG_VIRTUALIZATION=y
+--
+2.19.1
+
diff --git a/arch/arm/arm64-defconfig-remove-CONFIG_IPQ_APSS_5018.patch b/arch/arm/arm64-defconfig-remove-CONFIG_IPQ_APSS_5018.patch
new file mode 100644
index 00000000..e36c20ff
--- /dev/null
+++ b/arch/arm/arm64-defconfig-remove-CONFIG_IPQ_APSS_5018.patch
@@ -0,0 +1,29 @@
+From b0dbb1ddc539b556ac1920ff704ec4099f8ca392 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Thu, 4 Jan 2024 13:32:41 +0000
+Subject: [PATCH] arm64: defconfig: remove CONFIG_IPQ_APSS_5018
+
+This was added in 7f0c873 ("Enable IPQ5018 SoC base configs"), but there
+is no IPQ_APSS_5018 config defined in the kconfig at present.
+
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ arch/arm64/configs/defconfig | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
+index 88c0cfdd5581..bd6b6be68d3f 100644
+--- a/arch/arm64/configs/defconfig
++++ b/arch/arm64/configs/defconfig
+@@ -1248,7 +1248,6 @@ CONFIG_QCOM_CLK_APCC_MSM8996=y
+ CONFIG_QCOM_CLK_SMD_RPM=y
+ CONFIG_QCOM_CLK_RPMH=y
+ CONFIG_IPQ_APSS_6018=y
+-CONFIG_IPQ_APSS_5018=y
+ CONFIG_IPQ_GCC_5018=y
+ CONFIG_IPQ_GCC_5332=y
+ CONFIG_IPQ_GCC_6018=y
+--
+2.39.2
+
diff --git a/arch/microblaze/microblaze.cfg b/arch/microblaze/microblaze.cfg
index ba4773ba..db506551 100644
--- a/arch/microblaze/microblaze.cfg
+++ b/arch/microblaze/microblaze.cfg
@@ -15,5 +15,5 @@ CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=0
CONFIG_XILINX_MICROBLAZE0_USE_FPU=0
# Disable FTRACE, does not work with MicroBlaze
-# CONFIG_FTRACE is not set
+CONFIG_FTRACE=n
diff --git a/arch/mips/mips-Kconfig-add-QEMUMIPS64-option.patch b/arch/mips/mips-Kconfig-add-QEMUMIPS64-option.patch
index 11dba489..1c1d9408 100644
--- a/arch/mips/mips-Kconfig-add-QEMUMIPS64-option.patch
+++ b/arch/mips/mips-Kconfig-add-QEMUMIPS64-option.patch
@@ -1,4 +1,4 @@
-From 55d4751d26fe2eef6fd2dd746a5b424eab82db4c Mon Sep 17 00:00:00 2001
+From 63911f5a1a7753ef0fb2a1b82fa268d7e13c3935 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Tue, 7 Jan 2020 03:34:12 +0000
Subject: [PATCH] mips: Kconfig: add QEMUMIPS64 option
@@ -39,12 +39,12 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index a0bd9bdb5f83..39b28ca0bec1 100644
+index d89efba3d8a4..bc0d3e1cf297 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -87,6 +87,10 @@ config MIPS
- select VIRT_TO_BUS
- select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI)
+@@ -118,6 +118,10 @@ config MACH_INGENIC
+ select CPU_SUPPORTS_CPUFREQ
+ select MIPS_EXTERNAL_TIMER
+config QEMUMIPS64
+ bool "Enable for qemumips64 specific configurations"
@@ -53,19 +53,18 @@ index a0bd9bdb5f83..39b28ca0bec1 100644
menu "Machine selection"
choice
-@@ -98,11 +102,9 @@ config MIPS_GENERIC
+@@ -131,17 +135,17 @@ config MIPS_GENERIC_KERNEL
select BOOT_RAW
select BUILTIN_DTB
select CEVT_R4K
- select CLKSRC_MIPS_GIC
select COMMON_CLK
- select CPU_MIPSR2_IRQ_VI
select CPU_MIPSR2_IRQ_EI
+ select CPU_MIPSR2_IRQ_VI
- select CSRC_R4K
- select DMA_PERDEV_COHERENT
+ select DMA_NONCOHERENT
select HAVE_PCI
select IRQ_MIPS_CPU
-@@ -110,6 +112,8 @@ config MIPS_GENERIC
select MIPS_AUTO_PFN_OFFSET
select MIPS_CPU_SCACHE
select MIPS_GIC
@@ -74,7 +73,7 @@ index a0bd9bdb5f83..39b28ca0bec1 100644
select MIPS_L1_CACHE_SHIFT_7
select NO_EXCEPT_FILL
select PCI_DRIVERS_GENERIC
-@@ -502,9 +506,9 @@ config MIPS_MALTA
+@@ -546,9 +550,9 @@ config MIPS_MALTA
select BOOT_RAW
select BUILTIN_DTB
select CEVT_R4K
@@ -83,7 +82,7 @@ index a0bd9bdb5f83..39b28ca0bec1 100644
+ select CSRC_R4K if !QEMUMIPS64
select COMMON_CLK
- select CSRC_R4K
- select DMA_MAYBE_COHERENT
+ select DMA_NONCOHERENT
select GENERIC_ISA_DMA
select HAVE_PCSPKR_PLATFORM
--
diff --git a/arch/mips/mips-make-current_cpu_data-preempt-safe.patch b/arch/mips/mips-make-current_cpu_data-preempt-safe.patch
new file mode 100644
index 00000000..c68b5f46
--- /dev/null
+++ b/arch/mips/mips-make-current_cpu_data-preempt-safe.patch
@@ -0,0 +1,68 @@
+From 5b2595c3e0dce2912b32ef69aaaacd52cd0e720c Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@gmail.com>
+Date: Fri, 29 Sep 2023 00:11:41 +0000
+Subject: [PATCH] mips: make current_cpu_data preempt safe
+
+When DEBUG_PREEMPT is enabled, mips/mips64 boots are filled with
+backtraces similar to:
+
+ [ 130.730686] BUG: using smp_processor_id() in preemptible [00000000] code: systemd/1
+ [ 130.738542] caller is blast_dcache32+0x40/0x190
+ [ 130.745908] CPU: 0 PID: 1 Comm: systemd Not tainted 6.4.11-yocto-standard #1
+ [ 130.753928] Stack : 0000000000000001 0000000000000000 0000000000000018 9000000004937798
+ [ 130.762192] 9000000004937798 90000000049378c8 0000000000000000 0000000000000000
+ [ 130.770458] 008fac6060240fea 0000000000014f20 9000000004937728 0000000000000000
+ [ 130.778826] 00000000000b61b4 0000000000000030 ffffffff80e8eed0 0000000000000004
+ [ 130.787111] 9000000084937577 0000000000000000 0000000000000000 ffffffff810c3b18
+ [ 130.795440] ffffffff811f0000 0000000000000000 ffffffff81440000 0000000000000000
+ [ 130.803830] 0000000000000000 0000000000000000 ffffffff809842e8 0000000000175097
+ [ 130.812272] 0000000000000001 9000000004934000 9000000004937790 c0000000005d9000
+ [ 130.820722] ffffffff8010b6fc 0000000000000000 0000000000000000 0000000000000000
+ [ 130.829134] 0000000000000000 0000000000000000 ffffffff8010b71c 008fac6060240fea
+ [ 130.837649] ...
+ [ 130.845556] Call Trace:
+ [ 130.853432] [<ffffffff8010b71c>] show_stack+0x64/0x158
+ [ 130.861534] [<ffffffff80ea1790>] dump_stack_lvl+0x5c/0x7c
+ [ 130.869565] [<ffffffff80ea29c4>] check_preemption_disabled+0x10c/0x118
+ [ 130.877605] [<ffffffff8012d7c8>] blast_dcache32+0x40/0x190
+ [ 130.885585] [<ffffffff8039f648>] __vmalloc_node_range+0x3e0/0x780
+ [ 130.893527] [<ffffffff8039fbbc>] vzalloc+0x6c/0x78
+ [ 130.901378] [<ffffffff8095d6c4>] n_tty_open+0x1c/0xb8
+ [ 130.909252] [<ffffffff8095f5a8>] tty_ldisc_open+0x50/0xd0
+ [ 130.917053] [<ffffffff80960150>] tty_ldisc_setup+0x20/0x70
+ [ 130.924927] [<ffffffff80958694>] tty_init_dev.part.0+0xbc/0x2c0
+ [ 130.932742] [<ffffffff80958da8>] tty_open+0x4b8/0x730
+ [ 130.940486] [<ffffffff803e6960>] chrdev_open+0xe0/0x250
+ [ 130.948211] [<ffffffff803da7f4>] do_dentry_open+0x274/0x520
+ [ 130.955960] [<ffffffff803f642c>] path_openat+0xbc4/0x10d8
+ [ 130.963718] [<ffffffff803f7460>] do_filp_open+0x148/0x190
+ [ 130.971482] [<ffffffff803dc264>] do_sys_openat2+0xcc/0x1b0
+ [ 130.979288] [<ffffffff803dc710>] sys_openat+0x50/0xa8
+ [ 130.987077] [<ffffffff80119490>] syscall_common+0x34/0x58
+
+We don't control the locking around current_cpu_data, so it cannot use
+smp_processor_id() as the cpu index.
+
+To make ourselves safe in any context, we must use raw_smp_processor_id()
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ arch/mips/include/asm/cpu-info.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h
+index a600670d00e9..07f9cddd6c77 100644
+--- a/arch/mips/include/asm/cpu-info.h
++++ b/arch/mips/include/asm/cpu-info.h
+@@ -117,7 +117,7 @@ struct cpuinfo_mips {
+ } __attribute__((aligned(SMP_CACHE_BYTES)));
+
+ extern struct cpuinfo_mips cpu_data[];
+-#define current_cpu_data cpu_data[smp_processor_id()]
++#define current_cpu_data cpu_data[raw_smp_processor_id()]
+ #define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
+ #define boot_cpu_data cpu_data[0]
+
+--
+2.34.1
+
diff --git a/arch/mips/mips-vdso-fix-jalr-t9-crash-in-vdso-code.patch b/arch/mips/mips-vdso-fix-jalr-t9-crash-in-vdso-code.patch
new file mode 100644
index 00000000..da88515c
--- /dev/null
+++ b/arch/mips/mips-vdso-fix-jalr-t9-crash-in-vdso-code.patch
@@ -0,0 +1,50 @@
+From e8f6bebe11eb365466cfde324f99698dc8f7f4f8 Mon Sep 17 00:00:00 2001
+From: Victor Kamensky <kamensky@cisco.com>
+Date: Fri, 31 Jan 2020 09:39:44 -0800
+Subject: [PATCH] mips: vdso: fix 'jalr $t9' crash in vdso code
+
+Observed that when kernel is built with Yocto mips64-poky-linux-gcc,
+and mips64-poky-linux-gnun32-gcc toolchain, resuling vdso contains
+'jalr $t9' instructions in its code and since in vdso case nobody
+sets GOT table code crashes when instruction reached. On other hand
+observed that when kernel is built mips-poky-linux-gcc toolchain, the
+same 'jalr $t9' instruction are replaced with PC relative function
+calls using 'bal' instructions.
+
+The difference boils down to -mrelax-pic-calls and -mexplicit-relocs
+gcc options that gets different default values depending on gcc
+target triplets and corresponding binutils. -mrelax-pic-calls got
+enabled by default only in mips-poky-linux-gcc case. MIPS binuitls
+ld relies on R_MIPS_JALR relocation to convert 'jalr $t9' into 'bal'
+and such relocation is generated only if -mrelax-pic-calls option
+is on.
+
+Solution call out -mrelax-pic-calls and -mexplicit-relocs options
+explicitely while compiling MIPS vdso code. That would get correct
+and consitent between different toolchains behavior.
+
+Reported-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+Signed-off-by: Victor Kamensky <kamensky@cisco.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ arch/mips/vdso/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
+index 57fe83235281..374e1eca2791 100644
+--- a/arch/mips/vdso/Makefile
++++ b/arch/mips/vdso/Makefile
+@@ -35,7 +35,9 @@ cflags-vdso := $(ccflags-vdso) \
+ -O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
+ -mrelax-pic-calls $(call cc-option, -mexplicit-relocs) \
+ -fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \
+- $(call cc-option, -fno-asynchronous-unwind-tables)
++ $(call cc-option, -fno-asynchronous-unwind-tables) \
++ $(call cc-option, -mrelax-pic-calls) \
++ $(call cc-option, -mexplicit-relocs)
+ aflags-vdso := $(ccflags-vdso) \
+ -D__ASSEMBLY__ -Wa,-gdwarf-2
+
+--
+2.19.1
+
diff --git a/arch/mips/mips.scc b/arch/mips/mips.scc
index 9ff48e5c..088a934b 100644
--- a/arch/mips/mips.scc
+++ b/arch/mips/mips.scc
@@ -7,5 +7,6 @@ fi
patch malta-uhci-quirks-make-allowance-for-slow-4k-e-c.patch
patch 4kc-cache-tlb-hazard-tlbp-cache-coherency.patch
-patch staging-octeon-Add-a-workaround-for-the-issue-of-GCC.patch
-patch mips-Kconfig-add-QEMUMIPS64-option.patch \ No newline at end of file
+patch mips-Kconfig-add-QEMUMIPS64-option.patch
+patch mips-vdso-fix-jalr-t9-crash-in-vdso-code.patch
+patch mips-make-current_cpu_data-preempt-safe.patch
diff --git a/arch/mips/staging-octeon-Add-a-workaround-for-the-issue-of-GCC.patch b/arch/mips/staging-octeon-Add-a-workaround-for-the-issue-of-GCC.patch
deleted file mode 100644
index 89f79090..00000000
--- a/arch/mips/staging-octeon-Add-a-workaround-for-the-issue-of-GCC.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 3373c0cf71f2812eeb9694839456df6f67fd32ac Mon Sep 17 00:00:00 2001
-From: Kevin Hao <kexin.hao@windriver.com>
-Date: Wed, 20 Jun 2018 18:41:55 +0800
-Subject: [PATCH] staging: octeon: Add a workaround for the issue of GCC8
-
-In function cvm_oct_xmit(), the packet length is set with code like
-this:
- pko_command.s.total_bytes = skb->len;
-
-But when building with gcc8, the pko_command.s.total_bytes doesn't
-emit the right value when it is used in the following codes:
- /* Send the packet to the output queue */
- if (unlikely(cvmx_pko_send_packet_finish(priv->port,
- priv->queue + qos,
- pko_command, hw_buffer,
- CVMX_PKO_LOCK_NONE))) {
-
-Adding a barrier after the assignment would generate the right codes.
-
-Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- drivers/staging/octeon/ethernet-tx.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
-index 31f35025d19e..af9da2508e93 100644
---- a/drivers/staging/octeon/ethernet-tx.c
-+++ b/drivers/staging/octeon/ethernet-tx.c
-@@ -264,6 +264,9 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
- pko_command.s.n2 = 1; /* Don't pollute L2 with the outgoing packet */
- pko_command.s.segs = 1;
- pko_command.s.total_bytes = skb->len;
-+#if GCC_VERSION >= 80000
-+ barrier();
-+#endif
- pko_command.s.size0 = CVMX_FAU_OP_SIZE_32;
- pko_command.s.subone0 = 1;
-
---
-2.5.0
-
diff --git a/arch/powerpc/crtsavres-fixups-for-5.4.patch b/arch/powerpc/crtsavres-fixups-for-5.4.patch
deleted file mode 100644
index e3f09715..00000000
--- a/arch/powerpc/crtsavres-fixups-for-5.4.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f103dbd2b479057481bef2bc21060e05304be15e Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@gmail.com>
-Date: Tue, 15 Oct 2019 22:55:17 -0400
-Subject: [PATCH] crtsavres: fixups for 5.4+
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
----
- arch/powerpc/Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
-index c76c406faa59..7471b0160e84 100644
---- a/arch/powerpc/Makefile
-+++ b/arch/powerpc/Makefile
-@@ -416,6 +416,9 @@ endif
- archclean:
- $(Q)$(MAKE) $(clean)=$(boot)
-
-+arch/powerpc/lib/crtsavres.o: arch/powerpc/lib/crtsavres.S
-+ $(Q)$(MAKE) $(build)=arch/powerpc/lib arch/powerpc/lib/crtsavres.o
-+
- archprepare: checkbin arch/powerpc/lib/crtsavres.o
-
- archheaders:
---
-2.19.1
-
diff --git a/arch/powerpc/powerpc-Add-unwind-information-for-SPE-registers-of-.patch b/arch/powerpc/powerpc-Add-unwind-information-for-SPE-registers-of-.patch
deleted file mode 100644
index a6b43fd4..00000000
--- a/arch/powerpc/powerpc-Add-unwind-information-for-SPE-registers-of-.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 87398e3c68b21d06817c44ca39449ef382d2ce31 Mon Sep 17 00:00:00 2001
-From: Liming Wang <liming.wang@windriver.com>
-Date: Fri, 19 Dec 2008 11:16:39 +0800
-Subject: [PATCH 1/3] powerpc: Add unwind information for SPE registers of E500 core
-
-SPE registers use the high part bit0~bit31 of E500 GPR0~GPR31.
-The unwind information in "eh_frame" section is used during exception
-handling and describes register information in the signal frame. But
-current unwind information doesn't cover SPE registers, which have
-been saved in the signal frame. This patch adds this unwind information
-to "eh_frame" section.
-
-SPE registers use register number 1200+N to identify register 'N', but
-they start from 113 in unwind column, which is computed from gcc
-source code, macro DWARF_REG_TO_UNWIND_COLUMN:
-
- #define FIRST_PSEUDO_REGISTER 114
- #define DWARF_REG_TO_UNWIND_COLUMN(r) \
- ((r) > 1200 ? ((r) - 1200 + FIRST_PSEUDO_REGISTER - 1) : (r))
-
-Signed-off-by: Liming Wang <liming.wang@windriver.com>
----
- arch/powerpc/kernel/vdso32/sigtramp.S | 34 +++++++++++++++++++++++++++++++++
- 1 files changed, 34 insertions(+), 0 deletions(-)
-
-diff --git a/arch/powerpc/kernel/vdso32/sigtramp.S b/arch/powerpc/kernel/vdso32/sigtramp.S
-index 68d49dd..789a343 100644
---- a/arch/powerpc/kernel/vdso32/sigtramp.S
-+++ b/arch/powerpc/kernel/vdso32/sigtramp.S
-@@ -251,6 +251,40 @@ V_FUNCTION_END(__kernel_sigtramp_rt32)
- vsave_msr1 (31); \
- vsave_msr2 (33, 32*16+12); \
- vsave (32, 32*16)
-+#elif defined(CONFIG_SPE)
-+#define EH_FRAME_VMX \
-+ rsave (113, VREGS); \
-+ rsave (114, VREGS + 1*4); \
-+ rsave (115, VREGS + 2*4); \
-+ rsave (116, VREGS + 3*4); \
-+ rsave (117, VREGS + 4*4); \
-+ rsave (118, VREGS + 5*4); \
-+ rsave (119, VREGS + 6*4); \
-+ rsave (120, VREGS + 7*4); \
-+ rsave (121, VREGS + 8*4); \
-+ rsave (122, VREGS + 9*4); \
-+ rsave (123, VREGS + 10*4); \
-+ rsave (124, VREGS + 11*4); \
-+ rsave (125, VREGS + 12*4); \
-+ rsave (126, VREGS + 13*4); \
-+ rsave (127, VREGS + 14*4); \
-+ rsave (128, VREGS + 15*4); \
-+ rsave (129, VREGS + 16*4); \
-+ rsave (130, VREGS + 17*4); \
-+ rsave (131, VREGS + 18*4); \
-+ rsave (132, VREGS + 19*4); \
-+ rsave (133, VREGS + 20*4); \
-+ rsave (134, VREGS + 21*4); \
-+ rsave (135, VREGS + 22*4); \
-+ rsave (136, VREGS + 23*4); \
-+ rsave (137, VREGS + 24*4); \
-+ rsave (138, VREGS + 25*4); \
-+ rsave (139, VREGS + 26*4); \
-+ rsave (140, VREGS + 27*4); \
-+ rsave (141, VREGS + 28*4); \
-+ rsave (142, VREGS + 29*4); \
-+ rsave (143, VREGS + 30*4); \
-+ rsave (144, VREGS + 31*4);
- #else
- #define EH_FRAME_VMX
- #endif
---
-1.6.5.2
-
diff --git a/arch/powerpc/powerpc-Disable-attribute-alias-warnings-from-gcc8.patch b/arch/powerpc/powerpc-Disable-attribute-alias-warnings-from-gcc8.patch
deleted file mode 100644
index 2e93b857..00000000
--- a/arch/powerpc/powerpc-Disable-attribute-alias-warnings-from-gcc8.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 59e401ffeda487d9b3bd092199ec9a98faf5abfe Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 4 May 2018 09:46:42 -0700
-Subject: [PATCH 1/2] powerpc: Disable attribute-alias warnings from gcc8
-
-Fixes
-alias between functions of incompatible types warnings
-which are new with gcc8
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- arch/powerpc/kernel/Makefile | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
-index 1b6bc7fba996..7fab5ab9edc2 100644
---- a/arch/powerpc/kernel/Makefile
-+++ b/arch/powerpc/kernel/Makefile
-@@ -3,7 +3,8 @@
- # Makefile for the linux kernel.
- #
-
--CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
-+CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' $(call cc-disable-warning, attribute-alias)
-+CFLAGS_syscalls.o += $(call cc-disable-warning, attribute-alias)
-
- subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
-
---
-2.5.0
-
diff --git a/arch/powerpc/powerpc-add-crtsavres.o-to-archprepare-for-kbuild.patch b/arch/powerpc/powerpc-add-crtsavres.o-to-archprepare-for-kbuild.patch
deleted file mode 100644
index 27119879..00000000
--- a/arch/powerpc/powerpc-add-crtsavres.o-to-archprepare-for-kbuild.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From f13fd6af4120b8b42d77377c9989457cda41899f Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <bruce.ashfield@windriver.com>
-Date: Sun, 15 Feb 2009 16:57:14 -0500
-Subject: [PATCH 3/3] powerpc: add crtsavres.o to archprepare for kbuild
-
-upstream commit da3de6df33f5f42ff9dc40093fbc884f524c9a49 adds
-a dependency to all kernel modules to crtsavres. This
-ensures that out-of-line register saves/restores work when
-CONFIG_CC_OPTIMIZE_FOR_SIZE is enabled.
-
-What it didn't do was ensure that it was built when
-modules_prepare was run and hence out of tree powerpc kernel
-modules can't properly link.
-
-The fix is to add crtsavres.o to the archprepare rule in
-the arch/powerpc/Makefile
-
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- arch/powerpc/Makefile | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
-index c3811ab..ad16ff3 100644
---- a/arch/powerpc/Makefile
-+++ b/arch/powerpc/Makefile
-@@ -218,7 +218,7 @@ endif
- archclean:
- $(Q)$(MAKE) $(clean)=$(boot)
-
--archprepare: checkbin
-+archprepare: checkbin arch/powerpc/lib/crtsavres.o
-
- # Use the file '.tmp_gas_check' for binutils tests, as gas won't output
- # to stdout and these checks are run even on install targets.
---
-1.6.5.2
-
diff --git a/arch/powerpc/powerpc-debug.cfg b/arch/powerpc/powerpc-debug.cfg
new file mode 100644
index 00000000..6ea12a12
--- /dev/null
+++ b/arch/powerpc/powerpc-debug.cfg
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
diff --git a/arch/powerpc/powerpc-debug.scc b/arch/powerpc/powerpc-debug.scc
new file mode 100644
index 00000000..aedb597c
--- /dev/null
+++ b/arch/powerpc/powerpc-debug.scc
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: MIT
+
+kconf non-hardware powerpc-debug.cfg
diff --git a/arch/powerpc/powerpc-kexec-fix-for-powerpc64.patch b/arch/powerpc/powerpc-kexec-fix-for-powerpc64.patch
deleted file mode 100644
index d979885a..00000000
--- a/arch/powerpc/powerpc-kexec-fix-for-powerpc64.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 85388aad8ca15fcc28f5d0989265217351bada19 Mon Sep 17 00:00:00 2001
-From: Benjamin Walsh <benjamin.walsh@windriver.com>
-Date: Mon, 9 Feb 2009 14:25:47 -0500
-Subject: [PATCH] powerpc: kexec fix for powerpc64
-
-slbia instruction invalidates the SLB, but there was a hang on the first
-instruction that caused an SLB miss exception. Doing a full sync after
-the slbia causes the SLB to be in a consistent state for the handling of
-the SLB exception.
-
-Signed-off by: Benjamin Walsh <benjamin.walsh@windriver.com>
----
- arch/powerpc/mm/book3s64/slb.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/powerpc/mm/book3s64/slb.c b/arch/powerpc/mm/book3s64/slb.c
-index 515730e499fe..7a8b335003b6 100644
---- a/arch/powerpc/mm/book3s64/slb.c
-+++ b/arch/powerpc/mm/book3s64/slb.c
-@@ -331,6 +331,7 @@ void slb_initialize(void)
- asm volatile("isync":::"memory");
- asm volatile("slbmte %0,%0"::"r" (0) : "memory");
- asm volatile("isync; slbia; isync":::"memory");
-+ mb();
- create_shadowed_slbe(PAGE_OFFSET, mmu_kernel_ssize, lflags, LINEAR_INDEX);
- create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, VMALLOC_INDEX);
-
---
-2.1.0
-
diff --git a/arch/powerpc/powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch b/arch/powerpc/powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
deleted file mode 100644
index 6033c020..00000000
--- a/arch/powerpc/powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8632f470f02c70d9501ae21f57740ea23c14773f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 4 May 2018 09:50:05 -0700
-Subject: [PATCH 2/2] powerpc/ptrace: Disable array-bounds warning with gcc8
-
-This masks the new gcc8 warning
-include/linux/regset.h:270:4: error: 'memcpy' offset [-527, -529] is out of the bounds [0, 16] of object 'vrsave' with type 'union <anonymous>'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
----
- arch/powerpc/kernel/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
-index 7fab5ab9edc2..601118b43545 100644
---- a/arch/powerpc/kernel/Makefile
-+++ b/arch/powerpc/kernel/Makefile
-@@ -4,6 +4,7 @@
- #
-
- CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' $(call cc-disable-warning, attribute-alias)
-+CFLAGS_ptrace.o += $(call cc-disable-warning, array-bounds)
- CFLAGS_syscalls.o += $(call cc-disable-warning, attribute-alias)
-
- subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
---
-2.5.0
-
diff --git a/arch/powerpc/powerpc.scc b/arch/powerpc/powerpc.scc
index d3f7e2fb..548d2d44 100644
--- a/arch/powerpc/powerpc.scc
+++ b/arch/powerpc/powerpc.scc
@@ -1,7 +1 @@
# SPDX-License-Identifier: MIT
-patch powerpc-Add-unwind-information-for-SPE-registers-of-.patch
-patch powerpc-kexec-fix-for-powerpc64.patch
-patch powerpc-add-crtsavres.o-to-archprepare-for-kbuild.patch
-patch powerpc-Disable-attribute-alias-warnings-from-gcc8.patch
-patch powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
-patch crtsavres-fixups-for-5.4.patch
diff --git a/arch/x86/x86.scc b/arch/x86/x86.scc
index 548d2d44..a055f389 100644
--- a/arch/x86/x86.scc
+++ b/arch/x86/x86.scc
@@ -1 +1,2 @@
# SPDX-License-Identifier: MIT
+patch x86_64_defconfig-Fix-warnings.patch
diff --git a/arch/x86/x86_64_defconfig-Fix-warnings.patch b/arch/x86/x86_64_defconfig-Fix-warnings.patch
new file mode 100644
index 00000000..163effb2
--- /dev/null
+++ b/arch/x86/x86_64_defconfig-Fix-warnings.patch
@@ -0,0 +1,109 @@
+From a9590c3b985938a5882f4b6f83deb0b108cceabd Mon Sep 17 00:00:00 2001
+From: Naveen Saini <naveen.kumar.saini@intel.com>
+Date: Fri, 21 Jan 2022 16:46:21 +0800
+Subject: [PATCH] x86_64_defconfig: Fix warnings
+
+Configure CONFIG_EEEPC_LAPTOP & CONFIG_SND_SEQ_DUMMY as modules, because
+dependencies are configured as modules.
+ [NOTE]: 'CONFIG_EEEPC_LAPTOP' last val (y) and .config val (m) do not match
+ [NOTE]: 'CONFIG_SND_SEQ_DUMMY' last val (y) and .config val (m) do not match
+
+Added dependency configurations:
+ CONFIG_HID_LOGITECH for CONFIG_LOGITECH_FF
+ CONFIG_NET_VENDOR_DEC for CONFIG_NET_TULIP
+ CONFIG_IOMMU_SUPPORT for CONFIG_AMD_IOOMU & CONFIG_INTEL_IOMMU
+ CONFIG_NET_VENDOR_NVIDIA for CONFIG_FORCEDETH
+
+ Config 'LOGITECH_FF' has the following Direct dependencies (LOGITECH_FF=n):
+ HID_LOGITECH(=n) && HID(=y) && INPUT(=y)
+ Parent dependencies are:
+ HID_LOGITECH [n] HID [y] INPUT [y]
+ [INFO]: config 'CONFIG_LOGITECH_FF' was set, but it wasn't assignable, check (parent) dependencies
+
+ Config 'NET_TULIP' has the following Direct dependencies (NET_TULIP=n):
+ PCI(=y) || EISA(=n) || CARDBUS(=y) (=y) && NET_VENDOR_DEC(=n) && ETHERNET(=y) && NETDEVICES(=y)
+ Parent dependencies are:
+ NET_VENDOR_DEC [n] ETHERNET [y] EISA [n] PCI [y] CARDBUS [y] NETDEVICES [y]
+ [INFO]: config 'CONFIG_NET_TULIP' was set, but it wasn't assignable, check (parent) dependencies
+
+ Config 'FORCEDETH' has the following Direct dependencies (FORCEDETH=n):
+ PCI(=y) && NET_VENDOR_NVIDIA(=n) && ETHERNET(=y) && NETDEVICES(=y)
+ Parent dependencies are:
+ NETDEVICES [y] PCI [y] NET_VENDOR_NVIDIA [n] ETHERNET [y]
+ [INFO]: config 'CONFIG_FORCEDETH' was set, but it wasn't assignable, check (parent) dependencies
+
+Tested with qemux86-64 machine:
+$ oe-selftest --run-tests kerneldevelopment.KernelConfigs
+
+Disabled debug configurations. Yocto-kernel-cahce have seperate debug configurations.
+
+Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+---
+ arch/x86/configs/x86_64_defconfig | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
+index 27759236fd60..a3d260605161 100644
+--- a/arch/x86/configs/x86_64_defconfig
++++ b/arch/x86/configs/x86_64_defconfig
+@@ -132,7 +132,7 @@ CONFIG_PCCARD=y
+ CONFIG_YENTA=y
+ CONFIG_DEVTMPFS=y
+ CONFIG_DEVTMPFS_MOUNT=y
+-CONFIG_DEBUG_DEVRES=y
++CONFIG_DEBUG_DEVRES=n
+ CONFIG_CONNECTOR=y
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_VIRTIO_BLK=y
+@@ -160,11 +160,13 @@ CONFIG_NETCONSOLE=y
+ CONFIG_VIRTIO_NET=y
+ CONFIG_TIGON3=y
+ CONFIG_NET_TULIP=y
++CONFIG_NET_VENDOR_DEC=y
+ CONFIG_E100=y
+ CONFIG_E1000=y
+ CONFIG_E1000E=y
+ CONFIG_SKY2=y
+ CONFIG_FORCEDETH=y
++CONFIG_NET_VENDOR_NVIDIA=y
+ CONFIG_8139TOO=y
+ CONFIG_R8169=y
+ CONFIG_INPUT_EVDEV=y
+@@ -201,12 +203,13 @@ CONFIG_SOUND=y
+ CONFIG_SND=y
+ CONFIG_SND_HRTIMER=y
+ CONFIG_SND_SEQUENCER=y
+-CONFIG_SND_SEQ_DUMMY=y
++CONFIG_SND_SEQ_DUMMY=m
+ CONFIG_SND_HDA_INTEL=y
+ CONFIG_SND_HDA_HWDEP=y
+ CONFIG_HIDRAW=y
+ CONFIG_HID_GYRATION=y
+ CONFIG_LOGITECH_FF=y
++CONFIG_HID_LOGITECH=y
+ CONFIG_HID_NTRIG=y
+ CONFIG_HID_PANTHERLORD=y
+ CONFIG_PANTHERLORD_FF=y
+@@ -231,10 +234,11 @@ CONFIG_RTC_CLASS=y
+ CONFIG_DMADEVICES=y
+ CONFIG_VIRTIO_PCI=y
+ CONFIG_VIRTIO_INPUT=y
+-CONFIG_EEEPC_LAPTOP=y
++CONFIG_EEEPC_LAPTOP=m
+ CONFIG_AMD_IOMMU=y
+ CONFIG_INTEL_IOMMU=y
+ # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
++CONFIG_IOMMU_SUPPORT=y
+ CONFIG_EXT4_FS=y
+ CONFIG_EXT4_FS_POSIX_ACL=y
+ CONFIG_EXT4_FS_SECURITY=y
+@@ -276,4 +280,4 @@ CONFIG_SCHEDSTATS=y
+ CONFIG_BLK_DEV_IO_TRACE=y
+ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
+ CONFIG_EARLY_PRINTK_DBGP=y
+-CONFIG_DEBUG_BOOT_PARAMS=y
++CONFIG_DEBUG_BOOT_PARAMS=n
+--
+2.34.1
+