summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2014-06-28Add the userland facing drm header for nouveau.Jonathan Gray
This is required by the generic loader code in newer versions of Mesa even when we aren't building any nouveau drivers. The way these headers are used on Linux is with a kernel version and a libdrm version which are largely identical with the *_drm.h headers always installed by libdrm when libdrm is built with autoconf. In OpenBSD we have a single version of the _drm.h headers that are shared by the kernel and userspace and have our own simple Makefile for the libdrm build.
2014-06-27Cleanup support for legacy mmap flagsMatthew Dempsky
Move all legacy MAP_FOO values behind #ifndef _KERNEL and redefine them to either be aliases for existing flags (e.g., MAP_COPY -> MAP_PRIVATE) or 0. Also, add MAP_OLDFOO defines (behind #ifndef _KERNEL) so the kernel and kdump can remain compatible with current OpenBSD binaries. ok deraadt
2014-06-27Avoid buffer overflow on max line length by ending string with just one \0.Tobias Stoeckmann
ok deraadt@
2014-06-27Standardize xfer byte counts to ssize_t rather than a mix of size_t and intMiod Vallat
(we need to make them signed to spot controller overruns), and fix format strings accordingly. While there, make sure every runtime printf is prefixed by either the complete target information, if available, or at least the driver name with the proper instance number - supported systems with > 1 wdsc are quite common.
2014-06-27Update list of .S depencies over assym.h.Miod Vallat
2014-06-27Do not KASSERT an unsigned value being >= 0 after decrementing it; instead,Miod Vallat
KASSERT it being > 0 before decrementing. ok dlg@
2014-06-27Avoid buffer overflow if there were too many arguments, also adjust lenpTobias Stoeckmann
to contain actually consumed space on truncation. bootarg_list can be static again, it's not referenced from outside. ok deraadt@
2014-06-26Calling in{6,}_purgeaddr() is not enough to remove an address fromMartin Pieuchot
an interface. Two other operations are performed when issuing a SIOCDIFADDR{_IN6,} ioctl: call the address hook and the per-driver ioctl function. Since carp(4) relies on an address hook to recalculate its hash, make sure to call this hook when IFXF_NOINET6 is set or when the rdomain is changed. ok henning@, mikeb@
2014-06-26fix format string when compiled with VIRTIO_DEBUGJasper Lievisse Adriaanse
ok sf@
2014-06-26Work around compatibility problems with Intel ahci and Intel SSDs by retryingJonathan Matthew
device detection if the port is still busy after our normal timeout. based on a diff by chris@, based on a change in dragonflybsd tested by Peter J Philipp ok dlg@
2014-06-25So it turns out that there is AML out there that asks for an accessMark Kettenis
width that isn't compatible with the alignment of the region: OperationRegion (SATC, SystemMemory, 0xE008800A, 0x04) Field (SATC, DWordAcc, NoLock, Preserve) { STCL, 16 } DWordAcc means 4-byte access, but 0xE008800A is only 2-byte aligned. Moreover, the region itself is 4 bytes long. From this I conclude that 4-byte wide access to a 2-byte aligned address is really wanted in cases like this. ok deraadt@
2014-06-25pf_translate doesn't use the mbuf argument anymore.Mike Belopuhov
From Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>. Thanks!
2014-06-25If the Embedded Contoller device has a _STA method, evaluate it and bail outMark Kettenis
early during attach if it signals that the device isn't present. Reduces the noise on machines where the AML provides an (incomplete) description of the Embedded Controller but doesn't actually have one. ok mlarkin@, deraadt@
2014-06-23repair ramdisk buildsTheo de Raadt
2014-06-23Fix possible crash on invalid filesystems.Tobias Stoeckmann
Merged from FreeBSD's revision 206098. ok beck@
2014-06-23turn of IPv6 for new interfaces by default. this really just means thereHenning Brauer
is no link-local address assigned by default, which - by default, since INET6 is in the GENERIC kernels - makes the machine and services on it reachable. No such thing in IPv4 land. since assigning an inet6 address manually or running rtsol(d) etc resets the NOINET6 flag and causes the link-local to be assigned, this really is a noop for all inet6 users with the exception of those ONLY using the default link-local address. These needs to run "ifconfig <if> inet6 eui64" or put the equivalent in hostname.if. discussed at length with many, ok at least by krw todd benno sthen
2014-06-23SystemMemory is used to access memory mapped registers on some machines, so weMark Kettenis
must use the bus_space(9) API to access it instead of memcpy(9). Also make sure we properly align access to fields that need more than byte alignment. ok guenther@
2014-06-23Fix compile without IPSEC.YASUOKA Masahiko
Pointed out by Ivan Solonin. ok henning mpi jca
2014-06-22PROCFS has been broken for months without complaints, so stop building itPhilip Guenther
suggested by sthen@
2014-06-21Make sure kmthread never loops without making progress: if the freelistPhilip Guenther
was empty then the first page allocation should sleep until it can get one. ok tedu@
2014-06-21If the kernel generates a deadly trap signal (SEGV, BUS, etc) forPhilip Guenther
an untraced process but finds it blocking or ignoring it, just kill the process instead of looping. It's undefined behavor in POSIX but quite annoying when encountered in practice. improvements from kettenis@ ok matthew@
2014-06-21you've had 12+ years to update your kernel config.Daniel Dickman
ok deraadt@
2014-06-21drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc()Jonathan Gray
From Egbert Eich 9e68a1156da093385f057b9e4576652203f1248e in ubuntu 3.8 7f1950fbb989e8fc5463b307e062b4529d51c862 in mainline linux
2014-06-21drm/radeon/si: make sure mc ucode is loaded before checking the sizeJonathan Gray
From Alex Deucher eed35bff1fe05f3a32989ace86107a1402f18537 in ubuntu 3.8 8c79bae6a30f606b7a4e17c994bc5f72f8fdaf11 in mainline linux
2014-06-21drm/radeon: memory leak on bo reservation failure. v2Jonathan Gray
From Quentin Casasnovas 2b9149f17e7135c31c9df1c80ab6d912c4265126 in ubuntu 3.8 74073c9dd29905645feb6dee03c144657a9844cd in mainline linux
2014-06-21Protect explicit_bzero() from link-time optimizationMatthew Dempsky
Modern compiler toolchains are capable of optimizing even across translation unit boundaries, so simply moving the memory clearing into a separate function is not guaranteed to clear memory. To avoid this, we take advantage of ELF weak symbol semantics, and insert a call to an empty, weakly named function. The semantics of calling this function aren't determinable until load time, so the compiler and linker need to keep the memset() call. There are still ways a toolchain might defeat this trick (e.g., optimistically expecting the weak symbol to not be overloaded, and only calling memset() if it is; promoting weak symbols to strong symbols at link-time when emitting a static binary because they won't be interposed; implementing load-time optimizations). But at least for the foreseeable future, these seem unlikely. ok deraadt
2014-06-21remove useless brace block; from dhillTheo de Raadt
2014-06-20Fix a wrong comparison in the interrupt handler.Raphael Graf
ok syl@
2014-06-20sf@ pointed out that atom.c defines a DEBUG macro that takes arguments,Jonathan Gray
this breaks when compiling a kernel with DEBUG defined for additional printfs elsewhere. Instead of renaming the macro, undefine DEBUG before the new definition to minimise the diff the linux.
2014-06-19Implement the membar(9) API for powerpc.Mark Kettenis
ok miod@, dlg@
2014-06-19drm/i915: fix lane bandwidth capping for DP 1.2 sinksJonathan Gray
DP 1.2 compatible displays may report a 5.4Gbps maximum bandwidth which the driver will treat as an invalid value and use 1.62Gbps instead. Fix this by capping to 2.7Gbps for sinks reporting a 5.4Gbps max bw. Also add a warning for reserved values. From Imre Deak d4eead50eb206b875f54f66cc0f6ec7d54122c28 in mainline linux One of two backported commits to prevent a black screen on a Lenovo IdeaPad Yoga 2 Pro as reported/debugged by Steven Wilson.
2014-06-19drm/i915: kill intel_dp_link_clock()Jonathan Gray
Use drm_dp_bw_code_to_link_rate insead. It's the same thing, but supports DP_LINK_BW_5_4 and is also used by the other drivers. From Paulo Zanoni 9fa5f6522e6eecb5ab20192a264a29ba4f2f4e85 in mainline linux One of two backported commits to prevent a black screen on a Lenovo IdeaPad Yoga 2 Pro as reported/debugged by Steven Wilson.
2014-06-18fix format string if DEBUGMiod Vallat
2014-06-18Add missing synchronization instructions.Mark Kettenis
ok mpi@
2014-06-18Fix off by one in pm_inusemap.Tobias Stoeckmann
FreeBSD did this years ago in revision 126086 as pointed out by John-Mark Gurney on tech. Merge it and sync two occurrences. ok krw@
2014-06-18Update comment; there seems to be no PC-9801 extension board slot onKenji Aoyama
'original' LUNA-88K.
2014-06-18trailing tabs arent needed.David Gwynne
2014-06-17Implement the membar(9) API for hppa.Mark Kettenis
ok miod@, dlg@, guenther@
2014-06-17Add a configurable workaround for a bug in qemu < 2.0 that prevented VLANsStefan Fritsch
from working.
2014-06-17We need to be more aggressive flushing L2 entries on RM7000 systems.Miod Vallat
2014-06-17Add membars to guarantee mtx_oldipl is written after locking andPhilip Guenther
read before unlocking. Believed to fix some spl problems on MP that have had landry and tobaisu seeing red. suggestion to use membar API from matthew@ ok matthew@ kettenis@
2014-06-17whitespace fix.David Gwynne
im sick of fixing this by hand on all my boxes while hacking on other stuff and having it pollute my diffs. no functional change.
2014-06-17Revise previous: if a user calls STRIOCGETCWD two or more times in a rowPhilip Guenther
without an intervening STRIOCRESCWD, release the current values instead of the saved values, so as to effectively emulate a STRIOCRESCWD. While here, make sure the fdc->fd_[cr]dir members are updated before vrele()ing their old values, so that they can't be caught as dangling refs. ok matthew@
2014-06-17ansi function declarations.David Gwynne
ok gcc sha256
2014-06-17The io clock on Octeon II (CN6xxx) runs at a different rate to the cpu clock.Jonathan Matthew
Program the uarts based on the io clock rate on these platforms. ok jasper@ pirofti@ yasuoka@
2014-06-17Fix format string under MP_LOCKDEBUGTobias Ulmer
2014-06-16Enable PCI power management on Lemote.Paul Irofti
Remaining battery test results on Lemote after 30m in suspend: pci_dopm = 0: 82%, 68min pci_dopm = 1: 86%, 81min Suggested by deraadt@ Okay miod@, deraadt@
2014-06-16Revert "Always create a local route for every configured IPv4 address",Martin Pieuchot
it introduces a regression with default routes & p2p interfaces. Problem reported by naddy@
2014-06-15Use sizeof(struct file *) consistently for memcpy()'ing fd_ofiles.Matthew Dempsky
Pointed out by Jean-Philippe Ouellet.
2014-06-15Fix vnode leak in systrace(4).Matthew Dempsky
If a user calls STRIOCGETCWD two or more times in a row without an intervening STRIOCRESCWD, then the references held on fst->fd_{c,r}dir would leak. ok miod