From: Viresh Kumar <viresh.kumar@linaro.org> To: amit kachhap <amit.kachhap@gmail.com> Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com, Thomas Abraham <thomas.abraham@linaro.org>, cpufreq@vger.kernel.org, Amit Kucheria <amit.kucheria@linaro.org> Subject: Re: [PATCH 2/3] cpufreq: exynos: Adding cpufreq driver for exynos5440 Date: Fri, 8 Feb 2013 08:12:25 +0530 [thread overview] Message-ID: <CAKohpon1J+7ZQu+Nevz_KBXpVa2Kus--DxR3cOhb97o-scB0fw@mail.gmail.com> (raw) In-Reply-To: <CADGdYn7+U1fvFdHkAikoH9P-owF0ZKk6ZSgrPfY+16S3vO=S3A@mail.gmail.com> On 8 February 2013 00:38, amit kachhap <amit.kachhap@gmail.com> wrote: > Hi Viresh, > > Thanks for the detailed review. Will try to handle them in the next version, np. I haven't seen reply to few questions, you missed them or accept them. General tip: Leave a blank line before and after your comment, it makes it more readable. :) > On Thu, Feb 7, 2013 at 3:17 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: >> On Thu, Feb 7, 2013 at 1:09 AM, Amit Daniel Kachhap >>> +Required properties: >>> +- interrupts: Interrupt to know the completion of cpu frequency change. >>> +- cpufreq_tbl: Table of frequencies and voltage CPU could be transitioned into, >> >> This has to be "operating-points" as in cpufreq-cpu0 driver. > Yes I will check if opp table is beneficial. In my case it is just one > time parsing of cpufreq table and those values(freq, volt) are not > used later so did not use opp libraries. Its one time parsing for everybody, nobody do it twice :) >>> + for (old_index = 0; >>> + freq_table[old_index].frequency != CPUFREQ_TABLE_END; >>> + old_index++) >>> + if (freq_table[old_index].frequency == freqs.old) >>> + break; >>> + >>> + if (freq_table[old_index].frequency == CPUFREQ_TABLE_END) { >> >> How can this be true? > This is error scenario We have given cpufreq core a valid table and it has to set frequency from this table only. How can cpu have any other freq here ? And you have done something similar in your init() too, where you check if cpu has freq from the table or not. >>> + dvfs_info = kzalloc(sizeof(struct exynos_dvfs_data), GFP_KERNEL); >> >> sizeof(*dvfs_info) ?? why don't make it static too, as you have other >> stuff too.. ? >> The better option for single image solution to allocate everything >> dynamically, so that >> unused drivers don't occupy any space. ? >>> + if ((len == 0) || (len / 2 > CPUFREQ_LEVEL_END)) { >> >> I really didn't like this limit you have put at the number of dvfs >> points. Better >> would be to use: >>> + dvfs_info->dvfs_init = true; >> >> why do you need this ? > This is added to synchronize the interrupts. How? You are setting it once in init() and not touching it afterwards. :)
WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] cpufreq: exynos: Adding cpufreq driver for exynos5440 Date: Fri, 8 Feb 2013 08:12:25 +0530 [thread overview] Message-ID: <CAKohpon1J+7ZQu+Nevz_KBXpVa2Kus--DxR3cOhb97o-scB0fw@mail.gmail.com> (raw) In-Reply-To: <CADGdYn7+U1fvFdHkAikoH9P-owF0ZKk6ZSgrPfY+16S3vO=S3A@mail.gmail.com> On 8 February 2013 00:38, amit kachhap <amit.kachhap@gmail.com> wrote: > Hi Viresh, > > Thanks for the detailed review. Will try to handle them in the next version, np. I haven't seen reply to few questions, you missed them or accept them. General tip: Leave a blank line before and after your comment, it makes it more readable. :) > On Thu, Feb 7, 2013 at 3:17 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote: >> On Thu, Feb 7, 2013 at 1:09 AM, Amit Daniel Kachhap >>> +Required properties: >>> +- interrupts: Interrupt to know the completion of cpu frequency change. >>> +- cpufreq_tbl: Table of frequencies and voltage CPU could be transitioned into, >> >> This has to be "operating-points" as in cpufreq-cpu0 driver. > Yes I will check if opp table is beneficial. In my case it is just one > time parsing of cpufreq table and those values(freq, volt) are not > used later so did not use opp libraries. Its one time parsing for everybody, nobody do it twice :) >>> + for (old_index = 0; >>> + freq_table[old_index].frequency != CPUFREQ_TABLE_END; >>> + old_index++) >>> + if (freq_table[old_index].frequency == freqs.old) >>> + break; >>> + >>> + if (freq_table[old_index].frequency == CPUFREQ_TABLE_END) { >> >> How can this be true? > This is error scenario We have given cpufreq core a valid table and it has to set frequency from this table only. How can cpu have any other freq here ? And you have done something similar in your init() too, where you check if cpu has freq from the table or not. >>> + dvfs_info = kzalloc(sizeof(struct exynos_dvfs_data), GFP_KERNEL); >> >> sizeof(*dvfs_info) ?? why don't make it static too, as you have other >> stuff too.. ? >> The better option for single image solution to allocate everything >> dynamically, so that >> unused drivers don't occupy any space. ? >>> + if ((len == 0) || (len / 2 > CPUFREQ_LEVEL_END)) { >> >> I really didn't like this limit you have put at the number of dvfs >> points. Better >> would be to use: >>> + dvfs_info->dvfs_init = true; >> >> why do you need this ? > This is added to synchronize the interrupts. How? You are setting it once in init() and not touching it afterwards. :)
next prev parent reply other threads:[~2013-02-08 2:42 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-02-06 19:39 [PATCH 1/3] cpufreq: exynos: Remove error return even if no soc found Amit Daniel Kachhap 2013-02-06 19:39 ` Amit Daniel Kachhap 2013-02-06 19:39 ` [PATCH 2/3] cpufreq: exynos: Adding cpufreq driver for exynos5440 Amit Daniel Kachhap 2013-02-06 19:39 ` Amit Daniel Kachhap 2013-02-07 5:09 ` Inderpal Singh 2013-02-07 5:09 ` Inderpal Singh 2013-02-07 11:19 ` Viresh Kumar 2013-02-07 11:19 ` Viresh Kumar 2013-02-07 11:28 ` Inderpal Singh 2013-02-07 11:28 ` Inderpal Singh 2013-02-07 18:39 ` amit kachhap 2013-02-07 18:39 ` amit kachhap 2013-02-07 11:17 ` Viresh Kumar 2013-02-07 11:17 ` Viresh Kumar 2013-02-07 19:08 ` amit kachhap 2013-02-07 19:08 ` amit kachhap 2013-02-08 2:42 ` Viresh Kumar [this message] 2013-02-08 2:42 ` Viresh Kumar 2013-02-08 3:26 ` amit kachhap 2013-02-08 3:26 ` amit kachhap 2013-02-08 4:23 ` Viresh Kumar 2013-02-08 4:23 ` Viresh Kumar 2013-02-06 19:39 ` [PATCH 3/3] dts: Add cpufreq controller node for Exynos5440 SoC Amit Daniel Kachhap 2013-02-06 19:39 ` Amit Daniel Kachhap 2013-02-07 4:49 ` Inderpal Singh 2013-02-07 4:49 ` Inderpal Singh 2013-02-07 18:33 ` amit kachhap 2013-02-07 18:33 ` amit kachhap 2013-02-08 16:49 ` Inderpal Singh 2013-02-08 16:49 ` Inderpal Singh 2013-02-12 1:12 ` amit kachhap 2013-02-12 1:12 ` amit kachhap 2013-02-12 5:00 ` Inderpal Singh 2013-02-12 5:00 ` Inderpal Singh 2013-02-07 11:20 ` [PATCH 1/3] cpufreq: exynos: Remove error return even if no soc found Viresh Kumar 2013-02-07 11:20 ` Viresh Kumar
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAKohpon1J+7ZQu+Nevz_KBXpVa2Kus--DxR3cOhb97o-scB0fw@mail.gmail.com \ --to=viresh.kumar@linaro.org \ --cc=amit.kachhap@gmail.com \ --cc=amit.kucheria@linaro.org \ --cc=cpufreq@vger.kernel.org \ --cc=kgene.kim@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-pm@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=rjw@sisk.pl \ --cc=thomas.abraham@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.