+ snprintf(fullpath_base, sizeof(fullpath_base), POWER_SYSFILE_BASE_FREQ,
+ pi->lcore_id);
+
+ f_base = fopen(fullpath_base, "r");
+ if (f_base == NULL) {
+ /* No sysfs base_frequency, that's OK, continue without */
+ base_ratio = 0;
+ } else {
+ s_base = fgets(buf_base, sizeof(buf_base), f_base);
+ FOPS_OR_NULL_GOTO(s_base, out);
+
+ buf_base[BUFSIZ-1] = '\0';
+ if (strlen(buf_base))
+ /* Strip off terminating '\n' */
+ strtok(buf_base, "\n");
+
+ base_ratio = strtoul(buf_base, NULL, POWER_CONVERT_TO_DECIMAL)
+ / BUS_FREQ;
+ }
+