Skip to content

Conversation

@ktrzcinx
Copy link
Member

Solution extracted from discussion from #3527

Copy link
Member

Choose a reason for hiding this comment

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

Just wondering here if we can use a linker variable here for CONFIG_ELEM_COUNT as a way to automate this as it may be error prone for developers i.e. something cmake can pass into the linker pre-processor and have the linker set this based on the FW binary build ???

Copy link
Contributor

Choose a reason for hiding this comment

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

@ktrzcinx agreed with Liam, we can try to use some trick with enum like

Suggested change
sizeof(struct config_elem) * CONFIG_ELEM_CNT,
sizeof(struct config_elem) * (EXT_MAN_CONFIG_LAST_ELEM - 1),

You do not need to update the EXT_MAN_CONFIG_LAST_ELEM or CONFIG_ELEM_CNT if we add a new type

Copy link
Contributor

@xiulipan xiulipan left a comment

Choose a reason for hiding this comment

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

I think we can keep EXT_MAN_*_LAST_ELEM and calculated the CNT with (LAST_ELEM - 1)
No need to update the CNT anymore if we add new enum.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ktrzcinx agreed with Liam, we can try to use some trick with enum like

Suggested change
sizeof(struct config_elem) * CONFIG_ELEM_CNT,
sizeof(struct config_elem) * (EXT_MAN_CONFIG_LAST_ELEM - 1),

You do not need to update the EXT_MAN_CONFIG_LAST_ELEM or CONFIG_ELEM_CNT if we add a new type

…ig_data

This value shouldn't be included in any ABI header, because it may
vary between firmware configurations.
This change makes header file more similar to version provided by kernel.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
…ifest

This value should be included to output image with proper value instead
of including only for some configurations. It will reduce dictionary
element counting complexity.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
…_config_data

This value shouldn't be included in any ABI header, because it may
vary between firmware configurations.
This change makes header file more similar to version provided by kernel.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Copy link
Contributor

@xiulipan xiulipan left a comment

Choose a reason for hiding this comment

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

LGTM not. I am OK to have a more clear define for the COUNT.

@lgirdwood
Copy link
Member

@ktrzcinx can you check internal CI, looks like tests are failing ?

@xiulipan
Copy link
Contributor

xiulipan commented Jan 7, 2021

@lgirdwood @ktrzcinx I re-check our discussion in #3527
I will trigger a new round test with GCC built FW binary to verify this change won't break GCC compiler.

@xiulipan
Copy link
Contributor

xiulipan commented Jan 7, 2021

@lgirdwood @ktrzcinx Good to go, simple on-device test did not show issue with GCC FW binary.

@ktrzcinx
Copy link
Member Author

ktrzcinx commented Jan 7, 2021

@lgirdwood in internal CI single test is failing with message ERROR test_keyword_get_threshold(), unsupported sample width: 0, but it is unrelated with proposed change - system boot-up properly.

@lgirdwood
Copy link
Member

@zrombel good to merge, this error is unrelated ?

@zrombel
Copy link

zrombel commented Jan 7, 2021

It seemed unrelated. I run tests one again to be sure and now it's all green. Good to merge.

@lgirdwood lgirdwood merged commit 5a1078d into thesofproject:master Jan 7, 2021
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.

4 participants