[PATCH] book3s_hv_rmhandlers:Pass the correct trap argument to kvmhv_commence_exit

2015-05-21 Thread Gautham R. Shenoy
_exit as r12 contains the trap number Signed-off-by: Gautham R. Shenoy --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 4d70df2..f0d7c54 100644 --- a/arch/powerp

[PATCH] powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R. Shenoy
igned-off-by: Gautham R. Shenoy --- arch/powerpc/include/asm/kvm_ppc.h | 11 +++ arch/powerpc/platforms/powernv/subcore.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index c6

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R Shenoy
Hi Michael, On Tue, Aug 04, 2015 at 08:08:58PM +1000, Michael Ellerman wrote: > On Tue, 2015-04-08 at 08:30:58 UTC, "Gautham R. Shenoy" wrote: > > Section 3.7 of Version 1.2 of the Power8 Processor User's Manual > > prescribes that updates to HID0 be prec

[PATCH v2] powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R. Shenoy
path. Signed-off-by: Gautham R. Shenoy --- [v1--> v2: Moved defn of update_hid0 to reg.h from kvm_ppc.h] arch/powerpc/include/asm/reg.h | 13 + arch/powerpc/platforms/powernv/subcore.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/powerpc

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R Shenoy
Hi Segher, Thanks for the suggestions. I will rename the function to update_power8_hid0() and use asm volatile. On Tue, Aug 04, 2015 at 09:30:57PM -0500, Segher Boessenkool wrote: > On Tue, Aug 04, 2015 at 08:08:58PM +1000, Michael Ellerman wrote: > > > +static inline void update_hid0(unsigned l

[PATCH v3] powerpc: Add an inline function to update POWER8 HID0

2015-08-05 Thread Gautham R. Shenoy
core path. Signed-off-by: Gautham R. Shenoy --- [v1 --> v2: Moved defn of update_hid0 to reg.h from kvm_ppc.h] [v2 --> v3: Renamed to update_power8_hid0 and used asm volatile] arch/powerpc/include/asm/reg.h | 9 + arch/powerpc/platforms/powernv/subcore.c | 4 ++-- 2 fi

Re: [PATCH] book3s_hv_rmhandlers:Pass the correct trap argument to kvmhv_commence_exit

2015-08-16 Thread Gautham R Shenoy
Hi Sam, On Fri, Aug 14, 2015 at 03:07:28PM +1000, Sam Bobroff wrote: > On Thu, May 21, 2015 at 01:57:04PM +0530, Gautham R. Shenoy wrote: > > In guest_exit_cont we call kvmhv_commence_exit which expects the trap > > number as the argument. However r3 doesn't contain the tra

Re: [PATCH] powerpc/cpufreq: Add pr_warn() on OPAL firmware failures

2014-08-04 Thread Gautham R Shenoy
he pstate_id to go out of bounds ? Otherwise it looks ok. Acked-by: Gautham R. Shenoy > + } > > return powernv_freqs[i].frequency; > } -- Thanks and Regards gautham. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 3/4] powernv:cpufreq: Create a powernv_cpu_to_core_mask() helper.

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Move the code that computes the cpumask corresponding to the thread-siblings of a cpu to a new method named powernv_cpu_to_core_mask() so that it can be used by other places in the code. Signed-off-by: Gautham R. Shenoy --- drivers/cpufreq/powernv-cpuf

[PATCH 1/4] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a helper routine that can return the cpu-frequency for the corresponding pstate_id. Also, cache the values of the pstate_max, pstate_min and pstate_nominal and nr_pstates in a static structure so that they can be reused in the future to perform any v

[PATCH 2/4] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a driver attribute named cpuinfo_nominal_frequency which creates a sysfs read-only file named cpuinfo_nominal_frequency. Export the frequency corresponding to the nominal_pstate through this interface. Signed-off-by: Gautham R. Shenoy --- drive

