Re: [RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-13 Thread Florian Fainelli



Le 12/12/12 19:04, Linus Torvalds a écrit :

On Tue, Dec 11, 2012 at 3:10 AM, Ingo Molnar  wrote:


This tree removes ancient-386-CPUs support and thus zaps quite a
bit of complexity:


Btw, I think we should probably at least consider taking this one step
further, and remove the dear old FPU emulation support too. Remove
CONFIG_MATH_EMULATION and all of arch/x86/math-emu, along with a lot
of small special cases.

Or do people still use the 486SX?


Yes, the RDC-R321x SoC which is supported by mainline actually needs 
Math emulation to properly work.




Now, the math emulation hasn't been all that fundamentally problematic
(compared to lack of xadd etc), but it does result in some
complexities in exception handling and ptrace (grep for HAVE_HWFP or
"hard_math" or a number of other magic things). None of which have
likely been tested at all in the last ten years, so who knows if it
actually *works* or not.

Maybe somebody could try booting with "no387". Does it actually work?


Ok, I could try that.
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-13 Thread Linus Torvalds
On Wed, Dec 12, 2012 at 2:24 PM, H. Peter Anvin  wrote:
>
> Well... it turns out to boot and run Red Hat 4.1 just fine (using qemu -cpu
> 486 and the no387 option) once I changed /dev/hda1 to /dev/sda1.

Ok. It sounds like the code actually works despite lack of testing,
and it clearly hasn't been the same kind of maintenance pain and
problem that the lack of cmpxchg and friends, so let's leave it alone.
Thanks,

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-13 Thread Bernd Petrovitsch
On Mit, 2012-12-12 at 11:00 -0800, H. Peter Anvin wrote:
[...]
> There were a *bunch* of embedded 486 clones made, some still in 
> production as far as I know, and I wouldn't be surprised if some of them 
> lacked FPU.  I guess we'll see.

And there is an x86 emulator written in Javascript at
http://www.bellard.org/jslinux/.

http://www.bellard.org/jslinux/tech.html says that it (also) lacks an
FPU.

Bernd
-- 
Bernd Petrovitsch  Email : be...@petrovitsch.priv.at
 LUGA : http://www.luga.at

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-13 Thread Thorsten Glaser
H. Peter Anvin  zytor.com> writes:

> On 12/12/2012 10:04 AM, Linus Torvalds wrote:

> > Or do people still use the 486SX?

> There were a *bunch* of embedded 486 clones made, some still in 
> production as far as I know, and I wouldn't be surprised if some of them 
> lacked FPU.  I guess we'll see.

This one is fairly recent: Bifferboard ⇒ http://bifferos.co.uk/

bye,
//mirabilos


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-12 Thread H. Peter Anvin

On 12/12/2012 11:00 AM, H. Peter Anvin wrote:


It builds and boots, at least.  I'm currently installing Red Hat 4.1 in
a VM so I can test to see if it does anything more than that.  It
doesn't get in the way the same case the old 386 bits does, so I'm more
reluctant to remove it, but it does touch a lot of paths.



Well... it turns out to boot and run Red Hat 4.1 just fine (using qemu 
-cpu 486 and the no387 option) once I changed /dev/hda1 to /dev/sda1.


I'm actually kind of impressed.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-12 Thread H. Peter Anvin

On 12/12/2012 10:04 AM, Linus Torvalds wrote:

On Tue, Dec 11, 2012 at 3:10 AM, Ingo Molnar  wrote:


This tree removes ancient-386-CPUs support and thus zaps quite a
bit of complexity:


Btw, I think we should probably at least consider taking this one step
further, and remove the dear old FPU emulation support too. Remove
CONFIG_MATH_EMULATION and all of arch/x86/math-emu, along with a lot
of small special cases.

Or do people still use the 486SX?

Now, the math emulation hasn't been all that fundamentally problematic
(compared to lack of xadd etc), but it does result in some
complexities in exception handling and ptrace (grep for HAVE_HWFP or
"hard_math" or a number of other magic things). None of which have
likely been tested at all in the last ten years, so who knows if it
actually *works* or not.

Maybe somebody could try booting with "no387". Does it actually work?



It builds and boots, at least.  I'm currently installing Red Hat 4.1 in 
a VM so I can test to see if it does anything more than that.  It 
doesn't get in the way the same case the old 386 bits does, so I'm more 
reluctant to remove it, but it does touch a lot of paths.


There were a *bunch* of embedded 486 clones made, some still in 
production as far as I know, and I wouldn't be surprised if some of them 
lacked FPU.  I guess we'll see.


-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-12 Thread Linus Torvalds
On Tue, Dec 11, 2012 at 3:10 AM, Ingo Molnar  wrote:
>
> This tree removes ancient-386-CPUs support and thus zaps quite a
> bit of complexity:

Btw, I think we should probably at least consider taking this one step
further, and remove the dear old FPU emulation support too. Remove
CONFIG_MATH_EMULATION and all of arch/x86/math-emu, along with a lot
of small special cases.

Or do people still use the 486SX?

Now, the math emulation hasn't been all that fundamentally problematic
(compared to lack of xadd etc), but it does result in some
complexities in exception handling and ptrace (grep for HAVE_HWFP or
"hard_math" or a number of other magic things). None of which have
likely been tested at all in the last ten years, so who knows if it
actually *works* or not.

Maybe somebody could try booting with "no387". Does it actually work?

  Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC GIT PULL] "Nuke 386-DX/SX support" changes for v3.8

