update workaroud scemd coredump in SA6400 7.2-64551

This commit is contained in:
Jim Ma 2023-05-04 16:24:07 +08:00
parent 69d89123c0
commit e9702c3a8c
3 changed files with 12 additions and 11 deletions

View File

@ -431,8 +431,9 @@ const struct hw_config supported_platforms[] = {
.sys_thermal = { HWMON_SYS_TZONE_REMOTE1_ID, HWMON_SYS_TZONE_LOCAL_ID, HWMON_SYS_TZONE_REMOTE2_ID }, .sys_thermal = { HWMON_SYS_TZONE_REMOTE1_ID, HWMON_SYS_TZONE_LOCAL_ID, HWMON_SYS_TZONE_REMOTE2_ID },
.sys_voltage = { HWMON_SYS_VSENS_VCC_ID, HWMON_SYS_VSENS_VPP_ID, HWMON_SYS_VSENS_V33_ID, .sys_voltage = { HWMON_SYS_VSENS_VCC_ID, HWMON_SYS_VSENS_VPP_ID, HWMON_SYS_VSENS_V33_ID,
HWMON_SYS_VSENS_V5_ID, HWMON_SYS_VSENS_V12_ID }, HWMON_SYS_VSENS_V5_ID, HWMON_SYS_VSENS_V12_ID },
.sys_fan_speed_rpm = {HWMON_SYS_FAN1_ID, HWMON_SYS_FAN2_ID }, // FIXME add NULL ID to workaroud scemd coredump in SA6400 7.2-64551
.hdd_backplane = { HWMON_SYS_HDD_BP_DETECT_ID, HWMON_SYS_HDD_BP_ENABLE_ID }, .sys_fan_speed_rpm = { HWMON_SYS_FAN1_ID, HWMON_SYS_FAN2_ID, HWMON_SYS_FAN_NULL_ID },
.hdd_backplane = { HWMON_SYS_HDD_BP_DETECT_ID, HWMON_SYS_HDD_BP_NULL_ID },
.psu_status = { HWMON_PSU_NULL_ID }, .psu_status = { HWMON_PSU_NULL_ID },
.sys_current = { HWMON_SYS_CURR_NULL_ID }, .sys_current = { HWMON_SYS_CURR_NULL_ID },
} }

View File

@ -245,9 +245,10 @@ static int bios_hwmon_get_fans_rpm(SYNO_HWMON_SENSOR_TYPE *reading)
for (int i = 0; i < HWMON_SYS_FAN_RPM_IDS; i++) { for (int i = 0; i < HWMON_SYS_FAN_RPM_IDS; i++) {
if (hwmon_cfg->sys_fan_speed_rpm[i] == HWMON_SYS_FAN_NULL_ID) if (hwmon_cfg->sys_fan_speed_rpm[i] == HWMON_SYS_FAN_NULL_ID)
break; break;
// Save the name of the sensor
guarded_strscpy(reading->sensor[i].sensor_name, hwmon_sys_fan_id_map[hwmon_cfg->sys_fan_speed_rpm[i]], guarded_strscpy(reading->sensor[i].sensor_name,
sizeof(reading->sensor[i].sensor_name)); //Save the name of the sensor hwmon_sys_fan_id_map[hwmon_cfg->sys_fan_speed_rpm[i]],
sizeof(reading->sensor[i].sensor_name));
hwmon_fans_rpm[i] = prandom_int_range_stable(&hwmon_fans_rpm[i], FAN_SPEED_DEV, FAKE_RPM_MIN, FAKE_RPM_MAX); hwmon_fans_rpm[i] = prandom_int_range_stable(&hwmon_fans_rpm[i], FAN_SPEED_DEV, FAKE_RPM_MIN, FAKE_RPM_MAX);
snprintf(reading->sensor[i].value, sizeof(reading->sensor[i].value), "%d", hwmon_fans_rpm[i]); snprintf(reading->sensor[i].value, sizeof(reading->sensor[i].value), "%d", hwmon_fans_rpm[i]);
++reading->sensor_num; ++reading->sensor_num;

View File

@ -105,12 +105,11 @@ static void print_debug_symbols(const unsigned long *vtable_end)
unsigned long *call_ptr = vtable_start; unsigned long *call_ptr = vtable_start;
unsigned char *byte_ptr = (char *)vtable_start; unsigned char *byte_ptr = (char *)vtable_start;
for (int i = 0; i < im; i++, byte_ptr++) { for (int i = 0; i < im; i+=8, byte_ptr+=8, call_ptr+=8) {
pr_loc_dbg_raw("%02x ", *byte_ptr); pr_loc_dbg_raw("%02x %02x %02x %02x %02x %02x %02x %02x ",
if ((i+1) % 8 == 0) { *byte_ptr, *byte_ptr+1, *byte_ptr+2, *byte_ptr+3,
pr_loc_dbg_raw(" [%02d] 0x%03x \t%p\t%pS\n", i / 8, i-7, (void *) (*call_ptr), (void *) (*call_ptr)); *byte_ptr+4, *byte_ptr+5, *byte_ptr+6, *byte_ptr+7);
call_ptr++; pr_loc_dbg_raw("[%02d] 0x%03x \t%p\t%pS\n", i/8, i-7, (void *) (*call_ptr), (void *) (*call_ptr));
}
} }
pr_loc_dbg_raw("\n"); pr_loc_dbg_raw("\n");