HV: RDT: clean up RDT code

This commit makes some RDT code cleanup, mainling including:
- remove the clos_mask and mba_delay validation check in setup_res_clos_msr(), the check will be done in pre-build;
- rename platform_clos_num to valid_clos_num, which is set as the minimal clos_mas of all enabled RDT resouces;
- init the platform_clos_array in the res_cap_info[] definition;
- remove the unnecessary return values and return value check.

Tracked-On: #4604
Signed-off-by: Yan, Like <like.yan@intel.com>
This commit is contained in:
Yan, Like
2020-04-29 22:40:39 +08:00
committed by wenlingz
parent f774ee1fba
commit 277c668b04
4 changed files with 51 additions and 88 deletions

View File

@@ -21,7 +21,7 @@ enum {
#define RDT_RESID_MBA 3U
extern const uint16_t hv_clos;
extern const uint16_t platform_clos_num;
extern uint16_t valid_clos_num;
/* The intel Resource Director Tech(RDT) based Allocation Tech support */
struct rdt_info {
@@ -42,8 +42,8 @@ struct rdt_info {
struct platform_clos_info *platform_clos_array; /* user configured mask and MSR info for each CLOS*/
};
int32_t init_rdt_cap_info(void);
bool setup_clos(uint16_t pcpu_id);
void init_rdt_cap_info(void);
void setup_clos(uint16_t pcpu_id);
uint64_t clos2pqr_msr(uint16_t clos);
bool is_platform_rdt_capable(void);