summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2017-10-12Use a temporary variable in rw_status() to dereference only once theMartin Pieuchot
volatile member of the struct. Not forcing a memory read on every access, 3 in this function, might reduce cache traffic in some cases. Micro-optimization and diff provided by Mateusz Guzik. ok visa@
2017-10-12Move sysctl_mq() where it can safely mess with mbuf queue internals.Martin Pieuchot
ok visa@, bluhm@, deraadt@
2017-10-12Fix a singed vs unsigned comparison resulting in an overflow of theMartin Pieuchot
routing socket. When clang became the default compiler, `if_flags' from `struct ifnet' was changed from "short" to "unsigned short", to silence a warning. Sadly the copy of these flags on the stack was still a "short" which made the flags comparison always true, which in turn made ifioctl() generates a RTM_INFO message for many ioctl(2). Since my last commit, the flag comparison is done for every ioctl(2). This made the kernel generate at least one routing message per ioctl, resulting in a lot of RTM_DESYNC. RTM_DESYNC problem reported by krw@ thanks to dhclient(8)'s noisiness! ok krw@, patrick@
2017-10-12Add Section Attirbute flag defines, some default values for n_typeMartin Pieuchot
and a couple of missing EM_* required to build devel/libdwarf and devel/valgrind. ok deraadt@, jasper@
2017-10-12Add missing size to free(); ok deraadt@ mpi@anton
2017-10-11missing prototype for db_ctf_pprintJasper Lievisse Adriaanse
ok mpi@
2017-10-11input files should not be .o; from Scott ChelohaTheo de Raadt
2017-10-11regenPatrick Wildt
2017-10-11Add bwfm(4), a driver for Broadcom FullMAC WiFi controllers. ThePatrick Wildt
FullMAC, in comparison to SoftMAC, does most WiFi handling in the firmware that's running on the controller. This means we have to work around the net80211 stack while still implementing all the WiFi interfaces to userland. This driver is still in early development. So far it can connect to open WiFis over the USB bus. SDIO and PCIe support, for devices like the Raspberry Pi 3 or the Macbooks, is not yet implemented. Also mbufs on the transmit path leak and are not yet freed. ok stsp@
2017-10-11Try to make CPU cache size values more correct, especially on OCTEON IIVisa Hankala
and III. The logic does not look nice, but the parameters do not follow the standard config register layout anyway. Remove unnecessary default values, and assume that the Config1 and Config2 registers are available on every CPU. Tested on CN5020, CN6120, CN7130 and CN7360.
2017-10-11Remove lie talking about splsoftclock().Martin Pieuchot
2017-10-11Make the tc alpha blinkenlichten start by default.Martin Pieuchot
Restores the balance of serenity and peace of mind of the last real alpha user, to some extent. From miod@
2017-10-11Fix debug printf, from Dave Voutila.Martin Pieuchot
2017-10-11Move `kq_count' increase/decrease close to the corresponding TAILQ_*Martin Pieuchot
insert/remove operation. No functionnal change for the moment. However this helps to make this code mp-safe. Note that markers are still not, and wont be, counted. ok visa@, jsing@, bluhm@
2017-10-11Move kq_kev from struct kqueue to the stack.Martin Pieuchot
It turns this set of events per-thread without having to lock anything. From Dragonfly 10f6680a4f6684751aaae0965abfe140f19e9231 ok kettenis@, visa@, bluhm@
2017-10-11ifioctl() cleanups.Martin Pieuchot
Only one semantic chance for SIOCSIFXFLAGS, rtm_ifchg() is now only called when the flags changed, not always. ok bluhm@, visa@
2017-10-11Add "machine gop" command to support changing graphic output mode.YASUOKA Masahiko
The selected mode is used by efifb(4). original diff from Klemens Nanni, tested by Andrew Daugherity
2017-10-10hidmt: send input mode set report as 2 bytes, matches linuxJoshua Stein
tested by a few
2017-10-10hidmt: add support for hybrid packet mode used by some touchpadsJoshua Stein
2017-10-10hidmt: rename internal hidmt_input struct to hidmt_data, avoid clashJoshua Stein
with hidmt_input function
2017-10-10At reboot all vnodes are flushed, but when it sleeps, the updateAlexander Bluhm
process has a chance to create new dirty vnodes. Resolving soft dependencies adds vnodes to the dirty list. In softdep_flushfiles() vnodes and softdeps are flushed in a loop. But if they sleep, it is not guaranteed that all vnodes have been flushed when the softdep worklist flush reports that nothing has to be done. The solution is to do a final vnode flush after the softdep worklist has been flushed. Then the dirty list is empty and the final check in dounmount_leaf() does not panic with "unmount: dangling vnode". OK mikeb@
2017-10-10remove a unused variableMike Larkin
ok tom, kettenis, deraadt
2017-10-09Fix build on 32 bit; paddr in rtsx_xfer_dma needs to be 64bit on all platforms.Stefan Sperling
Found the hard way by deraadt@
2017-10-09Add ADMA support to rtsx(4) to make use of DMA buffers provided by sdmmc(4).Stefan Sperling
Data transfers use a little bit less CPU time now. Tested by me on RT5209 and on RTS525A by jcs@ ok mpi@ visa@
2017-10-09Print the name of the device tree node like we do for simplebus(4).Mark Kettenis
This makes it easier to match dmesg output to the device tree. ok patrick@
2017-10-09The previous commit was deemed too invasive, so back it out and replacePatrick Wildt
it with a simple ifdef that uses the inline keyword if being compiled with clang and doesn't use the keyword if being compiled with gcc. ok kettenis@
2017-10-09Reduces the scope of the NET_LOCK() in sysctl(2) path.Martin Pieuchot
Exposes per-CPU counters to real parrallelism. ok visa@, bluhm@, jca@
2017-10-09Correct logic check preventing the device to attach.Martin Pieuchot
Fix regression introdruced in previous. Found the hardway and diff from weerd@
2017-10-09Make _kernel_lock_held() always succeed after panic(9).Martin Pieuchot
ok visa@
2017-10-09Turns out that the previous commit resolves the problem on Clang but atPatrick Wildt
the same time breaks the sparc64 build due to a very similar issue. To make it work, stop returning a huge struct and instead make the caller pass a pointer to the struct it allocated only once on the stack. Similar diff from sashan@ "yeah just make it work, and add it to the mop list" deraadt@
2017-10-08ramdisks do not contain MROUTING, so the local variable becomes unused.Theo de Raadt
wrap it.
2017-10-08Adapt hidmt to the MT interface of wsmouse, and add the compat-mode setup.Ulf Brosziewski
ok mpi@, jcs@
2017-10-08Enable rkiic(4) and rkpmic(4) for Rockchip RK3288 boards.Mark Kettenis
ok patrick@, jsg@
2017-10-08Revert: libsa lacks memmove currently; a more thorough rename/change isPhilip Guenther
needed problem noted by naddy@
2017-10-07bcopy() is expected to be overlap safe, so it implement it with memmove()Philip Guenther
not memcpy(). 'oh oh' deraadt@
2017-10-07In "tty", permitting TIOCSTART is fineTheo de Raadt
2017-10-07permit SYS___set_tcb, upcoming code will require thisTheo de Raadt
2017-10-06Unfortunately I removed too much in my previous commit and brokeAlexander Bluhm
divert-packet. Bring back the loop over the global list to find the divert socket.
2017-10-06Kill the divert-packet socket option IP_DIVERTFL to filter packets.Alexander Bluhm
It used a loop over the global list divbtable that would be hard to make MP safe. The port net/dnsfilter does not work without this, it should be converted to divert-to. Neither other ports nor base use this filter feature. ports checked by sthen@; OK mpi@ benno@
2017-10-06The mount point flags were displayed in octal when printed by ddb.Alexander Bluhm
All other bit fields use hex as well as the MNT_ constants. Change this to hex to make it cosistent and less confusing. OK krw@
2017-10-06Recalibrate TSC timecounter with HPET and PM timerMike Belopuhov
If frequency of an invariant (non-stop) time stamp counter is measured using an independent working timecounter that has a known frequency, we can assume that the measured TSC frequency is as good as the resolution of the timecounter that we use to perform the measurement. This lets us switch from this high quality but expensive source to the cheaper TSC without sacrificing precision on a wide range of modern CPUs. From Adam Steen <adam@adamsteen.com.au> with tweaks from reyk@ and myself. Tested by brynet@, sthen@ and others, OK mlarkin, sthen
2017-10-06vmm: handle 32 bit guest w/PAE when guest enables PAE first then paging,Mike Larkin
as 32 bit linux guests do. ok pd@
2017-10-06Revert previous video mode when setting GOP SetMode is failed. ThisYASUOKA Masahiko
prevents the video output problem on ThinkPad X121e and so on. diff from Klemens Nanni, test by Andrew Daugherity
2017-10-05vmm: add functions to decode %rflags and IA32_MISC_ENABLE MSR.Mike Larkin
Debug builds only.
2017-10-05Check the state value within the assert statement, do not set it.Alexander Bluhm
found with grep 'KASSERT.* = '; OK kettenis@
2017-10-05Add support for the "TEMPer1F_H1V1.5F" USB temperature and humidityStefan Sperling
sensor to the ugold(4) driver. Patch by Jan Klemkow Tested by Remi Locherer ok mpi@ patrick@
2017-10-05restore a block of code erroneously removed in r1.162 that causes aMike Larkin
warning during linux guest bootup relating to fpu save state size.
2017-10-05Update mvneta(4) to the way OpenBSD handles multicast and promiscuousPatrick Wildt
mode bits. From Brad Smith.
2017-10-05fix some spacing issues, wrong comments, and DPRINTFs that were in theMike Larkin
wrong place, no functional change.
2017-10-05change DPRINTF format specifier from %lld to %llx for easier readabilityMike Larkin