summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2017-02-13whitespace tweak. no functional change.David Gwynne
2017-02-13properly set BGE_HCC_STATS_ADDR_HI by using BGE_HOSTADDR.David Gwynne
this makes it consistent with the rest of the code.
2017-02-12Replace dummy mutex asserts with real ones.Visa Hankala
OK stsp@
2017-02-12Remove dead assignment and now unused variable.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok dlg@
2017-02-12Remove incorrect if statementMike Belopuhov
Pointed out by jsg@ and Nathanael Rensen, <nathanael at list ! polymorpheus ! com>, thanks!
2017-02-12Split up fork1():Philip Guenther
- FORK_THREAD handling is a totally separate function, thread_fork(), that is only used by sys___tfork() and which loses the flags, func, arg, and newprocp parameters and gains tcb parameter to guarantee the new thread's TCB is set before the creating thread returns - fork1() loses its stack and tidptr parameters Common bits factor out: - struct proc allocation and initialization moves to thread_new() - maxthread handling moves to fork_check_maxthread() - setting the new thread running moves to fork_thread_start() The MD cpu_fork() function swaps its unused stacksize parameter for a tcb parameter. luna88k testing by aoyama@, alpha testing by dlg@ ok mpi@
2017-02-12The videocore portion of the raspberry pi which boots the arm cores andJonathan Gray
runs the mailbox interface knows about a MAC address that appears to be derived from a unique serial number along with the raspberry pi foundation oui. It modifies the device tree when booting to store the MAC address in /axi/usb/hub/ethernet/mac-address so fetch and use this value for the integrated smsc(4) Ethernet. A different smsc adapter plugged into one of the USB ports probes later with a different unit number and skips this path.
2017-02-12Fix an uninitialised return value in rtwn_ra_init(). Though nothingJonathan Gray
currently tests the return value. ok stsp@
2017-02-11Add a flags argument to falloc() that lets it optionally set thePhilip Guenther
close-on-exec flag on the newly allocated fd. Make falloc()'s return arguments non-optional: assert that they're not NULL. ok mpi@ millert@
2017-02-11Always leave one free slot in the Tx ring to avoid ambiguity with ringVisa Hankala
head and tail in the interrupt handler. This fixes an old bug that causes a Tx stall when Tx ring gets full.
2017-02-11Simplify ifq_deq_{begin,rollback,commit} sequence to ifq_dequeue.Visa Hankala
2017-02-11Correct the entry point and base address calculations for anPhilip Guenther
interpreter whose entry point isn't in its first PT_LOAD segment. problem report and testing by patrick@
2017-02-11disable aen handling.David Gwynne
on some or all original mfii boards (2208) the aen path fires repeatedly without reporting anything, causes enough load to start actual io. found by naddy@
2017-02-11Let MP-safe interrupt handlers run without the kernel lock on sgi.Visa Hankala
OK miod@
2017-02-10Unbreak 'config -p'.Martin Pieuchot
ok tb@, jca@
2017-02-10Update link to intel HDA spec. FromAlexandre Ratchov
Alexey Suslikov <alexey.suslikov at gmail.com>. Thanks.
2017-02-10Fix links to usb-audio specs. From Michael Reed <m.reed at mykolab.com>.Alexandre Ratchov
Thanks.
2017-02-10Use __func__ for DPRINTF's as we do in other parts of theAlexandre Ratchov
code. From Michael W. Bombardieri" <mb at ii.net>. Thanks.
2017-02-10Remove unused variable. From Michael W. Bombardieri <mb at ii.net>.Alexandre Ratchov
Thanks.
2017-02-09Dedup calls to icmp6stat_inc in icmp6_errcount, should save a few bytesJeremie Courreges-Anglas
ok bluhm@
2017-02-09remove a dead variable; ok millert, guentherMike Belopuhov
2017-02-09Use TAILQ_FOREACH_SAFE in cache_purgevfs(). Fix whitespaces.Alexander Bluhm
No binary change.
2017-02-09Unbreak 'netstat -g' and make multicast route stats sysctl more robust.Rafael Zalamena
ok mpi@
2017-02-09percpu counters for divert(4) statsJeremie Courreges-Anglas
ok dlg@
2017-02-09percpu counters for raw ipv6 and icmp6 statsJeremie Courreges-Anglas
ok mpi@
2017-02-09percpu counters for TCP statsJeremie Courreges-Anglas
ok mpi@ bluhm@
2017-02-09Temporarily grab the NET_LOCK() around soisdisconnected().Martin Pieuchot
This makes a (wrong) assert disappear and makes sure we hack to avoid a recursion in the upcall case still work. The real solution to this problem is to not grab the NET_LOCK() before entering uipc_usrreq(). Issue reported by dtucker@
2017-02-09Release the NET_LOCK() before calling unp_detach(), fix a recursionMartin Pieuchot
found by dtucker@
2017-02-09Replace a custom loop calling yield() by the idiom to check if theMartin Pieuchot
current process is hogging a CPU. ok mikeb@, visa@, tedu@
2017-02-09Do no select a CPU to execute the current thread when being preempt()ed.Martin Pieuchot
Calling sched_choosecpu() at this moment often result in moving the thread to a different CPU. This does not help the scheduler and creates a domino effect, resulting in kernel thread moving to other CPUs. Tested by many without performance impact. Simon Mages measured a small performance improvement and a smaller variance with an http proxy. Discussed with kettenis@, ok martijn@, beck@, visa@
2017-02-09Put back a return that I have removed by accident.Alexander Bluhm
2017-02-08Remove support for forcing the ELF interpreter to a specific address,Philip Guenther
last used by COMPAT_SYSV which was removed in 2011. ok millert@
2017-02-08Delete the obsolete fork/exec/exit emulation hooks.Philip Guenther
ok mpi@ dlg@
2017-02-08Improve error handling for poll timeoutsMike Belopuhov
2017-02-08Specify the read/write DMA flag for bounce buffersMike Belopuhov
2017-02-08Cleanup the device removal pathMike Belopuhov
When destroying the ring all transfers should be already gone so there should be no need to repeat ourselves after xbf_stop has done its work. Get rid of the yield() that was probably masking some issues that have been since fixed.
2017-02-08Switch to Xen interrupt barrier and improve state transitionsMike Belopuhov
2017-02-08Abort transactions with non-retriable error when device is stoppedMike Belopuhov
2017-02-08Switch to Xen interrupt barrierMike Belopuhov
2017-02-08Introduce Xen interrupt barriersMike Belopuhov
intr_barrier(9) is useful to make sure that after an interrupt is masked, the interrupt handler for the device has finished executing before proceeding with further device configuration. However, since Xen interrupt handlers run in the thread context, we need to make sure that they have finished as well. By scheduling a xen_barrier_task modelled after (or rather copied ;) ifq_barrier_task we can ensure that the interrupt handler is no longer running.
2017-02-08Fixup incorrect test when allocating grant table entriesMike Belopuhov
An xnf & xbf attach/detach loop has revealed that sometimes when we're about to free a grant table entry that is still in use which is a grave mistake code wise. Turned out we could allocate an entry twice because of an incorrect test that took flags value into account when making the decision regarding availability of a given entry. At the same time, upon releasing the entry we explicitly CAS in 0 into the flags making this check bogus. While here be explicit about starting flags by initializing them to 0 and always panic when the "double free" condition is encountered. rzalamena@ has lent me his eyes and has double-checked the condition.
2017-02-08Now pcexmem(4) and pcexio(4) are attached at cbus(4), we do not need toKenji Aoyama
include "pcex.h" here.
2017-02-08Remove the ipsec protocol callbacks which all do the same. ImplementAlexander Bluhm
it in ipsec_common_input_cb() instead. The code that was copied to ah6_input_cb() is now in ip6_ours() so we can call it directly. OK mpi@
2017-02-08Pass the physical address to the end of symbols to the kernel. FromPatrick Wildt
armv7 we inherited the mechanism to manually modify the kernel symbol table to change the value of esym. We don't use this, but instead use the virtual address that is passed to the kernel. This change makes us only work on and hand out physical addresses. Bump the efiboot version to make this ABI change more visible.
2017-02-08Retry BS->ExitBootServices() if it fails, like on amd64. Also we needPatrick Wildt
to make sure to pass the current mapkey to prove EFI that we know the current memory map and its constraints. Otherwise EFI can choose to only partially exit until we pass the correct key. As we already use the memory map to allocate memory for the kernel, split the previous function into one simply retrieving the table and another one who uses the map to allocate memory. At some point it would be nice to actually pass the table to the kernel since its data is more reliable than the FDT only. While there, sync a bit of style with the amd64 version.
2017-02-08fix a mixup of lengths of addresses and lengths in the aen_start sglDavid Gwynne
basically use htolem64 to set the address and htolem32 for the length, not the other way round. lucky this is mostly run on x86. found by Jon Kloske
2017-02-08the splvm() in pool_gc_pages is unecessary now.David Gwynne
all pools set their ipls unconditionally now, so there isn't a need to second guess them. pointed out by and ok jmatthew@
2017-02-08In exec_elf.c: expand ELFNAME(), ELFNAME2(), and ELFNAMEEND() exceptPhilip Guenther
leaving out the size, so that ELFNAME2(exec,makecmds) becomes exec_elf_makecmds instead of exec_elf{32,64}_makecmds and then delete the ELFNAME2() and ELFNAMEEND() macros. Move the prototypes for functions local to exec_elf.c to there from exec_elf.h. Simplify the SMALL_KERNEL conditionals around the ELF coredump code. Change exec_conf.c to use the size-generic names and macros Remove exec_elf{32,64}.c and just build exec_elf.c; delete the _KERN_DO_ELF and _KERN_DO_ELF64 #defines. ok jca@, encouragement from deraadt@ and tom@
2017-02-08Move ELF_AUX_ENTRIES from exec_elf.h to exec_elf.c; it's totally internalPhilip Guenther
and not something we guarantee to userspace ok jca@
2017-02-08Change ELFNAME(read_from)'s buf parameter to be void*, eliminating a castPhilip Guenther
from all but one call ok jca@