Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/sound/sof/info.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct sof_ipc_window_elem {
struct sof_ipc_window {
struct sof_ipc_ext_data_hdr ext_hdr;
uint32_t num_windows;
struct sof_ipc_window_elem window[];
struct sof_ipc_window_elem window[SOF_IPC_MAX_ELEMS];
} __packed;

struct sof_ipc_cc_version {
Expand Down
2 changes: 1 addition & 1 deletion include/uapi/sound/sof/abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/* SOF ABI version major, minor and patch numbers */
#define SOF_ABI_MAJOR 3
#define SOF_ABI_MINOR 16
#define SOF_ABI_MINOR 17
Copy link
Collaborator

Choose a reason for hiding this comment

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

how far are we with standardising our ABI changes? Haven't we yet agreed to first require a documented RFC for all changes?

Choose a reason for hiding this comment

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

RFC as issue is good pre-work, we have work done here already so you can comment/ACK/NACK in PR

Choose a reason for hiding this comment

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

@lyakh We agreed just that we need reviews from both sides, we don't have standarised flow for 'documenting', how would you like this to look? Author already wrote what he is bumping and why, however it may be not so 'detailed', cos he wrote that just backward compatibility is kept. Do you need it to be more detailed or maybe you need some other info?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jajanusz Having an implementation along with the ABI change is good IMHO. Without one, studying even an extended documentation might be difficult trying to understand whether the proposed change will really work. The change in this PR isn't particularly difficult either, so, I don't think it needs more documentation than is already provided. But the PR lacks both an ABI tag and an [RFC] keyword, so it could easily be missed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lyakh @jajanusz The new ABI process is still under discussion, it's not verified. Once we merge the sof-docs PR, then we can start following the new one, but until then, we do ABI changes with old rules.

#define SOF_ABI_PATCH 0

/* SOF ABI version number. Format within 32bit word is MMmmmppp */
Expand Down
5 changes: 2 additions & 3 deletions sound/soc/sof/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@ static int get_ext_windows(struct snd_sof_dev *sdev,
{
const struct sof_ipc_window *w =
container_of(ext_hdr, struct sof_ipc_window, ext_hdr);
size_t w_size = struct_size(w, window, w->num_windows);

if (w->num_windows == 0 || w->num_windows > SOF_IPC_MAX_ELEMS)
return -EINVAL;

if (sdev->info_window) {
if (memcmp(sdev->info_window, w, w_size)) {
if (memcmp(sdev->info_window, w, ext_hdr->hdr.size)) {
dev_err(sdev->dev, "error: mismatch between window descriptor from extended manifest and mailbox");
return -EINVAL;
}
return 0;
}

/* keep a local copy of the data */
sdev->info_window = kmemdup(w, w_size, GFP_KERNEL);
sdev->info_window = kmemdup(w, ext_hdr->hdr.size, GFP_KERNEL);
if (!sdev->info_window)
return -ENOMEM;

Expand Down