Skip to content

Commit

Permalink
firmware: arm_scmi: Convert u32 to unsigned long to align with arm_sm…
Browse files Browse the repository at this point in the history
…ccc_1_1_invoke()

All the parameters to arm_smccc_1_1_invoke() are unsigned long which
aligns well on both 32-bit and 64-bit Arm based platforms. Let us store
all the members in the structure scmi_smc used as the parameters to the
arm_smccc_1_1_invoke() call as unsigned long.

Cc: Cristian Marussi <[email protected]>
Reviewed-by: Cristian Marussi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sudeep Holla <[email protected]>
  • Loading branch information
sudeep-holla committed Oct 9, 2023
1 parent 65a8a3d commit 1f17395
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/firmware/arm_scmi/smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ struct scmi_smc {
struct mutex shmem_lock;
#define INFLIGHT_NONE MSG_TOKEN_MAX
atomic_t inflight;
u32 func_id;
u32 param_page;
u32 param_offset;
unsigned long func_id;
unsigned long param_page;
unsigned long param_offset;
};

static irqreturn_t smc_msg_done_isr(int irq, void *data)
Expand Down Expand Up @@ -211,8 +211,6 @@ static int smc_send_message(struct scmi_chan_info *cinfo,
{
struct scmi_smc *scmi_info = cinfo->transport_info;
struct arm_smccc_res res;
unsigned long page = scmi_info->param_page;
unsigned long offset = scmi_info->param_offset;

/*
* Channel will be released only once response has been
Expand All @@ -222,8 +220,8 @@ static int smc_send_message(struct scmi_chan_info *cinfo,

shmem_tx_prepare(scmi_info->shmem, xfer, cinfo);

arm_smccc_1_1_invoke(scmi_info->func_id, page, offset, 0, 0, 0, 0, 0,
&res);
arm_smccc_1_1_invoke(scmi_info->func_id, scmi_info->param_page,
scmi_info->param_offset, 0, 0, 0, 0, 0, &res);

/* Only SMCCC_RET_NOT_SUPPORTED is valid error code */
if (res.a0) {
Expand Down

0 comments on commit 1f17395

Please sign in to comment.