soc: qcom: llcc: Move struct llcc_slice_config to header
Subsystems (2)
PATCH 1/1 soc: qcom: llcc: Move struct llcc_slice_config to header
Move struct llcc_slice_config to header so that it can be reused by other kernel modules.
--- drivers/soc/qcom/llcc-qcom.c | 44 -------------------------------------- include/linux/soc/qcom/llcc-qcom.h | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 44 deletions(-)
drivers/soc/qcom/llcc-qcom.c +0 -44
@@ -55,50 +55,6 @@#define LLCC_VERSION_2_0_0_0 0x02000000#define LLCC_VERSION_2_1_0_0 0x02010000 -/** -* struct llcc_slice_config - Data associated with the llcc slice -* @usecase_id: Unique id for the client's use case -* @slice_id: llcc slice id for each client -* @max_cap: The maximum capacity of the cache slice provided in KB -* @priority: Priority of the client used to select victim line for replacement -* @fixed_size: Boolean indicating if the slice has a fixed capacity -* @bonus_ways: Bonus ways are additional ways to be used for any slice, -* if client ends up using more than reserved cache ways. Bonus -* ways are allocated only if they are not reserved for some -* other client. -* @res_ways: Reserved ways for the cache slice, the reserved ways cannot -* be used by any other client than the one its assigned to. -* @cache_mode: Each slice operates as a cache, this controls the mode of the -* slice: normal or TCM(Tightly Coupled Memory) -* @probe_target_ways: Determines what ways to probe for access hit. When -* configured to 1 only bonus and reserved ways are probed. -* When configured to 0 all ways in llcc are probed. -* @dis_cap_alloc: Disable capacity based allocation for a client -* @retain_on_pc: If this bit is set and client has maintained active vote -* then the ways assigned to this client are not flushed on power -* collapse. -* @activate_on_init: Activate the slice immediately after it is programmed -* @write_scid_en: Bit enables write cache support for a given scid. -* @write_scid_cacheable_en: Enables write cache cacheable support for a -* given scid (not supported on v2 or older hardware). -*/ -struct llcc_slice_config { -u32 usecase_id; -u32 slice_id; -u32 max_cap; -u32 priority; -bool fixed_size; -u32 bonus_ways; -u32 res_ways; -u32 cache_mode; -u32 probe_target_ways; -bool dis_cap_alloc; -bool retain_on_pc; -bool activate_on_init; -bool write_scid_en; -bool write_scid_cacheable_en; -}; -struct qcom_llcc_config {const struct llcc_slice_config *sct_data;int size;
include/linux/soc/qcom/llcc-qcom.h +44 -0
50 lines not on this page · raw message
Signature · 1 line
2.7.4
Bjorn Andersson
maintainerQuoted 2 lines · Guru Das Srinagesh
Move struct
llcc_slice_configto header so that it can be reused by other kernel modules.
Can you please continue this sentence to provide some concrete examples? Will we see those other users posted upstream?
Thanks,
Bjorn
Quoted 120 lines
Signed-off-by Guru Das Srinagesh <[email protected]>--- drivers/soc/qcom/llcc-qcom.c | 44 -------------------------------------- include/linux/soc/qcom/llcc-qcom.h | 44 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 44 deletions(-)drivers/soc/qcom/llcc-qcom.c +0
-44@@ -55,50 +55,6 @@#define LLCC_VERSION_2_0_0_0 0x02000000#define LLCC_VERSION_2_1_0_0 0x02010000 -/** -* struct llcc_slice_config - Data associated with the llcc slice -* @usecase_id: Unique id for the client's use case -* @slice_id: llcc slice id for each client -* @max_cap: The maximum capacity of the cache slice provided in KB -* @priority: Priority of the client used to select victim line for replacement -* @fixed_size: Boolean indicating if the slice has a fixed capacity -* @bonus_ways: Bonus ways are additional ways to be used for any slice, -* if client ends up using more than reserved cache ways. Bonus -* ways are allocated only if they are not reserved for some -* other client. -* @res_ways: Reserved ways for the cache slice, the reserved ways cannot -* be used by any other client than the one its assigned to. -* @cache_mode: Each slice operates as a cache, this controls the mode of the -* slice: normal or TCM(Tightly Coupled Memory) -* @probe_target_ways: Determines what ways to probe for access hit. When -* configured to 1 only bonus and reserved ways are probed. -* When configured to 0 all ways in llcc are probed. -* @dis_cap_alloc: Disable capacity based allocation for a client -* @retain_on_pc: If this bit is set and client has maintained active vote -* then the ways assigned to this client are not flushed on power -* collapse. -* @activate_on_init: Activate the slice immediately after it is programmed -* @write_scid_en: Bit enables write cache support for a given scid. -* @write_scid_cacheable_en: Enables write cache cacheable support for a -* given scid (not supported on v2 or older hardware). -*/ -struct llcc_slice_config { -u32 usecase_id; -u32 slice_id; -u32 max_cap; -u32 priority; -bool fixed_size; -u32 bonus_ways; -u32 res_ways; -u32 cache_mode; -u32 probe_target_ways; -bool dis_cap_alloc; -bool retain_on_pc; -bool activate_on_init; -bool write_scid_en; -bool write_scid_cacheable_en; -}; -struct qcom_llcc_config {const struct llcc_slice_config *sct_data;int size;include/linux/soc/qcom/llcc-qcom.h +44
-0@@ -106,6 +106,50 @@ struct llcc_drv_data {u32 version; }; +/** +* struct llcc_slice_config - Data associated with the llcc slice +* @usecase_id: Unique id for the client's use case +* @slice_id: llcc slice id for each client +* @max_cap: The maximum capacity of the cache slice provided in KB +* @priority: Priority of the client used to select victim line for replacement +* @fixed_size: Boolean indicating if the slice has a fixed capacity +* @bonus_ways: Bonus ways are additional ways to be used for any slice, +* if client ends up using more than reserved cache ways. Bonus +* ways are allocated only if they are not reserved for some +* other client. +* @res_ways: Reserved ways for the cache slice, the reserved ways cannot +* be used by any other client than the one its assigned to. +* @cache_mode: Each slice operates as a cache, this controls the mode of the +* slice: normal or TCM(Tightly Coupled Memory) +* @probe_target_ways: Determines what ways to probe for access hit. When +* configured to 1 only bonus and reserved ways are probed. +* When configured to 0 all ways in llcc are probed. +* @dis_cap_alloc: Disable capacity based allocation for a client +* @retain_on_pc: If this bit is set and client has maintained active vote +* then the ways assigned to this client are not flushed on power +* collapse. +* @activate_on_init: Activate the slice immediately after it is programmed +* @write_scid_en: Bit enables write cache support for a given scid. +* @write_scid_cacheable_en: Enables write cache cacheable support for a +* given scid (not supported on v2 or older hardware). +*/ +struct llcc_slice_config { +u32 usecase_id; +u32 slice_id; +u32 max_cap; +u32 priority; +bool fixed_size; +u32 bonus_ways; +u32 res_ways; +u32 cache_mode; +u32 probe_target_ways; +bool dis_cap_alloc; +bool retain_on_pc; +bool activate_on_init; +bool write_scid_en; +bool write_scid_cacheable_en; +}; +#if IS_ENABLED (CONFIG_QCOM_LLCC )/** * llcc_slice_getd - get llcc slice descriptor Signature · 1 line
2.7.4
Quoted 6 lines · Bjorn Andersson
Quoted 2 lines · Guru Das Srinagesh
Move struct
llcc_slice_configto header so that it can be reused by other kernel modules.Can you please continue this sentence to provide some concrete examples? Will we see those other users posted upstream?
There is an llcc debug module downstream that we're currently using to test the llcc driver that uses this struct and has to copy the struct definition because it's not in the header. I can check with the team about their plans to upstream this driver.
Thank you.
Guru Das.