mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-11-19 02:21:38 +00:00
lib: utils/mpxy: Add domain parameter to setup_group() callback
The MPXY channels can be domain specific so the setup_group() callback must know which domain the MPXY RPMI instance is associated with. Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Reviewed-by: Pawandeep Oza <pawandeep.oza@oss.qualcomm.com> Tested-by: Pawandeep Oza <pawandeep.oza@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260923032359.4041876-10-anup.patel@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
1 parent
c4f098bfa3
commit
f909590830
4 files changed
+6
-4
No files matched your search
@@ -41,6 +41,7 @@ struct mpxy_rpmi_data {
|
||||
|
||||
/** Setup RPMI service group context for MPXY */
|
||||
int (*setup_group)(void **context, struct mbox_chan *chan,
|
||||
struct sbi_domain *dom,
|
||||
const struct mpxy_rpmi_data *data);
|
||||
|
||||
/** Cleanup RPMI service group context for MPXY */
|
||||
|
||||
@@ -286,7 +286,7 @@ static int __mpxy_rpmi_init(const struct mpxy_rpmi_data *data,
|
||||
|
||||
/* Setup RPMI service group context */
|
||||
if (data->setup_group) {
|
||||
rc = data->setup_group(&rmb->group_context, chan, data);
|
||||
rc = data->setup_group(&rmb->group_context, chan, dom, data);
|
||||
if (rc)
|
||||
goto fail_free_client;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ static struct mpxy_rpmi_service_data mm_srvcdata[] = {
|
||||
};
|
||||
|
||||
static int mpxy_rpmi_mm_setup(void **context, struct mbox_chan *chan,
|
||||
struct sbi_domain *dom,
|
||||
const struct mpxy_rpmi_data *data)
|
||||
{
|
||||
unsigned long mm_region_addr = 0;
|
||||
@@ -63,9 +64,8 @@ static int mpxy_rpmi_mm_setup(void **context, struct mbox_chan *chan,
|
||||
mm_region_size = rsp.mma.shmem_size;
|
||||
mm_region_flags = SBI_DOMAIN_MEMREGION_SHARED_SURW_MRW;
|
||||
|
||||
rc = sbi_domain_root_add_memrange(mm_region_addr, mm_region_size,
|
||||
PAGE_SIZE, mm_region_flags);
|
||||
return rc;
|
||||
return sbi_domain_add_memrange(dom, mm_region_addr, mm_region_size,
|
||||
PAGE_SIZE, mm_region_flags);
|
||||
}
|
||||
|
||||
static int mpxy_rpmi_mm_xfer(void *context, struct mbox_chan *chan,
|
||||
|
||||
@@ -85,6 +85,7 @@ static void mpxy_rpmi_sysmsi_cleanup(void *context)
|
||||
}
|
||||
|
||||
static int mpxy_rpmi_sysmsi_setup(void **context, struct mbox_chan *chan,
|
||||
struct sbi_domain *dom,
|
||||
const struct mpxy_rpmi_data *data)
|
||||
{
|
||||
struct rpmi_sysmsi_get_msi_attributes_resp gmaresp;
|
||||
|
||||
Reference in new issue
Block a user