From bcb4b231af9e1787ea6ba4eac2f269a7abb403aa Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Tue, 12 Sep 2023 19:52:58 +0200 Subject: [PATCH] linux.port: lxip_checksum_32.patch CONFIG_X86_USE_PPRO_CHECKSUM is a 'def_bool y' and gets re-enabled by 'make olddefconfig'. The PPRO version contains text relocations which we cannot have in binaries (e.g., 'lea 45f(%ebx ...).'). issue #5104 --- .../dde_linux/patches/lxip_checksum_32.patch | 30 +++++++++++++++++++ repos/dde_linux/ports/linux.hash | 2 +- repos/dde_linux/ports/linux.port | 2 ++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 repos/dde_linux/patches/lxip_checksum_32.patch diff --git a/repos/dde_linux/patches/lxip_checksum_32.patch b/repos/dde_linux/patches/lxip_checksum_32.patch new file mode 100644 index 0000000000..7a9e774bdd --- /dev/null +++ b/repos/dde_linux/patches/lxip_checksum_32.patch @@ -0,0 +1,30 @@ +CONFIG_X86_USE_PPRO_CHECKSUM is a 'def_bool y' and gets re-enabled by +'make olddefconfig'. The PPRO version contains text relocations which we cannot +have in binaries (e.g., 'lea 45f(%ebx ...).'). + +diff --git a/arch/x86/lib/checksum_32.S b/arch/x86/lib/checksum_32.S +index 23318c3..0eba848 100644 +--- a/arch/x86/lib/checksum_32.S ++++ b/arch/x86/lib/checksum_32.S +@@ -36,8 +36,9 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) + */ + + .text +- +-#ifndef CONFIG_X86_USE_PPRO_CHECKSUM ++ ++/* use version without text relocations */ ++#if 1 + + /* + * Experiments with Ethernet and SLIP connections show that buff +@@ -264,7 +265,8 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, + 9999: y; \ + _ASM_EXTABLE_TYPE(9999b, 7f, EX_TYPE_UACCESS | EX_FLAG_CLEAR_AX) + +-#ifndef CONFIG_X86_USE_PPRO_CHECKSUM ++/* use version without text relocations */ ++#if 1 + + #define ARGBASE 16 + #define FP 12 diff --git a/repos/dde_linux/ports/linux.hash b/repos/dde_linux/ports/linux.hash index 88d078cdd9..b77b0ee182 100644 --- a/repos/dde_linux/ports/linux.hash +++ b/repos/dde_linux/ports/linux.hash @@ -1 +1 @@ -b590eada42a940c88de535ea0f5c10e1bd0e709b +d6a9e6d9ac70cc70d4bee2924207d72f406e5dfd diff --git a/repos/dde_linux/ports/linux.port b/repos/dde_linux/ports/linux.port index 07280e8213..01b6b19ad8 100644 --- a/repos/dde_linux/ports/linux.port +++ b/repos/dde_linux/ports/linux.port @@ -13,6 +13,7 @@ PATCH_FILES := i915_irq.patch \ iwlwifi_enable_irq_before_pnvm.patch \ iwlwifi_limit_rx_bufs.patch \ usb_host_devio_sg.patch \ + lxip_checksum_32.patch \ usb_net_pinephone.patch \ usb_net_cdc_ncm.patch \ usb_net_smsc95xx.patch \ @@ -20,6 +21,7 @@ PATCH_FILES := i915_irq.patch \ PATCHES += $(addprefix patches/,$(PATCH_FILES)) PATCH_OPT(patches/i915_irq.patch) := -p1 -d${DIR(linux)} +PATCH_OPT(patches/lxip_checksum_32.patch) := -p1 -d${DIR(linux)} PATCH_OPT(patches/usb_net_pinephone.patch) := -p1 -d${DIR(linux)} PATCH_OPT(patches/usb_net_cdc_ncm.patch) := -p1 -d${DIR(linux)} PATCH_OPT(patches/usb_net_smsc95xx.patch) := -p1 -d${DIR(linux)}