summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2022-10-07Revert "console(4), constty(4): Rip off the kernel lock, take two."riastradh
Something is still busted and this is interfering with the releng amd64 testbed.
2022-10-07regensnj
2022-10-07add NVIDIA GeForce GTX 770snj
2022-10-06com(4): Add include guards.riastradh
2022-10-06console(4), constty(4): Rip off the kernel lock, take two.riastradh
2022-10-06constty(4): Make MP-safe.riastradh
Access to the global constty variable is coordinated as follows: 1. Setting constty to nonnull, with atomic_store_release, is allowed only under the new adaptive constty_lock in thread context. This serializes TIOCCONS operations and ensures unlocked readers can safely use a constty pointer read with atomic_load_consume. 2. Changing constty from nonnull to null, with atomic_cas_ptr, is allowed in any context -- printf(9) uses this to disable a broken constty. 3. Reading constty under constty_lock is allowed with atomic_load_relaxed, because while constty_lock is held, it can only be made null by some other thread/CPU, never made nonnull. 4. Reading constty outside constty_lock is allowed with atomic_load_consume in a pserialize read section -- constty is only ever made nonnull with atomic_store_release, in (1). ttyclose will wait for all these pserialize read sections to complete before flushing the tty. 5. To continue to use a struct tty pointer in (4) after the pserialize read section has completed, caller must use tty_acquire during the pserialize read section and then tty_release when done. ttyclose will wait for all these references to drain before returning. These access rules allow us to serialize TIOCCONS, and safely destroy ttys, without putting any locks on the access paths like printf(9) that use constty. Once we set D_MPSAFE, operations on /dev/console will contend only with other users of the same tty as constty, which will be an improvement over contending with all other kernel lock users in the system. Changes second time around: - Fix initialization of ok in cons.c cn_redirect. - Fix reversed sense of conditional in subr_prf.c putone.
2022-10-06fix few typos in comments and node description.andvar
2022-10-06Update some AMD CPUID bits:msaitoh
- Rename FSREP_MOV to FSRM. - Add Memory Bandwidth Enforcement (MBE) - Add AMD's PPIN. Rename CPUID_SEF_PPIN to CPUID_SEF_INTEL_PPIN. - Add Collaborative Processor Performance Control (CPPC). - Add HOST_MCE_OVERRIDE. - Add some unknown bits as Bxx. - Add comments. - Use __BIT().
2022-10-04Revert "constty(4): Make MP-safe."riastradh
Something appears to be wrong with this.
2022-10-04Revert "console(4), constty(4): Rip off the kernel lock."riastradh
Needs more testing.
2022-10-03com(4): Nix quirky `integrate' macro.riastradh
Just use `static inline' like everything else.
2022-10-03com(4): Omit needless spltty in comstart.riastradh
This is called either via tp->t_oproc, which is done with tty_lock held (thus, at IPL_VM = IPL_TTY), or from comparam which is called at IPL_TTY, either via comopen or tp->t_param.
2022-10-03com(4): Nix dead code.riastradh
This was introduced in rev. 1.292, whose commit message was... `Delete dead code.' I guess December 6, 2009 was Opposite Day?
2022-10-03com(4): Comment on lock order.riastradh
2022-10-03console(4), constty(4): Rip off the kernel lock.riastradh
2022-10-03constty(4): Make MP-safe.riastradh
Access to the global constty variable is coordinated as follows: 1. Setting constty to nonnull, with atomic_store_release, is allowed only under the new adaptive constty_lock in thread context. This serializes TIOCCONS operations and ensures unlocked readers can safely use a constty pointer read with atomic_load_consume. 2. Changing constty from nonnull to null, with atomic_cas_ptr, is allowed in any context -- printf(9) uses this to disable a broken constty. 3. Reading constty under constty_lock is allowed with atomic_load_relaxed, because while constty_lock is held, it can only be made null by some other thread/CPU, never made nonnull. 4. Reading constty outside constty_lock is allowed with atomic_load_consume in a pserialize read section -- constty is only ever made nonnull with atomic_store_release, in (1). ttyclose will wait for all these pserialize read sections to complete before flushing the tty. 5. To continue to use a struct tty pointer in (4) after the pserialize read section has completed, caller must use tty_acquire during the pserialize read section and then tty_release when done. ttyclose will wait for all these references to drain before returning. These access rules allow us to serialize TIOCCONS, and safely destroy ttys, without putting any locks on the access paths like printf(9) that use constty. Once we set D_MPSAFE, operations on /dev/console will contend only with other users of the same tty as constty, which will be an improvement over contending with all other kernel lock users in the system.
2022-10-03com(4): Update confusing comment from decades ago to reflect now.riastradh
No functional change.
2022-10-03cons(9): Check the unit number on close too.riastradh
Races between multiple opens, some of which fail, might lead to closing a bad unit number -- not clear there's a good way to prevent this.
2022-10-03cons(9): Serialize open and close.riastradh
Kernel lock wasn't enough for this -- cdevvp, vn_lock, or VOP_OPEN could block, allowing another thread to re-enter open.
2022-10-03cons(9): New function cn_set_tab.riastradh
Increment of progress toward eliminating bare access to cn_tab so we can make more things MP-safe without the kernel lock (and maybe some day better formalize console detection and switching).
2022-10-02Add extra delay quirk for AMD FCH SATA Controller D.martin
2022-10-02regen (AMD FCH SATA D added)martin
2022-10-02Add AMD FCH SATA Controller Dmartin
2022-10-02PR kern/57035rin
s/lower/higher/ in comment; for little endian, 2nd word is higher both in numeric and address. It seems that I'm too absorbed into big endian machines these days ;) No binary changes.
2022-10-01Regen.msaitoh
2022-10-01Add AMD 19h/6xh Root Complex.msaitoh
2022-10-01No need to mangle argument of macro.rin
2022-10-01Use appropriate macros. No binary changes for GCC/amd64.rin
2022-10-01Remove confusing braces. No binary changes.rin
2022-10-01trailing whitespacerin
2022-10-01PR kern/57035rin
genfb(4): Fix blank screen after switching to WSDISPLAYIO_MODE_EMUL for some GPU models like Ice Lake integrated GPU: - Restore lower words of 64-bit BARs correctly. - Do not disable expansion ROM if exists. Thanks ryoon@ for testing!
2022-10-01Add Nuvoton NCT6799D support.msaitoh
2022-09-29Convert from pci_intr_map() to pci_intr_alloc(); makes the driver usebouyer
MSI/MSI-x when available. Tested by Edgar Fuß.
2022-09-28synaptics: Lower scale factor to give less sluggish mouse performancenia
on modern displays.
2022-09-28Regen.msaitoh
2022-09-28Sort by number. No functional change.msaitoh
2022-09-28Add Intel Core 8G (8core, H, Halo) Host Bridge, DRAM.msaitoh
2022-09-28Jasper Lake Intel Trace Hub on Compute Die is not 0x4da6 but 0x4e29.msaitoh
2022-09-27Remove bogus assertions.mlelstv
2022-09-26Extent rtl8188eu_txagc[] (in a quite cryptic way duplicating allmartin
zeroes?!) to avoid out of array accesses - there are RTL8192EU variants with 2 TX chains.
2022-09-25Remove unnecessary include of <sys/malloc.h>.thorpej
2022-09-25Remove unnecessary include of <sys/malloc.h>.thorpej
2022-09-25Remove unnecessary include of <sys/malloc.h>.thorpej
2022-09-25Remove unnecessary include of <sys/malloc.h>.thorpej
2022-09-25malloc(9) -> kmem(9)thorpej
2022-09-25Remove unnecessary include of <sys/malloc.h>.thorpej
2022-09-25Incremental malloc(9) -> kmem(9)thorpej
2022-09-25Remove unnecessary include of <sys/malloc.h>.thorpej
2022-09-25Remove unnecessary incldue of <sys/malloc.h>.thorpej
2022-09-25malloc(9) -> kmem(9)thorpej