Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces hea
Extract eventfilter declarations to sys/_eventfilter.hThis allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces headerpollution substantially.EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .cfiles into appropriate headers (e.g., sys/proc.h, powernv/opal.h).As a side effect of reduced header pollution, many .c files and headers nolonger contain needed definitions. The remainder of the patch addressesadding appropriate includes to fix those files.LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required bysys/mutex.h since r326106 (but silently protected by header pollution priorto this change).No functional change (intended). Of course, any out of tree modules thatrelied on header pollution for sys/eventhandler.h, sys/lock.h, orsys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.
show more ...
[led] propagate error from set_led() to the callerDo not lose error condition by always returning 0 from set_led.None of the calls to set_led checks for return value at the moment sonone of API c
[led] propagate error from set_led() to the callerDo not lose error condition by always returning 0 from set_led.None of the calls to set_led checks for return value at the moment sonone of API consumers in base is affected.PR: 231567Submitted by: Bertrand Petit <[email protected]>MFC after: 1 week
SPDX: use the Beerware identifier.
This implements default-state support as described in:https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.txtWithout this booting the VSATV102 causes the blue "working" le
This implements default-state support as described in:https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.txtWithout this booting the VSATV102 causes the blue "working" led to turnoff when the kernel starts up. With this the led (which is turned on bythe firmware) stays on since that's the default state specified in the FDT.Expanded the meaning of the led_create_state state parameter in orderto implement support for "keep". The original values were:== 0 Off!= 0 OnThe new values are:== -1 don't change / keep current setting== 0 Off!= -1 && != 0 OnThis should have no effect on acpi_asus_attach which only callsled_create_state with state set to 1. Updated acpi_ibm_attachin order to avoid surprises.Differential Revision: https://reviews.freebsd.org/D2615Submitted by: John WehleReviewed by: gonzo, loos
MFcalloutng:Make led(4) fire callouts at 10Hz only when there is at least one LED thatis requested to blink. Do not fire if all LEDs are static (usual case).
MFgraid/head r218174:Add simple in-kernel API for controlling leds.
Fix an incorrect use of sbuf_overflowed() after a call to sbuf_finish().
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.Fix some wrong usages.Note: this does not affect generated binaries as this argument is not used.PR: 137213Submitted by: Eygene Ryab
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.Fix some wrong usages.Note: this does not affect generated binaries as this argument is not used.PR: 137213Submitted by: Eygene Ryabinkin (initial version)MFC after: 1 month
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
Add sbuf_new_auto as a shortcut for the very common case of creating acompletely dynamic sbuf.Obtained from: VarnishMFC after: 2 weeks
Remove the distinction between device minor and unit numbers.Even though we got rid of device major numbers some time ago, devicedrivers still need to provide unique device minor numbers to make_d
Remove the distinction between device minor and unit numbers.Even though we got rid of device major numbers some time ago, devicedrivers still need to provide unique device minor numbers to make_dev().These numbers are only used inside the kernel. They are not related todevice major and minor numbers which are visible in devfs. These areactually based on the inode number of the device.It would eventually be nice to remove minor numbers entirely, but wedon't want to be too agressive here.Because the 8-15 bits of the device number field (si_drv0) are stillreserved for the major number, there is no 1:1 mapping of the deviceminor and unit numbers. Because this is now unused, remove therestrictions on these numbers.The MAXMAJOR definition was actually used for two purposes. It was usedto convert both the userspace and kernelspace device numbers to theirmajor/minor pair, which is why it is now named UMINORMASK.minor2unit() and unit2minor() have now become useless. Both minor() anddev2unit() now serve the same purpose. We should eventually remove someof them, at least turning them into macro's. If devfs would becomecompletely minor number unaware, we could consider using si_drv0 directly,just like si_drv1 and si_drv2.Approved by: philip (mentor)
Make it possible to specify an initial state for the LED.Requested by: Henrik Brix Andersen <[email protected]>PR: 112008
Add placeholder mutex argument to new_unrhdr().
Make a bunch of malloc types static.Found by: src/tools/tools/kernxref
Better locking.Add 'u' and 'U' "wait for next UTC second" in sequence mode.
Remove a pointless check.
Second half of the dev_t cleanup.The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev()Various minor adjustments including handling of userland access to ke
Second half of the dev_t cleanup.The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev()Various minor adjustments including handling of userland access to kernelspace struct cdev etc.
Do the dreaded s/dev_t/struct cdev */Bump __FreeBSD_version accordingly.
- Remove the __FBSDID and put the $FreeBSD$ tag in the comment above, so that including this file more than once works.- Fix some style bugs while I'm here.
Fix off by one error.
Add the ability to avoid repetition of s.... sequences with a '.'
Device megapatch 4/6:Introduce d_version field in struct cdevsw, this must always beinitialized to D_VERSION.Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removingfour D_NOGIANT fl
Device megapatch 4/6:Introduce d_version field in struct cdevsw, this must always beinitialized to D_VERSION.Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removingfour D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Use standard style for cdevsw initialization.
DUH!Write 100 times for tomorrow: I will never again free(9) a modified pointer.Pointy Hat: yeah, yeah, yeah, can you just put it in the pile over there...
Correct usage of mtx_init() API. This is not a functional change sincethe code happened to work because MTX_DEF and NULL are both defined as 0.Reviewed by: phk
12