Skip to contentSkip to conversation

x86/Kconfig : Add missing i586-class cpus to X86_CMPXCHG64 Kconfig group

PATCH In review Matthew Whitehead 3 participants 9 messages Feb 15, 2018 – Feb 16, 2018 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 x86/Kconfig : Add missing i586-class cpus to X86_CMPXCHG64 Kconfig group

Several i586-class cpus supporting this instruction are missing from the X86_CMPXCHG64 config group.

Using a configuration with either M586TSC or M586MMX currently sets X86_MINIMUM_CPU_FAMILY=4 instead of the correct value 5.

Booting on an i486 it will fail to generate the "This kernel requires an i586 CPU, but only detected an i486 CPU" message and intentional halt as expected. It will instead just silently hang when it hits i586-specific instructions.

The M586 cpu is not in this list because at least the Cyrix 5x86 lacks this instruction, and perhaps others.

---
 arch/x86/Kconfig.cpu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig.cpu +1 -1
index 65a9a47..ec64aa7 100644
@@ -374,7 +374,7 @@ config X86_TSC
 
 config X86_CMPXCHG64
 	def_bool y
-	depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
+	depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8
 
 # this should be set for all -march=.. options where the compiler
 # generates cmov.
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 2/3 x86/Kconfig : Exclude i586-class cpus lacking PAE support from HIGHMEM64G Kconfig group

i586-class machines also lack support for Physical Address Extension (PAE), so add them to the exclusion list

---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
index 72d5149..89bf3fa 100644
@@ -1360,7 +1360,7 @@ config HIGHMEM4G
 
 config HIGHMEM64G
 	bool "64GB"
-	depends on !M486
+	depends on !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !WINCHIP3D && !MK6
 	select X86_PAE
 	---help---
 	  Select this if you have a 32-bit processor and more than 4
Signature · 1 line
1.8.3.1
#2 lore raw

[tip:x86/urgent] x86/Kconfig: Exclude i586-class CPUs lacking PAE support from the HIGHMEM64G Kconfig group

x86/Kconfig: Exclude i586-class CPUs lacking PAE support from the HIGHMEM64G Kconfig group
Commit-ID:  69b8d3fcabdc81d9efd82b4a506c8279cbaba692
Gitweb:     https://git.kernel.org/tip/69b8d3fcabdc81d9efd82b4a506c8279cbaba692
Author:     Matthew Whitehead <[email protected]>
AuthorDate: Thu, 15 Feb 2018 11:54:55 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 16 Feb 2018 10:36:39 +0100

x86/Kconfig: Exclude i586-class CPUs lacking PAE support from the HIGHMEM64G Kconfig group

i586-class machines also lack support for Physical Address Extension (PAE), so add them to the exclusion list.

Cc Andy Lutomirski <[email protected]>
Cc Arjan van de Ven <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
index a528c14..c1236b1 100644
@@ -1404,7 +1404,7 @@ config HIGHMEM4G
 
 config HIGHMEM64G
 	bool "64GB"
-	depends on !M486
+	depends on !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !WINCHIP3D && !MK6
 	select X86_PAE
 	---help---
 	  Select this if you have a 32-bit processor and more than 4
#3 lore raw

PATCH 3/3 x86/Kconfig : Explicitly enumerate i686-class cpus in Kconfig

In reply to Matthew Whitehead

The X86_P6_NOP config class leaves out many i686-class cpus. Instead, explicitly enumerate all these cpus.

Using a configuration with M686 currently sets X86_MINIMUM_CPU_FAMILY=5 instead of the correct value 6.

Booting on an i586 it will fail to generate the "This kernel requires an i686 CPU, but only detected an i586 CPU" message and intentional halt as expected. It will instead just silently hang when it hits i686-specific instructions.

---
 arch/x86/Kconfig.cpu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig.cpu +1 -1
index ec64aa7..8b8d229 100644
@@ -385,7 +385,7 @@ config X86_CMOV
 config X86_MINIMUM_CPU_FAMILY
 	int
 	default "64" if X86_64
-	default "6" if X86_32 && X86_P6_NOP
+	default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
 	default "5" if X86_32 && X86_CMPXCHG64
 	default "4"
 
Signature · 1 line
1.8.3.1
#4 lore raw

[tip:x86/urgent] x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig

x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig
Commit-ID:  25d76ac888216c369dea91768764728b83769799
Gitweb:     https://git.kernel.org/tip/25d76ac888216c369dea91768764728b83769799
Author:     Matthew Whitehead <[email protected]>
AuthorDate: Thu, 15 Feb 2018 11:54:56 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 16 Feb 2018 10:36:39 +0100

x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig

The X86_P6_NOP config class leaves out many i686-class CPUs. Instead, explicitly enumerate all these CPUs.

