* [PATCH v2 0/2] clocksource/cadence_ttc: Add sched_clock functionality @ 2013-07-08 16:51 ` Soren Brinkmann 0 siblings, 0 replies; 12+ messages in thread From: Soren Brinkmann @ 2013-07-08 16:51 UTC (permalink / raw) To: John Stultz, Thomas Gleixner, Baruch Siach Cc: linux-kernel, linux-arm-kernel, Michal Simek, Soren Brinkmann I updated the original patch according to the discussion with Thomas and Baruch. Furthermore, I noticed that the driver includes the clk-provider header for no apparent reason and removed it. Sören v2: - adding patch to remove unused header to the series - #include linux/sched_clock.h instead of asm/sched_clock.h - remove Kconfig options and #ifdefs around sched_clock related code The reasons for having those are obsolete, since ARM deprecated its custom sched_clock framework and migrated to the common one. Soren Brinkmann (2): clocksource/cadence_ttc: Remove unused header clocksource/cadence_ttc: Reuse clocksource as sched_clock drivers/clocksource/cadence_ttc_timer.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 1.8.3.2 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 0/2] clocksource/cadence_ttc: Add sched_clock functionality @ 2013-07-08 16:51 ` Soren Brinkmann 0 siblings, 0 replies; 12+ messages in thread From: Soren Brinkmann @ 2013-07-08 16:51 UTC (permalink / raw) To: linux-arm-kernel I updated the original patch according to the discussion with Thomas and Baruch. Furthermore, I noticed that the driver includes the clk-provider header for no apparent reason and removed it. S?ren v2: - adding patch to remove unused header to the series - #include linux/sched_clock.h instead of asm/sched_clock.h - remove Kconfig options and #ifdefs around sched_clock related code The reasons for having those are obsolete, since ARM deprecated its custom sched_clock framework and migrated to the common one. Soren Brinkmann (2): clocksource/cadence_ttc: Remove unused header clocksource/cadence_ttc: Reuse clocksource as sched_clock drivers/clocksource/cadence_ttc_timer.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 1.8.3.2 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/2] clocksource/cadence_ttc: Remove unused header 2013-07-08 16:51 ` Soren Brinkmann @ 2013-07-08 16:51 ` Soren Brinkmann -1 siblings, 0 replies; 12+ messages in thread From: Soren Brinkmann @ 2013-07-08 16:51 UTC (permalink / raw) To: John Stultz, Thomas Gleixner, Baruch Siach Cc: linux-kernel, linux-arm-kernel, Michal Simek, Soren Brinkmann The clk-provider.h header is not required by this driver. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> --- drivers/clocksource/cadence_ttc_timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c index 4cbe28c..0eefc8d 100644 --- a/drivers/clocksource/cadence_ttc_timer.c +++ b/drivers/clocksource/cadence_ttc_timer.c @@ -21,7 +21,6 @@ #include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/slab.h> -#include <linux/clk-provider.h> /* * This driver configures the 2 16-bit count-up timers as follows: -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 1/2] clocksource/cadence_ttc: Remove unused header @ 2013-07-08 16:51 ` Soren Brinkmann 0 siblings, 0 replies; 12+ messages in thread From: Soren Brinkmann @ 2013-07-08 16:51 UTC (permalink / raw) To: linux-arm-kernel The clk-provider.h header is not required by this driver. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> --- drivers/clocksource/cadence_ttc_timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c index 4cbe28c..0eefc8d 100644 --- a/drivers/clocksource/cadence_ttc_timer.c +++ b/drivers/clocksource/cadence_ttc_timer.c @@ -21,7 +21,6 @@ #include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/slab.h> -#include <linux/clk-provider.h> /* * This driver configures the 2 16-bit count-up timers as follows: -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock 2013-07-08 16:51 ` Soren Brinkmann @ 2013-07-08 16:51 ` Soren Brinkmann -1 siblings, 0 replies; 12+ messages in thread From: Soren Brinkmann @ 2013-07-08 16:51 UTC (permalink / raw) To: John Stultz, Thomas Gleixner, Baruch Siach Cc: linux-kernel, linux-arm-kernel, Michal Simek, Soren Brinkmann Reuse the TTC clocksource timer as sched clock provider. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> --- v2: - #include linux/sched_clock.h instead of asm/sched_clock.h - remove Kconfig options and #ifdefs around sched_clock related code The reasons for having those are obsolete, since ARM deprecated its custom sched_clock framework and migrated to the common one. drivers/clocksource/cadence_ttc_timer.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c index 0eefc8d..b2bb3a4b 100644 --- a/drivers/clocksource/cadence_ttc_timer.c +++ b/drivers/clocksource/cadence_ttc_timer.c @@ -21,6 +21,7 @@ #include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/slab.h> +#include <linux/sched_clock.h> /* * This driver configures the 2 16-bit count-up timers as follows: @@ -94,6 +95,8 @@ struct ttc_timer_clockevent { #define to_ttc_timer_clkevent(x) \ container_of(x, struct ttc_timer_clockevent, ce) +static void __iomem *ttc_sched_clock_val_reg; + /** * ttc_set_interval - Set the timer interval value * @@ -155,6 +158,11 @@ static cycle_t __ttc_clocksource_read(struct clocksource *cs) TTC_COUNT_VAL_OFFSET); } +static u32 notrace ttc_sched_clock_read(void) +{ + return __raw_readl(ttc_sched_clock_val_reg); +} + /** * ttc_set_next_event - Sets the time interval for next event * @@ -296,6 +304,10 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base) kfree(ttccs); return; } + + ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET; + setup_sched_clock(ttc_sched_clock_read, 16, + clk_get_rate(ttccs->ttc.clk) / PRESCALE); } static int ttc_rate_change_clockevent_cb(struct notifier_block *nb, -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock @ 2013-07-08 16:51 ` Soren Brinkmann 0 siblings, 0 replies; 12+ messages in thread From: Soren Brinkmann @ 2013-07-08 16:51 UTC (permalink / raw) To: linux-arm-kernel Reuse the TTC clocksource timer as sched clock provider. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> --- v2: - #include linux/sched_clock.h instead of asm/sched_clock.h - remove Kconfig options and #ifdefs around sched_clock related code The reasons for having those are obsolete, since ARM deprecated its custom sched_clock framework and migrated to the common one. drivers/clocksource/cadence_ttc_timer.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c index 0eefc8d..b2bb3a4b 100644 --- a/drivers/clocksource/cadence_ttc_timer.c +++ b/drivers/clocksource/cadence_ttc_timer.c @@ -21,6 +21,7 @@ #include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/slab.h> +#include <linux/sched_clock.h> /* * This driver configures the 2 16-bit count-up timers as follows: @@ -94,6 +95,8 @@ struct ttc_timer_clockevent { #define to_ttc_timer_clkevent(x) \ container_of(x, struct ttc_timer_clockevent, ce) +static void __iomem *ttc_sched_clock_val_reg; + /** * ttc_set_interval - Set the timer interval value * @@ -155,6 +158,11 @@ static cycle_t __ttc_clocksource_read(struct clocksource *cs) TTC_COUNT_VAL_OFFSET); } +static u32 notrace ttc_sched_clock_read(void) +{ + return __raw_readl(ttc_sched_clock_val_reg); +} + /** * ttc_set_next_event - Sets the time interval for next event * @@ -296,6 +304,10 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base) kfree(ttccs); return; } + + ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET; + setup_sched_clock(ttc_sched_clock_read, 16, + clk_get_rate(ttccs->ttc.clk) / PRESCALE); } static int ttc_rate_change_clockevent_cb(struct notifier_block *nb, -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock 2013-07-08 16:51 ` Soren Brinkmann @ 2013-07-12 12:08 ` Michal Simek -1 siblings, 0 replies; 12+ messages in thread From: Michal Simek @ 2013-07-12 12:08 UTC (permalink / raw) To: Soren Brinkmann Cc: John Stultz, Thomas Gleixner, Baruch Siach, linux-kernel, linux-arm-kernel, Michal Simek [-- Attachment #1: Type: text/plain, Size: 2526 bytes --] On 07/08/2013 06:51 PM, Soren Brinkmann wrote: > Reuse the TTC clocksource timer as sched clock provider. > > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> > --- > v2: > - #include linux/sched_clock.h instead of asm/sched_clock.h > - remove Kconfig options and #ifdefs around sched_clock related code > The reasons for having those are obsolete, since ARM deprecated its > custom sched_clock framework and migrated to the common one. > > drivers/clocksource/cadence_ttc_timer.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c > index 0eefc8d..b2bb3a4b 100644 > --- a/drivers/clocksource/cadence_ttc_timer.c > +++ b/drivers/clocksource/cadence_ttc_timer.c > @@ -21,6 +21,7 @@ > #include <linux/of_address.h> > #include <linux/of_irq.h> > #include <linux/slab.h> > +#include <linux/sched_clock.h> > > /* > * This driver configures the 2 16-bit count-up timers as follows: > @@ -94,6 +95,8 @@ struct ttc_timer_clockevent { > #define to_ttc_timer_clkevent(x) \ > container_of(x, struct ttc_timer_clockevent, ce) > > +static void __iomem *ttc_sched_clock_val_reg; > + > /** > * ttc_set_interval - Set the timer interval value > * > @@ -155,6 +158,11 @@ static cycle_t __ttc_clocksource_read(struct clocksource *cs) > TTC_COUNT_VAL_OFFSET); > } > > +static u32 notrace ttc_sched_clock_read(void) > +{ > + return __raw_readl(ttc_sched_clock_val_reg); > +} > + > /** > * ttc_set_next_event - Sets the time interval for next event > * > @@ -296,6 +304,10 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base) > kfree(ttccs); > return; > } > + > + ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET; > + setup_sched_clock(ttc_sched_clock_read, 16, > + clk_get_rate(ttccs->ttc.clk) / PRESCALE); > } > > static int ttc_rate_change_clockevent_cb(struct notifier_block *nb, > Acked-by: Michal Simek <monstr@monstr.eu> Thomas, John: Can you please add this patch to your queue? IRC all these timer patches should go through your trees. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock @ 2013-07-12 12:08 ` Michal Simek 0 siblings, 0 replies; 12+ messages in thread From: Michal Simek @ 2013-07-12 12:08 UTC (permalink / raw) To: linux-arm-kernel On 07/08/2013 06:51 PM, Soren Brinkmann wrote: > Reuse the TTC clocksource timer as sched clock provider. > > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> > --- > v2: > - #include linux/sched_clock.h instead of asm/sched_clock.h > - remove Kconfig options and #ifdefs around sched_clock related code > The reasons for having those are obsolete, since ARM deprecated its > custom sched_clock framework and migrated to the common one. > > drivers/clocksource/cadence_ttc_timer.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c > index 0eefc8d..b2bb3a4b 100644 > --- a/drivers/clocksource/cadence_ttc_timer.c > +++ b/drivers/clocksource/cadence_ttc_timer.c > @@ -21,6 +21,7 @@ > #include <linux/of_address.h> > #include <linux/of_irq.h> > #include <linux/slab.h> > +#include <linux/sched_clock.h> > > /* > * This driver configures the 2 16-bit count-up timers as follows: > @@ -94,6 +95,8 @@ struct ttc_timer_clockevent { > #define to_ttc_timer_clkevent(x) \ > container_of(x, struct ttc_timer_clockevent, ce) > > +static void __iomem *ttc_sched_clock_val_reg; > + > /** > * ttc_set_interval - Set the timer interval value > * > @@ -155,6 +158,11 @@ static cycle_t __ttc_clocksource_read(struct clocksource *cs) > TTC_COUNT_VAL_OFFSET); > } > > +static u32 notrace ttc_sched_clock_read(void) > +{ > + return __raw_readl(ttc_sched_clock_val_reg); > +} > + > /** > * ttc_set_next_event - Sets the time interval for next event > * > @@ -296,6 +304,10 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base) > kfree(ttccs); > return; > } > + > + ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET; > + setup_sched_clock(ttc_sched_clock_read, 16, > + clk_get_rate(ttccs->ttc.clk) / PRESCALE); > } > > static int ttc_rate_change_clockevent_cb(struct notifier_block *nb, > Acked-by: Michal Simek <monstr@monstr.eu> Thomas, John: Can you please add this patch to your queue? IRC all these timer patches should go through your trees. Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130712/bdcd7113/attachment.sig> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock 2013-07-12 12:08 ` Michal Simek @ 2013-07-16 15:32 ` Daniel Lezcano -1 siblings, 0 replies; 12+ messages in thread From: Daniel Lezcano @ 2013-07-16 15:32 UTC (permalink / raw) To: monstr Cc: Soren Brinkmann, John Stultz, Thomas Gleixner, Baruch Siach, linux-kernel, linux-arm-kernel, Michal Simek On 07/12/2013 02:08 PM, Michal Simek wrote: > Acked-by: Michal Simek <monstr@monstr.eu> Applied to my tree for 3.12 Thanks -- Daniel -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock @ 2013-07-16 15:32 ` Daniel Lezcano 0 siblings, 0 replies; 12+ messages in thread From: Daniel Lezcano @ 2013-07-16 15:32 UTC (permalink / raw) To: linux-arm-kernel On 07/12/2013 02:08 PM, Michal Simek wrote: > Acked-by: Michal Simek <monstr@monstr.eu> Applied to my tree for 3.12 Thanks -- Daniel -- <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock 2013-07-16 15:32 ` Daniel Lezcano @ 2013-07-16 15:51 ` Sören Brinkmann -1 siblings, 0 replies; 12+ messages in thread From: Sören Brinkmann @ 2013-07-16 15:51 UTC (permalink / raw) To: Daniel Lezcano Cc: monstr, John Stultz, Thomas Gleixner, Baruch Siach, linux-kernel, linux-arm-kernel, Michal Simek On Tue, Jul 16, 2013 at 05:32:41PM +0200, Daniel Lezcano wrote: > On 07/12/2013 02:08 PM, Michal Simek wrote: > > Acked-by: Michal Simek <monstr@monstr.eu> > > Applied to my tree for 3.12 thanks ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock @ 2013-07-16 15:51 ` Sören Brinkmann 0 siblings, 0 replies; 12+ messages in thread From: Sören Brinkmann @ 2013-07-16 15:51 UTC (permalink / raw) To: linux-arm-kernel On Tue, Jul 16, 2013 at 05:32:41PM +0200, Daniel Lezcano wrote: > On 07/12/2013 02:08 PM, Michal Simek wrote: > > Acked-by: Michal Simek <monstr@monstr.eu> > > Applied to my tree for 3.12 thanks ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-07-16 15:51 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-07-08 16:51 [PATCH v2 0/2] clocksource/cadence_ttc: Add sched_clock functionality Soren Brinkmann 2013-07-08 16:51 ` Soren Brinkmann 2013-07-08 16:51 ` [PATCH v2 1/2] clocksource/cadence_ttc: Remove unused header Soren Brinkmann 2013-07-08 16:51 ` Soren Brinkmann 2013-07-08 16:51 ` [PATCH v2 2/2] clocksource/cadence_ttc: Reuse clocksource as sched_clock Soren Brinkmann 2013-07-08 16:51 ` Soren Brinkmann 2013-07-12 12:08 ` Michal Simek 2013-07-12 12:08 ` Michal Simek 2013-07-16 15:32 ` Daniel Lezcano 2013-07-16 15:32 ` Daniel Lezcano 2013-07-16 15:51 ` Sören Brinkmann 2013-07-16 15:51 ` Sören Brinkmann
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.