selftests/resctrl: Refactor feature check to use resource and feature name
[platform/kernel/linux-starfive.git] / tools / testing / selftests / resctrl / resctrl.h
index eff178b..9e46fa9 100644 (file)
 #define RESCTRL_PATH           "/sys/fs/resctrl"
 #define PHYS_ID_PATH           "/sys/devices/system/cpu/cpu"
 #define INFO_PATH              "/sys/fs/resctrl/info"
-#define L3_PATH                        "/sys/fs/resctrl/info/L3"
-#define MB_PATH                        "/sys/fs/resctrl/info/MB"
-#define L3_MON_PATH            "/sys/fs/resctrl/info/L3_MON"
-#define L3_MON_FEATURES_PATH   "/sys/fs/resctrl/info/L3_MON/mon_features"
 
 #define ARCH_INTEL     1
 #define ARCH_AMD       2
@@ -85,7 +81,7 @@ int get_resource_id(int cpu_no, int *resource_id);
 int mount_resctrlfs(void);
 int umount_resctrlfs(void);
 int validate_bw_report_request(char *bw_report);
-bool validate_resctrl_feature_request(const char *resctrl_val);
+bool validate_resctrl_feature_request(const char *resource, const char *feature);
 char *fgrep(FILE *inf, const char *str);
 int taskset_benchmark(pid_t bm_pid, int cpu_no);
 void run_benchmark(int signum, siginfo_t *info, void *ucontext);