[powerpcspe] Fix build failures (thanks to James Clarke)
This commit is contained in:
parent
4fd24e2fc5
commit
4f5d99cab4
|
@ -5,6 +5,9 @@ linux (4.17.3-2) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
[ Ben Hutchings ]
|
[ Ben Hutchings ]
|
||||||
* linux-tools: Fix cross-build of objtool
|
* linux-tools: Fix cross-build of objtool
|
||||||
|
* [powerpcspe] Fix build failures (thanks to James Clarke):
|
||||||
|
- powerpc/lib/sstep: Fix building for powerpcspe
|
||||||
|
- powerpc/lib/Makefile: Don't pull in quad.o for 32-bit kernels
|
||||||
|
|
||||||
-- Sjoerd Simons <sjoerd@debian.org> Wed, 04 Jul 2018 10:25:57 +0200
|
-- Sjoerd Simons <sjoerd@debian.org> Wed, 04 Jul 2018 10:25:57 +0200
|
||||||
|
|
||||||
|
|
28
debian/patches/bugfix/powerpc/powerpc-lib-makefile-don-t-pull-in-quad.o-for-32-bit.patch
vendored
Normal file
28
debian/patches/bugfix/powerpc/powerpc-lib-makefile-don-t-pull-in-quad.o-for-32-bit.patch
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
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(-)
|
||||||
|
|
||||||
|
--- a/arch/powerpc/lib/Makefile
|
||||||
|
+++ b/arch/powerpc/lib/Makefile
|
||||||
|
@@ -34,7 +34,7 @@ obj64-$(CONFIG_KPROBES_SANITY_TEST) += t
|
||||||
|
|
||||||
|
obj-y += checksum_$(BITS).o checksum_wrappers.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
|
35
debian/patches/bugfix/powerpc/powerpc-lib-sstep-fix-building-for-powerpcspe.patch
vendored
Normal file
35
debian/patches/bugfix/powerpc/powerpc-lib-sstep-fix-building-for-powerpcspe.patch
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
From: James Clarke <jrtc27@jrtc27.com>
|
||||||
|
Date: Thu, 7 Dec 2017 20:32:44 +0000
|
||||||
|
Subject: powerpc/lib/sstep: Fix building for powerpcspe
|
||||||
|
Origin: https://people.debian.org/~jrtc27/linux-ppc32/0001-powerpc-lib-sstep-Fix-building-for-powerpcspe.patch
|
||||||
|
|
||||||
|
On powerpcspe, ptesync is not a recognised instruction and so fails to
|
||||||
|
assemble. We don't expect to have to emulate an lwsync or a ptesync on a
|
||||||
|
32-bit kernel, so just ifdef them out, and catch any unexpected barrier
|
||||||
|
types.
|
||||||
|
|
||||||
|
Fixes: 3cdfcbfd32b9 ("powerpc: Change analyse_instr so it doesn't modify *regs")
|
||||||
|
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
|
||||||
|
---
|
||||||
|
arch/powerpc/lib/sstep.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
--- a/arch/powerpc/lib/sstep.c
|
||||||
|
+++ b/arch/powerpc/lib/sstep.c
|
||||||
|
@@ -2671,12 +2671,16 @@ void emulate_update_regs(struct pt_regs
|
||||||
|
case BARRIER_EIEIO:
|
||||||
|
eieio();
|
||||||
|
break;
|
||||||
|
+#ifdef __powerpc64__
|
||||||
|
case BARRIER_LWSYNC:
|
||||||
|
asm volatile("lwsync" : : : "memory");
|
||||||
|
break;
|
||||||
|
case BARRIER_PTESYNC:
|
||||||
|
asm volatile("ptesync" : : : "memory");
|
||||||
|
break;
|
||||||
|
+#endif
|
||||||
|
+ default:
|
||||||
|
+ WARN_ON_ONCE(1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
|
@ -67,6 +67,8 @@ bugfix/x86/perf-tools-fix-unwind-build-on-i386.patch
|
||||||
bugfix/sh/sh-boot-do-not-use-hyphen-in-exported-variable-name.patch
|
bugfix/sh/sh-boot-do-not-use-hyphen-in-exported-variable-name.patch
|
||||||
bugfix/x86/mmap-remember-the-map_fixed-flag-as-vm_fixed.patch
|
bugfix/x86/mmap-remember-the-map_fixed-flag-as-vm_fixed.patch
|
||||||
bugfix/x86/mmap-add-an-exception-to-the-stack-gap-for-hotspot-jvm.patch
|
bugfix/x86/mmap-add-an-exception-to-the-stack-gap-for-hotspot-jvm.patch
|
||||||
|
bugfix/powerpc/powerpc-lib-sstep-fix-building-for-powerpcspe.patch
|
||||||
|
bugfix/powerpc/powerpc-lib-makefile-don-t-pull-in-quad.o-for-32-bit.patch
|
||||||
|
|
||||||
# Arch features
|
# Arch features
|
||||||
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
|
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
|
||||||
|
|
Loading…
Reference in New Issue