summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-01-01copyright++;Jonathan Gray
2019-01-01Fix comment typoPhilip Guenther
2018-12-31Set assigned-clocks.Mark Kettenis
2018-12-31Set assigned-clocks on RK3328.Mark Kettenis
2018-12-31Force base clock to 50 MHz on Rockchip SoCs. This increases the chance thatMark Kettenis
we end up with an optimal clock frequency for SD and eMMC. ok patrick@
2018-12-31Use data structures for the RK3399 as well.Mark Kettenis
2018-12-31nanosleep: loop tsleep(9) to ensure coverage of the full timeout range.cheloha
tsleep(9)'s maximum timeout shrinks as HZ grows, so this ensures we do not return early from longer timeouts on alpha or on custom kernels. POSIX says you cannot return early unless a signal is delivered, so this makes us more compliant with the standard. While here, remove the 100 million second upper bound. It is an artifact from itimerfix() and it serves no discernible purpose. ok tedu@ visa@
2018-12-31Implement fractional PLL frequencies for RK3328 and use them for APLL andMark Kettenis
GPLL like the Linux kernel does. Use NPLL for the CPU clock such that adjusting the CPU frequency doesn't change the clock of other devices anymore. Implement the last clocks that are used in the assigned-clocks property of clock controller. Don't enable the assigned-clocks processing yet as it results in a sub-optimal clock for for the SD and eMMC controllers. This clock handling in dwmcc(4) needs some further work before we can enable this.
2018-12-31Avoid calling setperf() with a negative level.Mark Kettenis
Avoid a potential use of an unitilized variable to pick an operating point. Remove an unused (but set) variable. ok patrick@
2018-12-31Use the return value of task_add(9) to determine whether the task wasMark Kettenis
already scheduled and whether we have to unref the device ourselves. ok tedu@, ratchov@
2018-12-31Revamp the way we handle clocks on the RK3328. Instead of having code forMark Kettenis
each and every clock, use a data structure for each clock and generic code that handles muxing and clock division based on that data structure. This should reduce the amount of code and hopefully make the process of adding clocks less error prone as it is easy to check the data structures against the SoC documentation. This approach will be used for the other Rockchip SoCs in the future as well.
2018-12-31Set floating point condition code even if the result of an emulatedVisa Hankala
floating point comparison is unordered. The setting should be skipped only if an invalid operation exception is taken. This fixes incorrect emulated compare behaviour with NaN values. NaN issue on octeon reported by afresh1@; OK miod@
2018-12-31Cleanup bootloader code. Compile with -ffreestanding and add ffs.S as aClaudio Jeker
build dependency which is required because of that. Add various include files and some prototypes and change some code so that clang does not issue warnings anymore. OK kettenis@ deraadt@
2018-12-30More RK3328 clock stuff.Mark Kettenis
2018-12-30Turn on -mretpoline by default in clang on amd64, but turn it offPhilip Guenther
explicitly in SMALL_KERNEL kernel builds. tweaks from jsg@ and tb@ ok deraadt@ kettenis@
2018-12-30Increase the reset timeout. The ROCK64 RK3328-based board seems to need aMark Kettenis
bit more time after a warm reset.
2018-12-30Implement setting CPU-related clocks for RK3328.Mark Kettenis
2018-12-29Cleanup: Initialize the pointers to position data early, and useUlf Brosziewski
them consistently.
2018-12-29sys_nanosleep: switch to descriptive, idiomatic variable names; ok tedu@cheloha
2018-12-29Remove the hand-rolled maximum segment size handling in sximmc(4)Patrick Wildt
since we now have the possibility to specify it in the attach args. ok kettenis@
2018-12-29The i.MX SD/MMC host controller does not support zero-length DMAPatrick Wildt
descriptors, which are used to encode 64k transfers since it's a 16-bit value in the descriptor, which means that we only support a maximum segment size of 64k minus one. This fixes I/O errors on i.MX machines. ok kettenis@
2018-12-29Allow passing the maximum size of a segment that a SD/MMC hostPatrick Wildt
controller can handle for DMA tranfers, since not all support 64k. ok kettenis@
2018-12-28Fix dino at uturn attachment. From miod@Mark Kettenis
2018-12-28Fix mbuf releated crashes in switch(4). They have been found byAlexander Bluhm
syzkaller as pool corruption panic. It is unclear which bug caused what, but it should be better now. - Check M_PKTHDR with assertion before accessing m_pkthdr. - Do not access oh_length without m_pullup(). - After checking if there is space at the end of the mbuf, don't overwrite the data at the beginning. Append the new content. - Do not set m_len and m_pkthdr.len when it is unclear whether the ofp_error header fits at all. Use m_makespace() to adjust the mbuf. Reported-by: syzbot+6efc0a9d5b700b54392e@syzkaller.appspotmail.com test akoshibe@; OK claudio@
2018-12-27Make KIOENABLE accept a mode argument, currently limited to KCOV_MODE_TRACE_PC.anton
Thanks to jmc@ for improving the manual bits. ok deraadt@ mpi@
2018-12-27must remember to unref device if setting the task isn't done.Ted Unangst
ok anton
2018-12-27Check for main ruleset explicitlykn
All rulesets reference their parent anchor, except for the special cased main anchor containing the main ruleset, which's reference is always NULL since initialization and never changes. Replacing nullity tests with clearer equality checks makes the code less ambigious and easier to understand. OK sashan
2018-12-27Convert K&R function definitions to modern C. clang is more picky aboutClaudio Jeker
them. OK otto@ deraadt@
2018-12-27Move away from K&R style function definitions. clang is rather picky aboutClaudio Jeker
them especially if char and short arguments are used. OK otto@ deraadt@
2018-12-27Do not assign node to itself. Instead move the earlier initialisation intoClaudio Jeker
the for loop. Makes clang happier. OK otto@, deraadt@
2018-12-27Separate kcov descriptor state and trace mode as a first step towards supportinganton
different trace modes. ok mpi@
2018-12-26uncouple AF_MPLS and AF_INETdenis
input and OK mpi@
2018-12-26Remove the rasops24_erasecols and rasops24_eraserows functions fromFrederic Cambus
rasops(9). We only build rasops24 functions on amd64 (for EFI support in QEMU) and on armv7 and arm64, and we can safely use the generic functions on those platforms, like we do for all other color depths. No other platform uses rasops24, Miod explains why here [1]. No performance regression observed when testing with QEMU in EFI mode. [1] https://marc.info/?l=openbsd-ppc&m=118664346819989&w=2 OK kettenis@
2018-12-26Use estimates of speed to improve gesture detection.Ulf Brosziewski
ok mpi@ (to the concept)
2018-12-25In the kcov ioctl(KIOSETBUFSIZE) path, malloc() can sleep. Double check thatanton
someone else didn't win the race. ok mpi@
2018-12-25rework icmp6_error() to be closer to icmp_error()denis
input & OK mpi@
2018-12-24Adjust cpsw for linux 4.20 device tree changes. The location of the phyJonathan Gray
is now found via phy-handle instead of phy_id.
2018-12-23Add support for generating a REPEATED START on operations where we firstPatrick Wildt
write the register address and then read the register data in one go. ok kettenis@
2018-12-23Rectify some issues with the noperm mount flag; the root vnode was notMartin Natano
protected properly and files without any x bit set were accidentaly considered executable when checked with access(2). Issues found and reported by deraadt, halex, reyk, tb ok deraadt
2018-12-22Avoid using m_trailingspace(9) on an mbuf allocated with MGET(9) as it reliesMark Kettenis
on header fields that aren't initialized, which may trigger an assertion. Check whether the control message doesn't exceed MLEN instead and turn the check into a KASSERT as the driver should not generate control messages that are larger. with help form claudio@ (who points out that the driver should not use MT_CONTROL here). ok patrick@
2018-12-21Do PAT setup earlier such that mapping the framebuffer WC works at theMark Kettenis
point where we remap it. ok deraadt@, mlarkin@
2018-12-21remove intr_find_mpmapping proto func removed in intr.c rev 1.31 in 2011Jonathan Gray
2018-12-20add bpe(4) or Backbone Provider Edge interfacesDavid Gwynne
Backbone refers to 802.1ah or 802.1Q Provider Backbone Bridges (PBB), or mac-in-mac, which is like vlans except it completely encapsulates the inner packet rather than just add a shim to it. This removes the need for Backbone Core Bridges (ie, switches between bpe instances) to know all the addresses on all the networks.
2018-12-20Replace a wrong poor mans m_trailingspace() with the real thing. The mbufClaudio Jeker
passed to ip_pcbopts could be a cluster and so the size check is all wrong. found by Greg Steuck; OK bluhm@ Reported-by: syzbot+c2543ae6b6692a5843e3@syzkaller.appspotmail.com eVS: ----------------------------------------------------------------------
2018-12-20The timeouts in nd6 are in msec so just use timeout_add_msec() insteadClaudio Jeker
of some complicated match to convert them to ticks. OK visa@ bluhm@ kn@
2018-12-20Convert to timeout_add_msec instead of counting ticks.Claudio Jeker
OK visa@ bluhm@ kn@
2018-12-20Make this not hz dependent by using timeout_add_sec() also rename theClaudio Jeker
define to IFNET_SLOWTIMO since it is no longer a hz divisor. OK visa@ bluhm@ kn@
2018-12-19get rid of a prototype for if_enqueue_try()David Gwynne
it isn't implemented, and is never called.
2018-12-18Detection of MELTDOWN-proof Intel CPUs was broken: cpuid.07 hasPhilip Guenther
subleafs, so to get SEFF0EDX_ARCH_CAP we have to clear %ecx too. While here, delete a redundant cpuid.01 invocation. problem noted and testing by tedu@ ok mlarkin@ deraadt@
2018-12-18Figure out the number of available CPUs using system fuse registers.Visa Hankala
This makes `ncpusfound' independent of kernel boot parameters. The kernel still needs the help of the firmware to spin up secondary CPUs, so the `coremask' or `numcores' boot parameter is still needed for multicore operation. Tested on CN5020, CN6120, CN7130 and CN7360.