summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-01-05Remove PTE locking from pmap_extract() because it does not add any MPVisa Hankala
safety. The function has to be called in a context where conflicting pmap updates cannot happen. Otherwise the returned physical address might not be valid. Suggested by kettenis@
2016-01-05Some implementations of HitSyncDCache() call pmap_extract() for va->paVisa Hankala
conversion. Because pmap_extract() acquires the PTE mutex, a "locking against myself" panic is triggered if the cache routine gets called in a context where the mutex is already held. In the pmap, all calls to HitSyncDCache() are for a whole page. Add a new cache routine, HitSyncDCachePage(), which gets both the va and the pa of a page. This removes the need of the va->pa conversion. The new routine has the same signature as SyncDCachePage(), allowing reuse of the same routine for cache implementations that do not need differences between "Hit" and non-"Hit" routines. With the diff, POWER Indigo2 R8000 boots multiuser again. Tested on sgi GENERIC-IP27.MP and octeon GENERIC.MP, too. Diff from miod@, ok kettenis@
2016-01-04Record the modified mbuf chain after transmit checksum setup codeMike Belopuhov
Keep the modified chain pointer and pass it back to the calling code so that it will get properly accounted for. Change it to m_pullup since m_pulldown with a zero offset is just as good. Tested by yasuoka@, myself and mxb at alumni ! chalmers ! se, thanks! ok yasuoka, mpi
2016-01-04Skip "suspend" device node during probingMike Belopuhov
2016-01-04Include the node name into the error messageMike Belopuhov
2016-01-04Preallocate Grant Table frames to simplify the code for nowMike Belopuhov
2016-01-04Add initial support for 11n mode to the iwn(4) driver.Stefan Sperling
Only MCS 0 to 7 are supported for now. Tested by many. There might still be outstanding issues but they now appear to be rare. I'm putting this in so that additional fixes can be developed and tested more easily if required. This diff is already quite large for one commit. ok deraadt
2016-01-04Replace magic shifts and bitmasks used for ADDBA parametersStefan Sperling
with proper names, now that we have the corresponding macros.
2016-01-04Fix another case where the return value of ieee80211_chan2mode() wasStefan Sperling
used for indexing something other than ic_sup_rates. Should have been part of earlier commit.
2016-01-04ADDBA frames have a parameter set which we check against our own capabilitiesStefan Sperling
but we were checking bits in these parameters with the wrong set of bitmasks. Negotiating A-MPDUs with some APs failed because of this bug. ok kettenis@
2016-01-04Fix manual scan while associated in 11a mode. It would only show APs on 5GHz.Stefan Sperling
Problem found by benno@ ok benno@ kettenis@
2016-01-04Don't return 11n mode from ieee80211_chan2mode() so we can switch intoStefan Sperling
11a and 11b/g mode correctly when the driver supports 11n. And make sure the result of this funtion is only used to index ic_sup_rates. Its stated purpose is to help select a legacy rate. ok sthen jasper kettenis deraadt mpi
2016-01-04While configuring ERP we need to know if we're in 11a or 11g mode so onlyStefan Sperling
configure ERP once we are sure about our operation mode against the AP. ok sthen jasper kettenis deraadt mpi
2016-01-04Skip over 11n mode during scanning to avoid scanning channels more than once.Stefan Sperling
ok sthen jasper kettenis deraadt mpi
2016-01-04mark the driver MPSAFE. most of this is cleaning up the oactive handling.David Gwynne
if there's lingering bugs we'll deal with them in tree. ok jmatthew@
2016-01-04Remove parameter name from gpt_chk_mbr() prototype and add prototypeKenneth R Westerback
for findopenbsd_gpt().
2016-01-04Do proper termination of VMs by doing proper VCPU run state management.Mike Larkin
This should fix some of the odd termination errors people have been seeing (vmctl status showing running VMs after they have exited/crashed, and invalid instruction panics on vmptrld during certain races) This diff also implements dropping the biglock when running a VCPU, and reacquiring the lock as needed based on the type of exit (normal vs. external interrupt) diff supplied by Stefan Kempf <sn.kempf at t-online.de>, many thanks!
2016-01-04wrap a long lineMike Larkin
2016-01-03Fix typo in comment.Mark Kettenis
Pointed out by mlarkin@
2016-01-03Don't need two 16K static buffers to checksum the GPT entries and find theKenneth R Westerback
OpenBSD partition. Just one 128-byte stack copy of a single entry. Problems with EFI installs involving many disks reported by and fix tested by Thomas Bohl. Stefan Kempf pointed finger of suspicion at the addition of the 2nd 16K static buffer for softraid GPT and suggested/reviewed several versions of the diff. Tweaked and ok jsing@
2016-01-03enable pchtemp(4) on i386.Daniel Dickman
ok kettenis@
2016-01-03Add support for 100 series to pchtemp(4).Daniel Dickman
ok kettenis@
2016-01-03copyright++;Jonathan Gray
2016-01-02Take the PHY of iec(4) out of reset before attaching the interface.Visa Hankala
Otherwise the PHY goes undetected on the slave node of a dual-node Origin 200. The PHY gets enabled by diagnostic checks but only on the master node. As the attach code will now do the enabling, the checks can be disabled on reboot, making reboots faster especially on IP27. Tested on Origin 200 (IP27), Fuel (IP35 with iec), and Origin 350 (IP35 without iec). Diff from miod@, ok krw@
2016-01-02mmcc noticed that nd.ni_pledge was uninitialized in doopenat() for theTheo de Raadt
oflags & 3 == 3 case. Therefore this depends on vn_open() blocking the operation later. Probably this meant the ni_pledge request would be too high, causing transient operation failure, rather than transient operation passage). Instead of initializing based on the oflags value use the result of FFLAGS(). I should have done this from the start. ok semarie [oflags & 3 == 3 is major dejavu for me]
2016-01-01The pointer buf is a user space string which was directly passedAlexander Bluhm
to tputchar() and could crash the kernel. Better use cnwrite() in sendsyslog2() for writing to console. It takes a struct uio which does the copyin() automatically. In addition cnwrite() outputs to the real console or to a redirected one, whichever is appropriate. One drawback is that the syslog priority cannot be stripped off easily. OK deraadt@
2016-01-01Sync formatting and a few comments with upstream. No functional change.Ingo Feinerer
2016-01-01Reimplement vga_put() such that it compiles on i386 as well.Mark Kettenis
2016-01-01Sync V4L2 header file with upstream (i.e., recent Linux kernel) headers.Ingo Feinerer
This syncs our videoio.h with upstream videodev2.h and inlines their v4l2-controls.h (which was split off from videodev2.h). Another header, v4l2-common.h, is currently not imported as it is GPL2 licensed. There will be a second commit just addressing whitespace and formatting. The current version has only real changes whereas the second commit will bring videoio.h in line with videodev2.h formatting so that potential syncs in the future are easier to implement. Bulk build by ajacoutot@; ok robert@; "you should go for it" deraadt@
2015-12-31regenMark Kettenis
2015-12-31Add some XEON-D devices.Mark Kettenis
2015-12-31Make ixgbe_start() mpsafe. This means the driver will no longer grab theMark Kettenis
kernel lock in the rx and tx path anymore. While there seems to be a small decrease in forwarding performance with our default network stack settings, Performance whiel receiving manymore packets than we can handle is better. And this change opens the road for future improvements in the network stack. ok dlg@, mpi@
2015-12-31NULL-terminate a pointer array to prevent an invalid free, and simplifymmcc
the associated pointer incrementing logic. Reported by Maxim Pugachev. Looks good to tedu@
2015-12-3182544 on pcix busses needs a workaround that effectively doublesDavid Gwynne
the possible number of slots a packet can use on the tx ring. to make it easier to reserve and account for space on the ring, half the number of dma descriptors on those chips so the number of slots can stay the same. ok claudio@
2015-12-31Move tr_port_destroy down; fixes 'lacp_compose_key protection fault trap'Stuart Henderson
when removing a port from a lacp trunk. Part of a larger diff from mpi, as suggested by mikeb. ok mpi@
2015-12-31Add pchtemp(4) a driver for the thermal sensor on recent Intel PCHs.Mark Kettenis
2015-12-31Provide a minimal implementation of the Linux vga_get/vga_put API and use itMark Kettenis
in inteldrm(4). The Intel integrated graphics device has a major design flaw where it needs legacy VGA io access to disable VGA mode completely. This only works if legacy VGA io routing is setup such that it actually reaches the IGD. This typically isn't the case if the primary VGA device is a discrete graphics device. To make sure we don't whack that device we have to temporarily route legacy VGA io access to the IGD. Fixes the "black screen" issue reported by Timo Myrra and others.
2015-12-31Unconditionally set the "switchcookie". Fixes synchronous VT switching.Mark Kettenis
Matches what radeondrm(4) already did.
2015-12-31Protect mips64 pmap and pvlist structs with a mutex to make pmapVisa Hankala
operations MP-safe. Tested on octeon and sgi (IP27, IP30). Feedback from kettenis@ long ago
2015-12-29regenMark Kettenis
2015-12-29Intel C610 Thermal SensorMark Kettenis
2015-12-29Tweak previous by de-indenting label and replacing remaining continuesmmcc
with gotos. supported by kettenis@, ok sobrado@
2015-12-29shuffle tx code slightly and mark bge_start as mpsafe.David Gwynne
reviewed by jmatthew@ ok kettenis@
2015-12-29store curcpu() in ifq_serializer so we can check it.David Gwynne
this in turn gives us ifq_is_serialized() and an IFQ_ASSERT_SERIALIZED() macro. ok mpi@
2015-12-29Set UltraDMA transfer mode. Some (early?) SATA drives, such as the MaxtorMark Kettenis
7Y250M0, refuse to do DMA unless the transfer mode has been set. This causes reads (and presumably writes) to time out. Unlike the wdc code, this only sets the UltraDMA transfer mode. If we ever want to support ancient PATA drivers through the atascsi layer, we probably need to set the PIO and/or MWDMA transfer modes as well. ok jmatthew@, dlg@)
2015-12-29Remove NULL-checks before free().mmcc
ok tb@
2015-12-281. Add a loop_end label to the outer loopmmcc
2. Replace a continue statement in an inner loop with goto loop_end This fixes a simple logical bug found with Coccinelle. ok kettenis@
2015-12-28Remove description of circular queues and add a small blurb aboutTodd C. Miller
XOR simple queues.
2015-12-28Rework re_start and re_txeof to only check the producer/consumer ringJonathan Matthew
positions when deciding how much work to do, and to adjust rl_tx_free with atomic operations; split the flag that indicates whether we're using timer based interrupts or not out into a separate field so it can be changed from interrupt context without needing a lock; take the kernel lock when calling re_init and re_start from interrupt context; add an interrupt barrier in re_stop; and finally mark the interrupt handler as mpsafe. started by Jim Smith a while ago, mostly finished up at n2k15 tested by dlg@, chris@ and Dimitris Papastamos on various hardware ok dlg@
2015-12-28use ulmin when looking at uio_resid to prevent wrapping around.Ted Unangst
from Martin Natano (and also reported by Stefan Kempf)