2018-02-15 16:56:51

by tedheadster

[permalink] [raw]
Subject: [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.

Signed-off-by: Matthew Whitehead <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 65a9a47..ec64aa7 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -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.
--
1.8.3.1



2018-02-15 16:57:06

by tedheadster

[permalink] [raw]
Subject: [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

Signed-off-by: Matthew Whitehead <[email protected]>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 72d5149..89bf3fa 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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
--
1.8.3.1


2018-02-16 09:40:00

by tedheadster

[permalink] [raw]
Subject: [PATCH 3/3] 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 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.

Signed-off-by: Matthew Whitehead <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index ec64aa7..8b8d229 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -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"

--
1.8.3.1


Subject: [tip:x86/urgent] 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.

Signed-off-by: Matthew Whitehead <[email protected]>
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]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a528c14..c1236b1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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

Subject: [tip:x86/urgent] 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.

Signed-off-by: Matthew Whitehead <[email protected]>
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]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index ec64aa7..8b8d229 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -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"


Subject: [tip:x86/urgent] 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.

Signed-off-by: Matthew Whitehead <[email protected]>
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]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 65a9a47..ec64aa7 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -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.

2018-02-16 19:11:51

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/3] x86/Kconfig : Add missing i586-class cpus to X86_CMPXCHG64 Kconfig group

On Thu, Feb 15, 2018 at 6:54 PM, Matthew Whitehead
<[email protected]> wrote:
> 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.

> 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.

--
With Best Regards,
Andy Shevchenko

2018-02-16 19:14:19

by tedheadster

[permalink] [raw]
Subject: Re: [PATCH 1/3] x86/Kconfig : Add missing i586-class cpus to X86_CMPXCHG64 Kconfig group

Andy

On Fri, Feb 16, 2018 at 9:17 AM, Andy Shevchenko
<[email protected]> wrote:
> On Thu, Feb 15, 2018 at 6:54 PM, Matthew Whitehead
> <[email protected]> wrote:
>> 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.

>> 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

2018-02-16 19:18:20

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 1/3] x86/Kconfig : Add missing i586-class cpus to X86_CMPXCHG64 Kconfig group

On Fri, Feb 16, 2018 at 5:08 PM, tedheadster <[email protected]> wrote:
> On Fri, Feb 16, 2018 at 9:17 AM, Andy Shevchenko
> <[email protected]> wrote:
>> On Thu, Feb 15, 2018 at 6:54 PM, Matthew Whitehead
>> <[email protected]> wrote:
>>> 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?

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

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


--
With Best Regards,
Andy Shevchenko