diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2024-08-02 14:46:08 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-08-02 15:05:15 +0200 |
commit | 5a4413d0fa8d0a438246acaf81637d71aab1b6a0 (patch) | |
tree | 7597ed23674c0c267be632fda06bf310061263ee /sound/soc/sof | |
parent | ASoC: SOF: sof-priv.h: optimize snd_sof_mailbox (diff) | |
download | linux-5a4413d0fa8d0a438246acaf81637d71aab1b6a0.tar.xz linux-5a4413d0fa8d0a438246acaf81637d71aab1b6a0.zip |
ASoC: SOF: sof-priv.h: optimize snd_sof_ipc_msg
Move waitq to make sure it's entirely in the same cache line, and move
ipc_complete to reduce padding.
struct snd_sof_ipc_msg {
void * msg_data; /* 0 8 */
void * reply_data; /* 8 8 */
size_t msg_size; /* 16 8 */
size_t reply_size; /* 24 8 */
int reply_error; /* 32 4 */
bool ipc_complete; /* 36 1 */
/* XXX 3 bytes hole, try to pack */
wait_queue_head_t waitq; /* 40 88 */
/* --- cacheline 2 boundary (128 bytes) --- */
void * rx_data; /* 128 8 */
/* size: 136, cachelines: 3, members: 8 */
/* sum members: 133, holes: 1, sum holes: 3 */
/* last cacheline: 8 bytes */
};
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20240802124609.188954-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r-- | sound/soc/sof/sof-priv.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h index 6ecc58e11592..843be3b6415d 100644 --- a/sound/soc/sof/sof-priv.h +++ b/sound/soc/sof/sof-priv.h @@ -425,11 +425,12 @@ struct snd_sof_ipc_msg { size_t reply_size; int reply_error; - /* notification, firmware initiated messages */ - void *rx_data; + bool ipc_complete; wait_queue_head_t waitq; - bool ipc_complete; + + /* notification, firmware initiated messages */ + void *rx_data; }; /** |