From 5a77952e4145e2c7a9fc0d812c3387e9d823d902 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 25 Sep 2018 20:00:50 +0100 Subject: [PATCH] [i386/686] Enable MGEODE_LX instead of M686 (regression in 4.16) - x86-32: Disable 3D-Now in generic config --- debian/changelog | 2 ++ debian/config/i386/config.686 | 4 ++- ...6-32-disable-3dnow-in-generic-config.patch | 29 +++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 debian/patches/bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch diff --git a/debian/changelog b/debian/changelog index 3acd35a7a..a45168554 100644 --- a/debian/changelog +++ b/debian/changelog @@ -156,6 +156,8 @@ linux (4.18.9-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * drivers/net/ethernet: Ignore ABI changes (fixes FTBFS on arm64, armhf) * [arm64] ACPI: Change ACPI_NFIT from built-in to module + * [i386/686] Enable MGEODE_LX instead of M686 (regression in 4.16) + - x86-32: Disable 3D-Now in generic config [ Yves-Alexis Perez ] * [x86] enable PINCTRL_AMD for touchpad support on Lenovo IdeaPad. diff --git a/debian/config/i386/config.686 b/debian/config/i386/config.686 index f07efc7df..c9d54a9cc 100644 --- a/debian/config/i386/config.686 +++ b/debian/config/i386/config.686 @@ -18,7 +18,9 @@ CONFIG_GEOS=y ## ## choice: Processor family # CONFIG_M486 is not set -CONFIG_M686=y +#. We want to support Geode LX and similar AMD family 5 CPUs as well as +#. family 6+ CPUs +CONFIG_MGEODE_LX=y ## end choice ## diff --git a/debian/patches/bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch b/debian/patches/bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch new file mode 100644 index 000000000..074c856be --- /dev/null +++ b/debian/patches/bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch @@ -0,0 +1,29 @@ +From: Ben Hutchings +Date: Tue, 25 Sep 2018 19:44:13 +0100 +Subject: x86-32: Disable 3D-Now in generic config + +We want the 686 flavour to run on Geode LX and similar AMD family 5 +CPUs as well as family 6 and higher CPUs. This used to work with +CONFIG_M686=y. However commit 25d76ac88821 "x86/Kconfig: Explicitly +enumerate i686-class CPUs in Kconfig" in Linux 4.16 has made the +kernel require family 6 or higher. + +It looks like a sensible choice would be to enable CONFIG_MGEODE_LX +and CONFIG_X86_GENERIC (for more generic optimisations), but this +currently enables CONFIG_X86_USE_3D_NOW which will cause the kernel to +crash on CPUs without the AMD-specific 3D-Now instructions. + +Make CONFIG_X86_USE_3DNOW depend on CONFIG_X86_GENERIC being disabled. + +--- +--- a/arch/x86/Kconfig.cpu ++++ b/arch/x86/Kconfig.cpu +@@ -337,7 +337,7 @@ config X86_USE_PPRO_CHECKSUM + + config X86_USE_3DNOW + def_bool y +- depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML ++ depends on (MCYRIXIII || MK7 || MGEODE_LX) && !X86_GENERIC && !UML + + # + # P6_NOPs are a relatively minor optimization that require a family >= diff --git a/debian/patches/series b/debian/patches/series index 43b35a6e2..409d0cc92 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -76,6 +76,7 @@ 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 bugfix/arm/arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch +bugfix/x86/x86-32-disable-3dnow-in-generic-config.patch # Arch features features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch