mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: utils/mpxy: Remove p2a_db_index from RPMI system MSI attributes
The discovery of P2A doorbell system MSI index is now through RPMI shared memory DT node so remove p2a_db_index from RPMI system MSI attributes and access it as a mailbox channel attribute. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Link: https://lore.kernel.org/r/20250512083827.804151-5-apatel@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -32,10 +32,9 @@ static int mpxy_rpmi_sysmis_xfer(void *context, struct mbox_chan *chan,
|
||||
case RPMI_SYSMSI_SRV_GET_ATTRIBUTES:
|
||||
((u32 *)xfer->rx)[0] = cpu_to_le32(RPMI_SUCCESS);
|
||||
((u32 *)xfer->rx)[1] = cpu_to_le32(smg->sys_num_msi);
|
||||
((u32 *)xfer->rx)[2] = -1U;
|
||||
((u32 *)xfer->rx)[2] = 0;
|
||||
((u32 *)xfer->rx)[3] = 0;
|
||||
((u32 *)xfer->rx)[4] = 0;
|
||||
args->rx_data_len = 5 * sizeof(u32);
|
||||
args->rx_data_len = 4 * sizeof(u32);
|
||||
break;
|
||||
case RPMI_SYSMSI_SRV_GET_MSI_ATTRIBUTES:
|
||||
case RPMI_SYSMSI_SRV_SET_MSI_STATE:
|
||||
@@ -90,8 +89,14 @@ static int mpxy_rpmi_sysmsi_setup(void **context, struct mbox_chan *chan,
|
||||
struct rpmi_sysmsi_get_msi_attributes_req gmareq;
|
||||
struct rpmi_sysmsi_get_attributes_resp garesp;
|
||||
struct mpxy_rpmi_sysmsi *smg;
|
||||
u32 p2a_db_index;
|
||||
int rc, i;
|
||||
|
||||
rc = mbox_chan_get_attribute(chan, RPMI_CHANNEL_ATTR_P2A_DOORBELL_SYSMSI_INDEX,
|
||||
&p2a_db_index);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = rpmi_normal_request_with_status(chan, RPMI_SYSMSI_SRV_GET_ATTRIBUTES,
|
||||
NULL, 0, 0, &garesp, rpmi_u32_count(garesp),
|
||||
rpmi_u32_count(garesp));
|
||||
@@ -122,7 +127,7 @@ static int mpxy_rpmi_sysmsi_setup(void **context, struct mbox_chan *chan,
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (garesp.p2a_db_index == i ||
|
||||
if (p2a_db_index == i ||
|
||||
(gmaresp.flag0 & RPMI_SYSMSI_MSI_ATTRIBUTES_FLAG0_PREF_PRIV))
|
||||
bitmap_set(smg->sys_msi_denied_bmap, i, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user