Author: dchagin Date: Sat Mar 25 15:47:29 2017 New Revision: 315957 URL: https://svnweb.freebsd.org/changeset/base/315957
Log: Implement Linux mincore() system call. This is necessary for the upcoming drm-next. Suggested by: hselasky@ MFC after: 1 month Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/compat/linux/linux_misc.c head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Sat Mar 25 15:06:28 2017 (r315956) +++ head/sys/amd64/linux/linux_dummy.c Sat Mar 25 15:47:29 2017 (r315957) @@ -59,7 +59,6 @@ UNIMPLEMENTED(tuxcall); UNIMPLEMENTED(uselib); UNIMPLEMENTED(vserver); -DUMMY(mincore); DUMMY(sendfile); DUMMY(syslog); DUMMY(setfsuid); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sat Mar 25 15:06:28 2017 (r315956) +++ head/sys/amd64/linux32/linux32_dummy.c Sat Mar 25 15:47:29 2017 (r315957) @@ -79,7 +79,6 @@ DUMMY(sendfile); DUMMY(setfsuid); DUMMY(setfsgid); DUMMY(pivot_root); -DUMMY(mincore); DUMMY(ptrace); DUMMY(lookup_dcookie); DUMMY(remap_file_pages); Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sat Mar 25 15:06:28 2017 (r315956) +++ head/sys/compat/linux/linux_misc.c Sat Mar 25 15:47:29 2017 (r315957) @@ -2534,3 +2534,17 @@ linux_getrandom(struct thread *td, struc return (read_random_uio(&uio, args->flags & LINUX_GRND_NONBLOCK)); } + +int +linux_mincore(struct thread *td, struct linux_mincore_args *args) +{ + struct mincore_args bsd_args; + + /* Needs to be page-aligned */ + if (args->start & PAGE_MASK) + return (EINVAL); + bsd_args.addr = PTRIN(args->start); + bsd_args.len = args->len; + bsd_args.vec = args->vec; + return (sys_mincore(td, &bsd_args)); +} Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sat Mar 25 15:06:28 2017 (r315956) +++ head/sys/i386/linux/linux_dummy.c Sat Mar 25 15:47:29 2017 (r315957) @@ -82,7 +82,6 @@ DUMMY(sendfile); /* different semantics DUMMY(setfsuid); DUMMY(setfsgid); DUMMY(pivot_root); -DUMMY(mincore); DUMMY(lookup_dcookie); DUMMY(remap_file_pages); DUMMY(mbind); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"