Loading arch/arc/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ config ARC select GENERIC_FIND_FIRST_BIT # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP select GENERIC_IRQ_SHOW select GENERIC_KERNEL_EXECVE select GENERIC_KERNEL_THREAD select GENERIC_PENDING_IRQ if SMP select GENERIC_SMP_IDLE_THREAD select HAVE_GENERIC_HARDIRQS Loading arch/arc/include/asm/arcregs.h +20 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,17 @@ #define AUX_ITRIGGER 0x40d #define AUX_IPULSE 0x415 /* * Floating Pt Registers * Status regs are read-only (build-time) so need not be saved/restored */ #define ARC_AUX_FP_STAT 0x300 #define ARC_AUX_DPFP_1L 0x301 #define ARC_AUX_DPFP_1H 0x302 #define ARC_AUX_DPFP_2L 0x303 #define ARC_AUX_DPFP_2H 0x304 #define ARC_AUX_DPFP_STAT 0x305 #ifndef __ASSEMBLY__ /* Loading Loading @@ -110,6 +121,15 @@ #endif #ifdef CONFIG_ARC_FPU_SAVE_RESTORE /* These DPFP regs need to be saved/restored across ctx-sw */ struct arc_fpu { struct { unsigned int l, h; } aux_dpfp[2]; }; #endif #endif /* __ASEMBLY__ */ #endif /* __KERNEL__ */ Loading arch/arc/include/asm/processor.h +3 −6 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ struct thread_struct { unsigned long callee_reg; /* pointer to callee regs */ unsigned long fault_address; /* dbls as brkpt holder as well */ unsigned long cause_code; /* Exception Cause Code (ECR) */ #ifdef CONFIG_ARC_FPU_SAVE_RESTORE struct arc_fpu fpu; #endif }; #define INIT_THREAD { \ Loading @@ -54,12 +57,6 @@ unsigned long thread_saved_pc(struct task_struct *t); #define cpu_relax() do { } while (0) /* * Create a new kernel thread */ extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags); #define copy_segments(tsk, mm) do { } while (0) #define release_segments(mm) do { } while (0) Loading arch/arc/include/asm/ptrace.h +8 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,14 @@ struct callee_regs { #define in_syscall(regs) (((regs->orig_r8) >= 0 && \ (regs->orig_r8 <= NR_syscalls)) ? 1 : 0) #define current_pt_regs() \ ({ \ /* open-coded current_thread_info() */ \ register unsigned long sp asm ("sp"); \ unsigned long pg_start = (sp & ~(THREAD_SIZE - 1)); \ (struct pt_regs *)(pg_start + THREAD_SIZE - 4) - 1; \ }) #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ Loading arch/arc/include/asm/switch_to.h 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef _ASM_ARC_SWITCH_TO_H #define _ASM_ARC_SWITCH_TO_H #ifndef __ASSEMBLY__ #include <linux/sched.h> #ifdef CONFIG_ARC_FPU_SAVE_RESTORE extern void fpu_save_restore(struct task_struct *p, struct task_struct *n); #define ARC_FPU_PREV(p, n) fpu_save_restore(p, n) #define ARC_FPU_NEXT(t) #else #define ARC_FPU_PREV(p, n) #define ARC_FPU_NEXT(n) #endif /* !CONFIG_ARC_FPU_SAVE_RESTORE */ struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n); #define switch_to(prev, next, last) \ do { \ ARC_FPU_PREV(prev, next); \ last = __switch_to(prev, next);\ ARC_FPU_NEXT(next); \ mb(); \ } while (0) #endif #endif Loading
arch/arc/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ config ARC select GENERIC_FIND_FIRST_BIT # for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP select GENERIC_IRQ_SHOW select GENERIC_KERNEL_EXECVE select GENERIC_KERNEL_THREAD select GENERIC_PENDING_IRQ if SMP select GENERIC_SMP_IDLE_THREAD select HAVE_GENERIC_HARDIRQS Loading
arch/arc/include/asm/arcregs.h +20 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,17 @@ #define AUX_ITRIGGER 0x40d #define AUX_IPULSE 0x415 /* * Floating Pt Registers * Status regs are read-only (build-time) so need not be saved/restored */ #define ARC_AUX_FP_STAT 0x300 #define ARC_AUX_DPFP_1L 0x301 #define ARC_AUX_DPFP_1H 0x302 #define ARC_AUX_DPFP_2L 0x303 #define ARC_AUX_DPFP_2H 0x304 #define ARC_AUX_DPFP_STAT 0x305 #ifndef __ASSEMBLY__ /* Loading Loading @@ -110,6 +121,15 @@ #endif #ifdef CONFIG_ARC_FPU_SAVE_RESTORE /* These DPFP regs need to be saved/restored across ctx-sw */ struct arc_fpu { struct { unsigned int l, h; } aux_dpfp[2]; }; #endif #endif /* __ASEMBLY__ */ #endif /* __KERNEL__ */ Loading
arch/arc/include/asm/processor.h +3 −6 Original line number Diff line number Diff line Loading @@ -29,6 +29,9 @@ struct thread_struct { unsigned long callee_reg; /* pointer to callee regs */ unsigned long fault_address; /* dbls as brkpt holder as well */ unsigned long cause_code; /* Exception Cause Code (ECR) */ #ifdef CONFIG_ARC_FPU_SAVE_RESTORE struct arc_fpu fpu; #endif }; #define INIT_THREAD { \ Loading @@ -54,12 +57,6 @@ unsigned long thread_saved_pc(struct task_struct *t); #define cpu_relax() do { } while (0) /* * Create a new kernel thread */ extern int kernel_thread(int (*fn) (void *), void *arg, unsigned long flags); #define copy_segments(tsk, mm) do { } while (0) #define release_segments(mm) do { } while (0) Loading
arch/arc/include/asm/ptrace.h +8 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,14 @@ struct callee_regs { #define in_syscall(regs) (((regs->orig_r8) >= 0 && \ (regs->orig_r8 <= NR_syscalls)) ? 1 : 0) #define current_pt_regs() \ ({ \ /* open-coded current_thread_info() */ \ register unsigned long sp asm ("sp"); \ unsigned long pg_start = (sp & ~(THREAD_SIZE - 1)); \ (struct pt_regs *)(pg_start + THREAD_SIZE - 4) - 1; \ }) #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ Loading
arch/arc/include/asm/switch_to.h 0 → 100644 +41 −0 Original line number Diff line number Diff line /* * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef _ASM_ARC_SWITCH_TO_H #define _ASM_ARC_SWITCH_TO_H #ifndef __ASSEMBLY__ #include <linux/sched.h> #ifdef CONFIG_ARC_FPU_SAVE_RESTORE extern void fpu_save_restore(struct task_struct *p, struct task_struct *n); #define ARC_FPU_PREV(p, n) fpu_save_restore(p, n) #define ARC_FPU_NEXT(t) #else #define ARC_FPU_PREV(p, n) #define ARC_FPU_NEXT(n) #endif /* !CONFIG_ARC_FPU_SAVE_RESTORE */ struct task_struct *__switch_to(struct task_struct *p, struct task_struct *n); #define switch_to(prev, next, last) \ do { \ ARC_FPU_PREV(prev, next); \ last = __switch_to(prev, next);\ ARC_FPU_NEXT(next); \ mb(); \ } while (0) #endif #endif