• Lang Yu's avatar
    drm/amdgpu: fix sysfs_emit/sysfs_emit_at warnings(v2) · 8f48ba30
    Lang Yu authored
    sysfs_emit and sysfs_emit_at requrie a page boundary
    aligned buf address. Make them happy!
    
    v2: use an inline function.
    
    Warning Log:
    [  492.545174] invalid sysfs_emit_at: buf:00000000f19bdfde at:0
    [  492.546416] WARNING: CPU: 7 PID: 1304 at fs/sysfs/file.c:765 sysfs_emit_at+0x4a/0xa0
    [  492.654805] Call Trace:
    [  492.655353]  ? smu_cmn_get_metrics_table+0x40/0x50 [amdgpu]
    [  492.656780]  vangogh_print_clk_levels+0x369/0x410 [amdgpu]
    [  492.658245]  vangogh_common_print_clk_levels+0x77/0x80 [amdgpu]
    [  492.659733]  ? preempt_schedule_common+0x18/0x30
    [  492.660713]  smu_print_ppclk_levels+0x65/0x90 [amdgpu]
    [  492.662107]  amdgpu_get_pp_od_clk_voltage+0x13d/0x190 [amdgpu]
    [  492.663620]  dev_attr_show+0x1d/0x40
    Signed-off-by: default avatarLang Yu <lang.yu@amd.com>
    Acked-by: default avatarHuang Rui <ray.huang@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    8f48ba30
navi10_ppt.c 101 KB