Re: [PATCH v6 2/4] scmi-cpufreq: Move CPU initialisation to probe

2021-01-30 Thread Nicola Mazzucato
Hi Cristian, sorry for my late reply. Thanks for looking into this. I am preparing a v7 with suggestions proposed by Viresh which, hopefully, should remove some unclear parts and resolve your comments. I had left behind some dealloc, so thanks for spotting! Many thanks, Nicola On 1/14/21 4:54 P

Re: [PATCH v6 2/4] scmi-cpufreq: Move CPU initialisation to probe

2021-01-14 Thread Cristian Marussi
Hi Nicola, a few remarks down below. On Mon, Jan 11, 2021 at 03:45:22PM +, Nicola Mazzucato wrote: > Some of the cpu related initialisation can be done at probe stage. > This patch moves those initialisations from the ->init callback to the > probe stage. > > This is done in preparation for

Re: [PATCH v6 2/4] scmi-cpufreq: Move CPU initialisation to probe

2021-01-14 Thread Nicola Mazzucato
Hi Viresh, many thanks for your suggestions. I will prepare a new version based on those. Many thanks, Nicola On 1/14/21 5:07 AM, Viresh Kumar wrote: > On 13-01-21, 11:55, Nicola Mazzucato wrote: >> On 1/12/21 11:17 AM, Viresh Kumar wrote: >>> This could have been done with a per-cpu variable i

Re: [PATCH v6 2/4] scmi-cpufreq: Move CPU initialisation to probe

2021-01-13 Thread Viresh Kumar
On 13-01-21, 11:55, Nicola Mazzucato wrote: > On 1/12/21 11:17 AM, Viresh Kumar wrote: > > This could have been done with a per-cpu variable instead. > > sure, I can do a DEFINE_PER_CPU() for it if it makes it better. If we don't go with the linked list approach, then yes. > >> + for_each_poss

Re: [PATCH v6 2/4] scmi-cpufreq: Move CPU initialisation to probe

2021-01-13 Thread Nicola Mazzucato
Hi Viresh, thanks for looking into this. Please see below. On 1/12/21 11:17 AM, Viresh Kumar wrote: > On 11-01-21, 15:45, Nicola Mazzucato wrote: >> diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c >> +static int scmi_init_cpudata(void) >> +{ >> +int cpu; >> +un

Re: [PATCH v6 2/4] scmi-cpufreq: Move CPU initialisation to probe

2021-01-12 Thread Viresh Kumar
On 11-01-21, 15:45, Nicola Mazzucato wrote: > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > +static int scmi_init_cpudata(void) > +{ > + int cpu; > + unsigned int ncpus = num_possible_cpus(); > + > + cpudata_table = kzalloc(sizeof(*cpudata_table) * ncpus

[PATCH v6 2/4] scmi-cpufreq: Move CPU initialisation to probe

2021-01-11 Thread Nicola Mazzucato
Some of the cpu related initialisation can be done at probe stage. This patch moves those initialisations from the ->init callback to the probe stage. This is done in preparation for adding support to retrieve additional information from DT (CPUs sharing v/f lines). Signed-off-by: Nicola Mazzucat