Commit 353bb6a5 authored by Simon Trimmer's avatar Simon Trimmer Committed by Mark Brown

ASoC: wm_adsp: Compressed stream DSP memory structs should be __packed

The compressed stream code has a bunch of structs that are used to
represent DSP memory but have not been marked __packed. This isn't
safe, they could get padded on a 64-bit build.
Signed-off-by: default avatarSimon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220309130017.2816-1-simont@opensource.cirrus.comAcked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5e02fb59
...@@ -97,13 +97,13 @@ struct wm_adsp_system_config_xm_hdr { ...@@ -97,13 +97,13 @@ struct wm_adsp_system_config_xm_hdr {
__be32 wdma[8]; __be32 wdma[8];
__be32 build_job_name[3]; __be32 build_job_name[3];
__be32 build_job_number; __be32 build_job_number;
}; } __packed;
struct wm_halo_system_config_xm_hdr { struct wm_halo_system_config_xm_hdr {
__be32 halo_heartbeat; __be32 halo_heartbeat;
__be32 build_job_name[3]; __be32 build_job_name[3];
__be32 build_job_number; __be32 build_job_number;
}; } __packed;
struct wm_adsp_alg_xm_struct { struct wm_adsp_alg_xm_struct {
__be32 magic; __be32 magic;
...@@ -114,13 +114,13 @@ struct wm_adsp_alg_xm_struct { ...@@ -114,13 +114,13 @@ struct wm_adsp_alg_xm_struct {
__be32 high_water_mark; __be32 high_water_mark;
__be32 low_water_mark; __be32 low_water_mark;
__be64 smoothed_power; __be64 smoothed_power;
}; } __packed;
struct wm_adsp_host_buf_coeff_v1 { struct wm_adsp_host_buf_coeff_v1 {
__be32 host_buf_ptr; /* Host buffer pointer */ __be32 host_buf_ptr; /* Host buffer pointer */
__be32 versions; /* Version numbers */ __be32 versions; /* Version numbers */
__be32 name[4]; /* The buffer name */ __be32 name[4]; /* The buffer name */
}; } __packed;
struct wm_adsp_buffer { struct wm_adsp_buffer {
__be32 buf1_base; /* Base addr of first buffer area */ __be32 buf1_base; /* Base addr of first buffer area */
...@@ -141,7 +141,7 @@ struct wm_adsp_buffer { ...@@ -141,7 +141,7 @@ struct wm_adsp_buffer {
__be32 min_free; /* min free space since stream start */ __be32 min_free; /* min free space since stream start */
__be32 blocks_written[2]; /* total blocks written (64 bit) */ __be32 blocks_written[2]; /* total blocks written (64 bit) */
__be32 words_written[2]; /* total words written (64 bit) */ __be32 words_written[2]; /* total words written (64 bit) */
}; } __packed;
struct wm_adsp_compr; struct wm_adsp_compr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment