diff options
Diffstat (limited to '')
3 files changed, 111 insertions, 0 deletions
diff --git a/debian/patches/bugfix/powerpc/powerpc-boot-fix-missing-crc32poly.h-when-building-with-kernel_xz.patch b/debian/patches/bugfix/powerpc/powerpc-boot-fix-missing-crc32poly.h-when-building-with-kernel_xz.patch new file mode 100644 index 000000000..45e1252df --- /dev/null +++ b/debian/patches/bugfix/powerpc/powerpc-boot-fix-missing-crc32poly.h-when-building-with-kernel_xz.patch @@ -0,0 +1,39 @@ +From: Krzysztof Kozlowski <krzk@kernel.org> +Date: Wed, 29 Aug 2018 09:32:23 +0200 +Subject: powerpc/boot: Fix missing crc32poly.h when building with KERNEL_XZ +Origin: https://patchwork.ozlabs.org/patch/963258/ + +After commit faa16bc404d7 ("lib: Use existing define with +polynomial") the lib/xz/xz_crc32.c includes a header from include/linux +directory thus any other user of this code should define proper include +path. + +This fixes the build error on powerpc with CONFIG_KERNEL_XZ: + + In file included from ../arch/powerpc/boot/../../../lib/decompress_unxz.c:233:0, + from ../arch/powerpc/boot/decompress.c:42: + ../arch/powerpc/boot/../../../lib/xz/xz_crc32.c:18:29: fatal error: linux/crc32poly.h: No such file or directory + +Reported-by: Michal Kubecek <mkubecek@suse.cz> +Fixes: faa16bc404d7 ("lib: Use existing define with polynomial") +Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> +Reported-by: kbuild test robot <lkp@intel.com> +Reported-by: Meelis Roos <mroos@linux.ee> +Tested-by: Michal Kubecek <mkubecek@suse.cz> +--- + arch/powerpc/boot/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: linux/arch/powerpc/boot/Makefile +=================================================================== +--- linux.orig/arch/powerpc/boot/Makefile ++++ linux/arch/powerpc/boot/Makefile +@@ -68,7 +68,7 @@ ifeq ($(call cc-option-yn, -fstack-prote + BOOTCFLAGS += -fno-stack-protector + endif + +-BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj) ++BOOTCFLAGS += -I$(objtree)/$(obj) -I$(srctree)/$(obj) -I$(srctree)/include + + DTC_FLAGS ?= -p 1024 + diff --git a/debian/patches/bugfix/powerpc/powerpc-fix-mcpu-options-for-spe-only-compiler.patch b/debian/patches/bugfix/powerpc/powerpc-fix-mcpu-options-for-spe-only-compiler.patch new file mode 100644 index 000000000..833cf5a3c --- /dev/null +++ b/debian/patches/bugfix/powerpc/powerpc-fix-mcpu-options-for-spe-only-compiler.patch @@ -0,0 +1,42 @@ +From: Ben Hutchings <ben@decadent.org.uk> +Date: Wed, 26 Dec 2018 00:00:40 +0000 +Subject: powerpc: Fix -mcpu= options for SPE-only compiler +Forwarded: https://lists.debian.org/debian-kernel/2018/12/msg00295.html + +GCC for Debian's "powerpcspe" architecture only supports 32-bit +SPE targets, and using -mcpu=powerpc or -mcpu=powerpc64 is a fatal +error. + +* Change the test for a biarch compiler to pass both the -m32 and -m64 + options, so that it doesn't catch 32-bit-only compilers +* Add an ifdef CONFIG_PPC64 around the 64-bit CPU option definitions + +Signed-off-by: Ben Hutchings <ben@decadent.org.uk> +--- +--- a/arch/powerpc/Makefile ++++ b/arch/powerpc/Makefile +@@ -12,7 +12,7 @@ + # Rewritten by Cort Dougan and Paul Mackerras + # + +-HAS_BIARCH := $(call cc-option-yn, -m32) ++HAS_BIARCH := $(call cc-option-yn, -m32 -m64) + + # Set default 32 bits cross compilers for vdso and boot wrapper + CROSS32_COMPILE ?= +@@ -159,6 +159,7 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-opti + + CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata) + ++ifdef CONFIG_PPC64 + ifdef CONFIG_PPC_BOOK3S_64 + ifdef CONFIG_CPU_LITTLE_ENDIAN + CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8 +@@ -170,6 +171,7 @@ endif + else ifdef CONFIG_PPC_BOOK3E_64 + CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 + endif ++endif + + ifdef CONFIG_FUNCTION_TRACER + CC_FLAGS_FTRACE := -pg diff --git a/debian/patches/bugfix/powerpc/powerpc-lib-makefile-don-t-pull-in-quad.o-for-32-bit.patch b/debian/patches/bugfix/powerpc/powerpc-lib-makefile-don-t-pull-in-quad.o-for-32-bit.patch new file mode 100644 index 000000000..8fc19da9f --- /dev/null +++ b/debian/patches/bugfix/powerpc/powerpc-lib-makefile-don-t-pull-in-quad.o-for-32-bit.patch @@ -0,0 +1,30 @@ +From: James Clarke <jrtc27@jrtc27.com> +Date: Sun, 18 Feb 2018 15:54:44 +0000 +Subject: powerpc/lib/Makefile: Don't pull in quad.o for 32-bit kernels +Origin: https://people.debian.org/~jrtc27/linux-ppc32/0002-powerpc-lib-Makefile-Don-t-pull-in-quad.o-for-32-bit.patch + +The functions exported by quad.o are only used when guarded by +__powerpc64__ and so are unused on 32-bit kernels. Moreover, their +implementations make use of instructions which will cause an illegal +instruction error on 32-bit processors, and are not accepted by the +assembler for SPE processors. + +Fixes: 31bfdb036f12 ("powerpc: Use instruction emulation infrastructure to handle alignment faults") +Signed-off-by: James Clarke <jrtc27@jrtc27.com> +--- + arch/powerpc/lib/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: linux/arch/powerpc/lib/Makefile +=================================================================== +--- linux.orig/arch/powerpc/lib/Makefile ++++ linux/arch/powerpc/lib/Makefile +@@ -35,7 +35,7 @@ obj64-$(CONFIG_KPROBES_SANITY_TEST) += t + obj-y += checksum_$(BITS).o checksum_wrappers.o \ + string_$(BITS).o memcmp_$(BITS).o + +-obj-y += sstep.o ldstfp.o quad.o ++obj-y += sstep.o ldstfp.o + obj64-y += quad.o + + obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o |