ChangeSet 1.2231.1.50, 2005/03/28 19:30:36-08:00, [EMAIL PROTECTED]

        [PATCH] rename FPU_*verify_area to FPU_*access_ok
        
        Since verify_area is going the way of the Dodo soon it seems resonable 
to
        no longer refer to it in wrapper functions/macros.  FPU_verify_area and
        FPU_code_verify_area have already been converted to call access_ok so 
now
        seems a good time to rename them.  This patch makes no functional 
changes
        at all.
        
        Signed-off-by: Jesper Juhl <[EMAIL PROTECTED]>
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 fpu_entry.c   |   10 +++++-----
 fpu_system.h  |    8 ++++----
 get_address.c |   18 +++++++++---------
 load_store.c  |    6 +++---
 reg_ld_str.c  |   48 ++++++++++++++++++++++++------------------------
 5 files changed, 45 insertions(+), 45 deletions(-)


diff -Nru a/arch/i386/math-emu/fpu_entry.c b/arch/i386/math-emu/fpu_entry.c
--- a/arch/i386/math-emu/fpu_entry.c    2005-03-28 21:17:22 -08:00
+++ b/arch/i386/math-emu/fpu_entry.c    2005-03-28 21:17:22 -08:00
@@ -257,7 +257,7 @@
     }
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_code_verify_area(1);
+  FPU_code_access_ok(1);
   FPU_get_user(FPU_modrm, (u_char __user *) FPU_EIP);
   RE_ENTRANT_CHECK_ON;
   FPU_EIP++;
@@ -589,7 +589,7 @@
   *override = (overrides) { 0, 0, PREFIX_DEFAULT };       /* defaults */
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_code_verify_area(1);
+  FPU_code_access_ok(1);
   FPU_get_user(byte, ip);
   RE_ENTRANT_CHECK_ON;
 
@@ -635,7 +635,7 @@
        do_next_byte:
          ip++;
          RE_ENTRANT_CHECK_OFF;
-         FPU_code_verify_area(1);
+         FPU_code_access_ok(1);
          FPU_get_user(byte, ip);
          RE_ENTRANT_CHECK_ON;
          break;
@@ -686,7 +686,7 @@
   int offset, other, i, tags, regnr, tag, newtop;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, d, 7*4 + 8*10);
+  FPU_access_ok(VERIFY_READ, d, 7*4 + 8*10);
   if (__copy_from_user(&S387->cwd, d, 7*4))
     return -1;
   RE_ENTRANT_CHECK_ON;
@@ -732,7 +732,7 @@
   int offset = (S387->ftop & 7) * 10, other = 80 - offset;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE, d, 7*4 + 8*10);
+  FPU_access_ok(VERIFY_WRITE, d, 7*4 + 8*10);
 #ifdef PECULIAR_486
   S387->cwd &= ~0xe080;
   /* An 80486 sets nearly all of the reserved bits to 1. */
diff -Nru a/arch/i386/math-emu/fpu_system.h b/arch/i386/math-emu/fpu_system.h
--- a/arch/i386/math-emu/fpu_system.h   2005-03-28 21:17:22 -08:00
+++ b/arch/i386/math-emu/fpu_system.h   2005-03-28 21:17:22 -08:00
@@ -66,7 +66,7 @@
 #define instruction_address    (*(struct address *)&I387.soft.fip)
 #define operand_address                (*(struct address *)&I387.soft.foo)
 
-#define FPU_verify_area(x,y,z) if ( !access_ok(x,y,z) ) \
+#define FPU_access_ok(x,y,z)   if ( !access_ok(x,y,z) ) \
                                math_abort(FPU_info,SIGSEGV)
 
 #undef FPU_IGNORE_CODE_SEGV
@@ -75,12 +75,12 @@
    about 20% slower if applied to the code. Anyway, errors due to bad
    code addresses should be much rarer than errors due to bad data
    addresses. */
-#define        FPU_code_verify_area(z)
+#define        FPU_code_access_ok(z)
 #else
 /* A simpler test than access_ok() can probably be done for
-   FPU_code_verify_area() because the only possible error is to step
+   FPU_code_access_ok() because the only possible error is to step
    past the upper boundary of a legal code area. */
-#define        FPU_code_verify_area(z) FPU_verify_area(VERIFY_READ,(void 
__user *)FPU_EIP,z)
+#define        FPU_code_access_ok(z) FPU_access_ok(VERIFY_READ,(void __user 
*)FPU_EIP,z)
 #endif
 
 #define FPU_get_user(x,y)       get_user((x),(y))
