diff options
author | dillon <dillon@FreeBSD.org> | 2000-04-02 17:52:43 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2000-04-02 17:52:43 +0000 |
commit | 6fa0b056f4d7bd22bab81ea7d5cf5ea523c12846 (patch) | |
tree | 06b2279b11d39f23cc67d1c0e4550ffb033f2948 /sys/amd64 | |
parent | 1d9f7bb597dbd671e7079f8c0c6174edae8ff204 (diff) | |
download | FreeBSD-src-6fa0b056f4d7bd22bab81ea7d5cf5ea523c12846.zip FreeBSD-src-6fa0b056f4d7bd22bab81ea7d5cf5ea523c12846.tar.gz |
Make the sigprocmask() and geteuid() system calls MP SAFE. Expand
commentary for copyin/copyout to indicate that they are MP SAFE as
well.
Reviewed by: msmith
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/support.S | 47 | ||||
-rw-r--r-- | sys/amd64/amd64/support.s | 47 |
2 files changed, 72 insertions, 22 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 1f350f5..34a5885 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -663,7 +663,9 @@ ENTRY(memcpy) * returns to *curpcb->onfault instead of the function. */ -/* copyout(from_kernel, to_user, len) */ +/* + * copyout(from_kernel, to_user, len) - MP SAFE (if not I386_CPU) + */ ENTRY(copyout) MEXITCOUNT jmp *_copyout_vector @@ -704,6 +706,10 @@ ENTRY(generic_copyout) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 3f @@ -849,9 +855,7 @@ ENTRY(i586_copyout) #endif /* I586_CPU && NNPX > 0 */ /* - * copyin(from_user, to_kernel, len) - * - * MPSAFE + * copyin(from_user, to_kernel, len) - MP SAFE */ ENTRY(copyin) MEXITCOUNT @@ -1133,9 +1137,9 @@ fastmove_tail_fault: #endif /* I586_CPU && NNPX > 0 */ /* - * fu{byte,sword,word} : fetch a byte (sword, word) from user memory + * fu{byte,sword,word} - MP SAFE * - * MP SAFE + * Fetch a byte (sword, word) from user memory */ ENTRY(fuword) movl _curpcb,%ecx @@ -1161,7 +1165,7 @@ ENTRY(fuswintr) ret /* - * MP SAFE + * fusword - MP SAFE */ ENTRY(fusword) movl _curpcb,%ecx @@ -1176,7 +1180,7 @@ ENTRY(fusword) ret /* - * MP SAFE + * fubyte - MP SAFE */ ENTRY(fubyte) movl _curpcb,%ecx @@ -1199,7 +1203,9 @@ fusufault: ret /* - * su{byte,sword,word}: write a byte (word, longword) to user memory + * su{byte,sword,word} - MP SAFE (if not I386_CPU) + * + * Write a byte (word, longword) to user memory */ ENTRY(suword) movl _curpcb,%ecx @@ -1208,6 +1214,10 @@ ENTRY(suword) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f /* we only have to set the right segment selector */ @@ -1250,6 +1260,9 @@ ENTRY(suword) movl %eax,PCB_ONFAULT(%ecx) ret +/* + * susword - MP SAFE (if not I386_CPU) + */ ENTRY(susword) movl _curpcb,%ecx movl $fusufault,PCB_ONFAULT(%ecx) @@ -1257,6 +1270,10 @@ ENTRY(susword) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f @@ -1299,6 +1316,9 @@ ENTRY(susword) movl %eax,PCB_ONFAULT(%ecx) ret +/* + * su[i]byte - MP SAFE (if not I386_CPU) + */ ALTENTRY(suibyte) ENTRY(subyte) movl _curpcb,%ecx @@ -1307,6 +1327,10 @@ ENTRY(subyte) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f @@ -1349,7 +1373,8 @@ ENTRY(subyte) ret /* - * copyinstr(from, to, maxlen, int *lencopied) + * copyinstr(from, to, maxlen, int *lencopied) - MP SAFE + * * copy a string from from to to, stop when a 0 character is reached. * return ENAMETOOLONG if string is longer than maxlen, and * EFAULT on protection violations. If lencopied is non-zero, @@ -1421,7 +1446,7 @@ cpystrflt_x: /* - * copystr(from, to, maxlen, int *lencopied) + * copystr(from, to, maxlen, int *lencopied) - MP SAFE */ ENTRY(copystr) pushl %esi diff --git a/sys/amd64/amd64/support.s b/sys/amd64/amd64/support.s index 1f350f5..34a5885 100644 --- a/sys/amd64/amd64/support.s +++ b/sys/amd64/amd64/support.s @@ -663,7 +663,9 @@ ENTRY(memcpy) * returns to *curpcb->onfault instead of the function. */ -/* copyout(from_kernel, to_user, len) */ +/* + * copyout(from_kernel, to_user, len) - MP SAFE (if not I386_CPU) + */ ENTRY(copyout) MEXITCOUNT jmp *_copyout_vector @@ -704,6 +706,10 @@ ENTRY(generic_copyout) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 3f @@ -849,9 +855,7 @@ ENTRY(i586_copyout) #endif /* I586_CPU && NNPX > 0 */ /* - * copyin(from_user, to_kernel, len) - * - * MPSAFE + * copyin(from_user, to_kernel, len) - MP SAFE */ ENTRY(copyin) MEXITCOUNT @@ -1133,9 +1137,9 @@ fastmove_tail_fault: #endif /* I586_CPU && NNPX > 0 */ /* - * fu{byte,sword,word} : fetch a byte (sword, word) from user memory + * fu{byte,sword,word} - MP SAFE * - * MP SAFE + * Fetch a byte (sword, word) from user memory */ ENTRY(fuword) movl _curpcb,%ecx @@ -1161,7 +1165,7 @@ ENTRY(fuswintr) ret /* - * MP SAFE + * fusword - MP SAFE */ ENTRY(fusword) movl _curpcb,%ecx @@ -1176,7 +1180,7 @@ ENTRY(fusword) ret /* - * MP SAFE + * fubyte - MP SAFE */ ENTRY(fubyte) movl _curpcb,%ecx @@ -1199,7 +1203,9 @@ fusufault: ret /* - * su{byte,sword,word}: write a byte (word, longword) to user memory + * su{byte,sword,word} - MP SAFE (if not I386_CPU) + * + * Write a byte (word, longword) to user memory */ ENTRY(suword) movl _curpcb,%ecx @@ -1208,6 +1214,10 @@ ENTRY(suword) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f /* we only have to set the right segment selector */ @@ -1250,6 +1260,9 @@ ENTRY(suword) movl %eax,PCB_ONFAULT(%ecx) ret +/* + * susword - MP SAFE (if not I386_CPU) + */ ENTRY(susword) movl _curpcb,%ecx movl $fusufault,PCB_ONFAULT(%ecx) @@ -1257,6 +1270,10 @@ ENTRY(susword) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f @@ -1299,6 +1316,9 @@ ENTRY(susword) movl %eax,PCB_ONFAULT(%ecx) ret +/* + * su[i]byte - MP SAFE (if not I386_CPU) + */ ALTENTRY(suibyte) ENTRY(subyte) movl _curpcb,%ecx @@ -1307,6 +1327,10 @@ ENTRY(subyte) #if defined(I386_CPU) +#if defined(SMP) +#error I386_CPU option not supported if SMP +#endif + #if defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU) cmpl $CPUCLASS_386,_cpu_class jne 2f @@ -1349,7 +1373,8 @@ ENTRY(subyte) ret /* - * copyinstr(from, to, maxlen, int *lencopied) + * copyinstr(from, to, maxlen, int *lencopied) - MP SAFE + * * copy a string from from to to, stop when a 0 character is reached. * return ENAMETOOLONG if string is longer than maxlen, and * EFAULT on protection violations. If lencopied is non-zero, @@ -1421,7 +1446,7 @@ cpystrflt_x: /* - * copystr(from, to, maxlen, int *lencopied) + * copystr(from, to, maxlen, int *lencopied) - MP SAFE */ ENTRY(copystr) pushl %esi |