Using a configuration with M686 currently sets X86_MINIMUM_CPU_FAMILY=5 instead of the correct value of 6.

Booting on an i586 it will fail to generate the "This kernel requires an i686 CPU, but only detected an i586 CPU" message and intentional halt as expected. It will instead just silently hang when it hits i686-specific instructions.

Cc Andy Lutomirski <[email protected]>
Cc Arjan van de Ven <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 arch/x86/Kconfig.cpu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig.cpu +1 -1
index ec64aa7..8b8d229 100644
@@ -385,7 +385,7 @@ config X86_CMOV
 config X86_MINIMUM_CPU_FAMILY
 	int
 	default "64" if X86_64
-	default "6" if X86_32 && X86_P6_NOP
+	default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
 	default "5" if X86_32 && X86_CMPXCHG64
 	default "4"
 
#5 lore raw

[tip:x86/urgent] x86/Kconfig: Add missing i586-class CPUs to the X86_CMPXCHG64 Kconfig group

In reply to Matthew Whitehead
x86/Kconfig: Add missing i586-class CPUs to the X86_CMPXCHG64 Kconfig group
Commit-ID:  f960cfd12650fad43c1cde07a1f7642cf2c57f97
Gitweb:     https://git.kernel.org/tip/f960cfd12650fad43c1cde07a1f7642cf2c57f97
Author:     Matthew Whitehead <[email protected]>
AuthorDate: Thu, 15 Feb 2018 11:54:54 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 16 Feb 2018 10:36:39 +0100

x86/Kconfig: Add missing i586-class CPUs to the X86_CMPXCHG64 Kconfig group

Several i586-class CPUs supporting this instruction are missing from the X86_CMPXCHG64 config group.

Using a configuration with either M586TSC or M586MMX currently sets X86_MINIMUM_CPU_FAMILY=4 instead of the correct value of 5.

Booting on an i486 it will fail to generate the "This kernel requires an i586 CPU, but only detected an i486 CPU" message and intentional halt as expected. It will instead just silently hang when it hits i586-specific instructions.

The M586 CPU is not in this list because at least the Cyrix 5x86 lacks this instruction, and perhaps others.

Cc Andy Lutomirski <[email protected]>
Cc Arjan van de Ven <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 arch/x86/Kconfig.cpu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig.cpu +1 -1
index 65a9a47..ec64aa7 100644
@@ -374,7 +374,7 @@ config X86_TSC
 
 config X86_CMPXCHG64
 	def_bool y
-	depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
+	depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8
 
 # this should be set for all -march=.. options where the compiler
 # generates cmov.
#6 lore raw
In reply to Matthew Whitehead
Quoted 2 lines · Matthew Whitehead

Several i586-class cpus supporting this instruction are missing from the X86_CMPXCHG64 config group.

What about Intel Quark? MinuteIA core which is currently set as M586TSC.

Quoted 2 lines

Using a configuration with either M586TSC or M586MMX currently sets X86_MINIMUM_CPU_FAMILY=4 instead of the correct value 5.

Are you sure about this? See above.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#7 lore raw

Andy

Quoted 7 lines · Andy Shevchenko
Quoted 2 lines · Matthew Whitehead

Several i586-class cpus supporting this instruction are missing from the X86_CMPXCHG64 config group.

What about Intel Quark? MinuteIA core which is currently set as M586TSC.

I am unsure what you are asking here. I do not see any option for Intel Quark processor types in arch/x86/Kconfig.cpu. Are you saying there should be one?

Or perhaps you are saying that Intel Quark is currently set for M586TSC and it lacks the CMPXCHG64 instruction? If so, I would change my config option from M586TSC to M586.

Quoted 5 lines
Quoted 2 lines

Using a configuration with either M586TSC or M586MMX currently sets X86_MINIMUM_CPU_FAMILY=4 instead of the correct value 5.

Are you sure about this? See above.

Yes I am sure of this, I tested it very well. A similar problem happens with an M686 configuration for a different reason.

- Matthew

#8 lore raw
Quoted 7 lines · tedheadster
Quoted 5 lines · Andy Shevchenko
Quoted 2 lines · Matthew Whitehead

Several i586-class cpus supporting this instruction are missing from the X86_CMPXCHG64 config group.

Quoted 8 lines
Quoted 1 line

What about Intel Quark? MinuteIA core which is currently set as M586TSC.

I am unsure what you are asking here. I do not see any option for Intel Quark processor types in arch/x86/Kconfig.cpu. Are you saying there should be one?

Or perhaps you are saying that Intel Quark is currently set for M586TSC and it lacks the CMPXCHG64 instruction?

This is a good question.
The CPUID tells us family 5, model 9.

Quoted 2 lines

If so, I would change
my config option from M586TSC to M586.

Signature · 2 lines
With Best Regards,
Andy Shevchenko