All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Fix lockdep warking more gracely
@ 2019-03-11 11:57 Pan, Xinhui
       [not found] ` <SN6PR12MB2800F0C5DAE738FA1F266E1987480-kxOKjb6HO/EqkY47FTA1ogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Pan, Xinhui @ 2019-03-11 11:57 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Deucher, Alexander, Michel Dänzer, Quan, Evan

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@amd.com>
---
 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,
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amdgpu: Fix lockdep warking more gracely
       [not found] ` <SN6PR12MB2800F0C5DAE738FA1F266E1987480-kxOKjb6HO/EqkY47FTA1ogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2019-03-11 15:14   ` Grodzovsky, Andrey
  2019-03-11 16:00   ` Paul Menzel
  1 sibling, 0 replies; 4+ messages in thread
From: Grodzovsky, Andrey @ 2019-03-11 15:14 UTC (permalink / raw)
  To: Pan, Xinhui, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Deucher, Alexander, Michel Dänzer, Quan, Evan

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

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@amd.com>
> ---
>   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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amdgpu: Fix lockdep warking more gracely
       [not found] ` <SN6PR12MB2800F0C5DAE738FA1F266E1987480-kxOKjb6HO/EqkY47FTA1ogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  2019-03-11 15:14   ` Grodzovsky, Andrey
@ 2019-03-11 16:00   ` Paul Menzel
       [not found]     ` <1a5f798c-39cb-1c9b-b198-86eb0d084370-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2019-03-11 16:00 UTC (permalink / raw)
  To: Xinhui Pan
  Cc: Alexander Deucher, Michel Dänzer, Evan Quan,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Dear Xinhui,


There is a typo in war*n*ing in your commit message summary.


Kind regards,

Paul
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] drm/amdgpu: Fix lockdep warking more gracely
       [not found]     ` <1a5f798c-39cb-1c9b-b198-86eb0d084370-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org>
@ 2019-03-11 16:03       ` Pan, Xinhui
  0 siblings, 0 replies; 4+ messages in thread
From: Pan, Xinhui @ 2019-03-11 16:03 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Deucher, Alexander, Michel Dänzer, Quan, Evan,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

I have fixed it and pushed in the internal branch. Sorry for typo.

-----Original Message-----
From: Paul Menzel <pmenzel+amd-gfx@molgen.mpg.de> 
Sent: 2019年3月12日 0:00
To: Pan, Xinhui <Xinhui.Pan@amd.com>
Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Michel Dänzer <michel@daenzer.net>; Quan, Evan <Evan.Quan@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Fix lockdep warking more gracely

Dear Xinhui,


There is a typo in war*n*ing in your commit message summary.


Kind regards,

Paul
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-11 16:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 11:57 [PATCH] drm/amdgpu: Fix lockdep warking more gracely Pan, Xinhui
     [not found] ` <SN6PR12MB2800F0C5DAE738FA1F266E1987480-kxOKjb6HO/EqkY47FTA1ogdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-03-11 15:14   ` Grodzovsky, Andrey
2019-03-11 16:00   ` Paul Menzel
     [not found]     ` <1a5f798c-39cb-1c9b-b198-86eb0d084370-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org>
2019-03-11 16:03       ` Pan, Xinhui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.