Message ID | 1411052390-27238-2-git-send-email-nathan_lynch@mentor.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/18/2014 04:59 PM, Nathan Lynch wrote: > The arm and arm64 VDSOs need CP15 access to the architected counter. > If this is unavailable (which is allowed by ARM v7), indicate this by > changing the clocksource name to "arch_mem_counter" before registering > the clocksource. > > Suggested by Stephen Boyd. > > Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> > Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Hi Nathan, is it possible to have the acked-by of the different maintainers for the other patches ? Are these patches targeted to be merged for 3.18 ? Thanks -- Daniel > --- > drivers/clocksource/arm_arch_timer.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index 5163ec13429d..c99afdf12e98 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -429,11 +429,19 @@ static void __init arch_counter_register(unsigned type) > u64 start_count; > > /* Register the CP15 based counter if we have one */ > - if (type & ARCH_CP15_TIMER) > + if (type & ARCH_CP15_TIMER) { > arch_timer_read_counter = arch_counter_get_cntvct; > - else > + } else { > arch_timer_read_counter = arch_counter_get_cntvct_mem; > > + /* If the clocksource name is "arch_sys_counter" the > + * VDSO will attempt to read the CP15-based counter. > + * Ensure this does not happen when CP15-based > + * counter is not available. > + */ > + clocksource_counter.name = "arch_mem_counter"; > + } > + > start_count = arch_timer_read_counter(); > clocksource_register_hz(&clocksource_counter, arch_timer_rate); > cyclecounter.mult = clocksource_counter.mult; >
On Fri, Sep 26, 2014 at 08:04:30AM +0100, Daniel Lezcano wrote: > On 09/18/2014 04:59 PM, Nathan Lynch wrote: > > The arm and arm64 VDSOs need CP15 access to the architected counter. > > If this is unavailable (which is allowed by ARM v7), indicate this by > > changing the clocksource name to "arch_mem_counter" before registering > > the clocksource. > > > > Suggested by Stephen Boyd. > > > > Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> > > Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> > > Hi Nathan, > > is it possible to have the acked-by of the different maintainers for the > other patches ? FWIW: I acked the series: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-September/289143.html There's ongoing debate about whether or not we should have a vdso, but this series still makes sense in isolation. Will
On 09/26/2014 11:26 AM, Will Deacon wrote: > On Fri, Sep 26, 2014 at 08:04:30AM +0100, Daniel Lezcano wrote: >> On 09/18/2014 04:59 PM, Nathan Lynch wrote: >>> The arm and arm64 VDSOs need CP15 access to the architected counter. >>> If this is unavailable (which is allowed by ARM v7), indicate this by >>> changing the clocksource name to "arch_mem_counter" before registering >>> the clocksource. >>> >>> Suggested by Stephen Boyd. >>> >>> Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> >>> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> >> >> Hi Nathan, >> >> is it possible to have the acked-by of the different maintainers for the >> other patches ? > > FWIW: I acked the series: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2014-September/289143.html > > There's ongoing debate about whether or not we should have a vdso, but this > series still makes sense in isolation. Ok. Thanks for the clarification. > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >
Hi Daniel, On 09/26/2014 02:04 AM, Daniel Lezcano wrote: > On 09/18/2014 04:59 PM, Nathan Lynch wrote: >> The arm and arm64 VDSOs need CP15 access to the architected counter. >> If this is unavailable (which is allowed by ARM v7), indicate this by >> changing the clocksource name to "arch_mem_counter" before registering >> the clocksource. >> >> Suggested by Stephen Boyd. >> >> Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> >> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> > > Hi Nathan, > > is it possible to have the acked-by of the different maintainers for the > other patches ? As Will said, he acked the series. > Are these patches targeted to be merged for 3.18 ? 3.18 is preferable, if it's not too late. But nothing will break if it needs to wait. Thanks, Nathan
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 5163ec13429d..c99afdf12e98 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -429,11 +429,19 @@ static void __init arch_counter_register(unsigned type) u64 start_count; /* Register the CP15 based counter if we have one */ - if (type & ARCH_CP15_TIMER) + if (type & ARCH_CP15_TIMER) { arch_timer_read_counter = arch_counter_get_cntvct; - else + } else { arch_timer_read_counter = arch_counter_get_cntvct_mem; + /* If the clocksource name is "arch_sys_counter" the + * VDSO will attempt to read the CP15-based counter. + * Ensure this does not happen when CP15-based + * counter is not available. + */ + clocksource_counter.name = "arch_mem_counter"; + } + start_count = arch_timer_read_counter(); clocksource_register_hz(&clocksource_counter, arch_timer_rate); cyclecounter.mult = clocksource_counter.mult;