aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/linux
Commit message (Collapse)AuthorAgeFilesLines
* After r193232 rt_tables in vnet.h are no longer indirectly dependent onBjoern A. Zeeb2009-06-081-1/+1
| | | | | | | | | | | | the ROUTETABLES kernel option thus there is no need to include opt_route.h anymore in all consumers of vnet.h and no longer depend on it for module builds. Remove the hidden include in flowtable.h as well and leave the two explicit #includes in ip_input.c and ip_output.c. Notes: svn path=/head/; revision=193744
* Remove opt_mac.h generation for various kernel modules that no longerRobert Watson2009-06-061-1/+1
| | | | | | | | | require it. Submitted by: pjd Notes: svn path=/head/; revision=193588
* Move opt_apic.h closer to the "XXX: for assym.s" comment.Dag-Erling Smørgrav2009-05-261-1/+4
| | | | | | | | Suggested by: jhb MFC after: 1 week Notes: svn path=/head/; revision=192855
* opt_apic.h is i386-only.Dag-Erling Smørgrav2009-05-261-2/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=192852
* Add preliminary KTR(9) support to the linux emulation layer.Dmitry Chagin2009-05-071-0/+3
| | | | | | | | Approved by: kib (mentor) MFC after: 1 month Notes: svn path=/head/; revision=191877
* Fix a few problems related to building modules in /sys/modules (notNick Hibma2009-02-121-1/+1
| | | | | | | | | | | | | checked whether this applies to builds in /sys/*/compile/* as well): - Create empty opt_*.h files were missing - Hook up svr4 to the build. It compiles fine here, so no reason to disconnect it in the Makefile. were missing - Hook up svr4 to the build. It compiles fine here, so no reason to disconnect it in the Makefile. Notes: svn path=/head/; revision=188516
* Rather than using hidden includes (with cicular dependencies),Bjoern A. Zeeb2008-12-021-1/+1
| | | | | | | | | | | | | | directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files. For now, this leaves us with very few modules including vnet.h and thus needing to depend on opt_route.h. Reviewed by: brooks, gnn, des, zec, imp Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=185571
* Per email to arch@ a little while ago (that was greeted with silence),Warner Losh2008-09-011-1/+1
| | | | | | | | prefer the more common > ${.TARGET} over > opt_foo.h in modules makefiles. Notes: svn path=/head/; revision=182668
* Fix the dependency for the linux_support.s, explicitely add linux_assym.h.Konstantin Belousov2007-05-231-1/+1
| | | | | | | | | Reported by: rwatson In collaboration with: rdivacky Sponsored by: Google SoC 2007 Notes: svn path=/head/; revision=169903
* Move futex support code from <arch>/support.s into linux compat directory.Konstantin Belousov2007-05-231-2/+10
| | | | | | | | | | | | | Implement all futex atomic operations in assembler to not depend on the fuword() that does not allow to distinguish between -1 and failure return. Correctly return 0 from atomic operations on success. In collaboration with: rdivacky Tested by: Scot Hetzel <swhetzel gmail com>, Milos Vyletel <mvyletel mzm cz> Sponsored by: Google SoC 2007 Notes: svn path=/head/; revision=169895
* Backout the linux aio stuff. Several problems where identified and theAlexander Leidinger2006-10-291-1/+1
| | | | | | | | | | | | | | | | | | dynamic nature (if no native aio code is available, the linux part returns ENOSYS because of missing requisites) should be solved differently than it is. All this will be done in P4. Not included in this commit is a backout of the changes to the native aio code (removing static in some places). Those changes (and some more) will also be needed when the reworked linux aio stuff will reenter the tree. Requested by: rwatson Discussed with: rwatson Notes: svn path=/head/; revision=163760
* MFP4 (with some minor changes):Alexander Leidinger2006-10-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the linux_io_* syscalls (AIO). They are only enabled if the native AIO code is available (either compiled in to the kernel or as a module) at the time the functions are used. If the AIO stuff is not available there will be a ENOSYS. From the submitter: ---snip--- DESIGN NOTES: 1. Linux permits a process to own multiple AIO queues (distinguished by "context"), but FreeBSD creates only one single AIO queue per process. My code maintains a request queue (STAILQ of queue(3)) per "context", and throws all AIO requests of all contexts owned by a process into the single FreeBSD per-process AIO queue. When the process calls io_destroy(2), io_getevents(2), io_submit(2) and io_cancel(2), my code can pick out requests owned by the specified context from the single FreeBSD per-process AIO queue according to the per-context request queues maintained by my code. 2. The request queue maintained by my code stores contrast information between Linux IO control blocks (struct linux_iocb) and FreeBSD IO control blocks (struct aiocb). FreeBSD IO control block actually exists in userland memory space, required by FreeBSD native aio_XXXXXX(2). 3. It is quite troubling that the function io_getevents() of libaio-0.3.105 needs to use Linux-specific "struct aio_ring", which is a partial mirror of context in user space. I would rather take the address of context in kernel as the context ID, but the io_getevents() of libaio forces me to take the address of the "ring" in user space as the context ID. To my surprise, one comment line in the file "io_getevents.c" of libaio-0.3.105 reads: Ben will hate me for this REFERENCE: 1. Linux kernel source code: http://www.kernel.org/pub/linux/kernel/v2.6/ (include/linux/aio_abi.h, fs/aio.c) 2. Linux manual pages: http://www.kernel.org/pub/linux/docs/manpages/ (io_setup(2), io_destroy(2), io_getevents(2), io_submit(2), io_cancel(2)) 3. Linux Scalability Effort: http://lse.sourceforge.net/io/aio.html The design notes: http://lse.sourceforge.net/io/aionotes.txt 4. The package libaio, both source and binary: http://rpmfind.net/linux/rpm2html/search.php?query=libaio Simple transparent interface to Linux AIO system calls. 5. Libaio-oracle: http://oss.oracle.com/projects/libaio-oracle/ POSIX AIO implementation based on Linux AIO system calls (depending on libaio). ---snip--- Submitted by: Li, Xiao <intron@intron.ac> Notes: svn path=/head/; revision=163379
* - Add the new files to the linux module.Alexander Leidinger2006-08-151-13/+18
| | | | | | | | | | | | - Prepare the modules for build on amd64, but don't build them there as part of the kernel build yet. The code for the missing symbols on amd64 isn't committed and it may be solved differently. Sponsored by: Google SoC 2006 Submitted by: rdivacky Notes: svn path=/head/; revision=161312
* Enhance the Linux emulation layer to make MegaRAID SAS managements tool happy.Doug Ambrisko2006-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add back in a scheme to emulate old type major/minor numbers via hooks into stat, linprocfs to return major/minors that Linux app's expect. Currently only /dev/null is always registered. Drivers can register via the Linux type shim similar to the ioctl shim but by using linux_device_register_handler/linux_device_unregister_handler functions. The structure is: struct linux_device_handler { char *bsd_driver_name; char *linux_driver_name; char *bsd_device_name; char *linux_device_name; int linux_major; int linux_minor; int linux_char_device; }; Linprocfs uses this to display the major number of the driver. The soon to be available linsysfs will use it to fill in the driver name. Linux_stat uses it to translate the major/minor into Linux type values. Note major numbers are dynamically assigned via passing in a -1 for the major number so we don't need to keep track of them. This is somewhat needed due to us switching to our devfs. MegaCli will not run until I add in the linsysfs and mfi Linux compat changes. Sponsored by: IronPort Systems Notes: svn path=/head/; revision=158311
* Get rid of the need of COMPAT_43 in the linuxolator.Alexander Leidinger2006-03-181-4/+1
| | | | | | | | Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz> Obtained from: DragonFly (some parts) Notes: svn path=/head/; revision=156842
* opt_vmpage.h is no longer needed here because it is not included byAlan Cox2006-01-261-1/+1
| | | | | | | vm_page.h. Notes: svn path=/head/; revision=154865
* Let modules use the kernel's opt_*.h files if built along withYaroslav Tykhiy2005-10-141-0/+2
| | | | | | | | | | | | | | | | | the kernel by wrapping all targets for fake opt_*.h files in .if defined(KERNBUILDDIR). Thus, such fake files won't be created at all if modules are built with the kernel. Some modules undergo cleanup like removing unused or unneeded options or .h files, without which they wouldn't build this way or the other. Reviewed by: ru Tested by: no binary changes in modules built alone Tested on: i386 sparc64 amd64 Notes: svn path=/head/; revision=151350
* Move MAINTAINER documentation to MAINTAINERSWarner Losh2005-06-041-2/+0
| | | | Notes: svn path=/head/; revision=146961
* o Remove @- from the ln and change it to a -sf. This was bogus, andWarner Losh2003-11-191-1/+1
| | | | | | | | | | | | | | | regocnized as such at the time. Now that the other bogons in the tree have been fixed, we can remove this ugly kludge. o Remove stale/bogus opt_foo.h files. These are left over from by-gone resources. And they point to the need, yet again, to improve the build system so meta information is only in one place. Submitted by: ru Reviewed by: bde Approved by: re@ (jhb) Notes: svn path=/head/; revision=122894
* Add IPv6 support for Linuxlator.Hajimu UMEMOTO2003-02-031-2/+5
| | | | | | | | Reviewed by: dwmalone MFC after: 10 days Notes: svn path=/head/; revision=110295
* opt_kstack_pages.h is not needed anymore. It would have been a Bad ThingPeter Wemm2002-09-081-2/+1
| | | | | | | if it had been different to the running kernel. Notes: svn path=/head/; revision=103089
* Unbreak the modules build:Thomas Moestl2002-09-071-1/+2
| | | | | | | | | | | | - add dependencies on opt_cpu.h and opt_kstack_pages.h to the linux module Makefile in the i386 case. The latter is needed by an i386-only file, the former by the i386 implementation of linux_sysvec.c (opt_cpu.h is used for architecture-dependent options, so I added it only for i386, although this file is also generated for the alpha). - add a dependency on opt_kstack_pages.h to the pecoff module Makefile. Notes: svn path=/head/; revision=103075
* Introduce support for Mandatory Access Control and extensibleRobert Watson2002-08-011-1/+2
| | | | | | | | | | | | | | | kernel access control. Invoke appropriate MAC entry points for a number of VFS-related operations in the Linux ABI module. In particular, handle uselib in a manner similar to open() (more work is probably needed here), as well as handle statfs(), and linux readdir()-like calls. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=101189
* Hook up the new linux_ptrace implementation.Marcel Moolenaar2002-05-191-1/+1
| | | | | | | | PR: 33299 Submitted by: Alexander N. Kabaev <ak03@gte.com> Notes: svn path=/head/; revision=96890
* (Belatedly) add the required EXPORT_SYMS. I'm not sure the list is complete,Dag-Erling Smørgrav2002-02-221-0/+8
| | | | | | | | but at least linprocfs works (I haven't had the opportunity to test other stuff that depends on the linux module, like aac or tdfx) Notes: svn path=/head/; revision=91072
* genassym depends on the presence of common variables, disable the useMike Smith2002-01-101-1/+1
| | | | | | | of -fno-common in this case. Notes: svn path=/head/; revision=89181
* Pass maintainership over to emulation@FreeBSD.org. It has been fun,Marcel Moolenaar2001-11-181-1/+1
| | | | | | | | | | | but time and other interests is making it hard. Open the door for new blood and fresh tactics now that the Linuxulator has had its facelift. Thanks to all who contributed during my tour of duty! Notes: svn path=/head/; revision=86538
* Round of cleanups and enhancements. These include (in random order):Marcel Moolenaar2001-09-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse. Notes: svn path=/head/; revision=83221
* Fix linux_getcwd() so that if the cwd isn't cached (__getcwd() fails),Andrew Gallatin2001-08-291-2/+2
| | | | | | | | | | | | | the cwd is looked up inside the kernel. The native getcwd() in libc handles this in userland if __getcwd() fails. Obtained from: NetBSD via OpenBSD Tested by: Chris Casey <chriss@phys.ksu.edu>, Markus Holmberg <markush@acc.umu.se> Reviewed by: Darrell Anderson <anderson@cs.duke.edu> PR: kern/24315 Notes: svn path=/head/; revision=82518
* Zap obsolete (died with LKM) EXPORT_SYMS variablePeter Wemm2001-02-041-1/+0
| | | | Notes: svn path=/head/; revision=71989
* It is unlikely that we'll be supporting old-style ZMAGIC linux a.outPeter Wemm2001-01-071-1/+1
| | | | | | | | | binaries on anything but i386.. (ia64, sparc64, etc) Invert the .if so that it is inclusive of i386 platforms rather than excluding just the alpha. Notes: svn path=/head/; revision=70739
* Use a consistent style and one much closer to the rest of /usr/srcDavid E. O'Brien2001-01-061-10/+10
| | | | Notes: svn path=/head/; revision=70711
* Don't auto-generate the syscalls.Marcel Moolenaar2000-12-031-16/+2
| | | | Notes: svn path=/head/; revision=69539
* Fix dependency for auto-generated files. This commit isMarcel Moolenaar2000-12-021-1/+1
| | | | | | | | | | | for archiving purposes only; auto-generation is going to be reverted. requested by: obrien submitted: gallatin Notes: svn path=/head/; revision=69533
* Fix breakage for parallel builds.Marcel Moolenaar2000-11-051-0/+1
| | | | Notes: svn path=/head/; revision=68341
* Retire linux(8). Using shell scripts to load kernel loadable modules isSheldon Hearn2000-11-023-74/+0
| | | | | | | | | | | | | | | | | out of fashion. This particular case, unlike joy(8) and friends which are just plain silly, did more than just load a kernel loadable module. However, /etc/rc and the linux_base port were adjusted a while back to cope with the absence of this script. The only outstanding reason to hang on to it would have been for the linux(8) manual page, which clued folks into the existence of the Linuxulator. A new linux(4) was introduced a while back. It does a much better job. This script just isn't useful any more. Notes: svn path=/head/; revision=68243
* Support for the linux ipc syscalls on the alpha, where each one hasAndrew Gallatin2000-11-011-2/+2
| | | | | | | | its own syscall rather than going through a demux function like linux_ipc() on i386 Notes: svn path=/head/; revision=68214
* Allow the building of the syscall bits at compile time.David E. O'Brien2000-11-011-1/+14
| | | | Notes: svn path=/head/; revision=68162
* Don't install manpages.David E. O'Brien2000-10-081-3/+0
| | | | | | | They are being moved elsewhere, and they are causing problems being here. Notes: svn path=/head/; revision=66826
* Only install secondary components if the destination directory exists.David E. O'Brien2000-10-041-0/+4
| | | | | | | This may be a WIP, but `make release' needs it sooner than later. Notes: svn path=/head/; revision=66620
* Since AlphaLinux is the weirdest Linux of all, probably best to do theDavid E. O'Brien2000-09-061-1/+1
| | | | | | | logic this way. Notes: svn path=/head/; revision=65548
* Two sys/compat/linux sources aren't applicable on the Alpha at this time.David E. O'Brien2000-09-061-2/+6
| | | | Notes: svn path=/head/; revision=65547
* Connect the new sources in /sys/compat/linux and the new fileMarcel Moolenaar2000-08-221-4/+3
| | | | | | | in /sys/i386/linux. Notes: svn path=/head/; revision=64930
* Use the genassym script here too. The linux and svr4 modules were broken.Bruce Evans2000-06-031-1/+4
| | | | Notes: svn path=/head/; revision=61204
* Use .include <bsd.kmod.mk> to get to ../../*/conf/kmod.mk instead ofPeter Wemm2000-05-271-1/+1
| | | | | | | encoding the relative path. Notes: svn path=/head/; revision=60966
* Pull in sys/conf/kmod.mk, rather than /usr/share/mk/bsd.kmod.mk.Peter Wemm2000-05-041-1/+1
| | | | | | | | | | This means that the kernel can be totally self contained now and is not dependent on the last buildworld to update /usr/share/mk. This might also make it easier to build 5.x kernels on 4.0 boxes etc, assuming gensetdefs and config(8) are updated. Notes: svn path=/head/; revision=59951
* Compile linux_genassym.c with ordinary ${CFLAGS}. The (small) need forBruce Evans2000-01-091-3/+3
| | | | | | | | | | | | | -U_KERNEL became negative when all all the genassym.c's were converted to be cross-built. Use "genassym ... > ${.TARGET}", not "genassym -o $@ ...", so that genassym(1) doesn't need to support -o. Removed duplicate -D_KERNEL from flags for compiling linux_locore.s. Notes: svn path=/head/; revision=55653
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-2/+2
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55206
* Use genassym(1) and <sys/assym.h> to generate assembler symbols.Marcel Moolenaar1999-12-231-8/+3
| | | | Notes: svn path=/head/; revision=55062
* Add a run of Linux ldconfig.Martin Cracauer1999-12-131-1/+10
| | | | Notes: svn path=/head/; revision=54541