-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Drop ARCH_BCM2708 and ARCH_BCM2709 #1717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I combined my needed changes with your's and opened PR #1719. The bcmrpi3_defconfig looks a bit different. The file from my branch should just replace the existing bcmrpi3_defconfig. I tested the combined changes on a RPI 3. |
235e57a
to
438f9d5
Compare
It looks like these PRs have been broken by the recent rebase. Since my changes are small and I can just submit as a separate PR, I'm going to just close my version. |
You should be able to rebase your branch and force push the changes. This way you wouldn't need to close this PR and open a new one. |
Yes:
should be all that is needed to fix a PR - no need to open a new one. |
@@ -78,7 +78,7 @@ void notrace _fiq_print(enum fiq_debug_level dbg_lvl, volatile struct fiq_state | |||
* fiq_fsm_spin_lock() - ARMv6+ bare bones spinlock | |||
* Must be called with local interrupts and FIQ disabled. | |||
*/ | |||
#if defined(CONFIG_ARCH_BCM2709) && defined(CONFIG_SMP) | |||
#if defined(CONFIG_SMP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are now people building our downstream tree with random configurations and emailing us about build errors, so I'd be happier if we kept this implementation with its inline assembler conditional on CONFIG_ARCH_BCM2836.
I've appended a commit that keeps mkknlimg working as it used to, i.e. detecting builds from the RPi tree as wanting the downstread bcm27xx DTBs. |
14f6d97
to
875e8ce
Compare
Both are based on ARCH_BCM2835 so use that instead. Signed-off-by: Noralf Trønnes <[email protected]>
They are not necessary anymore since both are based on ARCH_BCM2835. Also use the compatible strings "brcm,bcm2835", "brcm,bcm2836" and "brcm,bcm2837". Signed-off-by: Noralf Trønnes <[email protected]>
With the death of ARCH_BCM2708 and ARCH_BCM2709, a new way is needed to determine if this is a "downstream" build that wants the firmware to load a bcm27xx .dtb. The vc_cma driver is used downstream but not upstream, making vc_cma_init a suitable predicate symbol.
There is no CONFIG_ARCH_BCM2836 so I used CONFIG_ARCH_BCM2835. |
One final thought, on something I should have spotted earlier - shouldn't bcm2836.dtsi set |
The files that include it, overwrites the property, so that means patching an upstream file without actually changing anything. What's your thoughts on my suggestion to switch to mainline dts files? |
Not unless we modify the upstream DTBs to include FIQ-enhanced USB, the sdhost driver, DT parameters and the labels (and perhaps a few others). |
Yes of course, in that case we would patch the upstream files. The dtsi files would be patched by applying the diff-files we have: And the downstream dts files will in reality just change names and the upstream version dropped: |
That plan is logically equivalent to deleting the upstream files. How is that a step forwards? Apart from all of the downstream-only code, the primary difference to upstream is now the choice of DTB. By retaining the upstream files we make the differences plain, and by keeping them unmodified we reduce the merge conflicts when switching branches. |
All the PR's I have made was done with the purpose of closing the gap to mainline. To minimize the difference. DTB names are one obvious difference. Anyways, if this PR goes in, it will mean that we have fully moved to ARCH_BCM2835 which is what I have been working towards for some time now. At that's a milestone for me personally :-) |
And for that, and all your contributions, you have our thanks. I'm happy for use to merge this PR. @popcornmix? |
@notro I'm not sure but I think this patch breaks some overlays when compatible string contains "brcm,bcm27XX" only. |
Really? I'll let you into a secret - currently nothing is checking the top-level compatible string in overlays. |
It's ok then |
I have updated the Upstreaming page. |
I did a fresh 4.8 Pi1 build, and get this:
|
vchiq ping test doesn't work either:
Works fine on Pi2. |
@notro you are correct. There is a bug in the code that affects Pi1 more than Pi2 (bonus points for explaining why Pi2 wasn't broken...) |
@pelwell |
Yes, vcdbg is working now.
I suck at this low level memory stuff. Some L2 cache alias thing maybe :-) struct device is missing here:
This means that bus_addr contains the ARM physical address instead of the bus address on rpi-4.8.y. |
Added. |
I'm still trying to get to the bottom of the vchiq_test -p stall. The main protocol handling looks OK, but something is going wrong within the client library. |
There is a potential race between the callback thread and the main test thread when switching between asynchronous and synchronous modes. The vchi_clnt_callback function tries to rapidly swallow zero-length pong packets in asynchronous mode by looping in the callback until the message queue is emptied. There is a danger that if the main test thread switches to synchronous mode before the callback thread notices the queue is empty that the callback thread will erroneously receive the synchronous pong packet. Remove the race by forcing the callback thread to leave dequeue loop when a sync point (non-zero length reply) is received. See: raspberrypi/linux#1717
Got it - there was a race between the VCHI callback thread and the main test thread. This race is much more likely to occur on an SoC with a single ARM core, i.e. a Pi1. I've pushed a fix to the userland repo. |
See: raspberrypi/linux#1722 kernel: fb: Use struct device for dma_alloc_coherent See: raspberrypi/linux#1717 (comment)
See: raspberrypi/linux#1722 kernel: fb: Use struct device for dma_alloc_coherent See: raspberrypi/linux#1717 (comment)
I have taken another step towards mainline by removing ARCH_BCM2708/ARCH_BCM2709 completely, including 2708/2709/2710 in the compatible property.
I haven't done arm64, because I couldn't get bcmrpi3_defconfig right.
With this PR mkknlimg will tag the kernel for 2835, so if tagged it currently doesn't work.
Tested on Pi1 and Pi2, not Pi3.
It would have been nice if we could move to the mainline dts files as well: bcm283{5,6}-rpi-*.dts
The bootloader could (if not tagged), use 2835 dtb's if present, or fall back to 2708.
What do you think?