Skip to content

Commit 12c3dca

Browse files
committed
ARM: ep93xx: remove MaverickCrunch support
The MaverickCrunch support for ep93xx never made it into glibc and was removed from gcc in its 4.8 release in 2012. It is now one of the last parts of arch/arm/ that fails to build with the clang integrated assembler, which is unlikely to ever want to support it. The two alternatives are to force the use of binutils/gas when building the crunch support, or to remove it entirely. According to Hartley Sweeten: "Martin Guy did a lot of work trying to get the maverick crunch working but I was never able to successfully use it for anything. It "kind" of works but depending on the EP93xx silicon revision there are still a number of hardware bugs that either give imprecise or garbage results. I have no problem with removing the kernel support for the maverick crunch." Unless someone else comes up with a good reason to keep it around, remove it now. This touches mostly the ep93xx platform, but removes a bit of code from ARM common ptrace and signal frame handling as well. If there are remaining users of MaverickCrunch, they can use LTS kernels for at least another five years before kernel support ends. Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/ Link: https://lore.kernel.org/linux-arm-kernel/[email protected]/ Link: ClangBuiltLinux#1272 Link: https://gcc.gnu.org/legacy-ml/gcc/2008-03/msg01063.html Cc: "Martin Guy" <martinwguy@[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent c500bee commit 12c3dca

25 files changed

+4
-557
lines changed

arch/arm/configs/ep93xx_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
1212
# CONFIG_BLK_DEV_BSG is not set
1313
CONFIG_PARTITION_ADVANCED=y
1414
CONFIG_ARCH_EP93XX=y
15-
CONFIG_CRUNCH=y
1615
CONFIG_MACH_ADSSPHERE=y
1716
CONFIG_MACH_EDB9301=y
1817
CONFIG_MACH_EDB9302=y

