Skip to content

Commit

Permalink
soc: intel_adsp/ace: always inline funcs to get memory bank cnt
Browse files Browse the repository at this point in the history
The functions to get memory bank counts are simple enough that
they can be always inlined. This mostly helps with debugging,
especially with NO optimizations, as inlining is being done only
if the inline keyword is specified. This creates a chicken and
egg problem where the SRAM init functions need to call these
before code copying can be done. However, these functions are
not in memory before code copying, resulting in jumping into
memory with random bits.

Signed-off-by: Daniel Leung <[email protected]>
  • Loading branch information
dcpleung authored and nashif committed Oct 14, 2022
1 parent 3ffe265 commit a2cb4a7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ struct ace_l2mcap {

#define ACE_L2MCAP ((volatile struct ace_l2mcap *)DFL2MM_REG)

static inline uint32_t ace_hpsram_get_bank_count(void)
static ALWAYS_INLINE uint32_t ace_hpsram_get_bank_count(void)
{
return ACE_L2MCAP->l2hss;
}

static inline uint32_t ace_lpsram_get_bank_count(void)
static ALWAYS_INLINE uint32_t ace_lpsram_get_bank_count(void)
{
return ACE_L2MCAP->l2uss;
}
Expand Down

0 comments on commit a2cb4a7

Please sign in to comment.