lib: sbi_domain: Rename per-domain data to per-domain state

The per-domain sbi_domain_data hold each domain
associated state like hart context in sbi_domain_context,
mpxy state in sbi_mpxy, and others like each domain backed
by the corresponding MPT (SMMPT).
DATA reads as a generic name, while every use stores state.
Rename functions and macros appropriately. There are no
functional changes.

Signed-off-by: Rahul Pathak <rahul.pathak@oss.qualcomm.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260820121309.2551296-3-rahul.pathak@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Rahul Pathak
2026-09-05 12:53:15 +05:30
committed by Anup Patel
parent 35af7c8c7e
commit 3593a5facc
9 changed files with 261 additions and 261 deletions
+7 -7
View File
@@ -64,14 +64,14 @@ struct hart_context {
bool initialized;
};
static struct sbi_domain_data dcpriv;
static struct sbi_domain_state dcstate;
static inline struct hart_context *hart_context_get(struct sbi_domain *dom,
u32 hartindex)
{
struct hart_context **dom_hartindex_to_context_table;
dom_hartindex_to_context_table = sbi_domain_data_ptr(dom, &dcpriv);
dom_hartindex_to_context_table = sbi_domain_state_ptr(dom, &dcstate);
if (!dom_hartindex_to_context_table || !sbi_hartindex_valid(hartindex))
return NULL;
@@ -83,7 +83,7 @@ static void hart_context_set(struct sbi_domain *dom, u32 hartindex,
{
struct hart_context **dom_hartindex_to_context_table;
dom_hartindex_to_context_table = sbi_domain_data_ptr(dom, &dcpriv);
dom_hartindex_to_context_table = sbi_domain_state_ptr(dom, &dcstate);
if (!dom_hartindex_to_context_table || !sbi_hartindex_valid(hartindex))
return;
@@ -314,15 +314,15 @@ int sbi_domain_context_init(void)
/**
* Allocate per-domain and per-hart context data.
* The data type is "struct hart_context **" whose memory space will be
* dynamically allocated by domain_setup_data_one(). Calculate needed
* dynamically allocated by domain_setup_state_one(). Calculate needed
* size of memory space here.
*/
dcpriv.data_size = sizeof(struct hart_context *) * sbi_hart_count();
dcstate.state_size = sizeof(struct hart_context *) * sbi_hart_count();
return sbi_domain_register_data(&dcpriv);
return sbi_domain_register_state(&dcstate);
}
void sbi_domain_context_deinit(void)
{
sbi_domain_unregister_data(&dcpriv);
sbi_domain_unregister_state(&dcstate);
}