Move most of the contents of opt_compat.h to opt_global.h.opt_compat.h is mentioned in nearly 180 files. In-progress networkdriver compabibility improvements may add over 100 more so this isclose
Move most of the contents of opt_compat.h to opt_global.h.opt_compat.h is mentioned in nearly 180 files. In-progress networkdriver compabibility improvements may add over 100 more so this iscloser to "just about everywhere" than "only some files" per theguidance in sys/conf/options.Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset ofsys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.his created on all architectures.Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control theset of compiled files.Reviewed by: kib, cem, jhb, jtlSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D14941
show more ...
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
sys/dev: use our nitems() macro when it is avaliable through param.h.No functional change, only trivial cases are done in this sweep,Drivers that can get further enhancements will be done independ
sys/dev: use our nitems() macro when it is avaliable through param.h.No functional change, only trivial cases are done in this sweep,Drivers that can get further enhancements will be done independently.Discussed in: freebsd-current
- Use make_dev_credf(MAKEDEV_REF) instead of the race-prone make_dev()+dev_ref() in the clone handlers that still use it.- Don't set SI_CHEAPCLONE flag, it's not used anywhere neither in devfs(for
- Use make_dev_credf(MAKEDEV_REF) instead of the race-prone make_dev()+dev_ref() in the clone handlers that still use it.- Don't set SI_CHEAPCLONE flag, it's not used anywhere neither in devfs(for anything real)Reviewed by: kib
Get rid of D_PSEUDO.It seems the D_PSEUDO flag was meant to allow make_dev() to return NULL.Nowadays we have a different interface for that; make_dev_p(). There'sno need to keep it there.While
Get rid of D_PSEUDO.It seems the D_PSEUDO flag was meant to allow make_dev() to return NULL.Nowadays we have a different interface for that; make_dev_p(). There'sno need to keep it there.While there, remove an unneeded D_NEEDMINOR from the gpio driver.Discussed with: gonzo@ (gpio)
Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctlsto support wide characters. I created a patch to add ABI compatibil
Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctlsto support wide characters. I created a patch to add ABI compatibilityfor the old calls, but I didn't get any feedback to that.It seems now people are upgrading from 8 to 9 they experience thisissue, so add it anyway.
Remove unit2minor() use from kernel code.When I changed kern_conf.c three months ago I made device unit numbersequal to (unneeded) device minor numbers. We used to requirebitshifting, because the
Remove unit2minor() use from kernel code.When I changed kern_conf.c three months ago I made device unit numbersequal to (unneeded) device minor numbers. We used to requirebitshifting, because there were eight bits in the middle that werereserved for a device major number. Not very long after I turneddev2unit(), minor(), unit2minor() and minor2unit() into macro's.The unit2minor() and minor2unit() macro's were no-ops.We'd better not remove these four macro's from the kernel, because thereis a lot of (external) code that may still depend on them. For now it'sharmless to remove all invocations of unit2minor() and minor2unit().Reviewed by: kib
Don't enforce unique device minor number policy anymore.Except for the case where we use the cloner library (clone_create() andfriends), there is no reason to enforce a unique device minor number
Don't enforce unique device minor number policy anymore.Except for the case where we use the cloner library (clone_create() andfriends), there is no reason to enforce a unique device minor numberpolicy. There are various drivers in the source tree that allocate unrpools and such to provide minor numbers, without using them themselves.Because we still need to support unique device minor numbers for thecloner library, introduce a new flag called D_NEEDMINOR. All cdevsw'sthat are used in combination with the cloner library should be markedwith this flag to make the cloning work.This means drivers can now freely use si_drv0 to store their own flagsand state, making it effectively the same as si_drv1 and si_drv2. Westill keep the minor() and dev2unit() routines around to make drivershappy.The NTFS code also used the minor number in its hash table. We shouldnot do this anymore. If the si_drv0 field would be changed, it would nolonger end up in the same list.Approved by: philip (mentor)
Remove explicit calls to keyboard methods with their respective variantsimplemented with macros. This patch improves code readability. Reasoningbehind kbdd_* is a "keyboard discipline".List of ma
Remove explicit calls to keyboard methods with their respective variantsimplemented with macros. This patch improves code readability. Reasoningbehind kbdd_* is a "keyboard discipline".List of macros is supposed to be complete--all methods of keyboard_switchshould have their respective macros from now on.Functionally, this code should be no-op. My intention is to leave currentbehaviour of code as is.Glanced at by: rwatsonReviewed by: emax, marcelApproved by: cognet
Fix our ioctl(2) implementation when the argument is "int". Newioctls passing integer arguments should use the _IOWINT() macro.This fixes a lot of ioctl's not working on sparc64, most notablebein
Fix our ioctl(2) implementation when the argument is "int". Newioctls passing integer arguments should use the _IOWINT() macro.This fixes a lot of ioctl's not working on sparc64, most notablebeing keyboard/syscons ioctls.Full ABI compatibility is provided, with the bonus of fixing thehandling of old ioctls on sparc64.Reviewed by: bde (with contributions)Tested by: emax, mariusMFC after: 1 week
Disable custom locking in the vkbd(4) for now and make it rely on theGiant mutex (just like the rest of keyboard drivers and syscons(4) do).Tested by: markusMFC after: 1 day
Merge the dev_clone and dev_clone_cred event handlers into a singleevent handler, dev_clone, which accepts a credential argument.Implementors of the event can ignore it if they're not interested,a
Merge the dev_clone and dev_clone_cred event handlers into a singleevent handler, dev_clone, which accepts a credential argument.Implementors of the event can ignore it if they're not interested,and most do. This avoids having multiple event handler types andfall-back/precedence logic in devfs.This changes the kernel API for /dev cloning, and may affect thirdparty packages containg cloning kernel modules.Requested by: phkMFC after: 3 days
Fix kernel panic with vkbd(4). Initialize mutex properly (set name), or elseWITNESS gets upset.MFC after: 3 days
Fix yet another cut-and-paste bug.kbd was allocated from M_VKBD not from M_DEVBUF
Dont clear all flags in vkbd_clear_state_locked(). Clear only COMPOSE flag.MFC after: 3 days
Explicitly hold a reference to the cdev we have just cloned. Thiscloses the race where the cdev was reclaimed before it ever made itback to devfs lookup.
plug memory leakNoticed by: Coverity Prevent analysis toolReviewed by: emax
Start each of the license/copyright comments with /*-, minor shuffle of lines
Include fcntl.hCheck O_NONBLOCK instead of IO_NDELAY.Include selinfo.h instead of relying on vnode.h to do so.Don't include vnode.h
Add virtual AT keyboard driver vkbd(4).Not yet connected to the build.