Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Jan 15, 2021

commit 39266ca ("core: assure alignment is only done on power of 2
values") changed the alignment macros, they now use C code to perform a
sanity check. This broke ALIGN() usage in
platform/suecreek/include/platform/lib/memory.h in two different ways:

  1. it broke static initializers in platform/suecreek/base_module.c
    because these can't use statement-expressions. This could have been
    fixed by simply switching to ALIGN_UP_COMPILE(), BUT:

  2. memory.h files are also included in assembly.

Also note memory.h values are copied unprocessed to linker scripts that
require the ALIGN() spelling.

For these reasons ALIGN() needs to be switched back to a "dumb" macro.

Preserve the sanity checks just added in alloc.c and pm_memory.c by
switching them to the new and smarter ALIGN_UP() macro.

Signed-off-by: Marc Herbert marc.herbert@intel.com

commit 39266ca ("core: assure alignment is only done on power of 2
values") changed the alignment macros, they now use C code to perform a
sanity check. This broke ALIGN() usage in
platform/suecreek/include/platform/lib/memory.h in two different ways:

1. it broke static initializers in platform/suecreek/base_module.c
because these can't use statement-expressions. This could have been
fixed by simply switching to ALIGN_UP_COMPILE(), BUT:

2. memory.h files are also included in assembly.

Also note memory.h values are copied unprocessed to linker scripts that
require the ALIGN() spelling.

For these reasons ALIGN() needs to be switched back to a "dumb" macro.

Preserve the sanity checks just added in alloc.c and pm_memory.c by
switching them to the new and smarter ALIGN_UP() macro.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@lgirdwood
Copy link
Member

@marc-hb thanks, probably a result of travis CI being ignored when out of resources now. What is the ETA for travis build checks on Jenkins now ?

@lgirdwood lgirdwood merged commit 32fe8a4 into thesofproject:master Jan 15, 2021
@marc-hb marc-hb deleted the restore-align branch January 15, 2021 14:35
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jan 15, 2021

Travis doesn't build sue creek, not sure why not. Sue creek was the only platform using ALIGN() in assembly, not sure why either.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Feb 10, 2021

This removed checks in (at least) memory.c and pm_runtime.c, see #3804

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.

3 participants