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

ipc: simplify CMakeLists.txt by using a suffix variable #9180

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

lyakh
Copy link
Collaborator

@lyakh lyakh commented May 31, 2024

Everywhere, where IPC3 and IPC4 are distinguished in CMakeLists.txt the only difference is the use of x_ipc3.c vs. x_ipc4.c. Instead of duplicating all build instructions for IPC3 and IPC4 just define and use a suffix variable.

@lyakh lyakh requested a review from marc-hb as a code owner May 31, 2024 14:06
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.

Change looks good, but I think you hid an easter egg in the commit...

${PROJECT_BINARY_DIR}/src_llext)
add_dependencies(app src)
elseif(CONFIG_COMP_SRC)
zephyr_library_sources(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is adding an unrelated change related to llext...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kv2019i oh, just a tiny small one, wouldn't hurt! ;-) No, thanks for catching, indeed!

Everywhere, where IPC3 and IPC4 are distinguished in CMakeLists.txt
the only difference is the use of x_ipc3.c vs. x_ipc4.c. Instead of
duplicating all build instructions for IPC3 and IPC4 just define and
use a suffix variable.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

Nice! I remember trying to stem that copy/paste/diverge tide when it was happening but I wasn't successful.

One concern though: is there still some Zephyr+IPC3 platform that is actually running this? Some old IMX config maybe?

@marc-hb
Copy link
Collaborator

marc-hb commented May 31, 2024

SOFCI TEST

1 similar comment
@marc-hb
Copy link
Collaborator

marc-hb commented Jun 1, 2024

SOFCI TEST

@lyakh
Copy link
Collaborator Author

lyakh commented Jun 3, 2024

One concern though: is there still some Zephyr+IPC3 platform that is actually running this? Some old IMX config maybe?

@marc-hb I don't know but why is this a concern? Would this patch break such cases?

@marc-hb
Copy link
Collaborator

marc-hb commented Jun 3, 2024

I don't know but why is this a concern? Would this patch break such cases?

Yes of course: if it's not tested then it does not work.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

More deletion than additions are good here !

@lgirdwood
Copy link
Member

One concern though: is there still some Zephyr+IPC3 platform that is actually running this? Some old IMX config maybe?

@marc-hb I don't know but why is this a concern? Would this patch break such cases?

Build test only.

Copy link
Contributor

@iuliana-prodan iuliana-prodan left a comment

Choose a reason for hiding this comment

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

LGTM

@iuliana-prodan
Copy link
Contributor

One concern though: is there still some Zephyr+IPC3 platform that is actually running this? Some old IMX config maybe?

@marc-hb I don't know but why is this a concern? Would this patch break such cases?

Build test only.

I haven't tested on target, but from code review and the SOF components we are using with i.MX the changes are ok.

@lyakh
Copy link
Collaborator Author

lyakh commented Jun 3, 2024

@kv2019i kv2019i merged commit d6ee13c into thesofproject:main Jun 3, 2024
37 of 46 checks passed
@lyakh lyakh deleted the ipc branch June 4, 2024 05:45
@lyakh
Copy link
Collaborator Author

lyakh commented Jun 4, 2024

I don't know but why is this a concern? Would this patch break such cases?

Yes of course: if it's not tested then it does not work.

@marc-hb sorry, not sure I'm getting your answer. My question was, whether this PR was breaking it, not whether it works.

@marc-hb
Copy link
Collaborator

marc-hb commented Jun 4, 2024

This PR changes "if (IPC3/IPC4)" code in zephyr/cmakelist.txt. If nothing compiles any Zephyr+IPC3 configuration right now, then the IPC3 branch of the change is not tested.

I'm not 100% sure but I think @iuliana-prodan said there is such an active configuration right now.

@iuliana-prodan
Copy link
Contributor

This PR changes "if (IPC3/IPC4)" code in zephyr/cmakelist.txt. If nothing compiles any Zephyr+IPC3 configuration right now, then the IPC3 branch of the change is not tested.

I'm not 100% sure but I think @iuliana-prodan said there is such an active configuration right now.

Yes, there is. Now, all i.MX is compiled with Zephyr + IPC3.

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.

5 participants