[PATCH 0/4] powernv:cpufreq: Export nominal and current frequency via sysfs

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, On IBM POWERNV platforms[1], presently we do not report the current operating frequency of the processor through the sysfs interface "cpuinfo_cur_freq" since the cpu frequency driver[1] has not implemented the ->get(unsigned int c

[PATCH 4/4] powernv:cpufreq: Implement the driver->get() method

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The current frequency of a cpu is reported through the sysfs file cpuinfo_cur_freq. This requires the driver to implement a "->get(unsigned int cpu)" method which will return the current operating frequency. Implement a function named powe

Re: [PATCH v2 14/52] powerpc, sysfs: Fix CPU hotplug callback registration

2014-03-06 Thread Gautham R Shenoy
Hello Ben, On Fri, Mar 07, 2014 at 01:57:31PM +1100, Benjamin Herrenschmidt wrote: > On Fri, 2014-02-14 at 13:22 +0530, Srivatsa S. Bhat wrote: > > Subsystems that want to register CPU hotplug callbacks, as well as perform > > initialization for the CPUs that are already online, often do it as sho

[PATCH v2 0/6] powernv:cpufreq: Dynamic cpu-frequency scaling

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the v2 of the consolidated patchset consisting patches for enabling cpufreq on IBM POWERNV platforms along with some enhancements. The v1 of these patches have been previously submitted on linuxppc-dev [1][2]. - This patchset contains co

[PATCH v2 5/6] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a driver attribute named cpuinfo_nominal_freq which creates a sysfs read-only file named cpuinfo_nominal_freq. Export the frequency corresponding to the nominal_pstate through this interface. Nominal frequency is the highest non-turbo frequency for th

[PATCH v2 1/6] powernv: cpufreq driver for powernv platform

2014-03-10 Thread Gautham R. Shenoy
idyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: Gautham R. Shenoy --- arch/powerpc/include/asm/reg.h | 4 + arch/powerpc/platforms/powernv/Kconfig | 1 + drivers/cpufreq/Kconfig| 1 + drivers/cpufreq/Kconfig.powerpc

[PATCH v2 3/6] powernv, cpufreq:Add per-core locking to serialize frequency transitions

2014-03-10 Thread Gautham R. Shenoy
er-CPU lock and use the ones that belongs to the first thread sibling of the core. cpu_first_thread_sibling() macro is used to find the *common* lock for all thread siblings belonging to a core. Signed-off-by: Srivatsa S. Bhat Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Ga

[PATCH v2 2/6] powernv:cpufreq: Create a powernv_cpu_to_core_mask() helper.

2014-03-10 Thread Gautham R. Shenoy
Signed-off-by: Srivatsa S. Bhat Signed-off-by: Gautham R. Shenoy --- drivers/cpufreq/powernv-cpufreq.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index ab1551f..4cad727 100644 --- a/dr

[PATCH v2 6/6] powernv:cpufreq: Implement the driver->get() method

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The current frequency of a cpu is reported through the sysfs file cpuinfo_cur_freq. This requires the driver to implement a "->get(unsigned int cpu)" method which will return the current operating frequency. Implement a function named powernv_cp

[PATCH v2 4/6] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a helper routine that can return the cpu-frequency for the corresponding pstate_id. Also, cache the values of the pstate_max, pstate_min and pstate_nominal and nr_pstates in a static structure so that they can be reused in the future to perform any v

[RFC PATCH 1/2] powerpc: powernv: Framework to show the correct clock in /proc/cpuinfo

2014-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently, the code in setup-common.c for powerpc assumes that all clock rates are same in a smp system. This value is cached in the variable named ppc_proc_freq and is the value that is reported in /proc/cpuinfo. However on the PowerNV platform, the clock ra

[RFC PATCH 2/2] powerpc: powernv: Implement ppc_md.get_proc_freq()

2014-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Implement a method named pnv_get_proc_freq(unsigned int cpu) which returns the current clock rate on the 'cpu' in Hz to be reported in /proc/cpuinfo. This method uses the value reported by cpufreq when such a value is sane. Otherwise it fall

[RFC PATCH 0/2] powernv: Show the correct clock value in /proc/cpuinfo

2014-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, Currently, the code in setup-common.c for powerpc assumes that all clock rates are same in a smp system. This value is cached in the variable named ppc_proc_freq and is the value that is reported in /proc/cpuinfo. However on the PowerNV platform, the clo

Re: [PATCH v2 2/6] powernv:cpufreq: Create a powernv_cpu_to_core_mask() helper.

2014-03-19 Thread Gautham R Shenoy
On Wed, Mar 19, 2014 at 12:05:20PM +0530, Srivatsa S. Bhat wrote: > On 03/19/2014 05:07 AM, Benjamin Herrenschmidt wrote: > > On Mon, 2014-03-10 at 16:40 +0530, Gautham R. Shenoy wrote: > >> From: "Srivatsa S. Bhat" > >> > >> Create a helper method

[PATCH v3 0/5] powernv: Enable Dynamic Frequency

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the v3 of the consolidated patchset consisting patches for enabling cpufreq on IBM POWERNV platforms along with some enhancements. I have incorporated the review for v2 (which can be found at [1]). - This patchset contains code for the platform

[PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-20 Thread Gautham R. Shenoy
] Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: Gautham R. Shenoy --- arch/powerpc/include/asm/reg.h | 4 + arch/powerpc/platforms/powernv/Kconfig | 1 + drivers/cpufreq/Kconfig| 1 + drivers/cpufreq

[PATCH v3 2/5] powernv, cpufreq:Add per-core locking to serialize frequency transitions

2014-03-20 Thread Gautham R. Shenoy
er-CPU lock and use the ones that belongs to the first thread sibling of the core. cpu_first_thread_sibling() macro is used to find the *common* lock for all thread siblings belonging to a core. Signed-off-by: Srivatsa S. Bhat Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Ga

[PATCH v3 3/5] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a helper routine that can return the cpu-frequency for the corresponding pstate_id. Also, cache the values of the pstate_max, pstate_min and pstate_nominal and nr_pstates in a static structure so that they can be reused in the future to perform any v

[PATCH v3 4/5] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a driver attribute named cpuinfo_nominal_freq which creates a sysfs read-only file named cpuinfo_nominal_freq. Export the frequency corresponding to the nominal_pstate through this interface. Nominal frequency is the highest non-turbo frequency for th

[PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The current frequency of a cpu is reported through the sysfs file cpuinfo_cur_freq. This requires the driver to implement a "->get(unsigned int cpu)" method which will return the current operating frequency. Implement a function named powernv_cp

Re: [PATCH v3 2/5] powernv, cpufreq:Add per-core locking to serialize frequency transitions

2014-03-20 Thread Gautham R Shenoy
On Thu, Mar 20, 2014 at 05:40:57PM +0530, Gautham R. Shenoy wrote: > From: "Srivatsa S. Bhat" > > On POWER systems, the CPU frequency is controlled at a core-level and > hence we need to serialize so that only one of the threads in the core > switches the core's fre

Re: [PATCH v3 3/5] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-20 Thread Gautham R Shenoy
On Thu, Mar 20, 2014 at 05:40:58PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > Create a helper routine that can return the cpu-frequency for the > corresponding pstate_id. > > Also, cache the values of the pstate_max, pstate_min and > pst

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-20 Thread Gautham R Shenoy
On Thu, Mar 20, 2014 at 05:41:00PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > The current frequency of a cpu is reported through the sysfs file > cpuinfo_cur_freq. This requires the driver to implement a > "->get(unsigned int cpu)"

Re: [PATCH v3 0/5] powernv: Enable Dynamic Frequency

2014-03-21 Thread Gautham R Shenoy
Hi Viresh, On Fri, Mar 21, 2014 at 01:16:03PM +0530, Viresh Kumar wrote: > On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy > wrote: > > This is the v3 of the consolidated patchset consisting > > patches for enabling cpufreq on IBM POWERNV platforms > > along with some

Re: [PATCH v3 4/5] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 02:17:28PM +0530, Viresh Kumar wrote: > > +static ssize_t show_cpuinfo_nominal_freq(struct cpufreq_policy *policy, > > + char *buf) > > +{ > > + int nominal_freq; > > + nominal_freq = > > pstate_id_to_freq(powernv_pstate_inf

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Gautham R Shenoy
Hi Viresh, On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: > On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy > wrote: > > From: Vaidyanathan Srinivasan > > Hi Vaidy, > > > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig > &

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 03:01:29PM +0530, Viresh Kumar wrote: > On Thu, Mar 20, 2014 at 5:41 PM, Gautham R. Shenoy > wrote: > > From: "Gautham R. Shenoy" > > > > The current frequency of a cpu is reported through the sysfs file > > cpuinfo_cur_freq.

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 12:01:07PM +, David Laight wrote: > From: Viresh Kumar > > > On 21 March 2014 16:34, Gautham R Shenoy wrote: > > > Heh! Well, that wasn't the reason why this was sent out as a separate > > > patch, but never mind. Though

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 05:15:34PM +0530, Viresh Kumar wrote: > On 21 March 2014 16:34, Gautham R Shenoy wrote: > > Heh! Well, that wasn't the reason why this was sent out as a separate > > patch, but never mind. Though I don't understand why it would be > > diffi

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Gautham R Shenoy
Hi Viresh, On Fri, Mar 21, 2014 at 04:24:27PM +0530, Viresh Kumar wrote: > On 21 March 2014 16:13, Gautham R Shenoy wrote: > > On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: > > >> > + pr_debug("PState i

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 06:42:50PM +0530, Viresh Kumar wrote: > On 21 March 2014 18:34, Gautham R Shenoy wrote: > > Consider the case when pmspr = 0x00fe; > > > > We are interested in extracting the value 'fe'. And ensure that when > > we store th

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 04:24:27PM +0530, Viresh Kumar wrote: > >> > +static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy) > >> > +{ > >> > + int base, i; > >> > + > >> > + base = cpu_first_thread_sibling(policy->cpu); > >> > + > >> > + for (i = 0; i < threads_per_co

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-22 Thread Gautham R Shenoy
Hi Ben, On Sat, Mar 22, 2014 at 09:56:30AM +1100, Benjamin Herrenschmidt wrote: > On Fri, 2014-03-21 at 16:34 +0530, Gautham R Shenoy wrote: > > > > > > > > > +/* > > > > + * Computes the current frequency on this cpu > > > > + * and stores

[PATCH v4] powernv: Dynamic Frequency Scaling Enablement

2014-03-26 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the v4 of the patchset to enable Dynamic Frequency Scaling on IBM PowerNV Platforms. I have incorporated the review comments from the previous version (can be found at [1]). In this version, * Multiple patches from the previous version have

[PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-26 Thread Gautham R. Shenoy
Murthy Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: Gautham R. Shenoy --- arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs/pseries_le_defconfig | 1 + arch/powerpc/include/asm/reg.h| 4 + a

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Gautham R Shenoy
On Thu, Mar 27, 2014 at 12:09:53PM +0530, Viresh Kumar wrote: > Cc'ing Rafael. > Thanks. It was a lapse on my part by not Cc'ing Rafael in the first place. > On 26 March 2014 22:25, Gautham R. Shenoy wrote: > > From: Vaidyanathan Srinivasan > > > > Back

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Gautham R Shenoy
On Thu, Mar 27, 2014 at 03:29:36PM +0530, Viresh Kumar wrote: > On 27 March 2014 15:00, Gautham R Shenoy wrote: > > As of now, I prefer this patch be based on code that is in the -next > > tree. I'll get rid of the per-core locking once the serialization > > pat

[PATCH v5 0/3] powernv,cpufreq: Dynamic Frequency Scaling support

2014-03-28 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is v5 of the patchset to enable dynamic frequency scaling on IBM PowerNV platforms. This patchset does address all the review comments obtained for v4 (which can be found at [1]). Changes from v4: * Created a separate patch to select the CPUFr

[PATCH v5 2/3] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-28 Thread Gautham R. Shenoy
_freq by setting powernv_cpufreq_driver.get to powernv_cpufreq_get(). [Authored by e...@linux.vnet.ibm.com] [Change log updated by e...@linux.vnet.ibm.com] Reviewed-by: Preeti U Murthy Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: G

[PATCH v5 1/3] powernv, cpufreq: Select CPUFreq related Kconfig options for powernv

2014-03-28 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Enable CPUFreq for PowerNV. Select "performance", "powersave", "userspace" and "ondemand" governors. Choose "ondemand" to be the default governor. Signed-off-by: Gautham R. Shenoy Signed-off-by: Srivatsa

[PATCH v5 3/3] powernv, cpufreq: Use cpufreq_frequency_table.driver_data to store pstate ids

2014-03-28 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The .driver_data field in the cpufreq_frequency_table was supposed to be private to the drivers. However at some later point, it was being used to indicate if the particular frequency in the table is the BOOST_FREQUENCY. After patches [1] and [2], the .driv

[PATCH REPOST v5 2/3] powernv, cpufreq: cpufreq driver for powernv platform

2014-04-01 Thread Gautham R. Shenoy
_freq by setting powernv_cpufreq_driver.get to powernv_cpufreq_get(). [Authored by e...@linux.vnet.ibm.com] [Change log updated by e...@linux.vnet.ibm.com] Reviewed-by: Preeti U Murthy Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: G

[PATCH REPOST v5 3/3] powernv, cpufreq: Use cpufreq_frequency_table.driver_data to store pstate ids

2014-04-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The .driver_data field in the cpufreq_frequency_table was supposed to be private to the drivers. However at some later point, it was being used to indicate if the particular frequency in the table is the BOOST_FREQUENCY. After patches [1] and [2], the .driv

[PATCH REPOST v5 1/3] powernv, cpufreq: Select CPUFreq related Kconfig options for powernv

2014-04-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Enable CPUFreq for PowerNV. Select "performance", "powersave", "userspace" and "ondemand" governors. Choose "ondemand" to be the default governor. Signed-off-by: Gautham R. Shenoy Signed-off-by: Srivatsa

[PATCH] book3s_hv: Handle H_DOORBELL on the guest exit path

2015-10-14 Thread Gautham R. Shenoy
), we can unconditionally clear the doorbell message in kvmppc_check_wake_reason. Signed-off-by: Gautham R. Shenoy --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerp

Re: [PATCH RESEND v4 3/4] cpufreq: powernv: Add a trace print for the throttle event

2016-01-12 Thread Gautham R Shenoy
Hi Shilpa, Just saw this resend! On Tue, Jan 12, 2016 at 04:24:26AM -0600, Shilpasri G Bhat wrote: > Record the throttle event with a trace print replacing the printk, > except for events like throttling below nominal and occ reset > event which print a warning message. > > Signed-off-by: Shilpa

Re: [PATCH RESEND v4 4/4] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-12 Thread Gautham R Shenoy
Hi Shilpa, On Tue, Jan 12, 2016 at 04:24:27AM -0600, Shilpasri G Bhat wrote: > +static inline int get_chip_index(struct kobject *kobj) Probably have "get_chip_index(int id)". See the reason below. > +{ > + int i, id; > + > + i = kstrtoint(kobj->name + 4, 0, &id); > + if (i) > +

Re: [PATCH v5 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-21 Thread Gautham R Shenoy
On Thu, Jan 21, 2016 at 03:08:59PM +0530, Shilpasri G Bhat wrote: > Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.

Re: [PATCH v6 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-24 Thread Gautham R Shenoy
ary overhead > > in a hot path. So instead of calling cpu_to_chip_id() everytime cache > > the chip ids for all cores in the array 'core_to_chip_map' and use it > > in the hotpath. > > > > Reported-by: Anton Blanchard > > Signed-off-by: Shilpasri

Re: [PATCH v7 1/6] cpufreq: powernv: Free 'chips' on module exit

2016-01-28 Thread Gautham R Shenoy
On Thu, Jan 28, 2016 at 12:55:36PM +0530, Shilpasri G Bhat wrote: > This will free the dynamically allocated memory of'chips' on > module exit. > > Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy -- Than

Re: [PATCH v7 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-28 Thread Gautham R Shenoy
chip ids for all cores in the array 'core_to_chip_map' and use it > in the hotpath. > > Reported-by: Anton Blanchard > Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham. ___ Linu

Re: [PATCH v7 5/6] cpufreq: powernv: Replace pr_info with trace print for throttle event

2016-01-28 Thread Gautham R Shenoy
ts > like throttle below nominal frequency and OCC_RESET are reduced to > pr_warn/pr_warn_once as pointed by MFG to not mark them as critical > messages. This patch adds 'throttle_reason' to struct chip to store the > throttle reason. > > Signed-off-by: Shilpasri G

Re: [PATCH v7 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-28 Thread Gautham R Shenoy
Hi Shilpa, A minor nit. On Thu, Jan 28, 2016 at 12:55:41PM +0530, Shilpasri G Bhat wrote: [..snip..] > + > +What: > /sys/devices/system/cpu/cpufreq/chip*/throttle_reasons/ > +Date:Jan 2016 > +Contact: Linux kernel mailing list > + Linux for PowerPC

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Gautham R Shenoy
Hi Viresh, > > What I can suggest is: > - Move this directory inside cpuX/cpufreq/ directory, in a similar way > as to how we create 'stats' directory today. > - You can then get policy->cpu, to get chip->id out of it. > - The only disadvantage here is that the same chip directory will be > r

Re: [PATCH v2] powerpc/pseries: Only wait for dying CPU after call to rtas_stop_self()

2019-02-28 Thread Gautham R Shenoy
Hello Thiago, On Fri, Feb 22, 2019 at 07:57:52PM -0300, Thiago Jung Bauermann wrote: > When testing DLPAR CPU add/remove on a system under stress, > pseries_cpu_die() doesn't wait long enough for a CPU to die: > > [ 446.983944] cpu 148 (hwid 148) Ready to die... > [ 446.984062] cpu 149 (hwid 14

Re: [PATCH] powernv: powercap: Add hard minimum powercap

2019-02-28 Thread Gautham R Shenoy
Hi Shilpa, On Thu, Feb 28, 2019 at 11:25:25AM +0530, Shilpasri G Bhat wrote: > Hi, > > On 02/28/2019 10:14 AM, Daniel Axtens wrote: > > Shilpasri G Bhat writes: > > > >> In POWER9, OCC(On-Chip-Controller) provides for hard and soft system > >> powercapping range. The hard powercap range is guar

Re: [PATCH v2] powerpc/powernv/idle: Restore IAMR after idle

2019-02-28 Thread Gautham R Shenoy
longer use paca to save IAMR, instead use _DAR (thanks mpe) Looks good to me. Once we move to Nick Piggin's C-based save/restore code, we will be saving all these SPR values on the stack anyway. Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham.

[PATCH] pseries/energy: Use OF accessor functions to read ibm, drc-indexes

2019-03-08 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" In cpu_to_drc_index() in the case when FW_FEATURE_DRC_INFO is absent, we currently use of_read_property() to obtain the pointer to the array corresponding to the property "ibm,drc-indexes". The elements of this array are of type __be32, but are

Re: [PATCH v3] powerpc/pseries: Only wait for dying CPU after call to rtas_stop_self()

2019-03-12 Thread Gautham R Shenoy
ffirmative, the maximum time spent > inside the loop was was 10 ms. This patch loops for 20 ms just be sure. > > Signed-off-by: Thiago Jung Bauermann Thanks for this version. I have tested the patch and we no longer see the "Querying DEAD? cpu X (Y) shows 2" message. Tested-and-Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham.

Re: [PATCH 1/2] cpuidle : auto-promotion for cpuidle states

2019-04-04 Thread Gautham R Shenoy
Hello Daniel, On Thu, Apr 4, 2019 at 3:52 PM Daniel Lezcano wrote: > > > Hi Abhishek, > > thanks for taking the time to test the different scenario and give us > the numbers. > > On 01/04/2019 07:11, Abhishek wrote: > > [.. snip..] > > In case of POWER, this is problematic, when the predic

Re: [PATCH] powerpc/watchdog: Use hrtimers for per-CPU heartbeat

2019-04-04 Thread Gautham R Shenoy
Hello Nicholas, On Tue, Apr 2, 2019 at 4:57 PM Nicholas Piggin wrote: > > Using a jiffies timer creates a dependency on the tick_do_timer_cpu > incrementing jiffies. If that CPU has locked up and jiffies is not > incrementing, the watchdog heartbeat timer for all CPUs stops and > creates false po

Re: [PATCH v2] powerpc/watchdog: Use hrtimers for per-CPU heartbeat

2019-04-11 Thread Gautham R Shenoy
stops and > creates false positives and confusing warnings on local CPUs, and > also causes the SMP detector to stop, so the root cause is never > detected. > > Fix this by using hrtimer based timers for the watchdog heartbeat, > like the generic kernel hardlockup detector. > > Cc:

[PATCH v3 4/6] powerpc/sysfs: Show idle_purr and idle_spurr for every CPU

2020-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On Pseries LPARs, to calculate utilization, we need to know the [S]PURR ticks when the CPUs were busy or idle. The total PURR and SPURR ticks are already exposed via the per-cpu sysfs files "purr" and "spurr". This patch adds support

[PATCH v3 2/6] powerpc/idle: Add accessor function to always read latest idle PURR

2020-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently when CPU goes idle, we take a snapshot of PURR via pseries_idle_prolog() which is used at the CPU idle exit to compute the idle PURR cycles via the function pseries_idle_epilog(). Thus, the value of idle PURR cycle thus read before pseries_idle_pr

[PATCH v3 3/6] powerpc/pseries: Account for SPURR ticks on idle CPUs

2020-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On Pseries LPARs, to calculate utilization, we need to know the [S]PURR ticks when the CPUs were busy or idle. Via pseries_idle_prolog(), pseries_idle_epilog(), we track the idle PURR ticks in the VPA variable "wait_state_cycles". This patch ex

[PATCH v3 5/6] Documentation: Document sysfs interfaces purr, spurr, idle_purr, idle_spurr

2020-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Add documentation for the following sysfs interfaces: /sys/devices/system/cpu/cpuX/purr /sys/devices/system/cpu/cpuX/spurr /sys/devices/system/cpu/cpuX/idle_purr /sys/devices/system/cpu/cpuX/idle_spurr Signed-off-by: Gautham R. Shenoy --- Documentation/A

[PATCH v3 1/6] powerpc: Move idle_loop_prolog()/epilog() functions to header file

2020-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently prior to entering an idle state on a Linux Guest, the pseries cpuidle driver implement an idle_loop_prolog() and idle_loop_epilog() functions which ensure that idle_purr is correctly computed, and the hypervisor is informed that the CPU cycles

[PATCH v3 0/6] Track and expose idle PURR and SPURR ticks

2020-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the third version of the patches to track and expose idle PURR and SPURR ticks. These patches are required by tools such as lparstat to compute system utilization for capacity planning purposes. The previous versions can be found here: v2: https:

[PATCH v3 6/6] pseries/sysfs: Minimise IPI noise while reading [idle_][s]purr

2020-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently purr, spurr, idle_purr, idle_spurr are exposed for every CPU via the sysfs interface /sys/devices/system/cpu/cpuX/[idle_][s]purr. Each sysfs read currently generates an IPI to obtain the desired value from the target CPU X. Since these aforementi

Re: [PATCH] cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn

2020-03-20 Thread Gautham R Shenoy
pu frequency to policy->cur > on unthrottling") > Signed-off-by: Pratik Rajesh Sampat Reviewed-by: Gautham R. Shenoy > --- > drivers/cpufreq/powernv-cpufreq.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/cpufreq/

[PATCH v4 0/6] [PATCH v4 0/6] Track and expose idle PURR and SPURR ticks

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the fourth version of the patches to track and expose idle PURR and SPURR ticks. These patches are required by tools such as lparstat to compute system utilization for capacity planning purposes. The previous versions can be found here:

[PATCH v4 2/6] powerpc/idle: Add accessor function to always read latest idle PURR

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently when CPU goes idle, we take a snapshot of PURR via pseries_idle_prolog() which is used at the CPU idle exit to compute the idle PURR cycles via the function pseries_idle_epilog(). Thus, the value of idle PURR cycle thus read before pseries_idle_pr

[PATCH v4 3/6] powerpc/pseries: Account for SPURR ticks on idle CPUs

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On Pseries LPARs, to calculate utilization, we need to know the [S]PURR ticks when the CPUs were busy or idle. Via pseries_idle_prolog(), pseries_idle_epilog(), we track the idle PURR ticks in the VPA variable "wait_state_cycles". This patch ex

[PATCH v4 1/6] powerpc: Move idle_loop_prolog()/epilog() functions to header file

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently prior to entering an idle state on a Linux Guest, the pseries cpuidle driver implement an idle_loop_prolog() and idle_loop_epilog() functions which ensure that idle_purr is correctly computed, and the hypervisor is informed that the CPU cycles

[PATCH v4 5/6] Documentation: Document sysfs interfaces purr, spurr, idle_purr, idle_spurr

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Add documentation for the following sysfs interfaces: /sys/devices/system/cpu/cpuX/purr /sys/devices/system/cpu/cpuX/spurr /sys/devices/system/cpu/cpuX/idle_purr /sys/devices/system/cpu/cpuX/idle_spurr Signed-off-by: Gautham R. Shenoy --- Documentation/A

[PATCH v4 6/6] pseries/sysfs: Minimise IPI noise while reading [idle_][s]purr

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently purr, spurr, idle_purr, idle_spurr are exposed for every CPU via the sysfs interface /sys/devices/system/cpu/cpuX/[idle_][s]purr. Each sysfs read currently generates an IPI to obtain the desired value from the target CPU X. Since these aforementioned

[PATCH v4 4/6] powerpc/sysfs: Show idle_purr and idle_spurr for every CPU

2020-03-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On Pseries LPARs, to calculate utilization, we need to know the [S]PURR ticks when the CPUs were busy or idle. The total PURR and SPURR ticks are already exposed via the per-cpu sysfs files "purr" and "spurr". This patch adds support

[RFC/PATCH 1/3] powerpc/kvm: Handle H_FAC_UNAVAIL when guest executes stop.

2020-03-31 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" If a guest executes a stop instruction when the hypervisor has set the PSSCR[ESL|EC] bits, the processor will throw an Hypervisor Facility Unavailable exception. Currently when we receive this exception, we only check if the exeception is generated due to

[RFC/PATCH 2/3] pseries/kvm: Clear PSSCR[ESL|EC] bits before guest entry

2020-03-31 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" ISA v3.0 allows the guest to execute a stop instruction. For this, the PSSCR[ESL|EC] bits need to be cleared by the hypervisor before scheduling in the guest vCPU. Currently we always schedule in a vCPU with PSSCR[ESL|EC] bits set. This patch changes the be

[RFC/PATCH 0/3] Add support for stop instruction inside KVM guest

2020-03-31 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" *** RFC Only. Not intended for inclusion Motivation ~~~ The POWER ISA v3.0 allows stop instruction to be executed from a Guest Kernel (HV=0,PR=0) context. If the hypervisor has cleared PSSCR[ESL|EC] bits, then the stop instru

[RFC/PATCH 3/3] cpuidle/pseries: Add stop0lite state

2020-03-31 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The POWER ISA v3.0 allows stop instruction to be executed from a HV=0,PR=0 context. If the PSSCR[ESL|EC] bits are cleared, then the stop instruction thus executed will cause the thread to pause, thereby donating its cycles to the other threads in the core

Re: [RFC/PATCH 0/3] Add support for stop instruction inside KVM guest

2020-03-31 Thread Gautham R Shenoy
On Tue, Mar 31, 2020 at 05:40:55PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > > *** RFC Only. Not intended for inclusion > > Motivation > ~~~ > > The POWER ISA v3.0 allows stop instruction to be executed from

Re: [PATCH v4 6/6] pseries/sysfs: Minimise IPI noise while reading [idle_][s]purr

2020-04-01 Thread Gautham R Shenoy
Hello Naveen, On Wed, Apr 01, 2020 at 03:28:48PM +0530, Naveen N. Rao wrote: > Gautham R. Shenoy wrote: > >From: "Gautham R. Shenoy" > > [..snip..] > >-static DEVICE_ATTR(spurr, 0400, show_spurr, NULL); > >-static DEVICE_ATTR(purr, 0400, show_purr, st

Re: [PATCH v4 2/6] powerpc/idle: Add accessor function to always read latest idle PURR

2020-04-02 Thread Gautham R Shenoy
On Wed, Apr 01, 2020 at 03:12:53PM +0530, Naveen N. Rao wrote: > Hi Gautham, > > Gautham R. Shenoy wrote: > >From: "Gautham R. Shenoy" > > > >Currently when CPU goes idle, we take a snapshot of PURR via > >pseries_idle_prolog() which is used at th

Re: [PATCH v4 6/6] pseries/sysfs: Minimise IPI noise while reading [idle_][s]purr

2020-04-02 Thread Gautham R Shenoy
Hi Naveen, On Thu, Apr 02, 2020 at 01:04:34PM +0530, Naveen N. Rao wrote: [..snip..] > > > >It does reduce it to 10ms window. I am not sure if anyone samples PURR > >etc faster than that rate. > > > >I measured how much time it takes to read the purr, spurr, idle_purr, > >idle_spurr files back-to

Re: [PATCH v4 2/6] powerpc/idle: Add accessor function to always read latest idle PURR

2020-04-05 Thread Gautham R Shenoy
On Fri, Apr 03, 2020 at 04:04:56PM +0530, Naveen N. Rao wrote: > Gautham R Shenoy wrote: > >On Wed, Apr 01, 2020 at 03:12:53PM +0530, Naveen N. Rao wrote: > >>Hi Gautham, > >> > >>Gautham R. Shenoy wrote: > >>>From: "Gautham R. Shenoy" >

Re: [RFC/PATCH 2/3] pseries/kvm: Clear PSSCR[ESL|EC] bits before guest entry

2020-04-05 Thread Gautham R Shenoy
On Fri, Apr 03, 2020 at 12:20:26PM +1000, Nicholas Piggin wrote: > Gautham R. Shenoy's on March 31, 2020 10:10 pm: > > From: "Gautham R. Shenoy" > > > > ISA v3.0 allows the guest to execute a stop instruction. For this, the > > PSSCR[ESL|EC] bits n

[PATCH v2 0/1] pseries/hotplug: Change the default behaviour of cede_offline

2019-10-22 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" This is the v2 of the fix to change the default behaviour of cede_offline. The previous version can be found here: https://lkml.org/lkml/2019/9/12/222 The main change from v1 is that the patch2 to create a sysfs file to report and control th

[PATCH v2 1/1] pseries/hotplug-cpu: Change default behaviour of cede_offline to "off"

2019-10-22 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently on PSeries Linux guests, the offlined CPU can be put to one of the following two states: - Long term processor cede (also called extended cede) - Returned to the hypervisor via RTAS "stop-self" call. This is controlled by the k

  1   2   3   4   5   6   7   >