Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Mon, 26 Aug 2013 19:30:07 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, > On 26 August 2013 18:42, Rafael J. Wysocki wrote: > > On Monday, August 26, 2013 09:11:14 AM Lukasz Majewski wrote: > >> On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar > >> viresh.ku...@linaro.org wrote, > >> > On 26 August 2013 12:32, Lukasz Majewski > >> > wrote: > >> > > On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar > >> > > viresh.ku...@linaro.org wrote, > >> > >> Some minor nitpicking, nothing much :) > >> > > > >> > > Is there any chance to pull those corrected patches to v3.12? > >> > > >> > Only Rafael can decide :) > >> > >> :-) > > > > Well, 3.11 is a week away and the 3.12 merge window will open then. > > > > Honestly, I'd prefer this stuff to spend a couple of weeks in > > linux-next before pushing it to Linus, so this means 3.13 I'm > > afraid. > > +1 Ok. I understand. -- Best regards, Lukasz Majewski Samsung R Institute Poland (SRPOL) | Linux Platform Group -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On 26 August 2013 18:42, Rafael J. Wysocki wrote: > On Monday, August 26, 2013 09:11:14 AM Lukasz Majewski wrote: >> On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar viresh.ku...@linaro.org >> wrote, >> > On 26 August 2013 12:32, Lukasz Majewski >> > wrote: >> > > On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar >> > > viresh.ku...@linaro.org wrote, >> > >> Some minor nitpicking, nothing much :) >> > > >> > > Is there any chance to pull those corrected patches to v3.12? >> > >> > Only Rafael can decide :) >> >> :-) > > Well, 3.11 is a week away and the 3.12 merge window will open then. > > Honestly, I'd prefer this stuff to spend a couple of weeks in linux-next > before pushing it to Linus, so this means 3.13 I'm afraid. +1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Monday, August 26, 2013 09:11:14 AM Lukasz Majewski wrote: > On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar viresh.ku...@linaro.org > wrote, > > On 26 August 2013 12:32, Lukasz Majewski > > wrote: > > > On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar > > > viresh.ku...@linaro.org wrote, > > >> Some minor nitpicking, nothing much :) > > > > > > Is there any chance to pull those corrected patches to v3.12? > > > > Only Rafael can decide :) > > :-) Well, 3.11 is a week away and the 3.12 merge window will open then. Honestly, I'd prefer this stuff to spend a couple of weeks in linux-next before pushing it to Linus, so this means 3.13 I'm afraid. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, > On 26 August 2013 12:32, Lukasz Majewski > wrote: > > On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar > > viresh.ku...@linaro.org wrote, > >> Some minor nitpicking, nothing much :) > > > > Is there any chance to pull those corrected patches to v3.12? > > Only Rafael can decide :) :-) > > > After your comments I think, that this code could be rewritten: > > > > > > list_for_each_entry(policy, _policy_list, > > policy_list) { freq_table = > > cpufreq_frequency_get_table(policy->cpu); if (freq_table) { > > ret = > > cpufreq_frequency_table_cpuinfo(policy, freq_table); > > if (ret) { > > pr_err("%s: Policy frequency update > > failed\n") > > Don't break strings into multiple lines even if they cross 80 > columns.. And you missed __func__ :) C code which turned into the pseudo code :-). > > > break; > > } > > > > policy->user_policy.max = policy->max; > > __cpufreq_governor(policy,CPUFREQ_GOV_LIMITS); > > } > > } > > > > return ret; > > } > -- > To unsubscribe from this list: send the line "unsubscribe linux-pm" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Best regards, Lukasz Majewski Samsung R Institute Poland (SRPOL) | Linux Platform Group -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On 26 August 2013 12:32, Lukasz Majewski wrote: > On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org > wrote, >> Some minor nitpicking, nothing much :) > > Is there any chance to pull those corrected patches to v3.12? Only Rafael can decide :) > After your comments I think, that this code could be rewritten: > > > list_for_each_entry(policy, _policy_list, policy_list) { > freq_table = cpufreq_frequency_get_table(policy->cpu); > if (freq_table) { > ret = cpufreq_frequency_table_cpuinfo(policy, > freq_table); > if (ret) { > pr_err("%s: Policy frequency update > failed\n") Don't break strings into multiple lines even if they cross 80 columns.. And you missed __func__ :) > break; > } > > policy->user_policy.max = policy->max; > __cpufreq_governor(policy,CPUFREQ_GOV_LIMITS); > } > } > > return ret; > } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, > Some minor nitpicking, nothing much :) Is there any chance to pull those corrected patches to v3.12? > > On 13 August 2013 15:38, Lukasz Majewski > wrote: > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > > +static int cpufreq_boost_set_sw(int state) > > +{ > > + struct cpufreq_frequency_table *freq_table; > > + struct cpufreq_policy *policy; > > + int ret = -EINVAL; > > + > > + list_for_each_entry(policy, _policy_list, > > policy_list) { > > + freq_table = > > cpufreq_frequency_get_table(policy->cpu); > > + if (freq_table) { > > + ret = > > cpufreq_frequency_table_cpuinfo(policy, > > + freq_table); > > + if (!ret) { > > + policy->user_policy.max = > > policy->max; > > + __cpufreq_governor(policy, > > CPUFREQ_GOV_LIMITS); > > + } > > In case ret wasn't 0 (i.e. we failed), we should print an error > message and break > our loop ? After your comments I think, that this code could be rewritten: list_for_each_entry(policy, _policy_list, policy_list) { freq_table = cpufreq_frequency_get_table(policy->cpu); if (freq_table) { ret = cpufreq_frequency_table_cpuinfo(policy, freq_table); if (ret) { pr_err("%s: Policy frequency update failed\n") break; } policy->user_policy.max = policy->max; __cpufreq_governor(policy,CPUFREQ_GOV_LIMITS); } } return ret; } > > > + } > > + } > > + > > + return ret; > > +} > > + > > +int cpufreq_boost_trigger_state(int state) > > +{ > > + unsigned long flags; > > + int ret = 0; > > + > > + if (cpufreq_driver->boost_enabled == state) > > + return 0; > > + > > + write_lock_irqsave(_driver_lock, flags); > > + cpufreq_driver->boost_enabled = state; > > + write_unlock_irqrestore(_driver_lock, flags); > > + > > + ret = cpufreq_driver->set_boost(state); > > + if (ret) { > > + write_lock_irqsave(_driver_lock, flags); > > + cpufreq_driver->boost_enabled = !state; > > + write_unlock_irqrestore(_driver_lock, > > flags); + > > + pr_err("%s: Cannot %s BOOST\n", __func__, > > + state ? "enabled" : "disabled"); > > s/enabled/enable and s/disabled/disable Ok. > > > + } > > + > > + return ret; > > +} > > + -- Best regards, Lukasz Majewski Samsung R Institute Poland (SRPOL) | Linux Platform Group -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, Some minor nitpicking, nothing much :) Is there any chance to pull those corrected patches to v3.12? On 13 August 2013 15:38, Lukasz Majewski l.majew...@samsung.com wrote: diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c +static int cpufreq_boost_set_sw(int state) +{ + struct cpufreq_frequency_table *freq_table; + struct cpufreq_policy *policy; + int ret = -EINVAL; + + list_for_each_entry(policy, cpufreq_policy_list, policy_list) { + freq_table = cpufreq_frequency_get_table(policy-cpu); + if (freq_table) { + ret = cpufreq_frequency_table_cpuinfo(policy, + freq_table); + if (!ret) { + policy-user_policy.max = policy-max; + __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS); + } In case ret wasn't 0 (i.e. we failed), we should print an error message and break our loop ? After your comments I think, that this code could be rewritten: list_for_each_entry(policy, cpufreq_policy_list, policy_list) { freq_table = cpufreq_frequency_get_table(policy-cpu); if (freq_table) { ret = cpufreq_frequency_table_cpuinfo(policy, freq_table); if (ret) { pr_err(%s: Policy frequency update failed\n) break; } policy-user_policy.max = policy-max; __cpufreq_governor(policy,CPUFREQ_GOV_LIMITS); } } return ret; } + } + } + + return ret; +} + +int cpufreq_boost_trigger_state(int state) +{ + unsigned long flags; + int ret = 0; + + if (cpufreq_driver-boost_enabled == state) + return 0; + + write_lock_irqsave(cpufreq_driver_lock, flags); + cpufreq_driver-boost_enabled = state; + write_unlock_irqrestore(cpufreq_driver_lock, flags); + + ret = cpufreq_driver-set_boost(state); + if (ret) { + write_lock_irqsave(cpufreq_driver_lock, flags); + cpufreq_driver-boost_enabled = !state; + write_unlock_irqrestore(cpufreq_driver_lock, flags); + + pr_err(%s: Cannot %s BOOST\n, __func__, + state ? enabled : disabled); s/enabled/enable and s/disabled/disable Ok. + } + + return ret; +} + -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On 26 August 2013 12:32, Lukasz Majewski l.majew...@samsung.com wrote: On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, Some minor nitpicking, nothing much :) Is there any chance to pull those corrected patches to v3.12? Only Rafael can decide :) After your comments I think, that this code could be rewritten: list_for_each_entry(policy, cpufreq_policy_list, policy_list) { freq_table = cpufreq_frequency_get_table(policy-cpu); if (freq_table) { ret = cpufreq_frequency_table_cpuinfo(policy, freq_table); if (ret) { pr_err(%s: Policy frequency update failed\n) Don't break strings into multiple lines even if they cross 80 columns.. And you missed __func__ :) break; } policy-user_policy.max = policy-max; __cpufreq_governor(policy,CPUFREQ_GOV_LIMITS); } } return ret; } -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, On 26 August 2013 12:32, Lukasz Majewski l.majew...@samsung.com wrote: On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, Some minor nitpicking, nothing much :) Is there any chance to pull those corrected patches to v3.12? Only Rafael can decide :) :-) After your comments I think, that this code could be rewritten: list_for_each_entry(policy, cpufreq_policy_list, policy_list) { freq_table = cpufreq_frequency_get_table(policy-cpu); if (freq_table) { ret = cpufreq_frequency_table_cpuinfo(policy, freq_table); if (ret) { pr_err(%s: Policy frequency update failed\n) Don't break strings into multiple lines even if they cross 80 columns.. And you missed __func__ :) C code which turned into the pseudo code :-). break; } policy-user_policy.max = policy-max; __cpufreq_governor(policy,CPUFREQ_GOV_LIMITS); } } return ret; } -- To unsubscribe from this list: send the line unsubscribe linux-pm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Monday, August 26, 2013 09:11:14 AM Lukasz Majewski wrote: On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, On 26 August 2013 12:32, Lukasz Majewski l.majew...@samsung.com wrote: On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, Some minor nitpicking, nothing much :) Is there any chance to pull those corrected patches to v3.12? Only Rafael can decide :) :-) Well, 3.11 is a week away and the 3.12 merge window will open then. Honestly, I'd prefer this stuff to spend a couple of weeks in linux-next before pushing it to Linus, so this means 3.13 I'm afraid. Thanks, Rafael -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On 26 August 2013 18:42, Rafael J. Wysocki r...@sisk.pl wrote: On Monday, August 26, 2013 09:11:14 AM Lukasz Majewski wrote: On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, On 26 August 2013 12:32, Lukasz Majewski l.majew...@samsung.com wrote: On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, Some minor nitpicking, nothing much :) Is there any chance to pull those corrected patches to v3.12? Only Rafael can decide :) :-) Well, 3.11 is a week away and the 3.12 merge window will open then. Honestly, I'd prefer this stuff to spend a couple of weeks in linux-next before pushing it to Linus, so this means 3.13 I'm afraid. +1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
On Mon, 26 Aug 2013 19:30:07 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, On 26 August 2013 18:42, Rafael J. Wysocki r...@sisk.pl wrote: On Monday, August 26, 2013 09:11:14 AM Lukasz Majewski wrote: On Mon, 26 Aug 2013 12:36:47 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, On 26 August 2013 12:32, Lukasz Majewski l.majew...@samsung.com wrote: On Mon, 26 Aug 2013 10:58:53 +0530 Viresh Kumar viresh.ku...@linaro.org wrote, Some minor nitpicking, nothing much :) Is there any chance to pull those corrected patches to v3.12? Only Rafael can decide :) :-) Well, 3.11 is a week away and the 3.12 merge window will open then. Honestly, I'd prefer this stuff to spend a couple of weeks in linux-next before pushing it to Linus, so this means 3.13 I'm afraid. +1 Ok. I understand. -- Best regards, Lukasz Majewski Samsung RD Institute Poland (SRPOL) | Linux Platform Group -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
Some minor nitpicking, nothing much :) On 13 August 2013 15:38, Lukasz Majewski wrote: > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > +static int cpufreq_boost_set_sw(int state) > +{ > + struct cpufreq_frequency_table *freq_table; > + struct cpufreq_policy *policy; > + int ret = -EINVAL; > + > + list_for_each_entry(policy, _policy_list, policy_list) { > + freq_table = cpufreq_frequency_get_table(policy->cpu); > + if (freq_table) { > + ret = cpufreq_frequency_table_cpuinfo(policy, > + freq_table); > + if (!ret) { > + policy->user_policy.max = policy->max; > + __cpufreq_governor(policy, > CPUFREQ_GOV_LIMITS); > + } In case ret wasn't 0 (i.e. we failed), we should print an error message and break our loop ? > + } > + } > + > + return ret; > +} > + > +int cpufreq_boost_trigger_state(int state) > +{ > + unsigned long flags; > + int ret = 0; > + > + if (cpufreq_driver->boost_enabled == state) > + return 0; > + > + write_lock_irqsave(_driver_lock, flags); > + cpufreq_driver->boost_enabled = state; > + write_unlock_irqrestore(_driver_lock, flags); > + > + ret = cpufreq_driver->set_boost(state); > + if (ret) { > + write_lock_irqsave(_driver_lock, flags); > + cpufreq_driver->boost_enabled = !state; > + write_unlock_irqrestore(_driver_lock, flags); > + > + pr_err("%s: Cannot %s BOOST\n", __func__, > + state ? "enabled" : "disabled"); s/enabled/enable and s/disabled/disable > + } > + > + return ret; > +} > + -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 1/7] cpufreq: Add boost frequency support in core
Some minor nitpicking, nothing much :) On 13 August 2013 15:38, Lukasz Majewski l.majew...@samsung.com wrote: diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c +static int cpufreq_boost_set_sw(int state) +{ + struct cpufreq_frequency_table *freq_table; + struct cpufreq_policy *policy; + int ret = -EINVAL; + + list_for_each_entry(policy, cpufreq_policy_list, policy_list) { + freq_table = cpufreq_frequency_get_table(policy-cpu); + if (freq_table) { + ret = cpufreq_frequency_table_cpuinfo(policy, + freq_table); + if (!ret) { + policy-user_policy.max = policy-max; + __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS); + } In case ret wasn't 0 (i.e. we failed), we should print an error message and break our loop ? + } + } + + return ret; +} + +int cpufreq_boost_trigger_state(int state) +{ + unsigned long flags; + int ret = 0; + + if (cpufreq_driver-boost_enabled == state) + return 0; + + write_lock_irqsave(cpufreq_driver_lock, flags); + cpufreq_driver-boost_enabled = state; + write_unlock_irqrestore(cpufreq_driver_lock, flags); + + ret = cpufreq_driver-set_boost(state); + if (ret) { + write_lock_irqsave(cpufreq_driver_lock, flags); + cpufreq_driver-boost_enabled = !state; + write_unlock_irqrestore(cpufreq_driver_lock, flags); + + pr_err(%s: Cannot %s BOOST\n, __func__, + state ? enabled : disabled); s/enabled/enable and s/disabled/disable + } + + return ret; +} + -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/