Print this page
XXX AVX procfs

@@ -57,12 +57,12 @@
 #include <fs/proc/prdata.h>
 #include <sys/contract/process_impl.h>
 
 static  void    pr_settrace(proc_t *, sigset_t *);
 static  int     pr_setfpregs(prnode_t *, prfpregset_t *);
-#if defined(__sparc)
 static  int     pr_setxregs(prnode_t *, prxregset_t *);
+#if defined(__sparc)
 static  int     pr_setasrs(prnode_t *, asrset_t);
 #endif
 static  int     pr_setvaddr(prnode_t *, caddr_t);
 static  int     pr_clearsig(prnode_t *);
 static  int     pr_clearflt(prnode_t *);

@@ -85,12 +85,12 @@
         sigset_t        sigset;         /* PCSTRACE, PCSHOLD */
         fltset_t        fltset;         /* PCSFAULT */
         sysset_t        sysset;         /* PCSENTRY, PCSEXIT */
         prgregset_t     prgregset;      /* PCSREG, PCAGENT */
         prfpregset_t    prfpregset;     /* PCSFPREG */
-#if defined(__sparc)
         prxregset_t     prxregset;      /* PCSXREG */
+#if defined(__sparc)
         asrset_t        asrset;         /* PCSASRS */
 #endif
         prwatch_t       prwatch;        /* PCWATCH */
         priovec_t       priovec;        /* PCREAD, PCWRITE */
         prcred_t        prcred;         /* PCSCRED */

@@ -150,14 +150,14 @@
                 size += sizeof (prgregset_t);
                 break;
         case PCSFPREG:
                 size += sizeof (prfpregset_t);
                 break;
-#if defined(__sparc)
         case PCSXREG:
                 size += sizeof (prxregset_t);
                 break;
+#if defined(__sparc)
         case PCSASRS:
                 size += sizeof (asrset_t);
                 break;
 #endif
         case PCWATCH:

@@ -416,15 +416,11 @@
         case PCSFPREG:  /* set floating-point registers */
                 error = pr_setfpregs(pnp, &argp->prfpregset);
                 break;
 
         case PCSXREG:   /* set extra registers */
-#if defined(__sparc)
                 error = pr_setxregs(pnp, &argp->prxregset);
-#else
-                error = EINVAL;
-#endif
                 break;
 
 #if defined(__sparc)
         case PCSASRS:   /* set ancillary state registers */
                 error = pr_setasrs(pnp, argp->asrset);

@@ -501,13 +497,11 @@
         sigset_t        sigset;         /* PCSTRACE, PCSHOLD */
         fltset_t        fltset;         /* PCSFAULT */
         sysset_t        sysset;         /* PCSENTRY, PCSEXIT */
         prgregset32_t   prgregset;      /* PCSREG, PCAGENT */
         prfpregset32_t  prfpregset;     /* PCSFPREG */
-#if defined(__sparc)
         prxregset_t     prxregset;      /* PCSXREG */
-#endif
         prwatch32_t     prwatch;        /* PCWATCH */
         priovec32_t     priovec;        /* PCREAD, PCWRITE */
         prcred32_t      prcred;         /* PCSCRED */
         prpriv_t        prpriv;         /* PCSPRIV */
         int32_t         przoneid;       /* PCSZONE */

@@ -571,15 +565,13 @@
                 size += sizeof (prgregset32_t);
                 break;
         case PCSFPREG:
                 size += sizeof (prfpregset32_t);
                 break;
-#if defined(__sparc)
         case PCSXREG:
                 size += sizeof (prxregset_t);
                 break;
-#endif
         case PCWATCH:
                 size += sizeof (prwatch32_t);
                 break;
         case PCREAD:
         case PCWRITE:

@@ -864,18 +856,14 @@
                 else
                         error = pr_setfpregs32(pnp, &argp->prfpregset);
                 break;
 
         case PCSXREG:   /* set extra registers */
-#if defined(__sparc)
                 if (PROCESS_NOT_32BIT(p))
                         error = EOVERFLOW;
                 else
                         error = pr_setxregs(pnp, &argp->prxregset);
-#else
-                error = EINVAL;
-#endif
                 break;
 
         case PCSVADDR:  /* set virtual address at which to resume */
                 if (PROCESS_NOT_32BIT(p))
                         error = EOVERFLOW;

@@ -1704,11 +1692,10 @@
 
         return (0);
 }
 #endif  /* _SYSCALL32_IMPL */
 
-#if defined(__sparc)
 /* ARGSUSED */
 static int
 pr_setxregs(prnode_t *pnp, prxregset_t *prxregset)
 {
         proc_t *p = pnp->pr_common->prc_proc;

@@ -1729,10 +1716,11 @@
         mutex_enter(&p->p_lock);
 
         return (0);
 }
 
+#if defined(__sparc)
 static int
 pr_setasrs(prnode_t *pnp, asrset_t asrset)
 {
         proc_t *p = pnp->pr_common->prc_proc;
         kthread_t *t = pr_thread(pnp);  /* returns locked thread */