AMD-GFX Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] drm/amd/powerplay: fix compile error with ARCH=arc
@ 2020-06-28 11:18 Evan Quan
  2020-06-29 16:25 ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Evan Quan @ 2020-06-28 11:18 UTC (permalink / raw)
  To: amd-gfx; +Cc: alexander.deucher, Evan Quan, kernel test robot

Fix the compile error below:
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function 'smu_v11_0_init_microcode':
>> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean 'pci_warn'? [-Werror=implicit-function-declaration]
      22 |  pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
         |  ^~~~~~~
drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:176:3: note: in expansion of macro 'BUG'
     176 |   BUG();

Change-Id: I4e969082c41f8a8c91f1b0d19eb853eb0a2e0c0d
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Evan Quan <evan.quan@amd.com>
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index 677f8adb920c..48e15885e9c3 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -173,7 +173,8 @@ int smu_v11_0_init_microcode(struct smu_context *smu)
 		chip_name = "sienna_cichlid";
 		break;
 	default:
-		BUG();
+		dev_err(adev->dev, "Unsupported ASIC type %d\n", adev->asic_type);
+		return -EINVAL;
 	}
 
 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_smc.bin", chip_name);
-- 
2.27.0

_______________________________________________
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/amd/powerplay: fix compile error with ARCH=arc
  2020-06-28 11:18 [PATCH] drm/amd/powerplay: fix compile error with ARCH=arc Evan Quan
@ 2020-06-29 16:25 ` Alex Deucher
  2020-06-30  3:54   ` Quan, Evan
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2020-06-29 16:25 UTC (permalink / raw)
  To: Evan Quan; +Cc: Deucher, Alexander, kernel test robot, amd-gfx list

On Sun, Jun 28, 2020 at 7:19 AM Evan Quan <evan.quan@amd.com> wrote:
>
> Fix the compile error below:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function 'smu_v11_0_init_microcode':
> >> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean 'pci_warn'? [-Werror=implicit-function-declaration]
>       22 |  pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
>          |  ^~~~~~~
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:176:3: note: in expansion of macro 'BUG'
>      176 |   BUG();
>
> Change-Id: I4e969082c41f8a8c91f1b0d19eb853eb0a2e0c0d
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Evan Quan <evan.quan@amd.com>

I think this is probably a missing include.  We use BUG() elsewhere in
the driver with no problems.

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index 677f8adb920c..48e15885e9c3 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -173,7 +173,8 @@ int smu_v11_0_init_microcode(struct smu_context *smu)
>                 chip_name = "sienna_cichlid";
>                 break;
>         default:
> -               BUG();
> +               dev_err(adev->dev, "Unsupported ASIC type %d\n", adev->asic_type);
> +               return -EINVAL;
>         }
>
>         snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_smc.bin", chip_name);
> --
> 2.27.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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/amd/powerplay: fix compile error with ARCH=arc
  2020-06-29 16:25 ` Alex Deucher
@ 2020-06-30  3:54   ` Quan, Evan
  2020-06-30 12:49     ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Quan, Evan @ 2020-06-30  3:54 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Deucher, Alexander, kernel test robot, amd-gfx list

[AMD Official Use Only - Internal Distribution Only]

That's because pr_warn/err/info are forbidden to use in power routines.

/*
 * DO NOT use these for err/warn/info/debug messages.
 * Use dev_err, dev_warn, dev_info and dev_dbg instead.
 * They are more MGPU friendly.
 */
#undef pr_err
#undef pr_warn
#undef pr_info
#undef pr_debug

BR
Evan
-----Original Message-----
From: Alex Deucher <alexdeucher@gmail.com>
Sent: Tuesday, June 30, 2020 12:25 AM
To: Quan, Evan <Evan.Quan@amd.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] drm/amd/powerplay: fix compile error with ARCH=arc

On Sun, Jun 28, 2020 at 7:19 AM Evan Quan <evan.quan@amd.com> wrote:
>
> Fix the compile error below:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function 'smu_v11_0_init_microcode':
> >> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of
> >> function 'pr_warn'; did you mean 'pci_warn'?
> >> [-Werror=implicit-function-declaration]
>       22 |  pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
>          |  ^~~~~~~
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:176:3: note: in expansion of macro 'BUG'
>      176 |   BUG();
>
> Change-Id: I4e969082c41f8a8c91f1b0d19eb853eb0a2e0c0d
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Evan Quan <evan.quan@amd.com>

