aboutsummaryrefslogtreecommitdiff
path: root/sys/x86/linux
Commit message (Collapse)AuthorAgeFilesLines
* linux: Add inotify supportMark Johnston2025-07-041-2/+0
| | | | | | | | | | | Implement the Linux inotify system calls using the native implementation in vfs_inotify.c. PR: 240874 Reviewed by: brooks MFC after: 3 months Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50761
* linux(4): Remove sys/cdefs.h inclusion under x86/linux due to 685dc743Dmitry Chagin2023-08-183-3/+0
|
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-163-6/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* linux(4): Add elf_hwcap2 to x86Dmitry Chagin2023-07-282-1/+23
| | | | | | | | | On x86 Linux via AT_HWCAP2 the user controlled (by tunables) processor capabilities are exposed. Reviewed by: Differential Revision: https://reviews.freebsd.org/D41165 MFC after: 2 weeks
* linux(4): Preserve fpu xsave state across signal delivery on amd64Dmitry Chagin2023-06-081-1/+19
| | | | | | | PR: 270247 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40444 MFC after: 2 weeks
* linux(4): In preparation for xsave refactor fxsave code on amd64Dmitry Chagin2023-06-081-2/+7
| | | | | | | | | Due to fxsave area is os independent reimplement fxsave handmade code using copying of a whole area. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40443 MFC after: 2 weeks
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-125-5/+5
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* linux(4): Cleanup includes under x86/linuxDmitry Chagin2023-02-141-2/+1
| | | | | | | Cleanup unneeded includes, sort the rest according to style(9). No functional changes. MFC after: 2 weeks
* linux(4): Get rid of the opt_compat.h include.Dmitry Chagin2023-02-121-2/+0
| | | | | | | Since e013e369 COMPAT_LINUX, COMPAT_LINUX32 build options are removed, so include of opt_compat.h is no more needed. MFC after: 2 weeks
* linux(4): Preserve fpu fxsave state across signal delivery on amd64.Dmitry Chagin2023-02-021-3/+4
| | | | | | | PR: 240768 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38302 MFC after: 1 week
* Adjust linux_vdso_{cpu,tsc}_selector_idx() definitions to avoid clang 15 ↵Dimitry Andric2022-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | warnings With clang 15, the following -Werror warnings are produced: sys/x86/linux/linux_vdso_selector_x86.c:44:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] linux_vdso_tsc_selector_idx() ^ void sys/x86/linux/linux_vdso_selector_x86.c:62:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] linux_vdso_cpu_selector_idx() ^ void This is because linux_vdso_tsc_selector_idx() and linux_vdso_cpu_selector_idx are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days
* linux(4): Use saved cpu feature bitsDmitry Chagin2022-07-041-11/+0
| | | | MFC after: 3 days
* linux(4): Properly restore the thread signal mask after signal delivery on i386Dmitry Chagin2022-05-301-1/+1
| | | | | | | | | Replace sigframe sf_extramask by native sigset_t and use it to store/restore the thread signal mask without conversion to/from Linux signal mask. Pointy hat to: dchagin MFC after: 2 weeks
* linux(4): Deduplicate bsd_to_linux_trapcode()Dmitry Chagin2022-05-232-0/+44
| | | | | | | As bsd_to_linux_trapcode() is common for x86 Linuxulators, move it under x86/linux. MFC after: 2 weeks
* linux(4): Deduplicate translate_traps()Dmitry Chagin2022-05-232-0/+58
| | | | | | | As translate_traps() is common for x86 Linuxulators, move it under x86/linux. MFC after: 2 weeks
* linux(4): Better naming for ucontext field of struct rt_sigframeDmitry Chagin2022-05-151-2/+2
| | | | | | | To reduce sendsig code difference and to avoid confusing me, rename sf_sc to sf_uc to match the content. MFC after: 2 weeks
* linux(4): Move sigframe definitions to separate headersDmitry Chagin2022-05-151-0/+196
| | | | | | | | The signal trampoine-related definitions are used only in the MD part of code, wherefore moved from everywhere used linux.h to separate MD headers. MFC after: 2 weeks
* linux(4): Implement vdso getcpu for x86.Dmitry Chagin2022-05-083-1/+98
| | | | | | This is modeled after f2395455 (by kib@). MFC after: 2 weeks
* linux(4): Refactor vdso_gettc_x86 includes.Dmitry Chagin2022-05-081-13/+0
| | | | | | | Factor out includes from common vdso_gettc_x86 file to the corresponding MD files. MFC after: 2 weeks
* Drop "All rights reserved" from my copyright statements.Dmitry Chagin2021-07-201-2/+1
| | | | | | | | Add email and fixup years while here. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D30912 MFC after: 2 weeks
* linux(4); Almost complete the vDSO.Dmitry Chagin2021-07-203-0/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vDSO (virtual dynamic shared object) is a small shared library that the kernel maps R/O into the address space of all Linux processes on image activation. The vDSO is a fully formed ELF image, shared by all processes with the same ABI, has no process private data. The primary purpose of the vDSO: - non-executable stack, signal trampolines not copied to the stack; - signal trampolines unwind, mandatory for the NPTL; - to avoid contex-switch overhead frequently used system calls can be implemented in the vDSO: for now gettimeofday, clock_gettime. The first two have been implemented, so add the implementation of system calls. System calls implemenation based on a native timekeeping code with some limitations: - ifunc can't be used, as vDSO r/o mapped to the process VA and rtld can't relocate symbols; - reading HPET memory is not implemented for now (TODO). In case on any error vDSO system calls fallback to the kernel system calls. For unimplemented vDSO system calls added prototypes which call corresponding kernel system call. Tested by: trasz (arm64) Differential revision: https://reviews.freebsd.org/D30900 MFC after: 2 weeks
* linux: deduplicate DUMMY() entriesEdward Tomasz Napierala2021-05-291-10/+0
| | | | | | | | No functional changes. Reviewed By: emaste Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30524
* linux(4): Deduplicate unimpl/dummy syscall handlersConrad Meyer2020-11-051-0/+69
No functional change. Reviewed by: emaste, trasz Differential Revision: https://reviews.freebsd.org/D27099 Notes: svn path=/head/; revision=367395