2012-12-11 Thread Ingo Molnar
Linus,

Please consider pulling the latest x86-nuke386-for-linus git 
tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 
x86-nuke386-for-linus

   HEAD: 11af32b69ef7ee64c7d8848cad71a6f3749d9e37 x86, 386 removal: Document 
Nx586 as a 386 and thus unsupported

This tree removes ancient-386-CPUs support and thus zaps quite a 
bit of complexity:

   24 files changed, 56 insertions(+), 425 deletions(-)

... which complexity has plagued us with extra work whenever we 
wanted to change SMP primitives, for years.

Unfortunately there's a nostalgic cost: your old original 386 
DX33 system from early 1991 won't be able to boot modern Linux 
kernels anymore. Sniff.

 Thanks,

Ingo

-->
H. Peter Anvin (9):
  x86, 386 removal: Remove CONFIG_M386 from Kconfig
  x86, 386 removal: Remove CONFIG_CMPXCHG
  x86, 386 removal: Remove CONFIG_XADD
  x86, 386 removal: Remove CONFIG_BSWAP
  x86, 386 removal: Remove CONFIG_INVLPG
  x86, 386 removal: Remove CONFIG_X86_WP_WORKS_OK
  x86, 386 removal: Remove CONFIG_X86_POPAD_OK
  x86, cleanups: Simplify sync_core() in the case of no CPUID
  x86, 386 removal: Document Nx586 as a 386 and thus unsupported


 arch/x86/Kconfig  | 11 ++
 arch/x86/Kconfig.cpu  | 73 +++
 arch/x86/Makefile_32.cpu  |  1 -
 arch/x86/include/asm/atomic.h | 16 -
 arch/x86/include/asm/cmpxchg_32.h | 55 -
 arch/x86/include/asm/cpufeature.h |  6 
 arch/x86/include/asm/futex.h  | 12 ---
 arch/x86/include/asm/local.h  | 18 +-
 arch/x86/include/asm/module.h |  2 --
 arch/x86/include/asm/percpu.h |  3 --
 arch/x86/include/asm/processor.h  | 33 --
 arch/x86/include/asm/swab.h   | 29 ++--
 arch/x86/include/asm/tlbflush.h   |  3 --
 arch/x86/include/asm/uaccess.h| 42 --
 arch/x86/kernel/cpu/amd.c |  3 --
 arch/x86/kernel/cpu/bugs.c| 41 ++
 arch/x86/kernel/cpu/intel.c   |  4 ---
 arch/x86/lib/Makefile |  1 -
 arch/x86/lib/cmpxchg.c| 54 -
 arch/x86/lib/usercopy_32.c| 57 --
 arch/x86/mm/init_32.c |  5 +--
 arch/x86/mm/tlb.c |  8 ++---
 arch/x86/um/Kconfig   |  2 +-
 arch/x86/xen/Kconfig  |  2 +-
 24 files changed, 56 insertions(+), 425 deletions(-)
 delete mode 100644 arch/x86/lib/cmpxchg.c

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 46c3bff..631b298 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -69,8 +69,8 @@ config X86
select HAVE_PERF_USER_STACK_DUMP
select HAVE_DEBUG_KMEMLEAK
select ANON_INODES
-   select HAVE_ALIGNED_STRUCT_PAGE if SLUB && !M386
-   select HAVE_CMPXCHG_LOCAL if !M386
+   select HAVE_ALIGNED_STRUCT_PAGE if SLUB
+   select HAVE_CMPXCHG_LOCAL
select HAVE_CMPXCHG_DOUBLE
select HAVE_ARCH_KMEMCHECK
select HAVE_USER_RETURN_NOTIFIER
@@ -171,13 +171,8 @@ config ARCH_MAY_HAVE_PC_FDC
def_bool y
depends on ISA_DMA_API
 
-config RWSEM_GENERIC_SPINLOCK
-   def_bool y
-   depends on !X86_XADD
-
 config RWSEM_XCHGADD_ALGORITHM
def_bool y
-   depends on X86_XADD
 
 config GENERIC_CALIBRATE_DELAY
def_bool y
@@ -1100,7 +1095,7 @@ config HIGHMEM4G
 
 config HIGHMEM64G
bool "64GB"
-   depends on !M386 && !M486
+   depends on !M486
select X86_PAE
---help---
  Select this if you have a 32-bit processor and more than 4
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index f3b86d0..c026cca 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -4,23 +4,24 @@ choice
default M686 if X86_32
default GENERIC_CPU if X86_64
 
-config M386
-   bool "386"
-   depends on X86_32 && !UML
+config M486
+   bool "486"
+   depends on X86_32
---help---
- This is the processor type of your CPU. This information is used for
- optimizing purposes. In order to compile a kernel that can run on
- all x86 CPU types (albeit not optimally fast), you can specify
- "386" here.
+ This is the processor type of your CPU. This information is
+ used for optimizing purposes. In order to compile a kernel
+ that can run on all supported x86 CPU types (albeit not
+ optimally fast), you can specify "486" here.
+
+ Note that the 386 is no longer supported, this includes
+ AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI 486DLC/DLC2,
+ UMC 486SX-S and the NexGen Nx586.
 
  The kernel will not necessarily run on earlier architectures than
  the one you have chosen, e.g. a Pentium optimized kernel will run on
  a PPro, but not necessarily on a i486.
 
  Here are the settings