Open
Conversation
jceel
pushed a commit
that referenced
this pull request
Dec 22, 2019
We use armv7/GENERIC for the RPI2 images. The original RPI2 is actually a 32-bit BCM2836, but v1.2 was upgraded to the 64-bit BCM2837. The project continues to provide the RPI2 image as armv7, as it's the lowest common denominator of the two. Historically, we've just kind of implicitly acknowledged this by including some bcm2837 bits on a SOC_BCM2836 kernel config -- this worked until r354875 added code that actually cared. Acknowledge formally that BCM2837 is valid in arm32. This name is inconsistent with the other BCM* SOC on !arm64 for two reasons: 1. It's a pre-existing option on arm64, and 2. the naming convention on arm/ should've arguably changed to include BRCM #1 seems to be a convincing enough argument to maintain the existing name for it.
jceel
pushed a commit
that referenced
this pull request
Jan 7, 2020
With WITNESS enabled we see the following warning:
lock order reversal: (sleepable after non-sleepable)
1st 0xffffffd0847c7210 fu540spi0 (fu540spi0) @
/usr/home/kp/axiado/hornet-freebsd/src/sys/riscv/sifive/fu540_spi.c:297
2nd 0xffffffc00372bb30 Clock topology lock (Clock topology lock) @
/usr/home/kp/axiado/hornet-freebsd/src/sys/dev/extres/clk/clk.c:1137
stack backtrace:
#0 0xffffffc0002a579e at witness_checkorder+0xb72
#1 0xffffffc0002a5556 at witness_checkorder+0x92a
freebsd#2 0xffffffc000254c7a at _sx_slock_int+0x66
freebsd#3 0xffffffc00025537a at _sx_slock+0x8
freebsd#4 0xffffffc000123022 at clk_get_freq+0x38
freebsd#5 0xffffffc0005463e4 at __clzdi2+0x2bb8
freebsd#6 0xffffffc00014af58 at randomdev_getkey+0x76e
freebsd#7 0xffffffc0001278b0 at simplebus_add_device+0x7ee
freebsd#8 0xffffffc00027c9a8 at device_attach+0x2e6
freebsd#9 0xffffffc00027c634 at device_probe_and_attach+0x7a
freebsd#10 0xffffffc00027d76a at bus_generic_attach+0x10
freebsd#11 0xffffffc00014aab0 at randomdev_getkey+0x2c6
freebsd#12 0xffffffc00027c9a8 at device_attach+0x2e6
freebsd#13 0xffffffc00027c634 at device_probe_and_attach+0x7a
freebsd#14 0xffffffc00027d76a at bus_generic_attach+0x10
freebsd#15 0xffffffc000278bd2 at config_intrhook_oneshot+0x52
freebsd#16 0xffffffc000278b3e at config_intrhook_establish+0x146
freebsd#17 0xffffffc000278cf2 at config_intrhook_disestablish+0xfe
The clock topology lock can sleep, which means we cannot attempt to
acquire it while holding the non-sleepable mutex.
Fix that by retrieving the clock speed once, during attach and not every
time during SPI transaction setup.
Submitted by: kp
Sponsored by: Axiado
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
merging the latest changes with upstream