Re: [PATCH] x86, sched: Fix the AMD CPPC maximum perf on some specific generations

2021-04-20 Thread Huang Rui
On Tue, Apr 20, 2021 at 04:22:31PM +0800, Borislav Petkov wrote: > On Tue, Apr 20, 2021 at 04:09:43PM +0800, Huang Rui wrote: > > Some AMD Ryzen generations has different calculation method on maximum > > perf. 255 is not for all asics, some specific generations used 166 as >

[PATCH] x86, sched: Fix the AMD CPPC maximum perf on some specific generations

2021-04-20 Thread Huang Rui
iance for AMD systems") Fixes: 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies") Reported-by: Jason Bagavatsingham Tested-by: Jason Bagavatsingham Signed-off-by: Huang Rui Cc: Alex Deucher Cc: Nathan Fontenot Cc: Rafael J. Wysocki Cc: Bo

Re: [PATCH 2/2] drm/ttm: optimize the pool shrinker a bit v2

2021-04-15 Thread Huang Rui
ood for me as well. Acked-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_pool.c | 44 +- > 1 file changed, 22 insertions(+), 22 deletions(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c > index cb38b1a17b09..955

Re: your mail

2021-04-07 Thread Huang Rui
On Wed, Apr 07, 2021 at 09:27:46AM +0800, songqiang wrote: Please add the description in the commit message and subject. Thanks, Ray > Signed-off-by: songqiang > --- > drivers/gpu/drm/ttm/ttm_page_alloc.c | 18 ++ > 1 file changed, 14 insertions(+), 4 deletions(-) > > diff

Re: [PATCH 0/3] iommu/amd: Fix booting with amd_iommu=off

2021-03-17 Thread Huang Rui
OMMU is > disabled > iommu/amd: Keep track of amd_iommu_irq_remap state Series are Acked-by: Huang Rui > > drivers/iommu/amd/init.c | 36 > 1 file changed, 20 insertions(+), 16 deletions(-) > > -- > 2.30.2 >

Re: [PATCH] iommu/amd: Fix iommu remap panic while amd_iommu is set to disable

2021-03-17 Thread Huang Rui
On Tue, Mar 16, 2021 at 11:00:26PM +0800, Joerg Roedel wrote: > On Tue, Mar 16, 2021 at 09:36:02PM +0800, Huang Rui wrote: > > Thanks for the comments. Could you please elaborate this? > > > > Do you mean while amd_iommu=off, we won't prepare the IVRS, and even > >

Re: [PATCH] iommu/amd: Fix iommu remap panic while amd_iommu is set to disable

2021-03-16 Thread Huang Rui
On Tue, Mar 16, 2021 at 09:16:34PM +0800, Joerg Roedel wrote: > Hi Huang, > > On Thu, Mar 11, 2021 at 10:28:07PM +0800, Huang Rui wrote: > > diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c > > index f0adbc48fd17..a08e885403b7 100644 > > --- a/drivers/

Re: [PATCH V2] drm: amd: pm: Mundane typo fixes in the file amdgpu_pm.c

2021-03-14 Thread Huang Rui
On Mon, Mar 15, 2021 at 11:21:36AM +0800, Bhaskar Chowdhury wrote: > > s/"an minimum"/"a minimum"/ > s/"an maxmum"/"a maximum"/ > > Signed-off-by: Bhaskar Chowdhury Reviewed-by: Huang Rui > --- > Changes from V1: > Randy

[PATCH] iommu/amd: Fix iommu remap panic while amd_iommu is set to disable

2021-03-11 Thread Huang Rui
n Du Signed-off-by: Huang Rui Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/iommu/amd/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index f0adbc48fd17..a08

Re: [PATCH][next] drm/amdgpu: Fix masking binary not operator on two mask operations

2021-01-24 Thread Huang Rui
wise operator") > Fixes: 3c9a7b7d6e75 ("drm/amdgpu: update mmhub mgcg for mmhub_v2_3") > Signed-off-by: Colin Ian King Thanks. Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff -

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

2021-01-18 Thread Huang Rui
On Mon, Jan 18, 2021 at 02:52:18PM +0800, Stephen Rothwell wrote: > Hi Ray, > > On Mon, 18 Jan 2021 05:56:20 + "Huang, Ray" wrote: > > > > [AMD Public Use] > > > > Thanks Setphen. Please check attached V2 patch. > > (If you can share the config file to me, I can do the test in my side) > >

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': >

Re: [PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static

2021-01-12 Thread Huang Rui
On Wed, Jan 13, 2021 at 10:21:26AM +0800, Huang Rui wrote: > On Wed, Jan 13, 2021 at 10:13:02AM +0800, Alex Deucher wrote: > > On Tue, Jan 12, 2021 at 8:19 PM Huang Rui wrote: > > > > > > On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote: > > &

Re: [PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static

2021-01-12 Thread Huang Rui
On Wed, Jan 13, 2021 at 10:13:02AM +0800, Alex Deucher wrote: > On Tue, Jan 12, 2021 at 8:19 PM Huang Rui wrote: > > > > On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote: > > > kernel test robot throws below warnings -> > > > > > >

Re: [PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static

2021-01-12 Thread Huang Rui
On Wed, Jan 13, 2021 at 03:57:22AM +0800, Souptick Joarder wrote: > kernel test robot throws below warnings -> > > drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:594:6: > warning: no previous prototype for 'vangogh_clk_dpm_is_enabled' > [-Wmissing-prototypes] >

Re: 5.11-rc1 TTM list corruption

2021-01-05 Thread Huang Rui
On Tue, Jan 05, 2021 at 07:43:51PM +0800, Borislav Petkov wrote: > On Tue, Jan 05, 2021 at 07:08:52PM +0800, Huang Rui wrote: > > Ah, this asic is a bit old and still use radeon driver. So we didn't > > reproduce it on amdgpu driver. I don't have such the old asic in my hand.

Re: 5.11-rc1 TTM list corruption

2021-01-05 Thread Huang Rui
On Tue, Jan 05, 2021 at 06:31:38PM +0800, Borislav Petkov wrote: > Hi, > > On Tue, Jan 05, 2021 at 12:12:13PM +0800, Huang Rui wrote: > > I am reproducing this issue as well, are you using a Raven board? > > I have no clue what Raven is. The workstation I trig

Re: 5.11-rc1 TTM list corruption

2021-01-04 Thread Huang Rui
On Mon, Jan 04, 2021 at 06:58:02PM +0800, Borislav Petkov wrote: > On Fri, Jan 01, 2021 at 03:34:28PM +0100, Christian K?nig wrote: > > Going to double check the code, but can you reproduce this issue > > reliable? > > Lemme find a test box which can trigger it too - the splat happened > on my

Re: [PATCH] PCI: Mark AMD Raven iGPU ATS as broken

2020-11-23 Thread Huang Rui
ow as possible. Yes, besides the comments from Alex and Felix, may we get your firmware version (SMC firmware which is from SBIOS) and device id? > >>>| [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout, > >>> signaled seq=1, emitted seq=3 It looks only gfx ib

Re: [PATCH v2 -next] drm/amdkfd: Fix -Wunused-const-variable warning

2020-09-10 Thread Huang Rui
kfd_device_info raven_device_info = { > ^~~~~~~~~ > > As Huang Rui suggested, Raven already has the fallback path, > so it should be out of IOMMU v2 flag. > > Suggested-by: Huang Rui > Signed-off-by: YueHaibing Acked-by: Huang Rui

Re: [PATCH -next] drm/amdkfd: Fix -Wunused-const-variable warning

2020-09-10 Thread Huang Rui
On Thu, Sep 10, 2020 at 10:55:32AM +0800, YueHaibing wrote: > If KFD_SUPPORT_IOMMU_V2 is not set, gcc warns: > > drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device.c:121:37: warning: > ‘raven_device_info’ defined but not used [-Wunused-const-variable=] > static const struct kfd_device_info

Re: [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement

2019-03-03 Thread Huang Rui
; Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum > interface for Polaris.") > Cc: sta...@vger.kernel.org > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 + >

Re: radeon 0000:1d:00.0: GPU lockup (current fence id 0x00000000010da43f last fence id 0x00000000010da52d on ring 0)

2018-06-06 Thread Huang Rui
On Tue, Jun 05, 2018 at 04:44:04PM +0200, Borislav Petkov wrote: > Hi guys, > > X just froze here ontop of 4.17-rc7+ tip/master (kernel is from last > week) with the splat at the end. > > Box is a x470 chipset with Ryzen 2700X. > > GPU gets detected as > > [7.440971] [drm] radeon kernel

Re: radeon 0000:1d:00.0: GPU lockup (current fence id 0x00000000010da43f last fence id 0x00000000010da52d on ring 0)

2018-06-06 Thread Huang Rui
On Tue, Jun 05, 2018 at 04:44:04PM +0200, Borislav Petkov wrote: > Hi guys, > > X just froze here ontop of 4.17-rc7+ tip/master (kernel is from last > week) with the splat at the end. > > Box is a x470 chipset with Ryzen 2700X. > > GPU gets detected as > > [7.440971] [drm] radeon kernel

Re: [PATCH] drm/radeon: change function signature to pass full range

2018-04-13 Thread Huang Rui
always > false due to limited range of data type [-Wtype-limits] >if (num > ATOM_MAX_HW_I2C_READ) { >^ > > Signed-off-by: Mathieu Malaterre <ma...@debian.org> Reviewed-by: Huang Rui <ray.hu...@amd.com> > --- > drivers/gpu/drm/radeon/a

Re: [PATCH] drm/radeon: change function signature to pass full range

2018-04-13 Thread Huang Rui
always > false due to limited range of data type [-Wtype-limits] >if (num > ATOM_MAX_HW_I2C_READ) { >^ > > Signed-off-by: Mathieu Malaterre Reviewed-by: Huang Rui > --- > drivers/gpu/drm/radeon/atombios_i2c.c | 2 +- > 1 file changed, 1 insertion(+

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Huang Rui
On Tue, Apr 10, 2018 at 04:59:55PM -0400, Sinan Kaya wrote: > Code is expecing to observe the same number of buffers returned from > dma_map_sg() function compared to sg_alloc_table_from_pages(). This > doesn't hold true universally especially for systems with IOMMU. > > IOMMU driver tries to

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Huang Rui
On Tue, Apr 10, 2018 at 04:59:55PM -0400, Sinan Kaya wrote: > Code is expecing to observe the same number of buffers returned from > dma_map_sg() function compared to sg_alloc_table_from_pages(). This > doesn't hold true universally especially for systems with IOMMU. > > IOMMU driver tries to

Re: perf/x86/amd/power missing pmu::module initialisation

2017-11-07 Thread Huang Rui
On Tue, Nov 07, 2017 at 08:50:52PM +0800, Huang Rui wrote: > Hi Mark, > > On Fri, Nov 03, 2017 at 11:33:56AM +, Mark Rutland wrote: > > Hi, > > > > As a heads-up, I believe that arch/x86/events/amd/power.c is currently > > missing initialisation of pmu::modul

Re: perf/x86/amd/power missing pmu::module initialisation

2017-11-07 Thread Huang Rui
On Tue, Nov 07, 2017 at 08:50:52PM +0800, Huang Rui wrote: > Hi Mark, > > On Fri, Nov 03, 2017 at 11:33:56AM +, Mark Rutland wrote: > > Hi, > > > > As a heads-up, I believe that arch/x86/events/amd/power.c is currently > > missing initialisation of pmu::modul

Re: perf/x86/amd/power missing pmu::module initialisation

2017-11-07 Thread Huang Rui
Hi Mark, On Fri, Nov 03, 2017 at 11:33:56AM +, Mark Rutland wrote: > Hi, > > As a heads-up, I believe that arch/x86/events/amd/power.c is currently > missing initialisation of pmu::module, which could result in problems > when the module is unloaded. > > We've just spotted a similar problem

Re: perf/x86/amd/power missing pmu::module initialisation

2017-11-07 Thread Huang Rui
Hi Mark, On Fri, Nov 03, 2017 at 11:33:56AM +, Mark Rutland wrote: > Hi, > > As a heads-up, I believe that arch/x86/events/amd/power.c is currently > missing initialisation of pmu::module, which could result in problems > when the module is unloaded. > > We've just spotted a similar problem

Re: [PATCH 65/66] hwmon: (fam15h_power) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Huang Rui
> x_show << ro.x_show; > @@ > > if not (x^"_show" = x_show) then Coccilib.include_match false > > @@ > declarer name DEVICE_ATTR_RO; > identifier ro.x,ro.x_show; > @@ > > - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); > + DEVICE_ATTR_RO(x); &

Re: [PATCH 65/66] hwmon: (fam15h_power) use permission-specific DEVICE_ATTR variants

2016-12-22 Thread Huang Rui
> x_show << ro.x_show; > @@ > > if not (x^"_show" = x_show) then Coccilib.include_match false > > @@ > declarer name DEVICE_ATTR_RO; > identifier ro.x,ro.x_show; > @@ > > - DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL); > + DEVICE_A

Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible

2016-09-19 Thread Huang Rui
Hi Baoyou, On Mon, Sep 19, 2016 at 03:28:39PM +0800, Baoyou Xie wrote: > We get a few warnings when building kernel with W=1: > drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: > no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes] >

Re: [PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible

2016-09-19 Thread Huang Rui
Hi Baoyou, On Mon, Sep 19, 2016 at 03:28:39PM +0800, Baoyou Xie wrote: > We get a few warnings when building kernel with W=1: > drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: > no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes] >

Re: [PATCH] drm: amdgpu: mark symbols static where possible

2016-09-03 Thread Huang Rui
eclared and don't need a declaration, but can be made static. > So this patch marks these functions with 'static'. > > Signed-off-by: Baoyou Xie <baoyou@linaro.org> Thanks. Acked-by: Huang Rui <ray.hu...@amd.com>

Re: [PATCH] drm: amdgpu: mark symbols static where possible

2016-09-03 Thread Huang Rui
eclared and don't need a declaration, but can be made static. > So this patch marks these functions with 'static'. > > Signed-off-by: Baoyou Xie Thanks. Acked-by: Huang Rui

Re: perf: fuzzer crashes immediately on AMD system

2016-08-22 Thread Huang Rui
Hi Peter, Vince On Fri, Aug 19, 2016 at 12:01:30PM +0200, Peter Zijlstra wrote: > On Thu, Aug 18, 2016 at 10:46:31AM -0400, Vince Weaver wrote: > > On Thu, 18 Aug 2016, Vince Weaver wrote: > > > > > Tried the perf_fuzzer on my A10 fam15h/model13h system with 4.8-rc2 and it > > > falls over more

Re: perf: fuzzer crashes immediately on AMD system

2016-08-22 Thread Huang Rui
Hi Peter, Vince On Fri, Aug 19, 2016 at 12:01:30PM +0200, Peter Zijlstra wrote: > On Thu, Aug 18, 2016 at 10:46:31AM -0400, Vince Weaver wrote: > > On Thu, 18 Aug 2016, Vince Weaver wrote: > > > > > Tried the perf_fuzzer on my A10 fam15h/model13h system with 4.8-rc2 and it > > > falls over more

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-07-19 Thread Huang Rui
On Tue, Jul 19, 2016 at 02:22:36PM -0400, Vince Weaver wrote: > On Fri, 17 Jun 2016, Huang Rui wrote: > > > On Thu, Jun 16, 2016 at 06:47:00PM +0200, Borislav Petkov wrote: > > > On Thu, Jun 16, 2016 at 01:38:14PM +0800, Huang Rui wrote: > > > > I was tol

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-07-19 Thread Huang Rui
On Tue, Jul 19, 2016 at 02:22:36PM -0400, Vince Weaver wrote: > On Fri, 17 Jun 2016, Huang Rui wrote: > > > On Thu, Jun 16, 2016 at 06:47:00PM +0200, Borislav Petkov wrote: > > > On Thu, Jun 16, 2016 at 01:38:14PM +0800, Huang Rui wrote: > > > > I was tol

Re: [patch] events/amd/power add support for fam16h model30h

2016-06-17 Thread Huang Rui
On Thu, Jun 16, 2016 at 11:12:18PM +0200, Borislav Petkov wrote: > On Thu, Jun 16, 2016 at 05:00:04PM -0400, Vince Weaver wrote: > > > > According to the BKDG the AMD Family16h Model30h "Jaguar Mullins" > > also supports the accumulated power interface. I've tested on > > hardware I have and

Re: [patch] events/amd/power add support for fam16h model30h

2016-06-17 Thread Huang Rui
On Thu, Jun 16, 2016 at 11:12:18PM +0200, Borislav Petkov wrote: > On Thu, Jun 16, 2016 at 05:00:04PM -0400, Vince Weaver wrote: > > > > According to the BKDG the AMD Family16h Model30h "Jaguar Mullins" > > also supports the accumulated power interface. I've tested on > > hardware I have and

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-17 Thread Huang Rui
On Thu, Jun 16, 2016 at 04:44:20PM -0400, Vince Weaver wrote: > On Thu, 16 Jun 2016, Huang Rui wrote: > > > > 1. In theory this should also work on an amd fam16h model 30h > > > processor too, correct? The current code limits things to fam15h > > > ev

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-17 Thread Huang Rui
On Thu, Jun 16, 2016 at 04:44:20PM -0400, Vince Weaver wrote: > On Thu, 16 Jun 2016, Huang Rui wrote: > > > > 1. In theory this should also work on an amd fam16h model 30h > > > processor too, correct? The current code limits things to fam15h > > > ev

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-17 Thread Huang Rui
On Thu, Jun 16, 2016 at 06:47:00PM +0200, Borislav Petkov wrote: > On Thu, Jun 16, 2016 at 01:38:14PM +0800, Huang Rui wrote: > > I was told this feature would be supported on fam15h 60h, 70h and > > later processors before. Just checked the fam16h model 30h BKDG, yes, > &

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-17 Thread Huang Rui
On Thu, Jun 16, 2016 at 06:47:00PM +0200, Borislav Petkov wrote: > On Thu, Jun 16, 2016 at 01:38:14PM +0800, Huang Rui wrote: > > I was told this feature would be supported on fam15h 60h, 70h and > > later processors before. Just checked the fam16h model 30h BKDG, yes, > &

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-16 Thread Huang Rui
Hi Vince, Thanks for asking. On Wed, Jun 15, 2016 at 09:13:59PM -0400, Vince Weaver wrote: > > three questions about this functionality: > > 1. In theory this should also work on an amd fam16h model 30h > processor too, correct? The current code limits things to fam15h > even though

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-16 Thread Huang Rui
Hi Vince, Thanks for asking. On Wed, Jun 15, 2016 at 09:13:59PM -0400, Vince Weaver wrote: > > three questions about this functionality: > > 1. In theory this should also work on an amd fam16h model 30h > processor too, correct? The current code limits things to fam15h > even though

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-15 Thread Huang Rui
On Thu, Jun 16, 2016 at 01:38:13PM +0800, Huang Rui wrote: > On Wed, Jun 15, 2016 at 09:13:59PM -0400, Vince Weaver wrote: > > > > 2. Unless I'm misunderstanding things, the code seems to be accumulating > > Power. (see chunk below) Power is an instantaneous measureme

Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-06-15 Thread Huang Rui
On Thu, Jun 16, 2016 at 01:38:13PM +0800, Huang Rui wrote: > On Wed, Jun 15, 2016 at 09:13:59PM -0400, Vince Weaver wrote: > > > > 2. Unless I'm misunderstanding things, the code seems to be accumulating > > Power. (see chunk below) Power is an instantaneous measureme

Re: [PATCH] hwmon: (fam15h_power) Disable preemption when reading registers

2016-06-06 Thread Huang Rui
xt week unless I get an objection. > Guenter, I already verified on AMD CZ(family 15h, model 60h) and model 70h processors. Acked-and-tested-by: Huang Rui <ray.hu...@amd.com>

Re: [PATCH] hwmon: (fam15h_power) Disable preemption when reading registers

2016-06-06 Thread Huang Rui
xt week unless I get an objection. > Guenter, I already verified on AMD CZ(family 15h, model 60h) and model 70h processors. Acked-and-tested-by: Huang Rui

Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
On Wed, Apr 06, 2016 at 08:30:25AM -0700, Guenter Roeck wrote: > On Wed, Apr 06, 2016 at 03:44:11PM +0800, Huang Rui wrote: > > > > +static void do_read_registers_on_cu(void *_data) > > +{ > > + struct fam15h_power_data *data = _data; > > + int cpu, cu; >

Re: [PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
On Wed, Apr 06, 2016 at 08:30:25AM -0700, Guenter Roeck wrote: > On Wed, Apr 06, 2016 at 03:44:11PM +0800, Huang Rui wrote: > > > > +static void do_read_registers_on_cu(void *_data) > > +{ > > + struct fam15h_power_data *data = _data; > > + int cpu, cu; >

[PATCH v6 3/6] hwmon: (fam15h_power) Add ptsc counter value for accumulated power

2016-04-06 Thread Huang Rui
PTSC is the performance timestamp counter value in a cpu core and the cores in one compute unit have the fixed frequency. So it picks up the performance timestamp counter value of the first core per compute unit to measure the interval for average power per compute unit. Signed-off-by: Huang Rui

[PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
. Suggested-by: Borislav Petkov <b...@alien8.de> Signed-off-by: Huang Rui <ray.hu...@amd.com> --- drivers/hwmon/fam15h_power.c | 72 +++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_p

[PATCH v6 3/6] hwmon: (fam15h_power) Add ptsc counter value for accumulated power

2016-04-06 Thread Huang Rui
PTSC is the performance timestamp counter value in a cpu core and the cores in one compute unit have the fixed frequency. So it picks up the performance timestamp counter value of the first core per compute unit to measure the interval for average power per compute unit. Signed-off-by: Huang Rui

[PATCH v6 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-04-06 Thread Huang Rui
. Suggested-by: Borislav Petkov Signed-off-by: Huang Rui --- drivers/hwmon/fam15h_power.c | 72 +++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index 4f695d8..4edbaf0 100644

[PATCH v6 5/6] hwmon: (fam15h_power) Add documentation for TDP and accumulated power algorithm

2016-04-06 Thread Huang Rui
This patch adds the description to explain the TDP reporting mechanism and accumulated power algorithm. Signed-off-by: Huang Rui <ray.hu...@amd.com> Cc: Borislav Petkov <b...@alien8.de> --- Documentation/hwmon/fam15h_power | 65 +++- d

[PATCH v6 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-04-06 Thread Huang Rui
processor power consumption in 10 millisecond. The unit of the result is uWatt. Suggested-by: Guenter Roeck <li...@roeck-us.net> Signed-off-by: Huang Rui <ray.hu...@amd.com> Cc: Borislav Petkov <b...@alien8.de> --- drivers/hwmon/fam15h_power.c | 128 +

[PATCH v6 6/6] hwmon: (fam15h_power) Add platform check function

2016-04-06 Thread Huang Rui
This patch adds a platform check function to make code more readable. Signed-off-by: Huang Rui <ray.hu...@amd.com> --- drivers/hwmon/fam15h_power.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c

[PATCH v6 5/6] hwmon: (fam15h_power) Add documentation for TDP and accumulated power algorithm

2016-04-06 Thread Huang Rui
This patch adds the description to explain the TDP reporting mechanism and accumulated power algorithm. Signed-off-by: Huang Rui Cc: Borislav Petkov --- Documentation/hwmon/fam15h_power | 65 +++- drivers/hwmon/fam15h_power.c | 2 +- 2 files changed, 65

[PATCH v6 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-04-06 Thread Huang Rui
processor power consumption in 10 millisecond. The unit of the result is uWatt. Suggested-by: Guenter Roeck Signed-off-by: Huang Rui Cc: Borislav Petkov --- drivers/hwmon/fam15h_power.c | 128 +-- 1 file changed, 124 insertions(+), 4 deletions(-) diff --git

[PATCH v6 6/6] hwmon: (fam15h_power) Add platform check function

2016-04-06 Thread Huang Rui
This patch adds a platform check function to make code more readable. Signed-off-by: Huang Rui --- drivers/hwmon/fam15h_power.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index 7d9d697..eb97a92 100644

[PATCH v6 0/6] hwmon: (fam15h_power) Introduce an accumulated power reporting algorithm

2016-04-06 Thread Huang Rui
19.58 mW (avg = 2.55 mW, interval = 0.01 s) (crit = 15.00 W) ... These patches are rebased on v4.6-rc2. Thanks, Rui Huang Rui (6): hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence hwmon: (fam15h_power) Add compute unit accumulated power hwmon: (fam15h_power) Add

[PATCH v6 0/6] hwmon: (fam15h_power) Introduce an accumulated power reporting algorithm

2016-04-06 Thread Huang Rui
19.58 mW (avg = 2.55 mW, interval = 0.01 s) (crit = 15.00 W) ... These patches are rebased on v4.6-rc2. Thanks, Rui Huang Rui (6): hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence hwmon: (fam15h_power) Add compute unit accumulated power hwmon: (fam15h_power) Add

[PATCH v6 1/6] hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence

2016-04-06 Thread Huang Rui
nction `fam15h_power_probe': >> fam15h_power.c:(.text+0x26e3a3): undefined reference to >> `amd_get_cores_per_cu' fam15h_power.c:(.text+0x26e41e): undefined reference to `amd_get_cores_per_cu' Reported-by: build test robot <l...@intel.com> Acked-by: Borislav Petkov <b...@suse.de> Si

[PATCH v6 1/6] hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence

2016-04-06 Thread Huang Rui
nction `fam15h_power_probe': >> fam15h_power.c:(.text+0x26e3a3): undefined reference to >> `amd_get_cores_per_cu' fam15h_power.c:(.text+0x26e41e): undefined reference to `amd_get_cores_per_cu' Reported-by: build test robot Acked-by: Borislav Petkov Signed-off-by: Huang Rui --- drivers/hwmon/Kcon

[tip:perf/core] perf/x86/msr: Add AMD PTSC (Performance Time-Stamp Counter) support

2016-03-31 Thread tip-bot for Huang Rui
Commit-ID: 8a22426184774d7ced9c1d3aa4d95d34101fb3be Gitweb: http://git.kernel.org/tip/8a22426184774d7ced9c1d3aa4d95d34101fb3be Author: Huang Rui <ray.hu...@amd.com> AuthorDate: Fri, 29 Jan 2016 16:29:56 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Thu, 31 Mar 2

[tip:perf/core] perf/x86/msr: Add AMD IRPERF (Instructions Retired) performance counter

2016-03-31 Thread tip-bot for Huang Rui
Commit-ID: aaf248848db503927644d28e239bc399ed45959f Gitweb: http://git.kernel.org/tip/aaf248848db503927644d28e239bc399ed45959f Author: Huang Rui <ray.hu...@amd.com> AuthorDate: Fri, 29 Jan 2016 16:29:57 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Thu, 31 Mar 2

[tip:perf/core] perf/x86/msr: Add AMD PTSC (Performance Time-Stamp Counter) support

2016-03-31 Thread tip-bot for Huang Rui
Commit-ID: 8a22426184774d7ced9c1d3aa4d95d34101fb3be Gitweb: http://git.kernel.org/tip/8a22426184774d7ced9c1d3aa4d95d34101fb3be Author: Huang Rui AuthorDate: Fri, 29 Jan 2016 16:29:56 +0800 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:30:39 +0200 perf/x86/msr: Add AMD PTSC

[tip:perf/core] perf/x86/msr: Add AMD IRPERF (Instructions Retired) performance counter

2016-03-31 Thread tip-bot for Huang Rui
Commit-ID: aaf248848db503927644d28e239bc399ed45959f Gitweb: http://git.kernel.org/tip/aaf248848db503927644d28e239bc399ed45959f Author: Huang Rui AuthorDate: Fri, 29 Jan 2016 16:29:57 +0800 Committer: Ingo Molnar CommitDate: Thu, 31 Mar 2016 10:30:39 +0200 perf/x86/msr: Add AMD IRPERF

[tip:x86/urgent] x86/cpu: Add advanced power management bits

2016-03-29 Thread tip-bot for Huang Rui
Commit-ID: 34a4cceb78e48c75d1b48b25352a3f3b2cc2b2da Gitweb: http://git.kernel.org/tip/34a4cceb78e48c75d1b48b25352a3f3b2cc2b2da Author: Huang Rui <ray.hu...@amd.com> AuthorDate: Fri, 25 Mar 2016 10:08:40 +0800 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate: Tue, 29

[tip:x86/urgent] x86/cpu: Add advanced power management bits

2016-03-29 Thread tip-bot for Huang Rui
Commit-ID: 34a4cceb78e48c75d1b48b25352a3f3b2cc2b2da Gitweb: http://git.kernel.org/tip/34a4cceb78e48c75d1b48b25352a3f3b2cc2b2da Author: Huang Rui AuthorDate: Fri, 25 Mar 2016 10:08:40 +0800 Committer: Thomas Gleixner CommitDate: Tue, 29 Mar 2016 11:12:11 +0200 x86/cpu: Add advanced

Re: [PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-28 Thread Huang Rui
On Mon, Mar 28, 2016 at 11:33:27AM +0200, Borislav Petkov wrote: > On Mon, Mar 28, 2016 at 01:32:14PM +0800, Huang Rui wrote: > > > > return 0; > > @@ -330,6 +446,9 @@ static int fam15h_power_init_data(struct pci_dev *f4, > > > > data->max_cu_a

Re: [PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-28 Thread Huang Rui
On Mon, Mar 28, 2016 at 11:33:27AM +0200, Borislav Petkov wrote: > On Mon, Mar 28, 2016 at 01:32:14PM +0800, Huang Rui wrote: > > > > return 0; > > @@ -330,6 +446,9 @@ static int fam15h_power_init_data(struct pci_dev *f4, > > > > data->max_cu_a

Re: [PATCH v5 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-03-28 Thread Huang Rui
On Mon, Mar 28, 2016 at 11:29:52AM +0200, Borislav Petkov wrote: > On Mon, Mar 28, 2016 at 01:32:12PM +0800, Huang Rui wrote: > > + > > + get_online_cpus(); > > + this_cpu = get_cpu(); > > What now? > > get_online_cpus() i

Re: [PATCH v5 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-03-28 Thread Huang Rui
On Mon, Mar 28, 2016 at 11:29:52AM +0200, Borislav Petkov wrote: > On Mon, Mar 28, 2016 at 01:32:12PM +0800, Huang Rui wrote: > > + > > + get_online_cpus(); > > + this_cpu = get_cpu(); > > What now? > > get_online_cpus() i

[PATCH v5 5/6] hwmon: (fam15h_power) Add documentation for TDP and accumulated power algorithm

2016-03-27 Thread Huang Rui
This patch adds the description to explain the TDP reporting mechanism and accumulated power algorithm. Signed-off-by: Huang Rui <ray.hu...@amd.com> Cc: Borislav Petkov <b...@alien8.de> --- Documentation/hwmon/fam15h_power | 57 +++- d

[PATCH v5 5/6] hwmon: (fam15h_power) Add documentation for TDP and accumulated power algorithm

2016-03-27 Thread Huang Rui
This patch adds the description to explain the TDP reporting mechanism and accumulated power algorithm. Signed-off-by: Huang Rui Cc: Borislav Petkov --- Documentation/hwmon/fam15h_power | 57 +++- drivers/hwmon/fam15h_power.c | 2 +- 2 files changed, 57

[PATCH v5 6/6] hwmon: (fam15h_power) Add platform check function

2016-03-27 Thread Huang Rui
This patch adds a platform check function to make code more readable. Signed-off-by: Huang Rui <ray.hu...@amd.com> --- drivers/hwmon/fam15h_power.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c

[PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-27 Thread Huang Rui
processor power consumption in 10 millisecond. The unit of the result is uWatt. Suggested-by: Guenter Roeck <li...@roeck-us.net> Signed-off-by: Huang Rui <ray.hu...@amd.com> Cc: Borislav Petkov <b...@alien8.de> --- drivers/hwmon/fam15h_power.c | 119 +

[PATCH v5 6/6] hwmon: (fam15h_power) Add platform check function

2016-03-27 Thread Huang Rui
This patch adds a platform check function to make code more readable. Signed-off-by: Huang Rui --- drivers/hwmon/fam15h_power.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index c1cad26..622c646 100644

[PATCH v5 4/6] hwmon: (fam15h_power) Introduce a cpu accumulated power reporting algorithm

2016-03-27 Thread Huang Rui
processor power consumption in 10 millisecond. The unit of the result is uWatt. Suggested-by: Guenter Roeck Signed-off-by: Huang Rui Cc: Borislav Petkov --- drivers/hwmon/fam15h_power.c | 119 +++ 1 file changed, 119 insertions(+) diff --git a/drivers/hwmon

[PATCH v5 0/6] hwmon: (fam15h_power) Introduce an accumulated power reporting algorithm

2016-03-27 Thread Huang Rui
p$ sensors fam15h_power-pci-00c4 Adapter: PCI adapter power1: 19.58 mW (avg = 2.55 mW, interval = 0.01 s) (crit = 15.00 W) ... These patches are rebased on v4.6-rc1. Thanks, Rui Huang Rui (6): hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence hwmon: (fam

[PATCH v5 0/6] hwmon: (fam15h_power) Introduce an accumulated power reporting algorithm

2016-03-27 Thread Huang Rui
p$ sensors fam15h_power-pci-00c4 Adapter: PCI adapter power1: 19.58 mW (avg = 2.55 mW, interval = 0.01 s) (crit = 15.00 W) ... These patches are rebased on v4.6-rc1. Thanks, Rui Huang Rui (6): hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence hwmon: (fam

[PATCH v5 1/6] hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence

2016-03-27 Thread Huang Rui
nction `fam15h_power_probe': >> fam15h_power.c:(.text+0x26e3a3): undefined reference to >> `amd_get_cores_per_cu' fam15h_power.c:(.text+0x26e41e): undefined reference to `amd_get_cores_per_cu' Reported-by: build test robot <l...@intel.com> Signed-off-by: Huang Rui <ray.hu...@amd.com> --- d

[PATCH v5 3/6] hwmon: (fam15h_power) Add ptsc counter value for accumulated power

2016-03-27 Thread Huang Rui
PTSC is the performance timestamp counter value in a cpu core and the cores in one compute unit have the fixed frequency. So it picks up the performance timestamp counter value of the first core per compute unit to measure the interval for average power per compute unit. Signed-off-by: Huang Rui

[PATCH v5 1/6] hwmon: (fam15h_power) Add CPU_SUP_AMD as the dependence

2016-03-27 Thread Huang Rui
nction `fam15h_power_probe': >> fam15h_power.c:(.text+0x26e3a3): undefined reference to >> `amd_get_cores_per_cu' fam15h_power.c:(.text+0x26e41e): undefined reference to `amd_get_cores_per_cu' Reported-by: build test robot Signed-off-by: Huang Rui --- drivers/hwmon/Kconfig | 2 +- 1 file changed,

[PATCH v5 3/6] hwmon: (fam15h_power) Add ptsc counter value for accumulated power

2016-03-27 Thread Huang Rui
PTSC is the performance timestamp counter value in a cpu core and the cores in one compute unit have the fixed frequency. So it picks up the performance timestamp counter value of the first core per compute unit to measure the interval for average power per compute unit. Signed-off-by: Huang Rui

[PATCH v5 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-03-27 Thread Huang Rui
. Suggested-by: Borislav Petkov <b...@alien8.de> Signed-off-by: Huang Rui <ray.hu...@amd.com> --- drivers/hwmon/fam15h_power.c | 65 +++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_p

[PATCH v5 2/6] hwmon: (fam15h_power) Add compute unit accumulated power

2016-03-27 Thread Huang Rui
. Suggested-by: Borislav Petkov Signed-off-by: Huang Rui --- drivers/hwmon/fam15h_power.c | 65 +++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index 4f695d8..ccbc944 100644

[tip:perf/urgent] perf/x86: Move events_sysfs_show() outside CPU_SUP_INTEL

2016-03-25 Thread tip-bot for Huang Rui
Commit-ID: a49ac9f83b31e41c8311d64bd2b3f97a23dcb38d Gitweb: http://git.kernel.org/tip/a49ac9f83b31e41c8311d64bd2b3f97a23dcb38d Author: Huang Rui <ray.hu...@amd.com> AuthorDate: Fri, 25 Mar 2016 11:18:25 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Fri, 25 Mar 2

[tip:perf/urgent] perf/x86: Move events_sysfs_show() outside CPU_SUP_INTEL

2016-03-25 Thread tip-bot for Huang Rui
Commit-ID: a49ac9f83b31e41c8311d64bd2b3f97a23dcb38d Gitweb: http://git.kernel.org/tip/a49ac9f83b31e41c8311d64bd2b3f97a23dcb38d Author: Huang Rui AuthorDate: Fri, 25 Mar 2016 11:18:25 +0800 Committer: Ingo Molnar CommitDate: Fri, 25 Mar 2016 09:46:53 +0100 perf/x86: Move

[REDO PATCH] x86/perf: Move events_sysfs_show() outside CPU_SUP_INTEL

2016-03-24 Thread Huang Rui
ATTR_STR(power-pkg, power_pkg, "event=0x01"); ^ Reported-by: Randy Dunlap <rdun...@infradead.org> Reported-by: build test robot <l...@intel.com> Signed-off-by: Huang Rui <ray.hu...@amd.com> Cc: Stephen Rothwell <s...@canb.auug.org.au> Cc: a...@kernel.org --- Hi Pet

[REDO PATCH] x86/perf: Move events_sysfs_show() outside CPU_SUP_INTEL

2016-03-24 Thread Huang Rui
ATTR_STR(power-pkg, power_pkg, "event=0x01"); ^ Reported-by: Randy Dunlap Reported-by: build test robot Signed-off-by: Huang Rui Cc: Stephen Rothwell Cc: a...@kernel.org --- Hi Peter, Ingo, Randy, According to the comments of below thread, I rebased this fix to latest kernel. http:

Re: linux-next: Tree for Mar 24 (events/amd/power)

2016-03-24 Thread Huang Rui
On Thu, Mar 24, 2016 at 10:05:03AM -0700, Randy Dunlap wrote: > On 03/23/16 19:09, Stephen Rothwell wrote: > > Hi all, > > > > Please do not add any v4.7 related material to your linux-next included > > trees until after v4.6-rc1 is released. > > > > Changes since 20160323: > > > > on i386: >

Re: linux-next: Tree for Mar 24 (events/amd/power)

2016-03-24 Thread Huang Rui
On Thu, Mar 24, 2016 at 10:05:03AM -0700, Randy Dunlap wrote: > On 03/23/16 19:09, Stephen Rothwell wrote: > > Hi all, > > > > Please do not add any v4.7 related material to your linux-next included > > trees until after v4.6-rc1 is released. > > > > Changes since 20160323: > > > > on i386: >

  1   2   3   4   5   6   7   >