arch/arm/include/asm/fpstate.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,6 @@ union fp_state {
7777

7878
#define FP_SIZE (sizeof(union fp_state) / sizeof(int))
7979

80-
struct crunch_state {
81-
unsigned int mvdx[16][2];
82-
unsigned int mvax[4][3];
83-
unsigned int dspsc[2];
84-
};
85-
86-
#define CRUNCH_SIZE sizeof(struct crunch_state)
87-
8880
#endif
8981

9082
#endif

arch/arm/include/asm/thread_info.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ struct thread_info {
6565
__u32 syscall; /* syscall number */
6666
__u8 used_cp[16]; /* thread used copro */
6767
unsigned long tp_value[2]; /* TLS registers */
68-
#ifdef CONFIG_CRUNCH
69-
struct crunch_state crunchstate;
70-
#endif
7168
union fp_state fpstate __attribute__((aligned(8)));
7269
union vfp_state vfpstate;
7370
#ifdef CONFIG_ARM_THUMBEE
@@ -107,11 +104,6 @@ static inline struct thread_info *current_thread_info(void)
107104
((unsigned long)(task_thread_info(tsk)->cpu_context.r7))
108105
#endif
109106

110-
extern void crunch_task_disable(struct thread_info *);
111-
extern void crunch_task_copy(struct thread_info *, void *);
112-
extern void crunch_task_restore(struct thread_info *, void *);
113-
extern void crunch_task_release(struct thread_info *);
114-
115107
extern void iwmmxt_task_disable(struct thread_info *);
116108
extern void iwmmxt_task_copy(struct thread_info *, void *);
117109
extern void iwmmxt_task_restore(struct thread_info *, void *);

arch/arm/include/asm/ucontext.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,6 @@ struct ucontext {
4343
*/
4444
#define DUMMY_MAGIC 0xb0d9ed01
4545

46-
#ifdef CONFIG_CRUNCH
47-
#define CRUNCH_MAGIC 0x5065cf03
48-
#define CRUNCH_STORAGE_SIZE (CRUNCH_SIZE + 8)
49-
50-
struct crunch_sigframe {
51-
unsigned long magic;
52-
unsigned long size;
53-
struct crunch_state storage;
54-
} __attribute__((__aligned__(8)));
55-
#endif
56-
5746
#ifdef CONFIG_IWMMXT
5847
/* iwmmxt_area is 0x98 bytes long, preceded by 8 bytes of signature */
5948
#define IWMMXT_MAGIC 0x12ef842a
@@ -92,9 +81,6 @@ struct vfp_sigframe
9281
* one of these.
9382
*/
9483
struct aux_sigframe {
95-
#ifdef CONFIG_CRUNCH
96-
struct crunch_sigframe crunch;
97-
#endif
9884
#ifdef CONFIG_IWMMXT
9985
struct iwmmxt_sigframe iwmmxt;
10086
#endif

arch/arm/include/uapi/asm/hwcap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define HWCAP_EDSP (1 << 7)
1616
#define HWCAP_JAVA (1 << 8)
1717
#define HWCAP_IWMMXT (1 << 9)
18-
#define HWCAP_CRUNCH (1 << 10)
18+
#define HWCAP_CRUNCH (1 << 10) /* Obsolete */
1919
#define HWCAP_THUMBEE (1 << 11)
2020
#define HWCAP_NEON (1 << 12)
2121
#define HWCAP_VFPv3 (1 << 13)

arch/arm/include/uapi/asm/ptrace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#define PTRACE_GET_THREAD_AREA 22
2727
#define PTRACE_SET_SYSCALL 23
2828
/* PTRACE_SYSCALL is 24 */
29-
#define PTRACE_GETCRUNCHREGS 25
30-
#define PTRACE_SETCRUNCHREGS 26
29+
#define PTRACE_GETCRUNCHREGS 25 /* obsolete */
30+
#define PTRACE_SETCRUNCHREGS 26 /* obsolete */
3131
#define PTRACE_GETVFPREGS 27
3232
#define PTRACE_SETVFPREGS 28
3333
#define PTRACE_GETHBPREGS 29

arch/arm/kernel/asm-offsets.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ int main(void)
6363
#ifdef CONFIG_IWMMXT
6464
DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt));
6565
#endif
66-
#ifdef CONFIG_CRUNCH
67-
DEFINE(TI_CRUNCH_STATE, offsetof(struct thread_info, crunchstate));
68-
#endif
6966
#ifdef CONFIG_STACKPROTECTOR_PER_TASK
7067
DEFINE(TI_STACK_CANARY, offsetof(struct thread_info, stack_canary));
7168
#endif

arch/arm/kernel/entry-armv.S

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -618,15 +618,9 @@ call_fpe:
618618
W(b) do_fpe @ CP#1 (FPE)
619619
W(b) do_fpe @ CP#2 (FPE)
620620
ret.w lr @ CP#3
621-
#ifdef CONFIG_CRUNCH
622-
b crunch_task_enable @ CP#4 (MaverickCrunch)
623-
b crunch_task_enable @ CP#5 (MaverickCrunch)
624-
b crunch_task_enable @ CP#6 (MaverickCrunch)
625-
#else
626621
ret.w lr @ CP#4
627622
ret.w lr @ CP#5
628623
ret.w lr @ CP#6
629-
#endif
630624
ret.w lr @ CP#7
631625
ret.w lr @ CP#8
632626
ret.w lr @ CP#9

arch/arm/kernel/ptrace.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -318,32 +318,6 @@ static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
318318

319319
#endif
320320

321-
#ifdef CONFIG_CRUNCH
322-
/*
323-
* Get the child Crunch state.
324-
*/
325-
static int ptrace_getcrunchregs(struct task_struct *tsk, void __user *ufp)
326-
{
327-
struct thread_info *thread = task_thread_info(tsk);
328-
329-
crunch_task_disable(thread); /* force it to ram */
330-
return copy_to_user(ufp, &thread->crunchstate, CRUNCH_SIZE)
331-
? -EFAULT : 0;
332-
}
333-
334-
/*
335-
* Set the child Crunch state.
336-
*/
337-
static int ptrace_setcrunchregs(struct task_struct *tsk, void __user *ufp)
338-
{
339-
struct thread_info *thread = task_thread_info(tsk);
340-
341-
crunch_task_release(thread); /* force a reload */
342-
return copy_from_user(&thread->crunchstate, ufp, CRUNCH_SIZE)
343-
? -EFAULT : 0;
344-
}
345-
#endif
346-
347321
#ifdef CONFIG_HAVE_HW_BREAKPOINT
348322
/*
349323
* Convert a virtual register number into an index for a thread_info
@@ -815,16 +789,6 @@ long arch_ptrace(struct task_struct *child, long request,
815789
ret = 0;
816790
break;
817791

818-
#ifdef CONFIG_CRUNCH
819-
case PTRACE_GETCRUNCHREGS:
820-
ret = ptrace_getcrunchregs(child, datap);
821-
break;
822-
823-
case PTRACE_SETCRUNCHREGS:
824-
ret = ptrace_setcrunchregs(child, datap);
825-
break;
826-
#endif
827-
828792
#ifdef CONFIG_VFP
829793
case PTRACE_GETVFPREGS:
830794
ret = copy_regset_to_user(child,

arch/arm/kernel/signal.c

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,6 @@ extern const unsigned long sigreturn_codes[17];
2525

2626
static unsigned long signal_return_offset;
2727

28-
#ifdef CONFIG_CRUNCH
29-
static int preserve_crunch_context(struct crunch_sigframe __user *frame)
30-
{
31-
char kbuf[sizeof(*frame) + 8];
32-
struct crunch_sigframe *kframe;
33-
34-
/* the crunch context must be 64 bit aligned */
35-
kframe = (struct crunch_sigframe *)((unsigned long)(kbuf + 8) & ~7);
36-
kframe->magic = CRUNCH_MAGIC;
37-
kframe->size = CRUNCH_STORAGE_SIZE;
38-
crunch_task_copy(current_thread_info(), &kframe->storage);
39-
return __copy_to_user(frame, kframe, sizeof(*frame));
40-
}
41-
42-
static int restore_crunch_context(char __user **auxp)
43-
{
44-
struct crunch_sigframe __user *frame =
45-
(struct crunch_sigframe __user *)*auxp;
46-
char kbuf[sizeof(*frame) + 8];
47-
struct crunch_sigframe *kframe;
48-
49-
/* the crunch context must be 64 bit aligned */
50-
kframe = (struct crunch_sigframe *)((unsigned long)(kbuf + 8) & ~7);
51-
if (__copy_from_user(kframe, frame, sizeof(*frame)))
52-
return -1;
53-
if (kframe->magic != CRUNCH_MAGIC ||
54-
kframe->size != CRUNCH_STORAGE_SIZE)
55-
return -1;
56-
*auxp += CRUNCH_STORAGE_SIZE;
57-
crunch_task_restore(current_thread_info(), &kframe->storage);
58-
return 0;
59-
}
60-
#endif
61-
6228
#ifdef CONFIG_IWMMXT
6329

6430
static int preserve_iwmmxt_context(struct iwmmxt_sigframe __user *frame)
@@ -205,10 +171,6 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
205171
err |= !valid_user_regs(regs);
206172

207173
aux = (char __user *) sf->uc.uc_regspace;
208-
#ifdef CONFIG_CRUNCH
209-
if (err == 0)
210-
err |= restore_crunch_context(&aux);
211-
#endif
212174
#ifdef CONFIG_IWMMXT
213175
if (err == 0)
214176
err |= restore_iwmmxt_context(&aux);
@@ -321,10 +283,6 @@ setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set)
321283
err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(*set));
322284

323285
aux = (struct aux_sigframe __user *) sf->uc.uc_regspace;
324-
#ifdef CONFIG_CRUNCH
325-
if (err == 0)
326-
err |= preserve_crunch_context(&aux->crunch);
327-
#endif
328286
#ifdef CONFIG_IWMMXT
329287
if (err == 0)
330288
err |= preserve_iwmmxt_context(&aux->iwmmxt);

0 commit comments

Comments
 (0)