Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1194939
| From | Paul Bolle <pebolle@tiscali.nl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time |
| Date | 2015-07-29 10:30 +0200 |
| Message-ID | <pRuUr-2EV-29@gated-at.bofh.it> (permalink) |
| References | <pR1fH-1AI-5@gated-at.bofh.it> <pR1fH-1AI-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On ma, 2015-07-27 at 17:46 -0700, Christopher Hall wrote:
> --- /dev/null
> +++ b/arch/x86/include/asm/art.h
> +#ifndef CONFIG_X86_ART
> +
> +static inline int setup_art(void)
> +{
> + return 0;
> +}
> +
> +static inline bool has_art(void)
> +{
> + return false;
> +}
> +
> +static inline int art_to_rawmono64(struct timespec64 *rawmono, cycle_t art)
> +{
> + return -ENXIO;
> +}
> +static inline int art_to_realtime64(struct timespec64 *realtime, cycle_t art)
> +{
> + return -ENXIO;
> +}
> +static inline int art_to_mono64(struct timespec64 *mono, cycle_t art)
> +{
> + return -ENXIO;
> +}
> +
> +#else
> +
> +extern int setup_art(void);
> +extern bool has_art(void);
> +extern int art_to_rawmono64(struct timespec64 *rawmono, cycle_t art);
> +extern int art_to_realtime64(struct timespec64 *realtime, cycle_t art);
> +extern int art_to_mono64(struct timespec64 *mono, cycle_t art);
> +
> +#endif
> --- /dev/null
> +++ b/arch/x86/kernel/art.c
> +static bool has_art(void)
> +{
> + return art_present;
> +}
> +EXPORT_SYMBOL(has_art);
This exports a static function. Does that work?
> +static int art_to_rawmono64(struct timespec64 *rawmono, cycle_t art)
> +{
> + if (!checked_art_to_tsc(&art))
> + return -ENXIO;
> + return tsc_to_rawmono64(rawmono, art);
> +}
> +EXPORT_SYMBOL(art_to_rawmono64);
> +
> +static int art_to_realtime64(struct timespec64 *realtime, cycle_t art)
> +{
> + if (!checked_art_to_tsc(&art))
> + return -ENXIO;
> + return tsc_to_realtime64(realtime, art);
> +}
> +EXPORT_SYMBOL(art_to_realtime64);
> +
> +static int art_to_mono64(struct timespec64 *mono, cycle_t art)
> +{
> + if (!checked_art_to_tsc(&art))
> + return -ENXIO;
> + return tsc_to_mono64(mono, art);
> +}
> +EXPORT_SYMBOL(art_to_mono64);
Ditto (three times).
By the way, this series doesn't add users for art_to_mono64() and
art_to_mono64(), right?
Thanks,
Paul Bolle
--
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 | Find similar | Unroll thread
[PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time Christopher Hall <christopher.s.hall@intel.com> - 2015-07-28 02:50 +0200
RE: [PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time "Hall, Christopher S" <christopher.s.hall@intel.com> - 2015-07-29 03:20 +0200
Re: [PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time Andy Lutomirski <luto@amacapital.net> - 2015-07-29 03:50 +0200
RE: [PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time "Hall, Christopher S" <christopher.s.hall@intel.com> - 2015-07-29 04:10 +0200
Re: [PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time Paul Bolle <pebolle@tiscali.nl> - 2015-07-29 10:30 +0200
csiph-web