I think this is probably a missing include.  We use BUG() elsewhere in the driver with no problems.

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index 677f8adb920c..48e15885e9c3 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -173,7 +173,8 @@ int smu_v11_0_init_microcode(struct smu_context *smu)
>                 chip_name = "sienna_cichlid";
>                 break;
>         default:
> -               BUG();
> +               dev_err(adev->dev, "Unsupported ASIC type %d\n", adev->asic_type);
> +               return -EINVAL;
>         }
>
>         snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_smc.bin",
> chip_name);
> --
> 2.27.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cev
> an.quan%40amd.com%7C2962b4be8d5e4e72009308d81c49098d%7C3dd8961fe4884e6
> 08e11a82d994e183d%7C0%7C0%7C637290447307762780&amp;sdata=v5oJldXwh7UQN
> e0ETjZ048xkqODiPe6LiwmMIHu0Ur8%3D&amp;reserved=0
_______________________________________________
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/amd/powerplay: fix compile error with ARCH=arc
  2020-06-30  3:54   ` Quan, Evan
@ 2020-06-30 12:49     ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2020-06-30 12:49 UTC (permalink / raw)
  To: Quan, Evan; +Cc: Deucher, Alexander, kernel test robot, amd-gfx list

On Mon, Jun 29, 2020 at 11:54 PM Quan, Evan <Evan.Quan@amd.com> wrote:
>
> [AMD Official Use Only - Internal Distribution Only]
>
> That's because pr_warn/err/info are forbidden to use in power routines.
>
> /*
>  * DO NOT use these for err/warn/info/debug messages.
>  * Use dev_err, dev_warn, dev_info and dev_dbg instead.
>  * They are more MGPU friendly.
>  */
> #undef pr_err
> #undef pr_warn
> #undef pr_info
> #undef pr_debug
>
Ah, right.  Patch is:
Acked-by: Alex Deucher <alexander.deucher@amd.com>


> BR
> Evan
> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: Tuesday, June 30, 2020 12:25 AM
> To: Quan, Evan <Evan.Quan@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; kernel test robot <lkp@intel.com>
> Subject: Re: [PATCH] drm/amd/powerplay: fix compile error with ARCH=arc
>
> On Sun, Jun 28, 2020 at 7:19 AM Evan Quan <evan.quan@amd.com> wrote:
> >
> > Fix the compile error below:
> > drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function 'smu_v11_0_init_microcode':
> > >> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of
> > >> function 'pr_warn'; did you mean 'pci_warn'?
> > >> [-Werror=implicit-function-declaration]
> >       22 |  pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \
> >          |  ^~~~~~~
> > drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:176:3: note: in expansion of macro 'BUG'
> >      176 |   BUG();
> >
> > Change-Id: I4e969082c41f8a8c91f1b0d19eb853eb0a2e0c0d
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Evan Quan <evan.quan@amd.com>
>
> I think this is probably a missing include.  We use BUG() elsewhere in the driver with no problems.
>
> Alex
>
> > ---
> >  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> > b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> > index 677f8adb920c..48e15885e9c3 100644
> > --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> > +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> > @@ -173,7 +173,8 @@ int smu_v11_0_init_microcode(struct smu_context *smu)
> >                 chip_name = "sienna_cichlid";
> >                 break;
> >         default:
> > -               BUG();
> > +               dev_err(adev->dev, "Unsupported ASIC type %d\n", adev->asic_type);
> > +               return -EINVAL;
> >         }
> >
> >         snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_smc.bin",
> > chip_name);
> > --
> > 2.27.0
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cev
> > an.quan%40amd.com%7C2962b4be8d5e4e72009308d81c49098d%7C3dd8961fe4884e6
> > 08e11a82d994e183d%7C0%7C0%7C637290447307762780&amp;sdata=v5oJldXwh7UQN
> > e0ETjZ048xkqODiPe6LiwmMIHu0Ur8%3D&amp;reserved=0
_______________________________________________
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, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 11:18 [PATCH] drm/amd/powerplay: fix compile error with ARCH=arc Evan Quan
2020-06-29 16:25 ` Alex Deucher
2020-06-30  3:54   ` Quan, Evan
2020-06-30 12:49     ` Alex Deucher

AMD-GFX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/amd-gfx/0 amd-gfx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 amd-gfx amd-gfx/ https://lore.kernel.org/amd-gfx \
		amd-gfx@lists.freedesktop.org
	public-inbox-index amd-gfx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.amd-gfx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git