aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_proto.h23
-rw-r--r--sys/compat/freebsd32/freebsd32_syscall.h6
-rw-r--r--sys/compat/freebsd32/freebsd32_syscalls.c6
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c6
-rw-r--r--sys/compat/freebsd32/freebsd32_systrace_args.c152
5 files changed, 126 insertions, 67 deletions
diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h
index 9710e5735252..946f034fa465 100644
--- a/sys/compat/freebsd32/freebsd32_proto.h
+++ b/sys/compat/freebsd32/freebsd32_proto.h
@@ -11,6 +11,7 @@
#include <sys/signal.h>
#include <sys/acl.h>
#include <sys/cpuset.h>
+#include <sys/domainset.h>
#include <sys/_ffcounter.h>
#include <sys/_semaphore.h>
#include <sys/ucontext.h>
@@ -693,6 +694,24 @@ struct freebsd32_kevent_args {
char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)];
char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)];
};
+struct freebsd32_cpuset_getdomain_args {
+ char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
+ char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
+ char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)];
+ char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)];
+ char domainsetsize_l_[PADL_(size_t)]; size_t domainsetsize; char domainsetsize_r_[PADR_(size_t)];
+ char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)];
+ char policy_l_[PADL_(int *)]; int * policy; char policy_r_[PADR_(int *)];
+};
+struct freebsd32_cpuset_setdomain_args {
+ char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)];
+ char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)];
+ char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)];
+ char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)];
+ char domainsetsize_l_[PADL_(size_t)]; size_t domainsetsize; char domainsetsize_r_[PADR_(size_t)];
+ char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)];
+ char policy_l_[PADL_(int)]; int policy; char policy_r_[PADR_(int)];
+};
#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__))
#define PAD64_REQUIRED
#endif
@@ -823,6 +842,8 @@ int freebsd32_fstatat(struct thread *, struct freebsd32_fstatat_args *);
int freebsd32_fhstat(struct thread *, struct freebsd32_fhstat_args *);
int freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *);
int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *);
+int freebsd32_cpuset_getdomain(struct thread *, struct freebsd32_cpuset_getdomain_args *);
+int freebsd32_cpuset_setdomain(struct thread *, struct freebsd32_cpuset_setdomain_args *);
#ifdef COMPAT_43
@@ -1370,6 +1391,8 @@ int freebsd11_freebsd32_mknodat(struct thread *, struct freebsd11_freebsd32_mkno
#define FREEBSD32_SYS_AUE_freebsd32_fhstat AUE_FHSTAT
#define FREEBSD32_SYS_AUE_freebsd32_getdirentries AUE_GETDIRENTRIES
#define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_KEVENT
+#define FREEBSD32_SYS_AUE_freebsd32_cpuset_getdomain AUE_NULL
+#define FREEBSD32_SYS_AUE_freebsd32_cpuset_setdomain AUE_NULL
#undef PAD_
#undef PADL_
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index 4818ada6051d..cbc139a803f4 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -455,8 +455,6 @@
#define FREEBSD32_SYS_freebsd32_ppoll 545
#define FREEBSD32_SYS_freebsd32_futimens 546
#define FREEBSD32_SYS_freebsd32_utimensat 547
-#define FREEBSD32_SYS_numa_getaffinity 548
-#define FREEBSD32_SYS_numa_setaffinity 549
#define FREEBSD32_SYS_fdatasync 550
#define FREEBSD32_SYS_freebsd32_fstat 551
#define FREEBSD32_SYS_freebsd32_fstatat 552
@@ -468,4 +466,6 @@
#define FREEBSD32_SYS_fhstatfs 558
#define FREEBSD32_SYS_mknodat 559
#define FREEBSD32_SYS_freebsd32_kevent 560
-#define FREEBSD32_SYS_MAXSYSCALL 561
+#define FREEBSD32_SYS_freebsd32_cpuset_getdomain 561
+#define FREEBSD32_SYS_freebsd32_cpuset_setdomain 562
+#define FREEBSD32_SYS_MAXSYSCALL 563
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c
index 6588321af1a5..04d5af8a918a 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -580,8 +580,8 @@ const char *freebsd32_syscallnames[] = {
"freebsd32_ppoll", /* 545 = freebsd32_ppoll */
"freebsd32_futimens", /* 546 = freebsd32_futimens */
"freebsd32_utimensat", /* 547 = freebsd32_utimensat */
- "numa_getaffinity", /* 548 = numa_getaffinity */
- "numa_setaffinity", /* 549 = numa_setaffinity */
+ "#548", /* 548 = numa_getaffinity */
+ "#549", /* 549 = numa_setaffinity */
"fdatasync", /* 550 = fdatasync */
"freebsd32_fstat", /* 551 = freebsd32_fstat */
"freebsd32_fstatat", /* 552 = freebsd32_fstatat */
@@ -593,4 +593,6 @@ const char *freebsd32_syscallnames[] = {
"fhstatfs", /* 558 = fhstatfs */
"mknodat", /* 559 = mknodat */
"freebsd32_kevent", /* 560 = freebsd32_kevent */
+ "freebsd32_cpuset_getdomain", /* 561 = freebsd32_cpuset_getdomain */
+ "freebsd32_cpuset_setdomain", /* 562 = freebsd32_cpuset_setdomain */
};
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index 4891616428f3..a97ca9df8a23 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -629,8 +629,8 @@ struct sysent freebsd32_sysent[] = {
{ AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = freebsd32_ppoll */
{ AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 546 = freebsd32_futimens */
{ AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */
- { AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 548 = numa_getaffinity */
- { AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 549 = numa_setaffinity */
+ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 548 = numa_getaffinity */
+ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 549 = numa_setaffinity */
{ AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 550 = fdatasync */
{ AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 551 = freebsd32_fstat */
{ AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 552 = freebsd32_fstatat */
@@ -642,4 +642,6 @@ struct sysent freebsd32_sysent[] = {
{ AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 558 = fhstatfs */
{ AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 559 = mknodat */
{ AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_KEVENT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 560 = freebsd32_kevent */
+ { AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */
+ { AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */
};
diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c
index 2303788d6c04..d66d621d8f71 100644
--- a/sys/compat/freebsd32/freebsd32_systrace_args.c
+++ b/sys/compat/freebsd32/freebsd32_systrace_args.c
@@ -3150,24 +3150,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 4;
break;
}
- /* numa_getaffinity */
- case 548: {
- struct numa_getaffinity_args *p = params;
- iarg[0] = p->which; /* cpuwhich_t */
- iarg[1] = p->id; /* id_t */
- uarg[2] = (intptr_t) p->policy; /* struct vm_domain_policy * */
- *n_args = 3;
- break;
- }
- /* numa_setaffinity */
- case 549: {
- struct numa_setaffinity_args *p = params;
- iarg[0] = p->which; /* cpuwhich_t */
- iarg[1] = p->id; /* id_t */
- uarg[2] = (intptr_t) p->policy; /* const struct vm_domain_policy * */
- *n_args = 3;
- break;
- }
/* fdatasync */
case 550: {
struct fdatasync_args *p = params;
@@ -3266,6 +3248,32 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 6;
break;
}
+ /* freebsd32_cpuset_getdomain */
+ case 561: {
+ struct freebsd32_cpuset_getdomain_args *p = params;
+ iarg[0] = p->level; /* cpulevel_t */
+ iarg[1] = p->which; /* cpuwhich_t */
+ uarg[2] = p->id1; /* uint32_t */
+ uarg[3] = p->id2; /* uint32_t */
+ uarg[4] = p->domainsetsize; /* size_t */
+ uarg[5] = (intptr_t) p->mask; /* domainset_t * */
+ uarg[6] = (intptr_t) p->policy; /* int * */
+ *n_args = 7;
+ break;
+ }
+ /* freebsd32_cpuset_setdomain */
+ case 562: {
+ struct freebsd32_cpuset_setdomain_args *p = params;
+ iarg[0] = p->level; /* cpulevel_t */
+ iarg[1] = p->which; /* cpuwhich_t */
+ uarg[2] = p->id1; /* uint32_t */
+ uarg[3] = p->id2; /* uint32_t */
+ uarg[4] = p->domainsetsize; /* size_t */
+ uarg[5] = (intptr_t) p->mask; /* domainset_t * */
+ iarg[6] = p->policy; /* int */
+ *n_args = 7;
+ break;
+ }
default:
*n_args = 0;
break;
@@ -8563,38 +8571,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* numa_getaffinity */
- case 548:
- switch(ndx) {
- case 0:
- p = "cpuwhich_t";
- break;
- case 1:
- p = "id_t";
- break;
- case 2:
- p = "userland struct vm_domain_policy *";
- break;
- default:
- break;
- };
- break;
- /* numa_setaffinity */
- case 549:
- switch(ndx) {
- case 0:
- p = "cpuwhich_t";
- break;
- case 1:
- p = "id_t";
- break;
- case 2:
- p = "userland const struct vm_domain_policy *";
- break;
- default:
- break;
- };
- break;
/* fdatasync */
case 550:
switch(ndx) {
@@ -8768,6 +8744,62 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
+ /* freebsd32_cpuset_getdomain */
+ case 561:
+ switch(ndx) {
+ case 0:
+ p = "cpulevel_t";
+ break;
+ case 1:
+ p = "cpuwhich_t";
+ break;
+ case 2:
+ p = "uint32_t";
+ break;
+ case 3:
+ p = "uint32_t";
+ break;
+ case 4:
+ p = "size_t";
+ break;
+ case 5:
+ p = "userland domainset_t *";
+ break;
+ case 6:
+ p = "userland int *";
+ break;
+ default:
+ break;
+ };
+ break;
+ /* freebsd32_cpuset_setdomain */
+ case 562:
+ switch(ndx) {
+ case 0:
+ p = "cpulevel_t";
+ break;
+ case 1:
+ p = "cpuwhich_t";
+ break;
+ case 2:
+ p = "uint32_t";
+ break;
+ case 3:
+ p = "uint32_t";
+ break;
+ case 4:
+ p = "size_t";
+ break;
+ case 5:
+ p = "userland domainset_t *";
+ break;
+ case 6:
+ p = "int";
+ break;
+ default:
+ break;
+ };
+ break;
default:
break;
};
@@ -10554,16 +10586,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* numa_getaffinity */
- case 548:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
- /* numa_setaffinity */
- case 549:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
/* fdatasync */
case 550:
if (ndx == 0 || ndx == 1)
@@ -10619,6 +10641,16 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
+ /* freebsd32_cpuset_getdomain */
+ case 561:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
+ /* freebsd32_cpuset_setdomain */
+ case 562:
+ if (ndx == 0 || ndx == 1)
+ p = "int";
+ break;
default:
break;
};