diff -Nru a/arch/i386/math-emu/get_address.c b/arch/i386/math-emu/get_address.c
--- a/arch/i386/math-emu/get_address.c  2005-03-28 21:17:22 -08:00
+++ b/arch/i386/math-emu/get_address.c  2005-03-28 21:17:22 -08:00
@@ -81,7 +81,7 @@
   long offset;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_code_verify_area(1);
+  FPU_code_access_ok(1);
   FPU_get_user(base, (u_char __user *) (*fpu_eip));   /* The SIB byte */
   RE_ENTRANT_CHECK_ON;
   (*fpu_eip)++;
@@ -111,7 +111,7 @@
       /* 8 bit signed displacement */
       long displacement;
       RE_ENTRANT_CHECK_OFF;
-      FPU_code_verify_area(1);
+      FPU_code_access_ok(1);
       FPU_get_user(displacement, (signed char __user *) (*fpu_eip));
       offset += displacement;
       RE_ENTRANT_CHECK_ON;
@@ -122,7 +122,7 @@
       /* 32 bit displacement */
       long displacement;
       RE_ENTRANT_CHECK_OFF;
-      FPU_code_verify_area(4);
+      FPU_code_access_ok(4);
       FPU_get_user(displacement, (long __user *) (*fpu_eip));
       offset += displacement;
       RE_ENTRANT_CHECK_ON;
@@ -276,7 +276,7 @@
            {
              /* Special case: disp32 */
              RE_ENTRANT_CHECK_OFF;
-             FPU_code_verify_area(4);
+             FPU_code_access_ok(4);
              FPU_get_user(address, (unsigned long __user *) (*fpu_eip));
              (*fpu_eip) += 4;
              RE_ENTRANT_CHECK_ON;
@@ -293,7 +293,7 @@
        case 1:
          /* 8 bit signed displacement */
          RE_ENTRANT_CHECK_OFF;
-         FPU_code_verify_area(1);
+         FPU_code_access_ok(1);
          FPU_get_user(address, (signed char __user *) (*fpu_eip));
          RE_ENTRANT_CHECK_ON;
          (*fpu_eip)++;
@@ -301,7 +301,7 @@
        case 2:
          /* 32 bit displacement */
          RE_ENTRANT_CHECK_OFF;
-         FPU_code_verify_area(4);
+         FPU_code_access_ok(4);
          FPU_get_user(address, (long __user *) (*fpu_eip));
          (*fpu_eip) += 4;
          RE_ENTRANT_CHECK_ON;
@@ -362,7 +362,7 @@
        {
          /* Special case: disp16 */
          RE_ENTRANT_CHECK_OFF;
-         FPU_code_verify_area(2);
+         FPU_code_access_ok(2);
          FPU_get_user(address, (unsigned short __user *) (*fpu_eip));
          (*fpu_eip) += 2;
          RE_ENTRANT_CHECK_ON;
@@ -372,7 +372,7 @@
     case 1:
       /* 8 bit signed displacement */
       RE_ENTRANT_CHECK_OFF;
-      FPU_code_verify_area(1);
+      FPU_code_access_ok(1);
       FPU_get_user(address, (signed char __user *) (*fpu_eip));
       RE_ENTRANT_CHECK_ON;
       (*fpu_eip)++;
@@ -380,7 +380,7 @@
     case 2:
       /* 16 bit displacement */
       RE_ENTRANT_CHECK_OFF;
-      FPU_code_verify_area(2);
+      FPU_code_access_ok(2);
       FPU_get_user(address, (unsigned short __user *) (*fpu_eip));
       (*fpu_eip) += 2;
       RE_ENTRANT_CHECK_ON;
diff -Nru a/arch/i386/math-emu/load_store.c b/arch/i386/math-emu/load_store.c
--- a/arch/i386/math-emu/load_store.c   2005-03-28 21:17:22 -08:00
+++ b/arch/i386/math-emu/load_store.c   2005-03-28 21:17:22 -08:00
@@ -208,7 +208,7 @@
       break;
     case 024:     /* fldcw */
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_READ, data_address, 2);
+      FPU_access_ok(VERIFY_READ, data_address, 2);
       FPU_get_user(control_word, (unsigned short __user *) data_address);
       RE_ENTRANT_CHECK_ON;
       if ( partial_status & ~control_word & CW_Exceptions )
@@ -243,7 +243,7 @@
       break;
     case 034:      /* fstcw m16int */
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_WRITE,data_address,2);
+      FPU_access_ok(VERIFY_WRITE,data_address,2);
       FPU_put_user(control_word, (unsigned short __user *) data_address);
       RE_ENTRANT_CHECK_ON;
       return 1;
