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

xtensa: Set CONFIG_DCACHE_LINE_SIZE for NXP/Intel boards used in SOF module #57926

Merged
merged 3 commits into from
May 17, 2023

Conversation

LaurentiuM1234
Copy link
Collaborator

No description provided.

Thanks to PR [1] which introduces support for cache management
operations on xtensa architecture NXP SoCs can now use the
Zephyr native cache management API.

This commit enables some configurations that will allow us
to use the native Zephyr cache management API.

[1]: zephyrproject-rtos#50136

Signed-off-by: Laurentiu Mihalcea <[email protected]>
nashif
nashif previously approved these changes May 16, 2023
kv2019i
kv2019i previously approved these changes May 16, 2023
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for all Intel bits.

@softwarecki
Copy link
Collaborator

I don't understand why we need this definition? We already have defined d-cache-line-size in dt. It can be read using sys_cache_data_line_size_get()

@LaurentiuM1234 LaurentiuM1234 dismissed stale reviews from kv2019i and nashif via 931b57a May 16, 2023 10:55
@LaurentiuM1234
Copy link
Collaborator Author

I don't understand why we need this definition? We already have defined d-cache-line-size in dt. It can be read using sys_cache_data_line_size_get()

Sadly that can't be used in SOF as the size of the data cache line needs to be known at build time as the alignment of some data (e.g: the heap) depends on it.

@LaurentiuM1234
Copy link
Collaborator Author

Update: added CONFIG_DCACHE_LINE_SIZE for intel_adsp_ace20_lnl.

This commit sets the DCACHE_LINE_SIZE config for all xtensa-based
Intel SoCs for SOF usage.

Signed-off-by: Laurentiu Mihalcea <[email protected]>
This commit sets the DCACHE_LINE_SIZE config for all xtensa-based
NXP SoCs for SOF usage.

Signed-off-by: Laurentiu Mihalcea <[email protected]>
@softwarecki
Copy link
Collaborator

I don't understand why we need this definition? We already have defined d-cache-line-size in dt. It can be read using sys_cache_data_line_size_get()

Sadly that can't be used in SOF as the size of the data cache line needs to be known at build time as the alignment of some data (e.g: the heap) depends on it.

We can still read it from DT at build time. DT_PROP_OR(DT_PATH(cpus, cpu_0), d_cache_line_size, 0);

@LaurentiuM1234
Copy link
Collaborator Author

LaurentiuM1234 commented May 16, 2023

I don't understand why we need this definition? We already have defined d-cache-line-size in dt. It can be read using sys_cache_data_line_size_get()

Sadly that can't be used in SOF as the size of the data cache line needs to be known at build time as the alignment of some data (e.g: the heap) depends on it.

We can still read it from DT at build time. DT_PROP_OR(DT_PATH(cpus, cpu_0), d_cache_line_size, 0);

Agreed but is there a reason for which this approach is better than the current one? We'd still have to add said property to all the NXP boards and intel_adsp_ace20_lnl.

EDIT: Also seems kinda odd to query the property of a CPU you have disabled (i.e: in the case of i.MX93 which uses CPU 1 not CPU 0 which is disabled)

@nashif nashif merged commit ca3dd23 into zephyrproject-rtos:main May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Intel ADSP Intel Audio platforms platform: NXP NXP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants