summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2020-07-18Add functions to set/add properties on an FDT node.Mark Kettenis
ok visa@
2020-07-18Remove an unused function.Visa Hankala
2020-07-18Userland timecounter implementation for octeonVisa Hankala
OK naddy@; no objections from kettenis@
2020-07-18replace stat collection with the kstat api.David Gwynne
before this the stats were always collected, but you could only see stats with gdb against the running kernel, or by enabling IX_DEBUG in the build. neither of these are supported by default.
2020-07-17Pay attention to "openbsd,boothowto" and "openbsd,bootduid" propertiesMark Kettenis
like we do on arm64 and armv7.
2020-07-17Userland timecounter for macppcgkoehler
Tested by cwen@ and myself. Thanks to pirofti@ for creating the userland timecounter feature. ok kettenis@ pirofti@ deraadt@ cheloha@
2020-07-17Allow setsockopt SO_RTABLE when pleding "wroute" soon to be neededFlorian Obser
by slaacd(8). "wroute" allows changes to the routing table so this is a good fit. Nothing else in base is effected by this. dhclient might use the wroute pledge in the future and might also want SO_RTABLE in a more distant future. OK deraadt
2020-07-17Copy the right value to fix getsockopt(2) for SO_RTABLE and IPV6_PIPEXkn
r1.146 "Enable IPv6 routing domain support" adapted the mtod() line from the IPV6_PIPEX case which was bogus since introduction in r1.118. Issue found by florian, who came up with the same partial diff for SO_RTABLE while working on rdomain aware slaacd(8). Taken from sys/netinet/ip_output.c which does it correctly. OK florian millert
2020-07-17Randomize the system stoeplitz keyTheo Buehler
One can prove that the Toeplitz matrix generated from a 16-bit seed is invertible if and only if the seed has odd Boolean parity. Invertibility is necessary and sufficient for the stoeplitz hash to take all 65536 possible values. Generate a system stoeplitz seed of odd parity uniformly at random. This is done by generating a random 16-bit number and then flipping its last bit if it's of even parity. This works since flipping the last bit swaps the numbers of even and odd parity, so we obtain a 2:1 mapping from all 16-bit numbers onto those with odd parity. Implementation of parity via popcount provided by naddy; input from miod, David Higgs, Matthew Martin, Martin Vahlensieck and others. ok dlg
2020-07-17Fix definition of KIOC_GETBOOTDUID ioctl.Mark Kettenis
2020-07-17Use interface index instead of pointer to corresponding interfacemvs
within pipex(4) layer. ok mpi@
2020-07-17Check destruction ability before search instance of clone interface.mvs
ok mpi@
2020-07-17Re-work intr_barrier(9) on arm64 to remove layer violation. So far wePatrick Wildt
have stored the struct cpu_info * in the wrapper around the interrupt handler cookie, but since we can have a few layers inbetween, this does not seem very nice. Instead have each and every interrupt controller provide a barrier function. This means that intr_barrier(9) will in the end be executed by the interrupt controller that actually wired the pin to a core. And that's the only place where the information is stored. ok kettenis@
2020-07-17Merge the two if blocks checking if the font in use contains a givenFrederic Cambus
character in rasops_mapchar(). OK kn@, cheloha@
2020-07-17Revert r1.170. dlg and jmatthew simultaneously fixed this theTheo Buehler
correct way.
2020-07-17i forgot to commit this with if_ix.c r1.169David Gwynne
stoeplitz code needs to #include <net/toeplitz.h>, and ix does it's includes here. pointed out by jmatthew@ (thanks)
2020-07-17This needs <net/toeplitz.h> for stoeplitz_to_key(9).Theo Buehler
2020-07-17use the system stoeplitz key instead of a random one.David Gwynne
while here, stash the rss hash value from rx descriptors in the mbuf as a flow id.
2020-07-17enable multiq support for ix.David Gwynne
this is an updated version of a diff from christiano haesbaert by way of mpi@ to enable the use of multiple tx and rx rings with msi-x. now that patrick@ got interrupts on multiple cpus working on arm64, i can commit this. the main changes are to use an intrmap pointer as the flag for whether msix has been enabled or not, and to use the intrmap to establish vectors on multiple cpus. tested by hrvoje popovski
2020-07-17Virtual functions are effectively identical to full physical functions,Jonathan Matthew
so we can attach to them too. ok dlg@
2020-07-17name the rx rings so systat mb shows them.David Gwynne
2020-07-17Consistently use the port type and speed register (PTYS) to determine ifJonathan Matthew
the link is up, rather than the operational status (PAOS). ok dlg@
2020-07-17add kstats to myx.David Gwynne
myx is unusually minimal, so there's not a lot of information that the chip provides. the most interesting is the number of packets the chip drops cos of a lack of space on the rx rings.
2020-07-17Read ogen from the other timehands; fixes tk_generationgkoehler
If th0.th_generation == th1.th_generation when we update the user timekeep page, then tk_generation doesn't change, so libc may calculate the wrong time. Now th0 and th1 share the sequence so th0.th_generation != th1.th_generation. ok kettenis@ cheloha@
2020-07-17Always a joker hiding somewhere.Kenneth R Westerback
Access adapter_buswidth via link->bus->sb_adapter_buswidth.
2020-07-16adjtime(2): distribute skew along arbitrary period on runtime clockcheloha
The adjtime(2) adjustment is applied at up to 5000ppm/sec from tc_windup(). At the start of each UTC second, ntp_update_second() is called from tc_windup() and up to 5000ppm worth of skew is deducted from the timehands' th_adjtimedelta member and moved to the th_adjustment member. The resulting th_adjustment value is then mixed into the th_scale member and thus the system UTC time is slowly nudged in a particular direction. This works pretty well. The only issues have to do with the use of the the edge of the UTC second as the start of the ntp_update_second() period: 1. If the UTC clock jumps forward we can get stuck in a loop calling ntp_update_second() from tc_windup(). We work around this with a magic number, LARGE_STEP. If the UTC clock jumps forward more than LARGE_STEP seconds we truncate the number of iterations to 2. Per the comment in tc_windup(), we do 2 iterations instead of 1 iteration to account for a leap second we may have missed. This is an anachronism: the OpenBSD kernel does not handle leap seconds anymore. Such jumps happen during settimeofday(2), during boot when we jump the clock from zero to the RTC time, and during resume when we jump the clock to the RTC time (again). They are unavoidable. 2. Changes to adjtime(2) are applied asynchronously. For example, if you try to cancel the ongoing adjustment... struct timeval zero = { 0, 0 }; adjtime(&zero, NULL); ... it can take up to one second for the adjustment to be cancelled. In the meantime, the skew continues. This delayed application is not intuitive or documented. 3. Adjustment is deducted from th_adjtimedelta across suspends of fewer than LARGE_STEP seconds, even though we do not skew the clock while we are suspended. This is unintuitive, incorrect, and undocumented. We can avoid all of these problems by applying the adjustment along an arbitrary period on the runtime clock instead of the UTC clock. 1. The runtime clock doesn't jump arbitrary amounts, so we never get stuck in a loop and we don't need a magic number to test for this possibility. With the removal of the magic number LARGE_STEP we can also remove the leap second handling from the tc_windup() code. 2. With a new timehands member, th_next_ntp_update, we can track when the next ntp_update_second() call should happen on the runtime clock. This value can be updated during the adjtime(2) system call, so changes to the skew happen *immediately* instead of up to one second after the adjtime(2) call. 3. The runtime clock does not jump across a suspend: no skew is deducted from th_adjtimedelta for any time we are offline and unable to adjust the clock. otto@ says the use of the runtime clock should not be a problem for ntpd(8) or the NTP algorithm in general.
2020-07-16Pass the interrupt handler cookie instead of the pointer to itPatrick Wildt
to intr_barrier(9). Fixes mysterious panics seen while working on intr_barrier(9) for arm64. ok jmatthew@
2020-07-16Access adapter softc via link->bus->sb_adapter_softc.Kenneth R Westerback
In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth' via sb_adapter_buswidth. Removes last post-config uses of the copies of bus related information in scsi_link.
2020-07-16First stab at a bootloader for OpenBSD/powerpc64.Mark Kettenis
Based on the same principle (and mostly copied from) the bootloader written by visa@ for OpenBSD/octeon. Needed because the petitboot environment provided by the OpenPower firmware is unsuitable for loading OpenBSD kernels properly.
2020-07-16Add BOOT kernel config.Mark Kettenis
2020-07-16Add a pseudo-driver to "kexec" an OpenBSD/powerpc64 kernel. HeavilyMark Kettenis
based on the octboot driver that we use for octeon. To be used in the bootloader kernel.
2020-07-16Reset firmware state upon reboot.Mark Kettenis
2020-07-16Access scsibus_softc info (luns, adapter, adapter_target,Kenneth R Westerback
adapter_softc, adapter_buswidth) via link->bus rather than using copies currently residing in the link.
2020-07-16Store struct cpu_info * in arm64's interrupt wrap. intr_barrier() canPatrick Wildt
already assume every cookie is wrapped and simply retrieve the pointer from it. It's a bit of a layer violation though, since only the intc should actually store that kind of information. This is good enough for now, but I'm already cooking up a diff to resolve this. ok dlg@
2020-07-16To be able to have intr_barrier() on arm64, we need to be able toPatrick Wildt
somehow gain access to the struct cpu_info * used to establish the interrupt. One possibility is to store the pointer in the cookie returned by the establish methods. A better way would be to ask the interrupt controller directly to do barrier. This means that all external facing interrupt establish functions need to wrap the cookie in a common way. We already do this for FDT-based interrupts. Also most PCI controllers already return the cookie from the FDT API, which is already wrapped. So arm64's acpi_intr_establish() and acpipci(4) now need to explicitly wrap it, since they call ic->ic_establish directly, which does not wrap. ok dlg@
2020-07-16Beef up struct scsibus_softc to hold the information needed toKenneth R Westerback
initialize the scsi_link's on the bus. After sucking this information out of the "prototype" link provided by the scsibus_attach_arg, no need to keep a pointer to that prototype.
2020-07-16drm/i915: Also drop vm.ref along error paths for vma constructionJonathan Gray
From Chris Wilson 5e53344673fcf1df8ff52675ab0539fff26a8e29 in linux 5.7.y/5.7.9 cf1976b11372cac3b57fbae1831f66a4486355d3 in mainline linux
2020-07-16drm/i915: Drop vm.ref for duplicate vma on constructionJonathan Gray
From Chris Wilson 98762e5b00567622d57295d2d3389aea2c37be03 in linux 5.7.y/5.7.9 42723673a193d5f8e30dba6ea9826d42262a502b in mainline linux
2020-07-16drm/amdgpu: asd function needs to be unloaded in suspend phaseJonathan Gray
From Huang Rui 22ff658396b44606163ad0231e8215309a26d613 in linux 5.7.y/5.7.9 20303ec5d2165ee6344190274bc59118921f71d9 in mainline linux
2020-07-16drm/amdgpu: add TMR destory function for pspJonathan Gray
From Huang Rui 2c41c968c6f6480860c67210815cadc6507f5014 in linux 5.7.y/5.7.9 c564b8601ae917086751d90f464d5f19d731ece7 in mainline linux
2020-07-16drm/amdgpu: don't do soft recovery if gpu_recovery=0Jonathan Gray
From Marek Olsak d7915047a1d59474d06789a9dd1925064969e080 in linux 5.7.y/5.7.9 f4892c327a8e5df7ce16cab40897daf90baf6bec in mainline linux
2020-07-16drm/i915: Skip stale object handle for debugfs per-file-statsJonathan Gray
From Chris Wilson d073ed965cd908d320d49824dee02c80168f96a8 in linux 5.7.y/5.7.9 7dfbf8a07cf8c936b0d6cc810df6ae7923954d5b in mainline linux
2020-07-16drm/i915/gt: Pin the rings before marking activeJonathan Gray
From Chris Wilson 096b85c64987a0ef4fcc6ac0e3c3661573828df1 in linux 5.7.y/5.7.9 5a383d443b29a140094430f3ad1d02fa1acc2b80 in mainline linux
2020-07-16drm/radeon: fix double freeJonathan Gray
From Tom Rix 67e9648f20524ff6824ebeb26afea45f7d9c300d in linux 5.7.y/5.7.9 41855a898650803e24b284173354cc3e44d07725 in mainline linux
2020-07-16drm: panel-orientation-quirks: Use generic orientation-data for Acer S1003Jonathan Gray
From Hans de Goede 109b3b4e2a0f5bfda023a1b91b404fac31ba6808 in linux 5.7.y/5.7.9 a05caf9e62a85d12da27e814ac13195f4683f21c in mainline linux
2020-07-16drm: panel-orientation-quirks: Add quirk for Asus T101HA panelJonathan Gray
From Hans de Goede e64e92fea2bf85d9f33304faf973c46859afd0f7 in linux 5.7.y/5.7.9 6c22bc18a3b93a38018844636557ad02e588e055 in mainline linux
2020-07-16drm/ttm: Fix dma_fence refcnt leak when adding move fenceJonathan Gray
From Xiyu Yang bfd4297fd74ebb18d05044e49f1ff2fedd2ece8d in linux 5.7.y/5.7.9 11425c4519e2c974a100fc984867046d905b9380 in mainline linux
2020-07-16drm/ttm: Fix dma_fence refcnt leak in ttm_bo_vm_fault_reservedJonathan Gray
From Xiyu Yang f5e6ec57e3cbe37cd3ef52d18de6be9953ee105a in linux 5.7.y/5.7.9 37cc4b95d13f311c04aa8e9daacca3905ad45ca7 in mainline linux
2020-07-16Since the page tables could be larger than 256MB allow for multipleMark Kettenis
segments to map them.
2020-07-16Remove the refill timeout and wait for interrupts to finish whenJonathan Matthew
bringing the interface down. prompted by a crash seen by Hrvoje Popovski ok dlg@