Re: linux-next: build failure after merge of the amdgpu tree

2021-01-15 Thread Alex Deucher
On Fri, Jan 15, 2021 at 3:46 AM Huang, Ray  wrote:
>
> [AMD Public Use]
>
> Could you please help to check whether this patch can fix the issue?

Looks good.  Might want to add a comment where you set cpu_core_num
that this is only used on APUs which are x86 only.

Reviewed-by: Alex Deucher 

>
> Thanks,
> Ray
>
> -Original Message-
> From: Huang, Ray 
> Sent: Friday, January 15, 2021 1:57 PM
> To: Stephen Rothwell 
> Cc: Alex Deucher ; Linux Kernel Mailing List 
> ; Linux Next Mailing List 
> 
> Subject: Re: linux-next: build failure after merge of the amdgpu tree
>
> On Fri, Jan 15, 2021 at 01:35:05PM +0800, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the amdgpu tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> >
> > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> > 'vangogh_get_smu_metrics_data':
> > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:300:10: error: 
> > 'boot_cpu_data' undeclared (first use in this function); did you mean 
> > 'boot_cpuid'?
>
> Ah, vangogh is an x86 cpu, let me look at this issue.
>
> Could you share me the config file you tested?
>
> Thanks,
> Ray
>
> >   300 |  boot_cpu_data.x86_max_cores * sizeof(uint16_t));
> >   |  ^
> >   |  boot_cpuid
> > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> > 'vangogh_read_sensor':
> > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1320:11: error: 
> > 'boot_cpu_data' undeclared (first use in this function); did you mean 
> > 'boot_cpuid'?
> >  1320 |   *size = boot_cpu_data.x86_max_cores * sizeof(uint16_t);
> >   |   ^
> >   |   boot_cpuid
> > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> > 'vangogh_od_edit_dpm_table':
> > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1460:19: error: 
> > 'boot_cpu_data' undeclared (first use in this function); did you mean 
> > 'boot_cpuid'?
> >  1460 |   if (input[0] >= boot_cpu_data.x86_max_cores) {
> >   |   ^
> >   |   boot_cpuid
> >
> > Caused by commits
> >
> >   517cb957c43b ("drm/amd/pm: implement the processor clocks which read by 
> > metric")
> >   0d90d0ddd10e ("drm/amd/pm: implement processor fine grain feature for 
> > vangogh (v3)")
> >
> > The only thing I could do easily is to disable CONFIG_DRM_AMDGPU for today.
> >
> > --
> > Cheers,
> > Stephen Rothwell
>


RE: linux-next: build failure after merge of the amdgpu tree

2021-01-15 Thread Huang, Ray
[AMD Public Use]

Could you please help to check whether this patch can fix the issue?

Thanks,
Ray

-Original Message-
From: Huang, Ray  
Sent: Friday, January 15, 2021 1:57 PM
To: Stephen Rothwell 
Cc: Alex Deucher ; Linux Kernel Mailing List 
; Linux Next Mailing List 

Subject: Re: linux-next: build failure after merge of the amdgpu tree

On Fri, Jan 15, 2021 at 01:35:05PM +0800, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the amdgpu tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> 'vangogh_get_smu_metrics_data':
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:300:10: error: 
> 'boot_cpu_data' undeclared (first use in this function); did you mean 
> 'boot_cpuid'?

Ah, vangogh is an x86 cpu, let me look at this issue.

Could you share me the config file you tested?

Thanks,
Ray

>   300 |  boot_cpu_data.x86_max_cores * sizeof(uint16_t));
>   |  ^
>   |  boot_cpuid
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> 'vangogh_read_sensor':
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1320:11: error: 
> 'boot_cpu_data' undeclared (first use in this function); did you mean 
> 'boot_cpuid'?
>  1320 |   *size = boot_cpu_data.x86_max_cores * sizeof(uint16_t);
>   |   ^
>   |   boot_cpuid
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> 'vangogh_od_edit_dpm_table':
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1460:19: error: 
> 'boot_cpu_data' undeclared (first use in this function); did you mean 
> 'boot_cpuid'?
>  1460 |   if (input[0] >= boot_cpu_data.x86_max_cores) {
>   |   ^
>   |   boot_cpuid
> 
> Caused by commits
> 
>   517cb957c43b ("drm/amd/pm: implement the processor clocks which read by 
> metric")
>   0d90d0ddd10e ("drm/amd/pm: implement processor fine grain feature for 
> vangogh (v3)")
> 
> The only thing I could do easily is to disable CONFIG_DRM_AMDGPU for today.
> 
> -- 
> Cheers,
> Stephen Rothwell



0001-drm-amdgpu-fix-build-error-without-x86-kconfig.patch
Description: 0001-drm-amdgpu-fix-build-error-without-x86-kconfig.patch


Re: linux-next: build failure after merge of the amdgpu tree

2021-01-14 Thread Huang Rui
On Fri, Jan 15, 2021 at 01:35:05PM +0800, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the amdgpu tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> 'vangogh_get_smu_metrics_data':
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:300:10: error: 
> 'boot_cpu_data' undeclared (first use in this function); did you mean 
> 'boot_cpuid'?

Ah, vangogh is an x86 cpu, let me look at this issue.

Could you share me the config file you tested?

Thanks,
Ray

>   300 |  boot_cpu_data.x86_max_cores * sizeof(uint16_t));
>   |  ^
>   |  boot_cpuid
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> 'vangogh_read_sensor':
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1320:11: error: 
> 'boot_cpu_data' undeclared (first use in this function); did you mean 
> 'boot_cpuid'?
>  1320 |   *size = boot_cpu_data.x86_max_cores * sizeof(uint16_t);
>   |   ^
>   |   boot_cpuid
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function 
> 'vangogh_od_edit_dpm_table':
> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1460:19: error: 
> 'boot_cpu_data' undeclared (first use in this function); did you mean 
> 'boot_cpuid'?
>  1460 |   if (input[0] >= boot_cpu_data.x86_max_cores) {
>   |   ^
>   |   boot_cpuid
> 
> Caused by commits
> 
>   517cb957c43b ("drm/amd/pm: implement the processor clocks which read by 
> metric")
>   0d90d0ddd10e ("drm/amd/pm: implement processor fine grain feature for 
> vangogh (v3)")
> 
> The only thing I could do easily is to disable CONFIG_DRM_AMDGPU for today.
> 
> -- 
> Cheers,
> Stephen Rothwell




Re: linux-next: build failure after merge of the amdgpu tree

2020-06-25 Thread Stephen Rothwell
Hi all,

On Fri, 12 Jun 2020 10:25:52 +1000 Stephen Rothwell  
wrote:
>
> After merging the amdgpu tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c: In function 
> 'kfd_sdma_activity_worker':
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:118:2: error: implicit 
> declaration of function 'use_mm' [-Werror=implicit-function-declaration]
>   118 |  use_mm(mm);
>   |  ^~
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:145:2: error: implicit 
> declaration of function 'unuse_mm' [-Werror=implicit-function-declaration]
>   145 |  unuse_mm(mm);
>   |  ^~~~
> 
> Caused by commit
> 
>   32cb59f31362 ("drm/amdkfd: Track SDMA utilization per process")
> 
> interacting with commit
> 
>   f5678e7f2ac3 ("kernel: better document the use_mm/unuse_mm API contract")
> 
> from Linus' tree.
> 
> I have applied the following merge fix for today (that was previously
> part of the akpm tree).

The merge fix patch now looks like:

From: Stephen Rothwell 
Date: Thu, 28 May 2020 20:15:34 +1000
Subject: [PATCH] drm/amdkfd: fix up for {un}use_mm() rename

Signed-off-by: Stephen Rothwell 
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 013c2b018edc..40695d52e9a8 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -184,7 +184,7 @@ static void kfd_sdma_activity_worker(struct work_struct 
*work)
if (!mm)
goto cleanup;
 
-   use_mm(mm);
+   kthread_use_mm(mm);
 
list_for_each_entry(sdma_q, _q_list.list, list) {
val = 0;
@@ -198,7 +198,7 @@ static void kfd_sdma_activity_worker(struct work_struct 
*work)
}
}
 
-   unuse_mm(mm);
+   kthread_unuse_mm(mm);
mmput(mm);
 
/*

-- 
Cheers,
Stephen Rothwell


pgpBoBuhalELM.pgp
Description: OpenPGP digital signature


Re: linux-next: build failure after merge of the amdgpu tree

2019-08-15 Thread Stephen Rothwell
Hi Alex,

On Thu, 15 Aug 2019 21:52:19 -0400 Alex Deucher  wrote:
>
> Yes, sorry, just pushed out now.

Excellent, thanks.

-- 
Cheers,
Stephen Rothwell


pgpO8j1uoiXrU.pgp
Description: OpenPGP digital signature


Re: linux-next: build failure after merge of the amdgpu tree

2019-08-15 Thread Alex Deucher
Yes, sorry, just pushed out now.

Alex

On Thu, Aug 15, 2019 at 8:21 PM Stephen Rothwell  wrote:
>
> Hi Alex,
>
> On Tue, 13 Aug 2019 10:01:07 -0400 Alex Deucher  wrote:
> >
> > Applied.  thanks!
>
> But not pushed out?
>
> --
> Cheers,
> Stephen Rothwell


Re: linux-next: build failure after merge of the amdgpu tree

2019-08-15 Thread Stephen Rothwell
Hi Alex,

On Tue, 13 Aug 2019 10:01:07 -0400 Alex Deucher  wrote:
>
> Applied.  thanks!

But not pushed out?

-- 
Cheers,
Stephen Rothwell


pgpuu1Qr5BjtD.pgp
Description: OpenPGP digital signature


Re: linux-next: build failure after merge of the amdgpu tree

2019-08-13 Thread Alex Deucher
On Tue, Aug 13, 2019 at 4:21 AM Huang, Ray  wrote:
>
> > -Original Message-
> > From: Stephen Rothwell 
> > Sent: Tuesday, August 13, 2019 4:11 PM
> > To: Alex Deucher 
> > Cc: Linux Next Mailing List ; Linux Kernel
> > Mailing List ; Liu, Aaron
> > ; Huang, Ray 
> > Subject: linux-next: build failure after merge of the amdgpu tree
> >
> > Hi all,
> >
> > After merging the amdgpu tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> >
> > drivers/gpu/drm/amd/amdgpu/psp_v12_0.c:39:17: error: expected
> > declaration specifiers or '...' before string constant
> > MODULE_FIRMWARE("amdgpu/renoir_asd.bin");
> >  ^~~
> >
> > Caused by commit
> >
> >   6a7a0bdbfa0c ("drm/amdgpu: add psp_v12_0 for renoir (v2)")
> >
> > I have applied the following patch for today:
> >
> > From: Stephen Rothwell 
> > Date: Tue, 13 Aug 2019 18:03:16 +1000
> > Subject: [PATCH] drm/amdgpu: MODULE_FIRMWARE requires
> > linux/module.h
> >
> > Fixes: 6a7a0bdbfa0c ("drm/amdgpu: add psp_v12_0 for renoir (v2)")
> > Signed-off-by: Stephen Rothwell 
>
> Thanks!
>
> Reviewed-by: Huang Rui 
>

Applied.  thanks!

Alex

> > ---
> >  drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> > b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> > index f37b8af4b986..b474dfb79375 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> > @@ -21,6 +21,7 @@
> >   */
> >
> >  #include 
> > +#include 
> >  #include "amdgpu.h"
> >  #include "amdgpu_psp.h"
> >  #include "amdgpu_ucode.h"
> > --
> > 2.20.1
> >
> > --
> > Cheers,
> > Stephen Rothwell


RE: linux-next: build failure after merge of the amdgpu tree

2019-08-13 Thread Huang, Ray
> -Original Message-
> From: Stephen Rothwell 
> Sent: Tuesday, August 13, 2019 4:11 PM
> To: Alex Deucher 
> Cc: Linux Next Mailing List ; Linux Kernel
> Mailing List ; Liu, Aaron
> ; Huang, Ray 
> Subject: linux-next: build failure after merge of the amdgpu tree
> 
> Hi all,
> 
> After merging the amdgpu tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/gpu/drm/amd/amdgpu/psp_v12_0.c:39:17: error: expected
> declaration specifiers or '...' before string constant
> MODULE_FIRMWARE("amdgpu/renoir_asd.bin");
>  ^~~
> 
> Caused by commit
> 
>   6a7a0bdbfa0c ("drm/amdgpu: add psp_v12_0 for renoir (v2)")
> 
> I have applied the following patch for today:
> 
> From: Stephen Rothwell 
> Date: Tue, 13 Aug 2019 18:03:16 +1000
> Subject: [PATCH] drm/amdgpu: MODULE_FIRMWARE requires
> linux/module.h
> 
> Fixes: 6a7a0bdbfa0c ("drm/amdgpu: add psp_v12_0 for renoir (v2)")
> Signed-off-by: Stephen Rothwell 

Thanks!

Reviewed-by: Huang Rui 

> ---
>  drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> index f37b8af4b986..b474dfb79375 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> @@ -21,6 +21,7 @@
>   */
> 
>  #include 
> +#include 
>  #include "amdgpu.h"
>  #include "amdgpu_psp.h"
>  #include "amdgpu_ucode.h"
> --
> 2.20.1
> 
> --
> Cheers,
> Stephen Rothwell


Re: linux-next: build failure after merge of the amdgpu tree

2019-06-27 Thread Alex Deucher
On Wed, Jun 26, 2019 at 11:35 PM Stephen Rothwell  wrote:
>
> Hi Dave,
>
> On Wed, 26 Jun 2019 21:22:12 +1000 Stephen Rothwell  
> wrote:
> >
> > Hi Alex,
> >
> > After merging the amdgpu tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> >
> > In file included from drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:25:
> > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c: In function 
> > 'gfx_v10_0_cp_gfx_resume':
> > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:2628:27: error: 
> > 'CP_RB1_CNTL__BUF_SWAP_MASK' undeclared (first use in this function); did 
> > you mean 'CP_RB_CNTL__BUF_SWAP_MASK'?
> >   tmp = REG_SET_FIELD(tmp, CP_RB1_CNTL, BUF_SWAP, 1);
> >^~~
> > drivers/gpu/drm/amd/amdgpu/amdgpu.h:1067:36: note: in definition of macro 
> > 'REG_FIELD_MASK'
> >  #define REG_FIELD_MASK(reg, field) reg##__##field##_MASK
> > ^~~
> > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:2628:8: note: in expansion of macro 
> > 'REG_SET_FIELD'
> >   tmp = REG_SET_FIELD(tmp, CP_RB1_CNTL, BUF_SWAP, 1);
> > ^
> > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:2628:27: note: each undeclared 
> > identifier is reported only once for each function it appears in
> >   tmp = REG_SET_FIELD(tmp, CP_RB1_CNTL, BUF_SWAP, 1);
> >^~~
> > drivers/gpu/drm/amd/amdgpu/amdgpu.h:1067:36: note: in definition of macro 
> > 'REG_FIELD_MASK'
> >  #define REG_FIELD_MASK(reg, field) reg##__##field##_MASK
> > ^~~
> > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:2628:8: note: in expansion of macro 
> > 'REG_SET_FIELD'
> >   tmp = REG_SET_FIELD(tmp, CP_RB1_CNTL, BUF_SWAP, 1);
> > ^
> > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:2628:27: error: 
> > 'CP_RB1_CNTL__BUF_SWAP__SHIFT' undeclared (first use in this function); did 
> > you mean 'CP_RB0_CNTL__BUF_SWAP__SHIFT'?
> >   tmp = REG_SET_FIELD(tmp, CP_RB1_CNTL, BUF_SWAP, 1);
> >^~~
> > drivers/gpu/drm/amd/amdgpu/amdgpu.h:1066:37: note: in definition of macro 
> > 'REG_FIELD_SHIFT'
> >  #define REG_FIELD_SHIFT(reg, field) reg##__##field##__SHIFT
> >  ^~~
> > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:2628:8: note: in expansion of macro 
> > 'REG_SET_FIELD'
> >   tmp = REG_SET_FIELD(tmp, CP_RB1_CNTL, BUF_SWAP, 1);
> > ^
> >
> > Caused by commit
> >
> >   a644d85a5cd4 ("drm/amdgpu: add gfx v10 implementation (v10)")
> >
> > I have disabled that driver for today.  Please let me know when it is
> > fixed so that I can enable it again.
>
> I assume that this has now been inherited by the drm tree (since there
> has been no fix).  So the AMD_GPU driver will still be disabled in
> linux-next today as of the drm tree merge.

Fixed in this patch:
https://patchwork.freedesktop.org/patch/314527/?series=62866=1

Alex

>
> --
> Cheers,
> Stephen Rothwell