Remove support for ARMv3 ARM610 and ARM710 CPUs
RFC 1/1 Remove support for ARMv3 ARM610 and ARM710 CPUs
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.
What this patch shows is how well abstracted the ARMv3 support is. Apart from removing the multi-support selection conditionals in the glue-*.h and similar files, and the ARM710 hack in entry-common.S, ARMv3 support does not affect any other core code files. That flies directly in the face of people who whinge and moan about ARMv3 support being painful in the kernel; if it's soo well abstracted then it isn't being a problem.
So, after this commit, the only ARMv3 specific code left is arch/arm/mm/cache-v3.S and its selection in asm/glue-cache.h.
Irrespective of the whingers, I think this is something we should do, because it has been broken at runtime for quite some time and no one has shown any interest in it.
--- arch/arm/Makefile | 2 - arch/arm/configs/rpc_defconfig | 2 - arch/arm/include/asm/glue-df.h | 8 - arch/arm/include/asm/glue-proc.h | 18 -- arch/arm/include/asm/page.h | 9 - arch/arm/include/asm/tlbflush.h | 15 - arch/arm/kernel/entry-armv.S | 4 - arch/arm/kernel/entry-common.S | 28 -- arch/arm/lib/Makefile | 23 +-- arch/arm/lib/io-readsw-armv3.S | 106 ------- arch/arm/lib/io-writesw-armv3.S | 126 --------- arch/arm/lib/uaccess.S | 564 -------------------------------------- arch/arm/mm/Kconfig | 46 +--- arch/arm/mm/Makefile | 4 - arch/arm/mm/copypage-v3.c | 81 ------ arch/arm/mm/fault.c | 3 - arch/arm/mm/proc-arm6_7.S | 327 ---------------------- arch/arm/mm/tlb-v3.S | 48 ---- 18 files changed, 4 insertions(+), 1410 deletions(-)
arch/arm/Makefile +0 -2
@@ -70,8 +70,6 @@ arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 # This selects how we optimise for the processor. -tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 -tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi
arch/arm/configs/rpc_defconfig +0 -2
@@ -8,8 +8,6 @@ CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_ARCH_RPC=y -CONFIG_CPU_ARM610=y -CONFIG_CPU_ARM710=y CONFIG_CPU_SA110=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0
arch/arm/include/asm/glue-df.h +0 -8
@@ -31,14 +31,6 @@#undef CPU_DABORT_HANDLER#undef MULTI_DABORT -#if defined(CONFIG_CPU_ARM610 ) -# ifdef CPU_DABORT_HANDLER -# define MULTI_DABORT 1 -# else -# define CPU_DABORT_HANDLER cpu_arm6_data_abort -# endif -#endif -#if defined(CONFIG_CPU_ARM710 )# ifdef CPU_DABORT_HANDLER # define MULTI_DABORT 1
arch/arm/include/asm/glue-proc.h +0 -18
@@ -23,15 +23,6 @@* CPU_NAME - the prefix for CPU related functions */ -#ifdef CONFIG_CPU_ARM610 -# ifdef CPU_NAME -# undef MULTI_CPU -# define MULTI_CPU -# else -# define CPU_NAME cpu_arm6 -# endif -#endif -#ifdef CONFIG_CPU_ARM7TDMI # ifdef CPU_NAME # undef MULTI_CPU
@@ -41,15 +32,6 @@# endif #endif -#ifdef CONFIG_CPU_ARM710 -# ifdef CPU_NAME -# undef MULTI_CPU -# define MULTI_CPU -# else -# define CPU_NAME cpu_arm7 -# endif -#endif -#ifdef CONFIG_CPU_ARM720T # ifdef CPU_NAME # undef MULTI_CPU
arch/arm/include/asm/page.h +0 -9
@@ -34,7 +34,6 @@* processor(s) we're building for. * * We have the following to choose from: -* v3 - ARMv3 * v4wt - ARMv4 with writethrough cache, without minicache * v4wb - ARMv4 with writeback cache, without minicache * v4_mc - ARMv4 with minicache
@@ -44,14 +43,6 @@#undef _USER#undef MULTI_USER -#ifdef CONFIG_CPU_COPY_V3 -# ifdef _USER -# define MULTI_USER 1 -# else -# define _USER v3 -# endif -#endif -#ifdef CONFIG_CPU_COPY_V4WT # ifdef _USER# define MULTI_USER 1
arch/arm/include/asm/tlbflush.h +0 -15
@@ -65,21 +65,6 @@#define MULTI_TLB 1#endif -#define v3_tlb_flags (TLB_V3_FULL | TLB_V3_PAGE) - -#ifdef CONFIG_CPU_TLB_V3 -# define v3_possible_flags v3_tlb_flags -# define v3_always_flags v3_tlb_flags -# ifdef _TLB -# define MULTI_TLB 1 -# else -# define _TLB v3 -# endif -#else -# define v3_possible_flags 0 -# define v3_always_flags (-1UL) -#endif -#define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE)#ifdef CONFIG_CPU_TLB_V4WT
arch/arm/kernel/entry-armv.S +0 -4
@@ -556,10 +556,6 @@ call_fpe: #endif tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2 -#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) - and r8, r0, #0x0f000000 @ mask out op-code bits - teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)? -#endif moveq pc, lr get_thread_info r10 @ get current thread and r8, r0, #0x00000f00 @ mask out CP number
arch/arm/kernel/entry-common.S +0 -28
@@ -335,20 +335,6 @@ ENDPROC(ftrace_stub) *----------------------------------------------------------------------------- */ - /* If we're optimising for StrongARM the resulting code won't - run on an ARM7 and we can save a couple of instructions. - --pb */ -#ifdef CONFIG_CPU_ARM710 -#define A710(code...) code -.Larm710bug: - ldmia sp, {r0 - lr}^ @ Get calling r0 - lr - mov r0, r0 - add sp, sp, #S_FRAME_SIZE - subs pc, lr, #4 -#else -#define A710(code...) -#endif - .align 5 ENTRY(vector_swi) sub sp, sp, #S_FRAME_SIZE
@@ -379,9 +365,6 @@ ENTRY(vector_swi) ldreq r10, [lr, #-4] @ get SWI instruction #else ldr r10, [lr, #-4] @ get SWI instruction - A710( and ip, r10, #0x0f000000 @ check for SWI ) - A710( teq ip, #0x0f000000 ) - A710( bne .Larm710bug ) #endif #ifdef CONFIG_CPU_ENDIAN_BE8 rev r10, r10 @ little endian instruction
@@ -392,26 +375,15 @@ ENTRY(vector_swi) /* * Pure EABI user space always put syscall number into scno (r7). */ - A710( ldr ip, [lr, #-4] @ get SWI instruction ) - A710( and ip, ip, #0x0f000000 @ check for SWI ) - A710( teq ip, #0x0f000000 ) - A710( bne .Larm710bug ) - #elif defined(CONFIG_ARM_THUMB) - /* Legacy ABI only, possibly thumb mode. */ tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in ldreq scno, [lr, #-4] #else - /* Legacy ABI only. */ ldr scno, [lr, #-4] @ get SWI instruction - A710( and ip, scno, #0x0f000000 @ check for SWI ) - A710( teq ip, #0x0f000000 ) - A710( bne .Larm710bug ) - #endif #ifdef CONFIG_ALIGNMENT_TRAP
arch/arm/lib/Makefile +3 -20
@@ -17,30 +17,13 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ call_with_stack.o mmu-y := clear_user.o copy_page.o getuser.o putuser.o - -# the code in uaccess.S is not preemption safe and -# probably faster on ARMv3 only -ifeq ($(CONFIG_PREEMPT),y) - mmu-y += copy_from_user.o copy_to_user.o -else -ifneq ($(CONFIG_CPU_32v3),y) - mmu-y += copy_from_user.o copy_to_user.o -else - mmu-y += uaccess.o -endif -endif +mmu-y += copy_from_user.o copy_to_user.o # using lib_ here won't override already available weak symbols obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o -lib-$(CONFIG_MMU) += $(mmu-y) - -ifeq ($(CONFIG_CPU_32v3),y) - lib-y += io-readsw-armv3.o io-writesw-armv3.o -else - lib-y += io-readsw-armv4.o io-writesw-armv4.o -endif - +lib-$(CONFIG_MMU) += $(mmu-y) +lib-y += io-readsw-armv4.o io-writesw-armv4.o lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o lib-$(CONFIG_ARCH_SHARK) += io-shark.o
arch/arm/lib/io-readsw-armv3.S deleted +0 -106
106 lines not on this page · raw message
arch/arm/lib/io-writesw-armv3.S deleted +0 -126
126 lines not on this page · raw message
arch/arm/lib/uaccess.S deleted +0 -564
564 lines not on this page · raw message
arch/arm/mm/Kconfig +1 -45
76 lines not on this page · raw message
arch/arm/mm/Makefile +0 -4
@@ -44,7 +44,6 @@ obj-$(CONFIG_CPU_CACHE_FA) += cache-fa.o AFLAGS_cache-v6.o :=-Wa,-march=armv6 AFLAGS_cache-v7.o :=-Wa,-march=armv7-a -obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o
@@ -54,7 +53,6 @@ obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o obj-$(CONFIG_CPU_COPY_FA) += copypage-fa.o -obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o
@@ -66,8 +64,6 @@ obj-$(CONFIG_CPU_TLB_FA) += tlb-fa.o AFLAGS_tlb-v6.o :=-Wa,-march=armv6 AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a -obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o -obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o obj-$(CONFIG_CPU_ARM740T) += proc-arm740.o
arch/arm/mm/copypage-v3.c deleted +0 -81
81 lines not on this page · raw message
arch/arm/mm/fault.c +0 -3
@@ -430,9 +430,6 @@ do_translation_fault(unsigned long addr, unsigned int fsr, index =pgd_index (addr); -/* -* FIXME: CP15 C1 is write only on ARMv3 architectures. -*/ pgd =cpu_get_pgd () + index; pgd_k = init_mm.pgd + index;
arch/arm/mm/proc-arm6_7.S deleted +0 -327
327 lines not on this page · raw message
arch/arm/mm/tlb-v3.S deleted +0 -48
48 lines not on this page · raw message
Quoted 17 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.What this patch shows is how well abstracted the ARMv3 support is. Apart from removing the multi-support selection conditionals in the glue-*.h and similar files, and the ARM710 hack in
entry-common.S, ARMv3 support does not affect any other core code files. That flies directly in the face of people who whinge and moan about ARMv3 support being painful in the kernel; if it's soo well abstracted then it isn't being a problem.So, after this commit, the only ARMv3 specific code left is
arch/arm/mm/cache-v3.Sand its selection inasm/glue-cache.h.
Quoted 6 lines
Irrespective of the whingers, I think this is something we should do, because it has been broken at runtime for quite some time and no one has shown any interest in it.
Signed-off-by Russell King <[email protected]>---
The earliest CPU I have is a 720t, so I can't see the reason for reviving this broken code.
FWIW:
Will
Quoted 5 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.
No objections to the patch, but I wonder if this change obsoletes any hardware drivers in turn. Are there any RiscPC peripherals that are only available on the older models?
Arnd
Quoted 10 lines · Arnd Bergmann
Quoted 5 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.No objections to the patch, but I wonder if this change obsoletes any hardware drivers in turn. Are there any RiscPC peripherals that are only available on the older models?
"older models" ? It's not a machine where the CPU is soldered to the motherboard. I could describe it as being like an x86 motherboard where you can plug either an ARM610, ARM710 or StrongARM CPU into it. The CPU type is merely incidental.
Quoted 8 lines · Russell King - ARM Linux
Quoted 7 lines · Arnd Bergmann
Quoted 5 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.
Quoted 8 lines
Quoted 3 lines
No objections to the patch, but I wonder if this change obsoletes any hardware drivers in turn. Are there any RiscPC peripherals that are only available on the older models?
"older models" ? It's not a machine where the CPU is soldered to the motherboard. I could describe it as being like an x86 motherboard where you can plug either an ARM610, ARM710 or StrongARM CPU into it. The CPU type is merely incidental.
I'll point out that we can remove drivers if we kill off ARMv4 support, which would mean getting rid of all the StrongARM and FA526 CPU support. That would also mean removing all of ebsa110, footbridge, riscpc, gemini, sa1100, and shark mach- subdirectories.
It also means I would no longer be able to test various chunks of code which I currently look after, such as ARM PCI stuff, PCMCIA soc-common, and some DMA engine stuff.
What I'm basically pointing out is that the majority of my infrastructure here runs on ARMv4 StrongARM based platforms, and I don't see this changing any time soon. As long as that is the case, I have a vested and selfish interest in keeping the kernel buildable for ARMv4.
Quoted 8 lines · Russell King - ARM Linux
Quoted 7 lines · Arnd Bergmann
Quoted 5 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.
Quoted 8 lines
Quoted 3 lines
No objections to the patch, but I wonder if this change obsoletes any hardware drivers in turn. Are there any RiscPC peripherals that are only available on the older models?
"older models" ? It's not a machine where the CPU is soldered to the motherboard. I could describe it as being like an x86 motherboard where you can plug either an ARM610, ARM710 or StrongARM CPU into it. The CPU type is merely incidental.
Ok, I see. I've never actually seen one of those machines myself, they were always very rare in Germany.
Arnd
Quoted 18 lines · Russell King - ARM Linux
Quoted 8 lines · Russell King - ARM Linux
Quoted 7 lines · Arnd Bergmann
Quoted 5 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.Quoted 8 lines
Quoted 3 lines
No objections to the patch, but I wonder if this change obsoletes any hardware drivers in turn. Are there any RiscPC peripherals that are only available on the older models?
"older models" ? It's not a machine where the CPU is soldered to the motherboard. I could describe it as being like an x86 motherboard where you can plug either an ARM610, ARM710 or StrongARM CPU into it. The CPU type is merely incidental.
Quoted 4 lines
I'll point out that we can remove drivers if we kill off ARMv4 support, which would mean getting rid of all the StrongARM and FA526 CPU support. That would also mean removing all of ebsa110, footbridge, riscpc, gemini, sa1100, and shark mach- subdirectories.
Also all ARM720, ARM7TDMI and ARM920/922, right? I certainly wouldn't suggest that, especially since it looks like we are about to gain support for a new ARM920T based platform (lpc31xx) and the renewed interest in ep93xx in addition to the StrongARM systems you mention.
Removing ARM720 support might not hurt as much, but there is also little to gain there, since it doesn't cause any problems. I was just asking to make sure we remove all code that is known to be unused after the ARMv3 removal and you already confirmed that there is none.
Arnd
Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · Russell King - ARM Linux
Quoted 16 lines · Russell King - ARM Linux
Quoted 10 lines · Arnd Bergmann
Quoted 5 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.No objections to the patch, but I wonder if this change obsoletes any hardware drivers in turn. Are there any RiscPC peripherals that are only available on the older models?
"older models" ? It's not a machine where the CPU is soldered to the motherboard. I could describe it as being like an x86 motherboard where you can plug either an ARM610, ARM710 or StrongARM CPU into it. The CPU type is merely incidental.
Quoted 6 lines
Quoted 4 lines
I'll point out that we can remove drivers if we kill off ARMv4 support, which would mean getting rid of all the StrongARM and FA526 CPU support. That would also mean removing all of ebsa110, footbridge, riscpc, gemini, sa1100, and shark mach- subdirectories.
Also all ARM720, ARM7TDMI and ARM920/922, right?
These are ARMv4T rather than ARMv4.
Quoted 9 lines
I certainly wouldn't suggest
that, especially since it looks like we are about to gain support for a new ARM920T based platform (lpc31xx) and the renewed interest in ep93xx in addition to the StrongARM systems you mention.Removing ARM720 support might not hurt as much, but there is also little to gain there, since it doesn't cause any problems. I was just asking to make sure we remove all code that is known to be unused after the ARMv3 removal and you already confirmed that there is none.
ARM720T is ARMv4T, so all that you'd gain is the removal of the CPU support file for that CPU, and the ARMv4 "writethrough cache mode" TLB support file. That clocks in around 300 lines... I'd say not worth it on balance, but I personally wouldn't miss it if it went.
Quoted 14 lines · Russell King - ARM Linux
This patch removes support for ARMv3 CPUs, which haven't worked properly for quite some time (see the FIXME comment in
arch/arm/mm/fault.c). The only V3 parts left is the cache model for ARMv3, which is needed for some odd reason by ARM740T CPUs, and being able to build with -march=armv3, which is required for the RiscPC platform due to its bus structure.What this patch shows is how well abstracted the ARMv3 support is. Apart from removing the multi-support selection conditionals in the glue-*.h and similar files, and the ARM710 hack in
entry-common.S, ARMv3 support does not affect any other core code files. That flies directly in the face of people who whinge and moan about ARMv3 support being painful in the kernel; if it's soo well abstracted then it isn't being a problem.
Quoted 8 lines
So, after this commit, the only ARMv3 specific code left is
arch/arm/mm/cache-v3.Sand its selection inasm/glue-cache.h.Irrespective of the whingers, I think this is something we should do, because it has been broken at runtime for quite some time and no one has shown any interest in it.
Signed-off-by Russell King <[email protected]>
as will my oldest boards have a ARMv4
Best Regards,
J.