Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1241299
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal |
| Date | 2015-10-07 11:50 +0200 |
| Message-ID | <qgTwe-10x-23@gated-at.bofh.it> (permalink) |
| References | <qgCvo-1OO-17@gated-at.bofh.it> <qgJwR-3HK-17@gated-at.bofh.it> <qgSgO-7JK-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/07/2015 10:23 AM, Marc Gonzalez wrote:
[ ... ]
>>> +++ b/drivers/clocksource/tango_xtal.c
>>> @@ -0,0 +1,46 @@
>>> +#include <linux/clocksource.h>
>>> +#include <linux/sched_clock.h>
>>> +#include <linux/of_address.h>
>>> +#include <linux/delay.h>
>>> +#include <linux/clk.h>
>>
>> #include <linux/init.h> is missing.
>
> For my education: this header is already indirectly included;
> The directive should be explicit to prevent breakage in case
> other (implicit) includes are reorganized?
Yes, exactly.
The 'clocksource.h' header includes 'init.h' only for the
'clocksource_default_clock' function. If this function disappears, or
the __init section is removed, then the 'init.h' inclusion won't make
sense anymore in the header file. By removing it, that will break all
code relying on the implicit inclusion.
So the rule of thumb I apply to myself is always to explicitly include
the headers in the C file even if it is already implicitly included.
This rule is valid only if the header file is not using intensively code
coming from the implicit inclusion like static inlines etc ...
>>> +static void __iomem *xtal_in_cnt;
>>> +static struct delay_timer delay_timer;
>>> +
>>> +static unsigned long read_xtal_counter(void)
>>> +{
>>> + return readl_relaxed(xtal_in_cnt);
>>> +}
>>> +
>>> +static u64 read_sched_clock(void)
>>> +{
>>> + return read_xtal_counter();
>>> +}
>>
>> static u64 *notrace* read_sched_clock(void)
>
> What about read_clocksource? and read_xtal_counter?
See commit 89e6a13b88.
-- 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
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-06 17:40 +0200
Re: [PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-07 01:10 +0200
Re: [PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-07 10:30 +0200
Re: [PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-07 11:50 +0200
Re: [PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-07 13:20 +0200
Re: [PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-07 13:40 +0200
[PATCH v2] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-07 13:40 +0200
Re: [PATCH v2] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-07 14:40 +0200
Re: [PATCH v2] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-07 15:20 +0200
Re: [PATCH v2] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-07 18:10 +0200
Re: [PATCH v2] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Mason <slash.tmp@free.fr> - 2015-10-08 15:20 +0200
[PATCH v3] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-09 14:30 +0200
Re: [PATCH v3] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-09 15:30 +0200
Re: [PATCH v3] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-09 15:50 +0200
Re: [PATCH v3] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-09 16:30 +0200
Re: [PATCH v3] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Nicolas Pitre <nicolas.pitre@linaro.org> - 2015-10-09 18:40 +0200
[PATCH v4] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-09 16:40 +0200
Re: [PATCH v4] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-09 16:50 +0200
[PATCH v5] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-09 17:00 +0200
Re: [PATCH v5] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-10-16 14:10 +0200
Re: [PATCH v4] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Måns Rullgård <mans@mansr.com> - 2015-10-09 17:00 +0200
Re: [PATCH v4] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-09 17:50 +0200
Re: [PATCH v4] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Måns Rullgård <mans@mansr.com> - 2015-10-09 18:10 +0200
Re: [PATCH v4] clocksource/drivers/tango_xtal: Add new timer for Tango SoCs Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2015-10-09 18:40 +0200
csiph-web