Re: [PATCH] drm/amdgpu: Fix lockdep warking more gracely

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-and-Tested-by: Andrey Grodzovsky <andrey.grodzovsky@xxxxxxx>

Andrey

On 3/11/19 7:57 AM, Pan, Xinhui wrote:
> lockdep need a static key.
> Previously we set ignore bit to avoid the warning.
> Now call sysfs_attr_init to initialize the static key.
>
> Signed-off-by: xinhui pan <xinhui.pan@xxxxxxx>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 1acaa8473629..1f47974b1184 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -748,12 +748,10 @@ static int amdgpu_ras_sysfs_create_feature_node(struct amdgpu_device *adev)
>   		.attr = {
>   			.name = "features",
>   			.mode = S_IRUGO,
> -#ifdef CONFIG_DEBUG_LOCK_ALLOC
> -			.ignore_lockdep = 1,
> -#endif
>   		},
>   			.show = amdgpu_ras_sysfs_features_read,
>   	};
> +	sysfs_attr_init(attrs[0]);
>   
>   	return sysfs_create_group(&adev->dev->kobj, &group);
>   }
> @@ -793,12 +791,10 @@ int amdgpu_ras_sysfs_create(struct amdgpu_device *adev,
>   		.attr = {
>   			.name = obj->fs_data.sysfs_name,
>   			.mode = S_IRUGO,
> -#ifdef CONFIG_DEBUG_LOCK_ALLOC
> -			.ignore_lockdep = 1,
> -#endif
>   		},
>   			.show = amdgpu_ras_sysfs_read,
>   	};
> +	sysfs_attr_init(&obj->sysfs_attr.attr);
>   
>   	if (sysfs_add_file_to_group(&adev->dev->kobj,
>   				&obj->sysfs_attr.attr,
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux