MFC r343826, r346698, r349057-r349060, r349073-r349077, r349080-r349086, r349088, r349091-r349097, r349115, r349119, r349130-r349132, r349143-r349145, r349164-r349168, r349174, r349269-r34927
MFC r343826, r346698, r349057-r349060, r349073-r349077, r349080-r349086, r349088, r349091-r349097, r349115, r349119, r349130-r349132, r349143-r349145, r349164-r349168, r349174, r349269-r349273r343826 by yuripv:pwm.8: fix markup in synopsis, add -f descriptionr346698 by manu:arm: allwinner: aw_pwm: compile it as module toor349057:Allow pwm(9) components to be selected individually, while 'device pwm'still includes it all.r349058:In detach(), check for failure of bus_generic_detach(), only releaseresources if they got allocated (because detach() gets called from attach()to handle various failures), and delete the pwmbus child if it got created.r349059:Don't call pwmbus_attach_bus(), because it may not be present if thisdriver is compiled into the kernel but pwmbus will be loaded as a modulewhen needed (and because of that, pwmbus_attach_bus() is going away inthe near future). Instead, just directly do what that function did:register the fdt xfef handle, and attach the pwmbus.r349060:Handle failure to enable the clock or obtain its frequency.r349073:Do not include pwm.h here, it is purely a userland interface file containingioctl defintions for the pwmc driver. It is not part of the pwmbus interface.r349074:Move/rename the sys/pwm.h header file to dev/pwm/pwmc.h. The file containsioctl definitions and related datatypes that allow userland control of pwmhardware via the pwmc device. The new name and location better reflects itsassocation with a single device driver.r349075:Remove pwmbus_attach_bus(), it no longer has any callers. Also remove acouple prototypes for functions that never existed (and never will).r349076:Use device_delete_children() instead of a locally-rolled copy of it thatleaks the device-list memory.r349077:Add a missing #include. I suspect this used to get included via some headerpollution that was cleaned up recently, and this file got missed in thecleanup because it's not attached to the build unless you specificallyrequest this device in a custom kernel config.r349080:Make pwmbus driver and devclass vars static; they're not mentioned in anyheader file, so they can't be used outside this file anyway.r349081:Unwrap prototype lines so that return type and function name are on thesame line. No functional changes.r349082:Spell unsigned int as u_int and channel as chan; eliminates the need to wrapsome long lines.r349083:Give the aw_pwm driver a module version.r349084:Rename the channel_max method to channel_count, because that's what it'sreturning. (If the channel count is 2, then the max channel number is 1.)r349085:Destroy the cdev on device detach. Also, make the driver and devclassstatic, because nothing outside this file needs them.r349086:Restructure the pwm device hirearchy and interfaces.The pwm and pwmbus interfaces were nearly identical, this merges them into asingle pwmbus interface. The pwmbus driver now implements the pwmbusinterface by simply passing all calls through to its parent (the hardwaredriver). The channel_count method moves from pwm to pwmbus, and theget_bus method is deleted (just no longer needed).The net effect is that the interface for doing pwm stuff is now the sameregardless of whether you're a child of pwmbus, or some random driverelsewhere in the hierarchy that is bypassing the pwmbus layer and is talkingdirectly to the hardware driver via cross-hierarchy connections establishedusing fdt data.The pwmc driver is now a child of pwmbus, instead of being its sibling(that's why the get_bus method is no longer needed; pwmc now gets thedevice_t of the bus using device_get_parent()).r349088:Make pwm channel numbers unsigned.r349091:The pwm interface was replaced with pwmbus, include the right header file.r349092:Make channel number unsigned, and spell unsigned int u_int. This shouldhave been part of r349088.r349093:This code no longer uses fdt/ofw stuff, no need to include ofw headers.r349094:Add module makefiles for pwm.r349095:Split the dtb MODULES_EXTRA line to a series of += lines, making it easierto maintain and keep in alphabetical order, and paving the way for addingsome other modules that aren't dtb-related.r349096:Add module makefiles for Texas Instruments ARM SoCs.The natural place to look for them based on how other SoCs are organizedwould be sys/modules/ti, but that's already taken. Drop a clue intomodules/ti/Makefile directing people to modules/arm_ti if they're lookingfor ARM modules.r349097:Build SoC-specific modules with GENERIC for the SoCs that have them.r349115:Rename pwmbus.h to ofw_pwm.h, because after all the recent changes, thereis nothing left in the file that related to pwmbus at all. It just containsprototypes for the functions implemented in dev/pwm.ofw_pwm.c, so name itaccordingly and fix the include protect wrappers to match.A new pwmbus.h will be coming along in a future commit.r349119:Rework pwmbus and pwmc so that each child will handle a single PWM channel.Previously, there was a pwmc instance for each instance of pwm hardwareregardless of how many pwm channels that hardware supported. Now therewill be a pwmc instance for each channel when the hardware supportsmultiple channels. With a separate instance for each channel, we can have"named channels" in userland by making devfs alias entries in /dev/pwm.These changes add support for ivars to pwmbus, and use an ivar to track thechannel number for each child. It also adds support for hinted children.In pwmc, the driver checks for a label hint, and if present, it's used tocreate an alias for the cdev in /dev/pwm. It's not anticipated that hintswill be heavily used, but it's easy to do and allows quick ad-hoc creationof named channels from userland by using kenv to create hint.pwmc.N.label=hints. Upcoming changes will add FDT support, and most labels willprobably be specified that way.r349130:Add ofw_pwmbus to enumerate pwmbus devices on systems configured with fdtdata. Also, add fdt support to pwmc.r349131:Implement the ofw_bus_get_node method in aw_pwm(4) so that ofw_pwmbus canfind its metadata for instantiating children.r349132:Add back a const qualifier I somehow fumbled away between test-buildingand committing recent changes.r349143:Put the pwmc cdev filenames under the pwm directory along with any labelnames. I.e., everything related to pwm now goes in /dev/pwm. This willmake it easier for userland tools to turn an unqualified name into a fullyqualified pathname, whether it's the base pwmcX.Y name or a label name.r349144:Follow changes in the pwmc(4) driver in relation to device filenames.The driver now names its cdev nodes pwmcX.Y where X is unit number andY is the channel within that unit. Change the default device name frompwmc0 to pwmc0.0. The driver now puts cdev files and label aliases inthe /dev/pwm directory, so allow the user to provide unqualified nameswith -f and automatically prepend the /dev/pwm part for them.Update the examples in the manpage to show the new device name formatand location within /dev/pwm.r349145:Put periods at the ends of argument descriptions. Explain the relationshipbetween the period and duty arguments.r349164:Remove everything related to channels from the pwmc public interface, nowthat there is a pwmc(4) instance per channel and the channel number ismaintained as a driver ivar rather than being passed in from userland.r349165:Explain the relationship between PWM hardware channels being controlled andpwmc(4) device filenames. Also, use uppercase PWM when the term is beingused as an acronym, and expand the acronym where it's first used.r349166:Rearrange the argument checking and processing so that enable and disablecan be combined with configuring the period and duty cycle (the same ioctlsets all 3 values at once, so there's no reason to require the user to runthe program twice to get all 3 things set).r349167:Oops, it seems I left out the word 'cycle', fix it.r349168:Add a pwmc(4) manpage.r349174:Handle labels specified with hints even on FDT systems. Hints are theeasiest thing for a user to control (via loader.conf or kenv+kldload), sohandle them in addition to any label specified via the FDT data.r349269:Some mundane tweaks and cleanups to help de-clutter the diffs of someupcoming functional changes.Add an ofw_compat_data table for probing compat strings, and use it to addPNP data. Remove some stray semicolons at the end of macro definitions,and add a PWM_LOCK_ASSERT macro to round out the usual suite. Move thedevice_t and driver_methods structs to the end of the file. Tweak comments.r349270:Add support for the PWM(9) API. This allows configuring the pwm output usingpwm(9), but also maintains the historical sysctl config interface forcompatiblity with existing apps. The two config systems are not compatiblewith each other; if you use both interfaces to change configurations you'relikely to end up with incorrect output or none at all.r349271:Catch up with recent changes in pwmbus(9). The pwm(9) and pwmbus(9)interfaces were unified into pwmbus(9), and the PWMBUS_CHANNEL_MAX methodwas renamed PWMBUS_CHANNEL_COUNT. The pwmbus_attach_bus() function justwent away completely. Also, fix a few typos such as s/is/if/.r349272:Do some general cleanup and light wordsmithing.Sort methods alphabetically. Wrap long lines. Start sentences on a newline. Remove contractions (not because it's a good idea, just to silenceigor). Add some explanation of the units for the period and duty argumentsand the convention for channel numbers.r349273:Add pwm to the armv7 GENERIC kernel, it's now used by TI and Allwinner.
show more ...
sys/modules: normalize .CURDIR-relative paths to SRCTOPThis simplifies make output/logicTested with: `cd sys/modules; make ALL_MODULES=` on amd64MFC after: 1 monthSponsored by: Dell EMC Isilon
Remove zero-copy sockets code. It only worked for anonymous memory,and the equivalent functionality is now provided by sendfile(2) overposix shared memory filedescriptor.Remove the cow member of
Remove zero-copy sockets code. It only worked for anonymous memory,and the equivalent functionality is now provided by sendfile(2) overposix shared memory filedescriptor.Remove the cow member of struct vm_page, and rearrange the remainingmembers. While there, make hold_count unsigned.Requested and reviewed by: alcTested by: phoSponsored by: The FreeBSD FoundationApproved by: re (delphij)
The if_ti Tigon I/II driver has moved to /sys/dev/ti
Remove bridge(4) from the tree. if_bridge(4) is a full functionalreplacement and has additional features which make it superior.Discussed on: -archReviewed by: thompsaX-MFC-after: never (RELENG
Remove bridge(4) from the tree. if_bridge(4) is a full functionalreplacement and has additional features which make it superior.Discussed on: -archReviewed by: thompsaX-MFC-after: never (RELENG_6 as transition period)
Remove vnode_if.h for rev 1.14.
We don't need to generate vnode_if.h anymore
At long last, commit the zero copy sockets code.MAKEDEV: Add MAKEDEV glue for the ti(4) device nodes.ti.4: Update the ti(4) man page to include information on the TI_JUMBO_HDRSPLIT and TI_PRIV
At long last, commit the zero copy sockets code.MAKEDEV: Add MAKEDEV glue for the ti(4) device nodes.ti.4: Update the ti(4) man page to include information on the TI_JUMBO_HDRSPLIT and TI_PRIVATE_JUMBOS kernel options, and also include information about the new character device interface and the associated ioctls.man9/Makefile: Add jumbo.9 and zero_copy.9 man pages and associated links.jumbo.9: New man page describing the jumbo buffer allocator interface and operation.zero_copy.9: New man page describing the general characteristics of the zero copy send and receive code, and what an application author should do to take advantage of the zero copy functionality.NOTES: Add entries for ZERO_COPY_SOCKETS, TI_PRIVATE_JUMBOS, TI_JUMBO_HDRSPLIT, MSIZE, and MCLSHIFT.conf/files: Add uipc_jumbo.c and uipc_cow.c.conf/options: Add the 5 options mentioned above.kern_subr.c: Receive side zero copy implementation. This takes "disposable" pages attached to an mbuf, gives them to a user process, and then recycles the user's page. This is only active when ZERO_COPY_SOCKETS is turned on and the kern.ipc.zero_copy.receive sysctl variable is set to 1.uipc_cow.c: Send side zero copy functions. Takes a page written by the user and maps it copy on write and assigns it kernel virtual address space. Removes copy on write mapping once the buffer has been freed by the network stack.uipc_jumbo.c: Jumbo disposable page allocator code. This allocates (optionally) disposable pages for network drivers that want to give the user the option of doing zero copy receive.uipc_socket.c: Add kern.ipc.zero_copy.{send,receive} sysctls that are enabled if ZERO_COPY_SOCKETS is turned on. Add zero copy send support to sosend() -- pages get mapped into the kernel instead of getting copied if they meet size and alignment restrictions.uipc_syscalls.c:Un-staticize some of the sf* functions so that they can be used elsewhere. (uipc_cow.c)if_media.c: In the SIOCGIFMEDIA ioctl in ifmedia_ioctl(), avoid calling malloc() with M_WAITOK. Return an error if the M_NOWAIT malloc fails. The ti(4) driver and the wi(4) driver, at least, call this with a mutex held. This causes witness warnings for 'ifconfig -a' with a wi(4) or ti(4) board in the system. (I've only verified for ti(4)).ip_output.c: Fragment large datagrams so that each segment contains a multiple of PAGE_SIZE amount of data plus headers. This allows the receiver to potentially do page flipping on receives.if_ti.c: Add zero copy receive support to the ti(4) driver. If TI_PRIVATE_JUMBOS is not defined, it now uses the jumbo(9) buffer allocator for jumbo receive buffers. Add a new character device interface for the ti(4) driver for the new debugging interface. This allows (a patched version of) gdb to talk to the Tigon board and debug the firmware. There are also a few additional debugging ioctls available through this interface. Add header splitting support to the ti(4) driver. Tweak some of the default interrupt coalescing parameters to more useful defaults. Add hooks for supporting transmit flow control, but leave it turned off with a comment describing why it is turned off.if_tireg.h: Change the firmware rev to 12.4.11, since we're really at 12.4.11 plus fixes from 12.4.13. Add defines needed for debugging. Remove the ti_stats structure, it is now defined in sys/tiio.h.ti_fw.h: 12.4.11 firmware.ti_fw2.h: 12.4.11 firmware, plus selected fixes from 12.4.13, and my header splitting patches. Revision 12.4.13 doesn't handle 10/100 negotiation properly. (This firmware is the same as what was in the tree previously, with the addition of header splitting support.)sys/jumbo.h: Jumbo buffer allocator interface.sys/mbuf.h: Add a new external mbuf type, EXT_DISPOSABLE, to indicate that the payload buffer can be thrown away / flipped to a userland process.socketvar.h: Add prototype for socow_setup.tiio.h: ioctl interface to the character portion of the ti(4) driver, plus associated structure/type definitions.uio.h: Change prototype for uiomoveco() so that we'll know whether the source page is disposable.ufs_readwrite.c:Update for new prototype of uiomoveco().vm_fault.c: In vm_fault(), check to see whether we need to do a page based copy on write fault.vm_object.c: Add a new function, vm_object_allocate_wait(). This does the same thing that vm_object allocate does, except that it gives the caller the opportunity to specify whether it should wait on the uma_zalloc() of the object structre. This allows vm objects to be allocated while holding a mutex. (Without generating WITNESS warnings.) vm_object_allocate() is implemented as a call to vm_object_allocate_wait() with the malloc flag set to M_WAITOK.vm_object.h: Add prototype for vm_object_allocate_wait().vm_page.c: Add page-based copy on write setup, clear and fault routines.vm_page.h: Add page based COW function prototypes and variable in the vm_page structure.Many thanks to Drew Gallatin, who wrote the zero copy send and receivecode, and to all the other folks who have tested and reviewed this codeover the years.
vlan.h is obsolete, don't create it anymore.
Use a consistent style and one much closer to the rest of /usr/src
Use .include <bsd.kmod.mk> to get to ../../*/conf/kmod.mk instead ofencoding the relative path.
Pull in sys/conf/kmod.mk, rather than /usr/share/mk/bsd.kmod.mk.This means that the kernel can be totally self contained now and is notdependent on the last buildworld to update /usr/share/mk. Thi
Pull in sys/conf/kmod.mk, rather than /usr/share/mk/bsd.kmod.mk.This means that the kernel can be totally self contained now and is notdependent on the last buildworld to update /usr/share/mk. This mightalso make it easier to build 5.x kernels on 4.0 boxes etc, assuminggensetdefs and config(8) are updated.
Add ${DEBUG_FLAGS} to CFLAGS in bsd.kmod.mk, not in scattered modulemakefiles. Bad examples in fxp/Makefile keep getting copied to newmakefiles.
Removed special rules for building and cleaning device interface filesand empty options files. The rules are now generated automatically inbsd.kmod.mk. Cleaned up related things ($S and ${CLEANFI
Removed special rules for building and cleaning device interface filesand empty options files. The rules are now generated automatically inbsd.kmod.mk. Cleaned up related things ($S and ${CLEANFILES}).
Zap some unused echo "#define NFOO 1" > foo.h style defunct stuff.
Don't generate 'bpf.h' since it's not used.
Change the name of the installed KLM to contain a leading "if_".Except for miibus which is now installed as miibus.ko.Discussed by: msmith, peter, and wpaul
$Id$ -> $FreeBSD$
Convert the VIA Rhine driver to newbus and set it up to be compiled asa module. Also modified the code to work on FreeBSD/alpha and addeddevice vr0 to the alpha GENERIC config.While I was in the
Convert the VIA Rhine driver to newbus and set it up to be compiled asa module. Also modified the code to work on FreeBSD/alpha and addeddevice vr0 to the alpha GENERIC config.While I was in the neighborhood, I noticed that I was still using#define NFPX 1 in all of the Makefiles that I'd copied from the fxpmodule. I don't really use #define Nfoo X so it didn't matter, butI decided to customize this correctly anyway.
Create module directories for the xl, ti, tl and sk drivers and addthem to the Makefile so that modules will be generated for /modules.