summaryrefslogtreecommitdiffstats
path: root/sys/sys/sysent.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-11-23 07:09:35 +0000
committerkib <kib@FreeBSD.org>2015-11-23 07:09:35 +0000
commite0c4faece4ce54570904909a5ede55c60f35fe5f (patch)
tree86f12545db0b9e76efce54eb215d79ed458d2be6 /sys/sys/sysent.h
parentd427e0a9ba651eeab98ce6516fef233ea7041714 (diff)
downloadFreeBSD-src-e0c4faece4ce54570904909a5ede55c60f35fe5f.zip
FreeBSD-src-e0c4faece4ce54570904909a5ede55c60f35fe5f.tar.gz
Split kerne timekeep ABI structure vdso_sv_tk out of the struct
sysentvec. This allows the timekeep data to be shared between similar ABIs which cannot share sysentvec. Make the timekeep_push_vdso() tick callback to the timekeep structures instead of sysentvecs. If several sysentvec share the vdso_sv_tk structure, we would update the userspace data several times on each tick, without the change. Only allocate vdso_sv_tk in the exec_sysvec_init() sysinit when sysentvec is marked with the new SV_TIMEKEEP flag. This saves allocation and update of unneeded vdso_sv_tk for ABIs which do not provide userspace gettimeofday yet, which are PowerPCs arches right now. Make vdso_sv_tk allocator public, namely split out and export alloc_sv_tk() and alloc_sv_tk_compat32(). ABIs which share timekeep data now can allocate it manually and share as appropriate. Requested by: nwhitehorn Tested by: nwhitehorn, pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r--sys/sys/sysent.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index db92981..7e25ee4 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -127,13 +127,10 @@ struct sysentvec {
int (*sv_fetch_syscall_args)(struct thread *, struct
syscall_args *);
const char **sv_syscallnames;
+ vm_offset_t sv_timekeep_base;
vm_offset_t sv_shared_page_base;
vm_offset_t sv_shared_page_len;
vm_offset_t sv_sigcode_base;
- vm_offset_t sv_timekeep_base;
- int sv_timekeep_off;
- int sv_timekeep_curr;
- uint32_t sv_timekeep_gen;
void *sv_shared_page_obj;
void (*sv_schedtail)(struct thread *);
void (*sv_thread_detach)(struct thread *);
@@ -145,6 +142,7 @@ struct sysentvec {
#define SV_AOUT 0x008000 /* a.out executable. */
#define SV_SHP 0x010000 /* Shared page. */
#define SV_CAPSICUM 0x020000 /* Force cap_enter() on startup. */
+#define SV_TIMEKEEP 0x040000
#define SV_ABI_MASK 0xff
#define SV_PROC_FLAG(p, x) ((p)->p_sysent->sv_flags & (x))
@@ -274,6 +272,7 @@ int shared_page_alloc(int size, int align);
int shared_page_fill(int size, int align, const void *data);
void shared_page_write(int base, int size, const void *data);
void exec_sysvec_init(void *param);
+void exec_inittk(void);
#define INIT_SYSENTVEC(name, sv) \
SYSINIT(name, SI_SUB_EXEC, SI_ORDER_ANY, \
OpenPOWER on IntegriCloud