@@ -255,7 +255,7 @@
       break;
     case 036:      /* fstsw m2byte */
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_WRITE,data_address,2);
+      FPU_access_ok(VERIFY_WRITE,data_address,2);
       FPU_put_user(status_word(),(unsigned short __user *) data_address);
       RE_ENTRANT_CHECK_ON;
       return 1;
diff -Nru a/arch/i386/math-emu/reg_ld_str.c b/arch/i386/math-emu/reg_ld_str.c
--- a/arch/i386/math-emu/reg_ld_str.c   2005-03-28 21:17:22 -08:00
+++ b/arch/i386/math-emu/reg_ld_str.c   2005-03-28 21:17:22 -08:00
@@ -91,7 +91,7 @@
   FPU_REG *sti_ptr = &st(stnr);
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, s, 10);
+  FPU_access_ok(VERIFY_READ, s, 10);
   __copy_from_user(sti_ptr, s, 10);
   RE_ENTRANT_CHECK_ON;
 
@@ -106,7 +106,7 @@
   unsigned m64, l64;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, dfloat, 8);
+  FPU_access_ok(VERIFY_READ, dfloat, 8);
   FPU_get_user(m64, 1 + (unsigned long __user *) dfloat);
   FPU_get_user(l64, (unsigned long __user *) dfloat);
   RE_ENTRANT_CHECK_ON;
@@ -178,7 +178,7 @@
   int exp, tag, negative;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, single, 4);
+  FPU_access_ok(VERIFY_READ, single, 4);
   FPU_get_user(m32, (unsigned long __user *) single);
   RE_ENTRANT_CHECK_ON;
 
@@ -243,7 +243,7 @@
   FPU_REG *st0_ptr = &st(0);
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, _s, 8);
+  FPU_access_ok(VERIFY_READ, _s, 8);
   copy_from_user(&s,_s,8);
   RE_ENTRANT_CHECK_ON;
 
@@ -274,7 +274,7 @@
   int negative;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, _s, 4);
+  FPU_access_ok(VERIFY_READ, _s, 4);
   FPU_get_user(s, _s);
   RE_ENTRANT_CHECK_ON;
 
@@ -302,7 +302,7 @@
   int s, negative;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, _s, 2);
+  FPU_access_ok(VERIFY_READ, _s, 2);
   /* Cast as short to get the sign extended. */
   FPU_get_user(s, _s);
   RE_ENTRANT_CHECK_ON;
@@ -335,7 +335,7 @@
   int sign;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ, s, 10);
+  FPU_access_ok(VERIFY_READ, s, 10);
   RE_ENTRANT_CHECK_ON;
   for ( pos = 8; pos >= 0; pos--)
     {
@@ -380,7 +380,7 @@
   if ( st0_tag != TAG_Empty )
     {
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_WRITE, d, 10);
+      FPU_access_ok(VERIFY_WRITE, d, 10);
 
       FPU_put_user(st0_ptr->sigl, (unsigned long __user *) d);
       FPU_put_user(st0_ptr->sigh, (unsigned long __user *) ((u_char __user *)d 
+ 4));
@@ -397,7 +397,7 @@
       /* The masked response */
       /* Put out the QNaN indefinite */
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_WRITE,d,10);
+      FPU_access_ok(VERIFY_WRITE,d,10);
       FPU_put_user(0, (unsigned long __user *) d);
       FPU_put_user(0xc0000000, 1 + (unsigned long __user *) d);
       FPU_put_user(0xffff, 4 + (short __user *) d);
@@ -607,7 +607,7 @@
          /* The masked response */
          /* Put out the QNaN indefinite */
          RE_ENTRANT_CHECK_OFF;
-         FPU_verify_area(VERIFY_WRITE,dfloat,8);
+         FPU_access_ok(VERIFY_WRITE,dfloat,8);
          FPU_put_user(0, (unsigned long __user *) dfloat);
          FPU_put_user(0xfff80000, 1 + (unsigned long __user *) dfloat);
          RE_ENTRANT_CHECK_ON;
@@ -620,7 +620,7 @@
     l[1] |= 0x80000000;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,dfloat,8);
+  FPU_access_ok(VERIFY_WRITE,dfloat,8);
   FPU_put_user(l[0], (unsigned long __user *)dfloat);
   FPU_put_user(l[1], 1 + (unsigned long __user *)dfloat);
   RE_ENTRANT_CHECK_ON;
