summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2015-04-12Bring PAE code back to life, in a different form. This diff (via bluhm thenMike Larkin
to deraadt, then myself) brings the PAE pmap on i386 (not touched in any significant way for years) closer to the current non-PAE pmap and allows us to take a big next step toward better i386 W^X in the kernel (similar to what we did a few months ago on amd64). Unlike the original PAE pmap, this diff will not be supporting > 4GB physical memory on i386 - this effort is specifically geared toward providing W^X (via NX) only. There still seems to be a bug removing certain pmap entries when PAE is enabled, so I'm leaving PAE mode disabled for the moment until we can figure out what is going on, but with this diff in the tree hopefully others can help. The pmap functions now operate through function pointers, due to the need to support both non-PAE and PAE forms. My unscientific testing showed less than 0.3% (a third of a percent) slowdown with this approach during a base build. Discussed for months with guenther, kettenis, and deraadt. ok kettenis@, deraadt@
2015-04-12Add a few missing trace functions, and "use" them. Add back the WATCH_GTTMark Kettenis
code (that isn't actually compiled in). Use dev_priv->dev in one more place now that we have it, and add set_normalized_timespec() and use it.
2015-04-12hfsc_classq has a type member which is never set or read, except to reportDavid Gwynne
its value to userland which will always be 0. drop the member. lie to userland. ok henning@
2015-04-12there's a 1:1 correlation between hfsc_class instances and hfsc_classqDavid Gwynne
instances, so maintaining separate pools for them and pointing between them is overhead. this drops the hfsc_classq pool and inlines it into hfsc_class. ok henning@
2015-04-12change back to linux style pci vendor/device definesJonathan Gray
2015-04-12change back to wait_for/wait_for_atomic_usJonathan Gray
2015-04-12disable the pool gc. there are reports of strange lockups on various mpDavid Gwynne
archs and this is the only interesting diff in the window.
2015-04-12pull structs and macros that are only used in hfsc.c out of the headerDavid Gwynne
and into the .c file. ok henning@
2015-04-12dont rely on hfsc.h via pfvar.h to include sys/timeout.h.David Gwynne
2015-04-12Switch back to ioread32 and iowrite32 for cases where bus_space_vaddr isJonathan Gray
used instead of bus_space_read/bus_space_write.
2015-04-12make wait_queue_head a struct with a mutexJonathan Gray
better matches linux behaviour
2015-04-11Directly handle ioctls issued to a SCSI device associated with a softraidJoel Sing
volume, ignoring any device name specified in the bio(4) ioctl struct. One of bio(4)'s design flaws is that the device name is hardcoded in many of the ioctl structs, making it basically unusable with DUIDs. In the case of `bioctl -d' the bioctl(8) code actually uses opendev(3) on the given name, then issues the ioctl directly to the resulting device. As such, we already know which device (or in this case, softraid volume) the ioctl was intended for, however the current softraid(4) code ignores this and instead attempts to perform a lookup using the name in the bio(4) ioctl struct. This diff splits the sr_bio_ioctl() code into two parts - one that implements the API required by bio(4) and the other that contains the ioctl handling code, which now takes an optional pointer to the softraid discipline. If an ioctl is issued to a SCSI device associated with a softraid volume, pass the corresponding softraid discipline struct through and to the bio ioctl handler and use it in preference to performing a device name lookup. Amongst other things, this makes bioctl -d now work with DUIDs. ok krw@
2015-04-11Add support for restarting rebuilds on RAID 5.Joel Sing
ok krw@
2015-04-11Convert lii(4) to if_input().Joel Sing
ok mpi@
2015-04-11rename i915 interrupt handlers from *_intr back to *_irq_handlerJonathan Gray
2015-04-11the hfsc pools are only used in hfsc.c, so move the init of themDavid Gwynne
there instead of pf_ioctl.c. ok henning@
2015-04-11change back to spinlock_t/DEFINE_SPINLOCKJonathan Gray
2015-04-11change back to drm_free_large/drm_malloc_abJonathan Gray
2015-04-11add/use max_t()Jonathan Gray
2015-04-11Rename i915_gem_chipset_flush() to intel_gtt_chipset_flush()Jonathan Gray
so we can use the inline definition of i915_gem_chipset_flush() that avoids the flush entirely on gen >= 6.
2015-04-10Axe vq_free_entry_lockedStefan Fritsch
A leftover from netbsd
2015-04-10Fix typo in macro nameStefan Fritsch
2015-04-10Don't use pa_to_pvh() if we already have the page. Avoids an unused variableMark Kettenis
for non-DIAGNOSTIC kernels. ok deraadt@
2015-04-10Convert to if_input().Martin Pieuchot
Tested by Daniel Jakots, thanks!
2015-04-10I did quite some changes to this driver, so add copyright.Martin Pieuchot
2015-04-10replace the use of ifqueues for most input queues serviced by netisrDavid Gwynne
with niqueues. this change is so big because there's a lot of code that takes pointers to different input queues (eg, ether_input picks between ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through to code to enqueue packets against the pointer. if i changed only one of the input queues id have to add sepearate code paths, one for ifqueues and one for niqueues in each of these places by flipping all these input queues at once i can keep the currently common code common. testing by mpi@ sthen@ and rafael zalamena ok mpi@ sthen@ claudio@ henning@
2015-04-10Full-speed isochronous transfers support with opportunistic micro-framesMartin Pieuchot
scheduling. More work is required to properly budget and schedule micro-frames, most of it at the HUB level. But this let people use USB1.1 uaudio(4) devices on ehci(4)-only systems. Thanks to all the testers! ok ratchov@, sthen@, naddy@
2015-04-10replace the guts of tdb_hash with SipHash24David Gwynne
tested by (including some statistical measurement) and ok mikeb@
2015-04-10Move irqs_disabled() and in_dbg_master() out of the i386/amd64 ifdef blockJonathan Gray
and change drm_can_sleep() to only use in_atomic() on i386/amd64 as it isn't defined for other archs currently. Unbreaks the sparc64 build. Found the hard way by benoit@
2015-04-10mpi@ introduced a ph_cookie in mbuf packet headers that can be usedDavid Gwynne
by a subsystem to stash some state while the mbuf gets queued. eg, net80211 uses it to keep track of the wireless node associated with a packet before submitting it to a drivers snd queue for transmission. this makes pipex use ph_cookie to keep track of the pipex session associated with a packet before submitting it to the softint queues. this lets us get rid of an mbuf tag type, and avoids the cost of tag allocation. ok yasuoka@
2015-04-10Run detach hook and similar before cleaning up any other resource whenMartin Pieuchot
an interface is destroyed/removed. This way we can ensure pseudo-driver changes done after attaching an interface are undone before detaching it. Note: it is safe to call if_deactivate() multiple times as the interface should not have any attached pseudo-interface after the first call. ok deraadt@, dlg@
2015-04-10Add support for CRC-enabled elantech v3 touchpads.Stefan Sperling
Patch by Fasse <fasse.f2@gmail.com> ok mpi@
2015-04-10Convert remaining USB Ethernet adapter to if_input().Martin Pieuchot
ok dlg@
2015-04-10Use mdelay(x) instead of delay(x * 1000) for drm_msleep() to betterJonathan Gray
deal with long delays.
2015-04-10Make drm_can_sleep() match linux. No change in behaviour as it'sJonathan Gray
only ever used to decide between mdelay and drm_msleep and our drm_msleep delays instead of sleeping.
2015-04-10add irqs_disabled() and in_dbg_master() using cold and db_is_activeJonathan Gray
2015-04-10dont inherit the parent interfaces hardmtu as the vlan interfacesDavid Gwynne
mtu when it gets set up. instead, allow the vlan interfaces mtu to be raised to the parents hardmtu in SIOCSIFMTU handling. pointed out by claudio@
2015-04-09Send lmc(4) and san(4) to the HDLC framed bit bucket in the sky.Theo de Raadt
2015-04-09Make the sparc64 pmap (more) mpsafe by protecting both the pmap itself and theMark Kettenis
pv lists with a mutex. Some minor code adjustments to prevent holding locks too long. This should make pmap_enter(9), pmap_remove(9) and pmap_page_protect(9) safe to use without holding the kernel lock.
2015-04-09Plug a memory leak in pfr_destroy_kentryMike Belopuhov
pfi_kif objects allocated for table entries created by route-to or by specifying weight weren't garbage collected when the table entry was destroyed. Spotted by Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>, thanks! Ok henning, florian
2015-04-09to quote jim smith:David Gwynne
> fix a regression on re chips which have > 7k jumbo support (RL_JUMBO_MTU_7K) as reported by daniel jakots > and emilio perea. the regression was caused because RL_JUMBO_FRAMELEN > was changed to 9k and i missed fixing up the RL_JUMBO_MTU_7K macro. nice of him to fix the thing he broke ;) ok sthen@
2015-04-08add a #define for IEEE80211_ELEMID_CSA, 802.11h-2003 Channel Switch AnnouncementStuart Henderson
ok stsp@
2015-04-08Kill unused function.Martin Pieuchot
2015-04-08Move vmap back to kernel_map/uvm_km_valloc as it's allowed to fail.Jonathan Gray
This should help dlg's dell 2950 that gets stuck during boot with vmap in the trace. ok kettenis@
2015-04-08Table flags are not looked at when a table entry is created.Mike Belopuhov
Spotted by Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>, thanks!
2015-04-08I believe UVM is clean now and no managed pages should be in use anymoreMark Kettenis
when we call pmap_release(). Turn debug code into printf and remove the code that tried to mop up. Override Debugger() such that it inserts a trap instruction directly into the code such that we get useful backtraces. This way I don't need to worry about pmap_release() removing pv entries when making this pmap mpsafe.
2015-04-08Convert to if_input().Martin Pieuchot
ok dlg@
2015-04-08Destination table needs it's own negation flag passed to the pfr_update_stats.Mike Belopuhov
Spotted by Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>, thanks a lot! Ok florian
2015-04-08Check for link status in tsec_start(). Prevent the watchdog from fireingMartin Pieuchot
when no cable is plugged in but the interface is brough up. inputs and ok kettenis@
2015-04-08Convert to if_input().Martin Pieuchot
ok dlg@