summaryrefslogtreecommitdiff
path: root/sys/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/linux/linux.h32
-rw-r--r--sys/i386/linux/linux_dummy.c2
-rw-r--r--sys/i386/linux/linux_locore.s12
-rw-r--r--sys/i386/linux/linux_machdep.c56
-rw-r--r--sys/i386/linux/linux_support.s12
-rw-r--r--sys/i386/linux/linux_sysvec.c14
-rw-r--r--sys/i386/linux/syscalls.master12
7 files changed, 69 insertions, 71 deletions
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index 2f2ba6e631863..fc3d83b723578 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -217,19 +217,19 @@ struct l_stat64 {
l_ulonglong st_ino;
};
-struct l_statfs64 {
- l_int f_type;
- l_int f_bsize;
- uint64_t f_blocks;
- uint64_t f_bfree;
- uint64_t f_bavail;
- uint64_t f_files;
- uint64_t f_ffree;
- l_fsid_t f_fsid;
- l_int f_namelen;
- l_int f_frsize;
- l_int f_flags;
- l_int f_spare[4];
+struct l_statfs64 {
+ l_int f_type;
+ l_int f_bsize;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ uint64_t f_bavail;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ l_fsid_t f_fsid;
+ l_int f_namelen;
+ l_int f_frsize;
+ l_int f_flags;
+ l_int f_spare[4];
};
#define LINUX_NSIG_WORDS 2
@@ -431,11 +431,11 @@ struct l_sigframe {
struct l_rt_sigframe {
l_int sf_sig;
- l_siginfo_t *sf_siginfo;
+ l_siginfo_t *sf_siginfo;
struct l_ucontext *sf_ucontext;
l_siginfo_t sf_si;
- struct l_ucontext sf_sc;
- l_handler_t sf_handler;
+ struct l_ucontext sf_sc;
+ l_handler_t sf_handler;
};
extern struct sysentvec linux_sysvec;
diff --git a/sys/i386/linux/linux_dummy.c b/sys/i386/linux/linux_dummy.c
index 769308a9e25cb..b58c74aace00b 100644
--- a/sys/i386/linux/linux_dummy.c
+++ b/sys/i386/linux/linux_dummy.c
@@ -8,7 +8,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
diff --git a/sys/i386/linux/linux_locore.s b/sys/i386/linux/linux_locore.s
index 6c4d19c893132..34d0434704e9e 100644
--- a/sys/i386/linux/linux_locore.s
+++ b/sys/i386/linux/linux_locore.s
@@ -65,12 +65,12 @@ NON_GPROF_ENTRY(linux_vsyscall)
.previous
#endif
-#define do_cfa_expr(offset) \
- .byte 0x0f; /* DW_CFA_def_cfa_expression */ \
- .uleb128 11f-10f; /* length */ \
-10: .byte 0x74; /* DW_OP_breg4 */ \
- .sleb128 offset; /* offset */ \
- .byte 0x06; /* DW_OP_deref */ \
+#define do_cfa_expr(offset) \
+ .byte 0x0f; /* DW_CFA_def_cfa_expression */ \
+ .uleb128 11f-10f; /* length */ \
+10: .byte 0x74; /* DW_OP_breg4 */ \
+ .sleb128 offset; /* offset */ \
+ .byte 0x06; /* DW_OP_deref */ \
11:
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index 5d94329240564..3939fcd31164c 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -282,7 +282,7 @@ linux_set_cloned_tls(struct thread *td, void *desc)
} else {
idx = info.entry_number;
- /*
+ /*
* looks like we're getting the idx we returned
* in the set_thread_area() syscall
*/
@@ -293,8 +293,8 @@ linux_set_cloned_tls(struct thread *td, void *desc)
/* this doesnt happen in practice */
if (idx == 6) {
- /* we might copy out the entry_number as 3 */
- info.entry_number = 3;
+ /* we might copy out the entry_number as 3 */
+ info.entry_number = 3;
error = copyout(&info, desc, sizeof(struct l_user_desc));
if (error)
printf(LMSG("copyout failed!"));
@@ -638,51 +638,51 @@ linux_set_thread_area(struct thread *td, struct linux_set_thread_area_args *args
#ifdef DEBUG
if (ldebug(set_thread_area))
- printf(ARGS(set_thread_area, "%i, %x, %x, %i, %i, %i, %i, %i, %i\n"),
+ printf(ARGS(set_thread_area, "%i, %x, %x, %i, %i, %i, %i, %i, %i\n"),
info.entry_number,
- info.base_addr,
- info.limit,
- info.seg_32bit,
+ info.base_addr,
+ info.limit,
+ info.seg_32bit,
info.contents,
- info.read_exec_only,
- info.limit_in_pages,
- info.seg_not_present,
- info.useable);
+ info.read_exec_only,
+ info.limit_in_pages,
+ info.seg_not_present,
+ info.useable);
#endif
idx = info.entry_number;
- /*
+ /*
* Semantics of linux version: every thread in the system has array of
- * 3 tls descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. This
+ * 3 tls descriptors. 1st is GLIBC TLS, 2nd is WINE, 3rd unknown. This
* syscall loads one of the selected tls decriptors with a value and
* also loads GDT descriptors 6, 7 and 8 with the content of the
* per-thread descriptors.
*
- * Semantics of fbsd version: I think we can ignore that linux has 3
+ * Semantics of fbsd version: I think we can ignore that linux has 3
* per-thread descriptors and use just the 1st one. The tls_array[]
* is used only in set/get-thread_area() syscalls and for loading the
* GDT descriptors. In fbsd we use just one GDT descriptor for TLS so
- * we will load just one.
+ * we will load just one.
*
* XXX: this doesn't work when a user space process tries to use more
* than 1 TLS segment. Comment in the linux sources says wine might do
* this.
*/
- /*
- * we support just GLIBC TLS now
+ /*
+ * we support just GLIBC TLS now
* we should let 3 proceed as well because we use this segment so
* if code does two subsequent calls it should succeed
*/
if (idx != 6 && idx != -1 && idx != 3)
return (EINVAL);
- /*
+ /*
* we have to copy out the GDT entry we use
* FreeBSD uses GDT entry #3 for storing %gs so load that
*
* XXX: what if a user space program doesn't check this value and tries
- * to use 6, 7 or 8?
+ * to use 6, 7 or 8?
*/
idx = info.entry_number = 3;
error = copyout(&info, args->desc, sizeof(struct l_user_desc));
@@ -700,7 +700,7 @@ linux_set_thread_area(struct thread *td, struct linux_set_thread_area_args *args
memcpy(&sd, &a, sizeof(a));
#ifdef DEBUG
if (ldebug(set_thread_area))
- printf("Segment created in set_thread_area: lobase: %x, hibase: %x, lolimit: %x, hilimit: %x, type: %i, dpl: %i, p: %i, xx: %i, def32: %i, gran: %i\n", sd.sd_lobase,
+ printf("Segment created in set_thread_area: lobase: %x, hibase: %x, lolimit: %x, hilimit: %x, type: %i, dpl: %i, p: %i, xx: %i, def32: %i, gran: %i\n", sd.sd_lobase,
sd.sd_hibase,
sd.sd_lolimit,
sd.sd_hilimit,
@@ -719,14 +719,14 @@ linux_set_thread_area(struct thread *td, struct linux_set_thread_area_args *args
PCPU_GET(fsgs_gdt)[1] = sd;
load_gs(GSEL(GUGS_SEL, SEL_UPL));
critical_exit();
-
+
return (0);
}
int
linux_get_thread_area(struct thread *td, struct linux_get_thread_area_args *args)
{
-
+
struct l_user_desc info;
int error;
int idx;
@@ -767,7 +767,7 @@ linux_get_thread_area(struct thread *td, struct linux_get_thread_area_args *args
error = copyout(&info, args->desc, sizeof(struct l_user_desc));
if (error)
- return (EFAULT);
+ return (EFAULT);
return (0);
}
@@ -777,7 +777,7 @@ int
linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
{
#ifdef P1003_1B_MQUEUE
- return sys_kmq_open(td, (struct kmq_open_args *) args);
+ return sys_kmq_open(td, (struct kmq_open_args *) args);
#else
return (ENOSYS);
#endif
@@ -787,7 +787,7 @@ int
linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
{
#ifdef P1003_1B_MQUEUE
- return sys_kmq_unlink(td, (struct kmq_unlink_args *) args);
+ return sys_kmq_unlink(td, (struct kmq_unlink_args *) args);
#else
return (ENOSYS);
#endif
@@ -797,7 +797,7 @@ int
linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
{
#ifdef P1003_1B_MQUEUE
- return sys_kmq_timedsend(td, (struct kmq_timedsend_args *) args);
+ return sys_kmq_timedsend(td, (struct kmq_timedsend_args *) args);
#else
return (ENOSYS);
#endif
@@ -807,7 +807,7 @@ int
linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
{
#ifdef P1003_1B_MQUEUE
- return sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
+ return sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
#else
return (ENOSYS);
#endif
@@ -827,7 +827,7 @@ int
linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
{
#ifdef P1003_1B_MQUEUE
- return sys_kmq_setattr(td, (struct kmq_setattr_args *) args);
+ return sys_kmq_setattr(td, (struct kmq_setattr_args *) args);
#else
return (ENOSYS);
#endif
diff --git a/sys/i386/linux/linux_support.s b/sys/i386/linux/linux_support.s
index afcfbda7ed6b5..e3a60e0be4f72 100644
--- a/sys/i386/linux/linux_support.s
+++ b/sys/i386/linux/linux_support.s
@@ -46,7 +46,7 @@ ENTRY(futex_xchgl)
movl 4(%esp),%eax
movl 8(%esp),%edx
cmpl $VM_MAXUSER_ADDRESS-4,%edx
- ja futex_fault
+ ja futex_fault
xchgl %eax,(%edx)
movl 12(%esp),%edx
movl %eax,(%edx)
@@ -60,7 +60,7 @@ ENTRY(futex_addl)
movl 4(%esp),%eax
movl 8(%esp),%edx
cmpl $VM_MAXUSER_ADDRESS-4,%edx
- ja futex_fault
+ ja futex_fault
#ifdef SMP
lock
#endif
@@ -76,7 +76,7 @@ ENTRY(futex_orl)
movl $futex_fault_decx,PCB_ONFAULT(%ecx)
movl 8(%esp),%edx
cmpl $VM_MAXUSER_ADDRESS-4,%edx
- ja futex_fault
+ ja futex_fault
movl (%edx),%eax
1: movl %eax,%ecx
orl 4(%esp),%ecx
@@ -85,7 +85,7 @@ ENTRY(futex_orl)
#endif
cmpxchgl %ecx,(%edx)
jnz 1b
-futex_tail:
+futex_tail:
movl 12(%esp),%edx
movl %eax,(%edx)
xorl %eax,%eax
@@ -98,7 +98,7 @@ ENTRY(futex_andl)
movl $futex_fault_decx,PCB_ONFAULT(%ecx)
movl 8(%esp),%edx
cmpl $VM_MAXUSER_ADDRESS-4,%edx
- ja futex_fault
+ ja futex_fault
movl (%edx),%eax
1: movl %eax,%ecx
andl 4(%esp),%ecx
@@ -114,7 +114,7 @@ ENTRY(futex_xorl)
movl $futex_fault_decx,PCB_ONFAULT(%ecx)
movl 8(%esp),%edx
cmpl $VM_MAXUSER_ADDRESS-4,%edx
- ja futex_fault
+ ja futex_fault
movl (%edx),%eax
1: movl %eax,%ecx
xorl 4(%esp),%ecx
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index fb6cf76cbea45..ba4f6f7255356 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -85,10 +85,8 @@ MODULE_VERSION(linux, 1);
#endif
#if defined(DEBUG)
-SYSCTL_PROC(_compat_linux, OID_AUTO, debug,
- CTLTYPE_STRING | CTLFLAG_RW,
- 0, 0, linux_sysctl_debug, "A",
- "Linux debugging control");
+SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0,
+ linux_sysctl_debug, "A", "Linux debugging control");
#endif
/*
@@ -436,7 +434,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
int oonstack;
sig = ksi->ksi_signo;
- code = ksi->ksi_code;
+ code = ksi->ksi_code;
PROC_LOCK_ASSERT(p, MA_OWNED);
psp = p->p_sigacts;
mtx_assert(&psp->ps_mtx, MA_OWNED);
@@ -873,8 +871,8 @@ linux_fetch_syscall_args(struct thread *td)
if (sa->code >= p->p_sysent->sv_size)
/* nosys */
sa->callp = &p->p_sysent->sv_table[p->p_sysent->sv_size - 1];
- else
- sa->callp = &p->p_sysent->sv_table[sa->code];
+ else
+ sa->callp = &p->p_sysent->sv_table[sa->code];
sa->narg = sa->callp->sy_narg;
td->td_retval[0] = 0;
@@ -1035,7 +1033,7 @@ static void
linux_vdso_install(void *param)
{
- linux_szsigcode = (&_binary_linux_locore_o_end -
+ linux_szsigcode = (&_binary_linux_locore_o_end -
&_binary_linux_locore_o_start);
if (linux_szsigcode > elf_linux_sysvec.sv_shared_page_len)
diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master
index 93776fee25d4f..0c1483c192e22 100644
--- a/sys/i386/linux/syscalls.master
+++ b/sys/i386/linux/syscalls.master
@@ -22,7 +22,7 @@
; types:
; STD always included
; UNIMPL not implemented, placeholder only
-; NOPROTO same as STD except do not create structure or
+; NOPROTO same as STD except do not create structure or
; function prototype in sys/sysproto.h. Does add a
; definition to syscall.h besides adding a sysent.
@@ -541,8 +541,8 @@
; linux 2.6.19:
318 AUE_NULL STD { int linux_getcpu(void); }
319 AUE_NULL STD { int linux_epoll_pwait(l_int epfd, struct epoll_event *events, \
- l_int maxevents, l_int timeout, l_sigset_t *mask, \
- l_size_t sigsetsize); }
+ l_int maxevents, l_int timeout, l_sigset_t *mask, \
+ l_size_t sigsetsize); }
; linux 2.6.22:
320 AUE_FUTIMESAT STD { int linux_utimensat(l_int dfd, const char *pathname, \
const struct l_timespec *times, l_int flags); }
@@ -567,10 +567,10 @@
331 AUE_NULL STD { int linux_pipe2(l_int *pipefds, l_int flags); }
332 AUE_NULL STD { int linux_inotify_init1(void); }
; linux 2.6.30:
-333 AUE_NULL STD { int linux_preadv(l_ulong fd, \
+333 AUE_NULL STD { int linux_preadv(l_ulong fd, \
struct iovec *vec, l_ulong vlen, \
l_ulong pos_l, l_ulong pos_h); }
-334 AUE_NULL STD { int linux_pwritev(l_ulong fd, \
+334 AUE_NULL STD { int linux_pwritev(l_ulong fd, \
struct iovec *vec, l_ulong vlen, \
l_ulong pos_l, l_ulong pos_h); }
; linux 2.6.31:
@@ -620,7 +620,7 @@
void *attr, l_uint size, l_uint flags); }
; linux 3.15:
353 AUE_NULL STD { int linux_renameat2(l_int oldfd, \
- const char *oldname, l_int newfd, \
+ const char *oldname, l_int newfd, \
const char *newname, unsigned int flags); }
; linux 3.17:
354 AUE_NULL STD { int linux_seccomp(l_uint op, l_uint flags, \