summaryrefslogtreecommitdiffstats
path: root/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Don't reload the FPU registers when they're already loaded.kettenis2020-07-111-3/+5
| | | | Seems to fix the clang crashes I was seeing.
* Implement a machdep.altivec sysctl that always returns 1. This makeskettenis2020-07-112-3/+17
| | | | | | pixman in xenocara build and hopefully helps with ports as well. suggested by matthieu@
* Change locks which don't use spin_lock_irq() or spin_lock_irqsave()jsg2020-07-112-3/+3
| | | | | | from IPL_TTY to IPL_NONE. From Benjamin Baier
* test for gem_size > 0 on pool_destroy() matching pool_init() calljsg2020-07-111-1/+2
| | | | ok kettenis@
* don't complain if the API is too low to support "query phy types".dlg2020-07-111-6/+8
| | | | | | | | it just means we won't know what to show in ifconfig media output, but that's not a huge deal. there's still some more issues around api versions and driver support that we're working on though. ok sthen@ jmatthew@
* Add hw.cpuspeed and hw.setperfgkoehler2020-07-103-6/+117
| | | | | | | | | Get the list of Pstates from OPAL, and use special registers to request a Pstate or check the current Pstate. The turbo Pstates are higher than the cpu's nominal speed, but the OCC's firmware should throttle down the cpu if it would overheat. ok kettenis@
* Shuffle a bit of code to stop using sc->sc_link to hold values forkrw2020-07-102-9/+11
| | | | | | | openings outside of the one used at config_found() time. Adapters should take care of their own data. ok dlg@ for a sligthly different vioblk.c version.
* Oops, I didn't intend to commit these bits.kettenis2020-07-102-18/+5
|
* Implement process_read_regs() such that core dumps become usable.kettenis2020-07-103-28/+28
|
* Parse a bootduid= argument passed on the command line and use it to set thekettenis2020-07-101-1/+33
| | | | | | | bootduid variable in the kernel. This makes it possible to specify the boot disk in pettitboot menu entry (e.g. grub.cfg). ok deraadt@
* Clear FPU state if we try to restore the state when the process didn't usekettenis2020-07-101-2/+6
| | | | the FPU yet.
* Add check for userland VSID overflow.kettenis2020-07-101-1/+2
|
* Use OPAL_REINIT_CPUS calls during early boot to set endianness and tokettenis2020-07-101-1/+11
| | | | | set the MMU to hash mode such that the full TLB is available on POWER9 CPUs.
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-10117-315/+308
| | | | ok dlg@ tobhe@
* Change users of IFQ_PURGE() to use the "new" API.patrick2020-07-108-24/+19
| | | | ok dlg@ tobhe@
* Change users of IFQ_DEQUEUE(), IFQ_ENQUEUE() and IFQ_LEN() to use thepatrick2020-07-1072-158/+147
| | | | | | "new" API. ok dlg@ tobhe@
* Add OPAL_REINIT_CPUS.kettenis2020-07-102-2/+12
|
* Even though the PowerISA indicates that hardware should update referencekettenis2020-07-101-121/+55
| | | | | | | | and change bits in the page table entries that doesn't seem to happen reliably on the POWER9 CPU I'm looking at. So make our pmap not depend on this and emulate these bits instead. As far as I can determine Linux doesn't rely on the hardware bits either.
* Kill `pppx_devs_lk' rwlock. It used only to prevent races caused bymvs2020-07-101-42/+12
| | | | | | | malloc(9) in pppxopen(). We can avoid these races without rwlock. Also we move malloc(9) out of rwlock. ok mpi@
* Set missing `IFXF_CLONED' flag to pppx(4) related `ifnet'. That shouldmvs2020-07-101-1/+2
| | | | | | prevent collecting entropy from pppx(4). ok mpi@
* add back orientation quirk for Kogan Atlas 2-in-1 D300jsg2020-07-101-0/+6
| | | | local change lost in 5.7 drm update
* Add "Spleen 6x12" to wsfont, a font targetted at OLED displays.fcambus2020-07-102-5/+1307
| | | | | | | | | Similar to "Spleen 5x8" it only contains the printable ASCII characters (96 glyphes). The font is 2-Clause BSD licensed and is my original creation. OK patrick@
* Move sc->sc_link initialization closer to config_found() invocationkrw2020-07-091-10/+10
| | | | like all the cool drivers do.
* Move sc->sc_link initialization closer to config_found() invocationkrw2020-07-091-11/+12
| | | | like all the cool drivers do.
* On some laptops that have a Windows Precision Touchpad (imt) andjcs2020-07-093-13/+26
| | | | | | | | | | | also a trackstick or separate physical buttons, imt was claiming all report ids of the ihidev device preventing the trackstick/buttons from attaching as a separate ims device on other report ids. Just claim the report ids that imt needs and let ims attach to others it may find. Fixes two Dell Latitude laptops and tested in snaps for a bit.
* Some touchpads don't have the "maximum number of contacts" orjcs2020-07-091-19/+17
| | | | | | | "button type" usages, so assume some reasonable defaults rather than failing to attach. Fixes two Dell Latitude laptops and tested in snaps for a bit.
* Fix a warning false positive from clang 10.millert2020-07-091-2/+2
| | | | | | | blf_enc() takes a number of 64-bit blocks to encrypt, but using sizeof(uint64_t) in the calculation triggers a warning from clang 10 because the actual data type is uint32_t. Pass BCRYPT_WORDS / 2 for the number of blocks like libc bcrypt(3) does. OK kettenis@
* another excess filederaadt2020-07-091-23/+0
|
* drm/amdgpu/atomfirmware: fix vram_info fetching for renoirjsg2020-07-091-0/+1
| | | | | | From Alex Deucher fceff9423f428a62a20bb8fb8f66e6a9f906f12c in linux 5.7.y/5.7.8 d7a6634a4cfba073ff6a526cb4265d6e58ece234 in mainline linux
* drm/amdgpu: use %u rather than %d for sclk/mclkjsg2020-07-091-2/+2
| | | | | | From Alex Deucher c337fc540bb99e476e33153a9196eba4749a707a in linux 5.7.y/5.7.8 beaf10efca64ac824240838ab1f054dfbefab5e6 in mainline linux
* drm/amd/display: Only revalidate bandwidth on medium and fast updatesjsg2020-07-091-4/+6
| | | | | | From Nicholas Kazlauskas fcb408a7282302bd8b8afc6ef8db42b4eece23ee in linux 5.7.y/5.7.8 6eb3cf2e06d22b2b08e6b0ab48cb9c05a8e1a107 in mainline linux
* drm/amd/powerplay: Fix NULL dereference in lock_bus() on Vega20 w/o RASjsg2020-07-091-4/+7
| | | | | | From Ivan Mironov 13b2fe391cac70c7746e2cb68e73d99002f1cd00 in linux 5.7.y/5.7.8 7e89e4aaa9ae83107d059c186955484b3aa6eb23 in mainline linux
* drm/i915: Include asm sources for {ivb, hsw}_clear_kernel.cjsg2020-07-093-0/+282
| | | | | | From Rodrigo Vivi 95e961c6c23c35bb9f190f8d6bd13f1606de5a48 in linux 5.7.y/5.7.8 55fd7e0222ea01246ef3e6aae28b5721fdfb790f in mainline linux
* drm/amdgpu: fix kernel page fault issue by ras recovery on sGPUjsg2020-07-091-2/+3
| | | | | | From Guchun Chen 18b1cf2968e1baa883dbdf6adef6213626beaa0f in linux 5.7.y/5.7.8 12c17b9d62663c14a5343d6742682b3e67280754 in mainline linux
* drm/amdgpu: fix non-pointer dereference for non-RAS supportedjsg2020-07-091-2/+2
| | | | | | From Evan Quan 9c33bf981fab14ffbde2635d6e3d7d0818bac5a8 in linux 5.7.y/5.7.8 a9d82d2f91297679cfafd7e61c4bccdca6cd550d in mainline linux
* drm/amdgpu: disable ras query and iject during gpu resetjsg2020-07-093-3/+28
| | | | | | From John Clements 50a8cfb0e71644f2882dbfaf93150184094245bd in linux 5.7.y/5.7.8 61380faa4b4cc577df8a7ff5db5859bac6b351f7 in mainline linux
* drm/i915/gt: Mark timeline->cacheline as destroyed after rcu grace periodjsg2020-07-091-2/+10
| | | | | | From Chris Wilson 18ad3ad0b9b35370182ae4a7dbd89a77168df19e in linux 5.7.y/5.7.8 8e87e0139aff59c5961347ab1ef06814f092c439 in mainline linux
* drm/amd/display: Fix ineffective setting of max bpc propertyjsg2020-07-091-1/+2
| | | | | | From Stylon Wang b903524c8a60a3e9d5eede7fc87f1012332b929f in linux 5.7.y/5.7.8 fa7041d9d2fc7401cece43f305eb5b87b7017fc4 in mainline linux
* drm/amd/display: Fix incorrectly pruned modes with deep colorjsg2020-07-091-38/+64
| | | | | | From Stylon Wang 60c60af1adffdc4a34f4b13acc44a02ec33169b1 in linux 5.7.y/5.7.8 cbd14ae7ea934fd9d9f95103a0601a7fea243573 in mainline linux
* Enable spleen16x32 and spleen32x64 on armv7 for GENERIC kernels.fcambus2020-07-091-2/+2
| | | | OK kettenis@, deraadt@, patrick@
* adjfreq(2): limit adjustment to [-500000, +500000] ppmcheloha2020-07-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we recompute the scaling factor during tc_windup() there is an opportunity for arithmetic overflow if the active timecounter's adjfreq(2) adjustment is too large. If we limit the adjustment to [-500000, +500000] ppm the statement in question cannot overflow. In particular, we are concerned with the following bit of code: scale = (u_int64_t)1 << 63; scale += \ ((th->th_adjustment + th->th_counter->tc_freq_adj) / 1024) * 2199; scale /= th->th_counter->tc_frequency; th->th_scale = scale * 2; where scale is an int64_t. Overflow when we do: scale += (...) / 1024 * 2199; as th->th_counter->tc_freq_adj is currently unbounded. th->th_adjustment is limited to [-5000ppm, 5000ppm]. To see that overflow is prevented with the new bounds, consider the new edge case where th->th_counter->tc_freq_adj is 500000ppm and th->th_adjustment is 5000ppm. Both are of type int64_t. We have: int64_t th_adjustment = (5000 * 1000) << 32; /* 21474836480000000 */ int64_t tc_freq_adj = 500000000LL << 32; /* 2147483648000000000 */ scale = (u_int64_t)1 << 63; /* 9223372036854775808 */ scale += (th_adjustment + tc_freq_adj) / 1024 * 2199; /* scale += 2168958484480000000 / 1024 * 2199; */ /* scale += 4657753620480000000; */ 9223372036854775808 + 4657753620480000000 = 13881125657334775808, which less than 18446744073709551616, so we don't have overflow. On the opposite end, if th->th_counter->tc_freq_adj is -500000ppm and th->th_adjustment is -5000ppm we would have -4657753620480000000. 9223372036854775808 - 4657753620480000000 = 4565618416374775808. Again, no overflow. 500000ppm and -500000ppm are extreme adjustments. otto@ says ntpd(8) would never arrive at them naturally, so we are not at risk of breaking a working setup by imposing these restrictions. Documentation input from kettenis@. No complaints from otto@.
* do not need this one eitherderaadt2020-07-091-23/+0
|
* a couple of small tweaks that shrink the kstat code.dlg2020-07-091-9/+10
| | | | saves a few hundred bytes on both amd64 and sparc64
* Info leaks in semctl SEM_GET, the pads (unknown old contents) and base (aderaadt2020-07-081-3/+5
| | | | | RW page within allocateable space) were leaked. report from adam@grimm-co ok millert
* Handle a few more Hypervisor traps.kettenis2020-07-081-2/+7
|
* Make membar_consumer() a plain compiler barrier in kernel on octeon.visa2020-07-081-1/+2
| | | | | | | | | | | The processor does not perform speculative reads and only one of its execution pipes should issue memory accesses. As a result, loads should happen in the correct order without barrier instructions. Tested on CN5020, CN6120, CN7130 and CN7360. This diff has been in use on the octeon-based mips64 bulk build cluster for several months. Also tested in snaps for a while.
* do not need these versions of timetc.hderaadt2020-07-083-69/+0
|
* Use CPU_IS_PRIMARY macro in identifycpu() on amd64.fcambus2020-07-081-6/+6
| | | | OK deraadt@
* Userland timecounter implementation for sparc64.kettenis2020-07-082-7/+9
| | | | ok deraadt@, pirofti@
* Clean up the amd64 userland timecounter implementation a bit:kettenis2020-07-081-3/+2
| | | | | | | | | * We don't need TC_LAST * Make internal functions static to avoid namespace pollution in libc.a * Use a switch statement to harmonize with architectures providing multiple timecounters ok deraadt@, pirofti@