@@ -826,7 +826,7 @@
          /* The masked response */
          /* Put out the QNaN indefinite */
          RE_ENTRANT_CHECK_OFF;
-         FPU_verify_area(VERIFY_WRITE,single,4);
+         FPU_access_ok(VERIFY_WRITE,single,4);
          FPU_put_user(0xffc00000, (unsigned long __user *) single);
          RE_ENTRANT_CHECK_ON;
          return 1;
@@ -845,7 +845,7 @@
     templ |= 0x80000000;
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,single,4);
+  FPU_access_ok(VERIFY_WRITE,single,4);
   FPU_put_user(templ,(unsigned long __user *) single);
   RE_ENTRANT_CHECK_ON;
 
@@ -906,7 +906,7 @@
     }
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,d,8);
+  FPU_access_ok(VERIFY_WRITE,d,8);
   copy_to_user(d, &tll, 8);
   RE_ENTRANT_CHECK_ON;
 
@@ -963,7 +963,7 @@
     }
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,d,4);
+  FPU_access_ok(VERIFY_WRITE,d,4);
   FPU_put_user(t.sigl, (unsigned long __user *) d);
   RE_ENTRANT_CHECK_ON;
 
@@ -1020,7 +1020,7 @@
     }
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,d,2);
+  FPU_access_ok(VERIFY_WRITE,d,2);
   FPU_put_user((short)t.sigl, d);
   RE_ENTRANT_CHECK_ON;
 
@@ -1069,7 +1069,7 @@
        {
          /* Produce the QNaN "indefinite" */
          RE_ENTRANT_CHECK_OFF;
-         FPU_verify_area(VERIFY_WRITE,d,10);
+         FPU_access_ok(VERIFY_WRITE,d,10);
          for ( i = 0; i < 7; i++)
            FPU_put_user(0, d+i); /* These bytes "undefined" */
          FPU_put_user(0xc0, d+7); /* This byte "undefined" */
@@ -1088,7 +1088,7 @@
     }
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,d,10);
+  FPU_access_ok(VERIFY_WRITE,d,10);
   RE_ENTRANT_CHECK_ON;
   for ( i = 0; i < 9; i++)
     {
@@ -1186,7 +1186,7 @@
       ^ (addr_modes.override.operand_size == OP_SIZE_PREFIX)) )
     {
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_READ, s, 0x0e);
+      FPU_access_ok(VERIFY_READ, s, 0x0e);
       FPU_get_user(control_word, (unsigned short __user *) s);
       FPU_get_user(partial_status, (unsigned short __user *) (s+2));
       FPU_get_user(tag_word, (unsigned short __user *) (s+4));
@@ -1206,7 +1206,7 @@
   else
     {
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_READ, s, 0x1c);
+      FPU_access_ok(VERIFY_READ, s, 0x1c);
       FPU_get_user(control_word, (unsigned short __user *) s);
       FPU_get_user(partial_status, (unsigned short __user *) (s+4));
       FPU_get_user(tag_word, (unsigned short __user *) (s+8));
@@ -1274,7 +1274,7 @@
 
   /* Copy all registers in stack order. */
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_READ,s,80);
+  FPU_access_ok(VERIFY_READ,s,80);
   __copy_from_user(register_base+offset, s, other);
   if ( offset )
     __copy_from_user(register_base, s+other, offset);
@@ -1298,7 +1298,7 @@
       ^ (addr_modes.override.operand_size == OP_SIZE_PREFIX)) )
     {
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_WRITE,d,14);
+      FPU_access_ok(VERIFY_WRITE,d,14);
 #ifdef PECULIAR_486
       FPU_put_user(control_word & ~0xe080, (unsigned long __user *) d);
 #else
@@ -1326,7 +1326,7 @@
   else
     {
       RE_ENTRANT_CHECK_OFF;
-      FPU_verify_area(VERIFY_WRITE, d, 7*4);
+      FPU_access_ok(VERIFY_WRITE, d, 7*4);
 #ifdef PECULIAR_486
       control_word &= ~0xe080;
       /* An 80486 sets nearly all of the reserved bits to 1. */
@@ -1356,7 +1356,7 @@
   d = fstenv(addr_modes, data_address);
 
   RE_ENTRANT_CHECK_OFF;
-  FPU_verify_area(VERIFY_WRITE,d,80);
+  FPU_access_ok(VERIFY_WRITE,d,80);
 
   /* Copy all registers in stack order. */
   __copy_to_user(d, register_base+offset, other);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to