From: Viresh Kumar <viresh.kumar@linaro.org> To: Alexey Klimov <klimov.linux@gmail.com> Cc: "Thomas Gleixner" <tglx@linutronix.de>, "Daniel Lezcano" <daniel.lezcano@linaro.org>, "Kukjin Kim" <kgene.kim@samsung.com>, linaro-kernel@lists.linaro.org, "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, "Krzysztof Kozłowski" <k.kozlowski@samsung.com> Subject: Re: [PATCH 06/41] clocksource: exynos_mct: Migrate to new 'set-state' interface Date: Fri, 19 Jun 2015 07:44:46 +0530 [thread overview] Message-ID: <20150619021446.GC4376@linux> (raw) In-Reply-To: <CALW4P+KrWdAPmG_H8uutDCh5OUgkiRC6UmwM3-C1WwV0CF2_Qg@mail.gmail.com> Hi Alexey, On 18-06-15, 19:38, Alexey Klimov wrote: > (adding samsung list and Krzysztof to c/c) Thanks. > Please don't forget to send patches to platform list and platform maintainers. Hmmm, I cc'd Kukjin on this patch as he was the one Acking most of the patches on this driver recently (had a look at git log). Also looked at MAINTAINERS and the driver itself to look for maintainers, and kukjin was all I can find. Yes, get_maintainers gave the two names you added, but many a times it generates list longer than required and so I don't completely depend on that. Anyway, thanks. > On Thu, Jun 18, 2015 at 1:54 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > > +static int set_state_shutdown(struct clock_event_device *evt) > > +{ > > + exynos4_mct_tick_stop(this_cpu_ptr(&percpu_mct_tick)); Let me clarify the purpose of this patch and the series. Its only about breaking the older ->set_mode() callback into state based callbacks and not change the way things were done. And so no improvements in this patch. If there are improvements possible on the driver, then they must be done separately. > Passed evt pointer isn't used Its a callback from clockevents core, and we can't get rid of the argument. :) > and instead you're going to locate > percpu_mct_tick struct knowing current cpu number offset. That's the way ->set_mode() was doing it and so I didn't touched it to keep this patch simple. > What do you think, since evt is embedded into percpu_mct_tick > structure then maybe it will be cheaper to calculate percpu_mct_tick > using container_of()? > > struct mct_clock_event_device *mevt; > mevt = container_of(evt, struct mct_clock_event_device, evt); Ofcourse, but that has to be fixed for many routines and should be done in a separate patch. It doesn't belong to this one. > > @@ -455,7 +447,10 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt) > > evt->name = mevt->name; > > evt->cpumask = cpumask_of(cpu); > > evt->set_next_event = exynos4_tick_set_next_event; > > - evt->set_mode = exynos4_tick_set_mode; > > + evt->set_state_periodic = set_state_periodic; > > + evt->set_state_shutdown = set_state_shutdown; > > + evt->set_state_oneshot = set_state_shutdown; > > + evt->tick_resume = set_state_shutdown; > > Do i correctly understand that during massive hot-plug cpu events (i > guess that will lead to CPU_STARING notification) on power management > this *_timer_setup() function will be called? I hope so. > And here code performs setting of rather constant values and copying. > You're going to increase number of such strange assignments. > > Well, just lazy-thinking. Can we do something like this: > > for_each_possible_cpu(cpu) { > exynos4_local_timer_setup_prepare(&per_cpu(percpu_mct_tick, > cpu).evt, cpu); > } > > somewhere in exynos_mct init functions and assign most of these values > for each evt structure? > And make *_timer_setup() function lighter moving some code to > prepare/init functions. I agree.. But again, that has to be done in a separate patch. > If it makes any sense i can take a look and try to prepare patch. Sure.. > Do you need testers? I can test it on odroid-xu3. That will be good. > Can't find in emails similar patch for ARM arch timer. Any plans about > it? Or if it's already converted to 'set-state' then could you please > share a link? https://git.linaro.org/people/daniel.lezcano/linux.git/shortlog/refs/heads/clockevents/4.3 -- viresh
WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/41] clocksource: exynos_mct: Migrate to new 'set-state' interface Date: Fri, 19 Jun 2015 07:44:46 +0530 [thread overview] Message-ID: <20150619021446.GC4376@linux> (raw) In-Reply-To: <CALW4P+KrWdAPmG_H8uutDCh5OUgkiRC6UmwM3-C1WwV0CF2_Qg@mail.gmail.com> Hi Alexey, On 18-06-15, 19:38, Alexey Klimov wrote: > (adding samsung list and Krzysztof to c/c) Thanks. > Please don't forget to send patches to platform list and platform maintainers. Hmmm, I cc'd Kukjin on this patch as he was the one Acking most of the patches on this driver recently (had a look at git log). Also looked at MAINTAINERS and the driver itself to look for maintainers, and kukjin was all I can find. Yes, get_maintainers gave the two names you added, but many a times it generates list longer than required and so I don't completely depend on that. Anyway, thanks. > On Thu, Jun 18, 2015 at 1:54 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote: > > +static int set_state_shutdown(struct clock_event_device *evt) > > +{ > > + exynos4_mct_tick_stop(this_cpu_ptr(&percpu_mct_tick)); Let me clarify the purpose of this patch and the series. Its only about breaking the older ->set_mode() callback into state based callbacks and not change the way things were done. And so no improvements in this patch. If there are improvements possible on the driver, then they must be done separately. > Passed evt pointer isn't used Its a callback from clockevents core, and we can't get rid of the argument. :) > and instead you're going to locate > percpu_mct_tick struct knowing current cpu number offset. That's the way ->set_mode() was doing it and so I didn't touched it to keep this patch simple. > What do you think, since evt is embedded into percpu_mct_tick > structure then maybe it will be cheaper to calculate percpu_mct_tick > using container_of()? > > struct mct_clock_event_device *mevt; > mevt = container_of(evt, struct mct_clock_event_device, evt); Ofcourse, but that has to be fixed for many routines and should be done in a separate patch. It doesn't belong to this one. > > @@ -455,7 +447,10 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt) > > evt->name = mevt->name; > > evt->cpumask = cpumask_of(cpu); > > evt->set_next_event = exynos4_tick_set_next_event; > > - evt->set_mode = exynos4_tick_set_mode; > > + evt->set_state_periodic = set_state_periodic; > > + evt->set_state_shutdown = set_state_shutdown; > > + evt->set_state_oneshot = set_state_shutdown; > > + evt->tick_resume = set_state_shutdown; > > Do i correctly understand that during massive hot-plug cpu events (i > guess that will lead to CPU_STARING notification) on power management > this *_timer_setup() function will be called? I hope so. > And here code performs setting of rather constant values and copying. > You're going to increase number of such strange assignments. > > Well, just lazy-thinking. Can we do something like this: > > for_each_possible_cpu(cpu) { > exynos4_local_timer_setup_prepare(&per_cpu(percpu_mct_tick, > cpu).evt, cpu); > } > > somewhere in exynos_mct init functions and assign most of these values > for each evt structure? > And make *_timer_setup() function lighter moving some code to > prepare/init functions. I agree.. But again, that has to be done in a separate patch. > If it makes any sense i can take a look and try to prepare patch. Sure.. > Do you need testers? I can test it on odroid-xu3. That will be good. > Can't find in emails similar patch for ARM arch timer. Any plans about > it? Or if it's already converted to 'set-state' then could you please > share a link? https://git.linaro.org/people/daniel.lezcano/linux.git/shortlog/refs/heads/clockevents/4.3 -- viresh
next prev parent reply other threads:[~2015-06-19 2:15 UTC|newest] Thread overview: 171+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <cover.1434622147.git.viresh.kumar@linaro.org> 2015-06-18 10:54 ` [PATCH 01/41] clocksource: asm9260: Migrate to new 'set-state' interface Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-30 8:25 ` Daniel Lezcano 2015-06-30 8:25 ` Daniel Lezcano 2015-06-30 9:00 ` Viresh Kumar 2015-06-30 9:00 ` Viresh Kumar 2015-06-30 9:20 ` Daniel Lezcano 2015-06-30 9:20 ` Daniel Lezcano 2015-07-08 5:37 ` Vineet Gupta 2015-07-08 5:37 ` Vineet Gupta 2015-07-08 5:37 ` Vineet Gupta 2015-07-08 5:43 ` Viresh Kumar 2015-07-08 5:43 ` Viresh Kumar 2015-07-08 6:14 ` Vineet Gupta 2015-07-08 6:14 ` Vineet Gupta 2015-06-18 10:54 ` [PATCH 02/41] clocksource: cadence_ttc: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-25 23:15 ` Sören Brinkmann 2015-06-25 23:15 ` Sören Brinkmann 2015-06-30 8:28 ` Daniel Lezcano 2015-06-30 8:28 ` Daniel Lezcano 2015-06-18 10:54 ` [PATCH 03/41] clocksource: clps711x: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 04/41] clocksource: dummy_timer: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 05/41] clocksource: dw_apb: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 06/41] clocksource: exynos_mct: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 16:38 ` Alexey Klimov 2015-06-18 16:38 ` Alexey Klimov 2015-06-19 2:14 ` Viresh Kumar [this message] 2015-06-19 2:14 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 07/41] clocksource: fsl_ftm: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 08/41] clocksource: i8253: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 09/41] clocksource: meson6: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-20 6:53 ` Carlo Caione 2015-06-20 6:53 ` Carlo Caione 2015-06-18 10:54 ` [PATCH 10/41] clocksource: metag_generic: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 11/41] clocksource: mips-gic: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 12/41] clocksource: moxart: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 13/41] clocksource: mtk: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 14/41] clocksource: mxs: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-17 5:28 ` Stefan Wahren 2015-07-17 5:28 ` Stefan Wahren 2015-06-18 10:54 ` [PATCH 15/41] clocksource: nomadik-mtu: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-14 11:11 ` Linus Walleij 2015-07-14 11:11 ` Linus Walleij 2015-06-18 10:54 ` [PATCH 16/41] clocksource: pxa: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-04 15:42 ` Robert Jarzmik 2015-07-04 15:42 ` Robert Jarzmik 2015-07-05 3:37 ` Viresh Kumar 2015-07-05 3:37 ` Viresh Kumar 2015-07-06 6:13 ` Robert Jarzmik 2015-07-06 6:13 ` Robert Jarzmik 2015-06-18 10:54 ` [PATCH 17/41] clocksource: qcom: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-19 19:10 ` Stephen Boyd 2015-06-19 19:10 ` Stephen Boyd 2015-06-18 10:54 ` [PATCH 18/41] clocksource: rockchip: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 19/41] clocksource: samsung_pwm: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 20/41] clocksource: sh_cmt: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 13:10 ` Laurent Pinchart 2015-06-18 13:10 ` Laurent Pinchart 2015-06-18 10:54 ` [PATCH 21/41] clocksource: sh_mtu2: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 13:10 ` Laurent Pinchart 2015-06-18 13:10 ` Laurent Pinchart 2015-06-18 10:54 ` [PATCH 22/41] clocksource: sh_tmu: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 13:10 ` Laurent Pinchart 2015-06-18 13:10 ` Laurent Pinchart 2015-06-18 10:54 ` [PATCH 23/41] clocksource: sun4i: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 12:01 ` Maxime Ripard 2015-06-18 12:01 ` Maxime Ripard 2015-06-18 12:23 ` Viresh Kumar 2015-06-18 12:23 ` Viresh Kumar 2015-06-19 10:30 ` Maxime Ripard 2015-06-19 10:30 ` Maxime Ripard 2015-06-18 10:54 ` [PATCH 24/41] clocksource: tcb_clksrc: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 25/41] clocksource: tegra20: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-02 19:41 ` Daniel Lezcano 2015-07-02 19:41 ` Daniel Lezcano 2015-07-03 8:54 ` Viresh Kumar 2015-07-03 8:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 26/41] clocksource: time-armada-370-xp: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 27/41] clocksource: efm32: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 28/41] clocksource: orion: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 29/41] clocksource: atlas7: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 30/41] clocksource: atmel: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 14:28 ` Alexandre Belloni 2015-06-18 14:28 ` Alexandre Belloni 2015-06-18 10:54 ` [PATCH 31/41] clocksource: atmel-st: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 14:40 ` Alexandre Belloni 2015-06-18 14:40 ` Alexandre Belloni 2015-06-19 1:49 ` Viresh Kumar 2015-06-19 1:49 ` Viresh Kumar 2015-06-19 11:48 ` Alexandre Belloni 2015-06-19 11:48 ` Alexandre Belloni 2015-06-19 11:52 ` Viresh Kumar 2015-06-19 11:52 ` Viresh Kumar 2015-06-19 12:06 ` Alexandre Belloni 2015-06-19 12:06 ` Alexandre Belloni 2015-06-18 10:54 ` [PATCH 32/41] clocksource: digicolor: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-23 10:17 ` Baruch Siach 2015-06-23 10:17 ` Baruch Siach 2015-06-23 10:21 ` Viresh Kumar 2015-06-23 10:21 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 33/41] clocksource: integrator: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-14 13:35 ` Linus Walleij 2015-07-14 13:35 ` Linus Walleij 2015-06-18 10:54 ` [PATCH 34/41] clocksource: keystone: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 35/41] clocksource: prima2: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 36/41] clocksource: stm32: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 11:09 ` Maxime Coquelin 2015-06-18 11:09 ` Maxime Coquelin 2015-06-18 11:32 ` Viresh Kumar 2015-06-18 11:32 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 37/41] clocksource: sun5i: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 38/41] clocksource: u300: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-14 13:36 ` Linus Walleij 2015-07-14 13:36 ` Linus Walleij 2015-06-18 10:54 ` [PATCH 39/41] clocksource: vf_pit: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-03 8:10 ` Stefan Agner 2015-07-03 8:10 ` Stefan Agner 2015-07-03 8:57 ` Viresh Kumar 2015-07-03 8:57 ` Viresh Kumar 2015-07-03 11:11 ` Stefan Agner 2015-07-03 11:11 ` Stefan Agner 2015-07-03 11:17 ` Viresh Kumar 2015-07-03 11:17 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 40/41] clocksource: vt8500: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-06-18 10:54 ` [PATCH 41/41] clocksource: zevio: " Viresh Kumar 2015-06-18 10:54 ` Viresh Kumar 2015-07-02 20:11 ` Daniel Lezcano 2015-07-02 20:11 ` Daniel Lezcano 2015-07-03 8:56 ` Viresh Kumar 2015-07-03 8:56 ` Viresh Kumar 2015-07-03 8:59 ` Daniel Lezcano 2015-07-03 8:59 ` Daniel Lezcano
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=20150619021446.GC4376@linux \ --to=viresh.kumar@linaro.org \ --cc=daniel.lezcano@linaro.org \ --cc=k.kozlowski@samsung.com \ --cc=kgene.kim@samsung.com \ --cc=klimov.linux@gmail.com \ --cc=linaro-kernel@lists.linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=tglx@linutronix.de \ /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.