diff --git a/sys/arm/arm/genassym.c b/sys/arm/arm/genassym.c index 4b8f4cc72c4..0a7399de3d1 100644 --- a/sys/arm/arm/genassym.c +++ b/sys/arm/arm/genassym.c @@ -113,7 +113,7 @@ ASSYM(ARM_RAS_START, ARM_RAS_START); ASSYM(ARM_RAS_END, ARM_RAS_END); #endif -#ifdef ARM_VFP_SUPPORT +#ifdef VFP ASSYM(PCB_VFPSTATE, offsetof(struct pcb, pcb_vfpstate)); ASSYM(PCB_VFPCPU, offsetof(struct pcb, pcb_vfpcpu)); diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index ddedd9bcd4f..12e7fd1ed0f 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -875,7 +875,7 @@ pcpu0_init(void) #endif pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); -#ifdef ARM_VFP_SUPPORT +#ifdef VFP PCPU_SET(cpu, 0); #endif } diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c index 4db6da49bdc..2e5e1d31e3b 100644 --- a/sys/arm/arm/mp_machdep.c +++ b/sys/arm/arm/mp_machdep.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef ARM_VFP_SUPPORT +#ifdef VFP #include #endif @@ -199,7 +199,7 @@ init_secondary(int cpu) KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); pc->pc_curthread = pc->pc_idlethread; pc->pc_curpcb = pc->pc_idlethread->td_pcb; -#ifdef ARM_VFP_SUPPORT +#ifdef VFP pc->pc_cpu = cpu; vfp_init(); diff --git a/sys/arm/arm/swtch.S b/sys/arm/arm/swtch.S index 8439a51072f..92c420b2ca2 100644 --- a/sys/arm/arm/swtch.S +++ b/sys/arm/arm/swtch.S @@ -114,7 +114,7 @@ ENTRY(cpu_throw) GET_PCPU(r7) -#ifdef ARM_VFP_SUPPORT +#ifdef VFP /* * vfp_discard will clear pcpu->pc_vfpcthread, and modify * and modify the control as needed. @@ -124,7 +124,7 @@ ENTRY(cpu_throw) bne 3f bl _C_LABEL(vfp_discard) /* yes, shut down vfp */ 3: -#endif /* ARM_VFP_SUPPORT */ +#endif /* VFP */ ldr r7, [r5, #(TD_PCB)] /* r7 = new thread's PCB */ @@ -303,7 +303,7 @@ ENTRY(cpu_switch) /* rem: r9 = new PCB */ /* rem: interrupts are enabled */ -#ifdef ARM_VFP_SUPPORT +#ifdef VFP /* * vfp_store will clear pcpu->pc_vfpcthread, save * registers and state, and modify the control as needed. @@ -325,7 +325,7 @@ ENTRY(cpu_switch) add r0, r2, #(PCB_VFPSTATE) bl _C_LABEL(vfp_store) 1: -#endif /* ARM_VFP_SUPPORT */ +#endif /* VFP */ /* r1 now free! */ @@ -505,7 +505,7 @@ ENTRY(savectx) /* Store all the registers in the process's pcb */ add r2, r0, #(PCB_R8) stmia r2, {r8-r13} -#ifdef ARM_VFP_SUPPORT +#ifdef VFP /* * vfp_store will clear pcpu->pc_vfpcthread, save * registers and state, and modify the control as needed. @@ -525,7 +525,7 @@ ENTRY(savectx) add r0, r0, #(PCB_VFPSTATE) bl _C_LABEL(vfp_store) 1: -#endif /* ARM_VFP_SUPPORT */ +#endif /* VFP */ add sp, sp, #4; ldmfd sp!, {r4-r7, pc} END(savectx) diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index 41f2f6420ac..476dd601a8b 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -234,13 +234,13 @@ undefinedinstruction(trapframe_t *frame) coprocessor = 0; if ((fault_instruction & (1 << 27)) != 0) coprocessor = (fault_instruction >> 8) & 0x0f; -#ifdef ARM_VFP_SUPPORT +#ifdef VFP else { /* check for special instructions */ if (((fault_instruction & 0xfe000000) == 0xf2000000) || ((fault_instruction & 0xff100000) == 0xf4000000)) coprocessor = 10; /* vfp / simd */ } -#endif /* ARM_VFP_SUPPORT */ +#endif /* VFP */ if ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) { /* diff --git a/sys/arm/arm/vfp.c b/sys/arm/arm/vfp.c index b9dce13aa68..8e8dbadb09d 100644 --- a/sys/arm/arm/vfp.c +++ b/sys/arm/arm/vfp.c @@ -24,10 +24,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #include __FBSDID("$FreeBSD$"); - +#ifdef VFP #include #include #include @@ -281,3 +282,5 @@ vfp_enable() tmp |= VFPEXC_EN; fmxr(VFPEXC, tmp); } +#endif + diff --git a/sys/arm/conf/PANDABOARD b/sys/arm/conf/PANDABOARD index 788a0ed336c..0ebcf52352a 100644 --- a/sys/arm/conf/PANDABOARD +++ b/sys/arm/conf/PANDABOARD @@ -140,5 +140,4 @@ options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=pandaboard.dts -#device vfp # vfp/neon -#options ARM_VFP_SUPPORT # vfp/neon +options VFP # vfp/neon diff --git a/sys/arm/conf/RPI-B b/sys/arm/conf/RPI-B index 251bf55ac55..20f119840df 100644 --- a/sys/arm/conf/RPI-B +++ b/sys/arm/conf/RPI-B @@ -109,5 +109,4 @@ options FDT #options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=rpi.dts -device vfp # vfp/neon -options ARM_VFP_SUPPORT # vfp/neon +options VFP # vfp/neon diff --git a/sys/arm/include/pcpu.h b/sys/arm/include/pcpu.h index cd5006caa84..19950304341 100644 --- a/sys/arm/include/pcpu.h +++ b/sys/arm/include/pcpu.h @@ -41,7 +41,7 @@ struct vmspace; #endif /* _KERNEL */ -#ifdef ARM_VFP_SUPPORT +#ifdef VFP #define PCPU_MD_FIELDS \ unsigned int pc_cpu; \ unsigned int pc_vfpsid; \ diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 0f18b134aa8..dbb9ffc2d36 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -50,7 +50,7 @@ arm/arm/uio_machdep.c standard arm/arm/undefined.c standard arm/arm/vectors.S standard arm/arm/vm_machdep.c standard -arm/arm/vfp.c optional vfp +arm/arm/vfp.c standard board_id.h standard \ dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \ compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ diff --git a/sys/conf/options.arm b/sys/conf/options.arm index b5e6064db0f..1d676452e7d 100644 --- a/sys/conf/options.arm +++ b/sys/conf/options.arm @@ -60,3 +60,4 @@ GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h GFB_NO_MODE_CHANGE opt_gfb.h AT91C_MAIN_CLOCK opt_at91.h +VFP opt_global.h