patch-2.2.11 linux/arch/alpha/kernel/osf_sys.c
Next file: linux/arch/alpha/kernel/process.c
Previous file: linux/arch/alpha/kernel/machvec.h
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Mon Aug 9 12:04:57 1999
- Orig file:
v2.2.10/linux/arch/alpha/kernel/osf_sys.c
- Orig date:
Mon May 10 09:55:21 1999
diff -u --recursive --new-file v2.2.10/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
@@ -925,6 +925,7 @@
return -EINVAL;
cpu = (struct percpu_struct*)
((char*)hwrpb + hwrpb->processor_offset);
+ w = cpu->type;
if (put_user(w, (unsigned long *)buffer))
return -EFAULT;
return 1;
@@ -949,7 +950,7 @@
{
switch (op) {
case SSI_IEEE_FP_CONTROL: {
- unsigned long swcr, fpcr, undz;
+ unsigned long swcr, fpcr, undz, ev6;
/*
* Alpha Architecture Handbook 4.7.7.3:
@@ -958,6 +959,8 @@
* set in the trap shadow of a software-complete insn.
*/
+ ev6 = (implver() == IMPLVER_EV6);
+
/* Update softare trap enable bits. */
if (get_user(swcr, (unsigned long *)buffer))
return -EFAULT;
@@ -966,10 +969,17 @@
/* Update the real fpcr. Keep UNFD off if not UNDZ. */
fpcr = rdfpcr();
- undz = (fpcr & FPCR_UNDZ);
- fpcr &= ~(FPCR_MASK | FPCR_DYN_MASK | FPCR_UNDZ);
+ if(ev6) {
+ undz = (fpcr & FPCR_UNDZ);
+ fpcr &= (~(FPCR_MASK | FPCR_UNDZ)) | FPCR_DYN_MASK;
+ }
+ else {
+ fpcr &= (~FPCR_MASK) | FPCR_DYN_MASK;
+ }
fpcr |= ieee_swcr_to_fpcr(swcr);
- fpcr &= ~(undz << 1);
+ if(ev6 && !undz) {
+ fpcr &= ~FPCR_UNFD;
+ }
wrfpcr(fpcr);
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)