Skip to content
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

ARM: dts: bcm2712-rpi: Set a 1GB ZONE_DMA limit #5658

Closed
wants to merge 1 commit into from

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Oct 17, 2023

The arm64 initialisation uses the physical address reachable by all DMA controllers to set the size of ZONE_DMA. This fails on BCM2712 with the current dts files because the declaration of the I/O space fools it into thinking the legacy 30-bit DMA channels can see most of the 32-bit space.

Take advantage of the simple nature of the implementation by adding a node with a restricted dma-ranges property solely so as to act as the limiting factor in the calculation.

See: #5470

The arm64 initialisation uses the physical address reachable by all
DMA controllers to set the size of ZONE_DMA. This fails on BCM2712
with the current dts files because the declaration of the I/O space
fools it into thinking the legacy 30-bit DMA channels can see most
of the 32-bit space.

Take advantage of the simple nature of the implementation by adding
a node with a restricted dma-ranges property solely so as to act as
the limiting factor in the calculation.

See: raspberrypi#5470

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor Author

pelwell commented Oct 18, 2023

I'm slightly concerned that this may be unnecessarily restrictive for Pi 5 most of the time - is the old DWC_OTG block the only block still (sometimes) in use that can only address the first 1GB? - but let's give this some wider testing.

@popcornmix
Copy link
Collaborator

I can't think of anything else limited to 1GB (apart from VC).
In fact pretty much everything can access the full (40-bits-ish) address bus on Pi5.

@pelwell
Copy link
Contributor Author

pelwell commented Oct 18, 2023

Are you OK with this being merged, or would you rather tie it to dwc_otg use in some way?

@popcornmix
Copy link
Collaborator

What exactly does this change affect?
I assume some buffers were more freely allocated before this, and are now limited to bottom 1GB?
Does this affect cma? dmabufs? kmalloc?

@pelwell
Copy link
Contributor Author

pelwell commented Oct 18, 2023 via email

@pelwell
Copy link
Contributor Author

pelwell commented Oct 19, 2023

This is likely to be superseded by #5661.

@pelwell pelwell closed this Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants