From 0f2591e21b2e85c05e2aa74d4703189fd3a57526 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Fri, 17 Sep 2021 14:33:49 +0100 Subject: mailbox: pcc: Add pcc_mbox_chan structure to hold shared memory region info Currently PCC mailbox controller sets con_priv in each channel to hold the pointer to pcct subspace entry it corresponds to. The mailbox user will then fetch this pointer from the channel descriptor they get when they request for the channel. Using that pointer they then parse the pcct entry again to fetch all the information about shared memory region. In order to remove individual users of PCC mailbox parsing the PCCT subspace entries to fetch same information, let us consolidate the same in pcc mailbox controller by parsing all the shared memory region information into a structure that can also hold the mbox_chan pointer it represent. This can then be used as main PCC mailbox channel pointer that we can return as part of pcc_mbox_request_channel instead of standard mailbox channel pointer. Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar --- include/acpi/pcc.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h index 4dec4ed138cd..5e510a6b8052 100644 --- a/include/acpi/pcc.h +++ b/include/acpi/pcc.h @@ -9,6 +9,15 @@ #include #include +struct pcc_mbox_chan { + struct mbox_chan *mchan; + u64 shmem_base_addr; + u64 shmem_size; + u32 latency; + u32 max_access_rate; + u16 min_turnaround_time; +}; + #define MAX_PCC_SUBSPACES 256 #ifdef CONFIG_PCC extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, -- cgit 1.4.1