netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Christopher Hall <christopher.s.hall@intel.com>
Cc: john.stultz@linaro.org, tglx@linutronix.de,
	richardcochran@gmail.com, mingo@redhat.com,
	jeffrey.t.kirsher@intel.com, john.ronciak@intel.com,
	hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time
Date: Wed, 29 Jul 2015 10:25:10 +0200	[thread overview]
Message-ID: <1438158310.5106.14.camel@tiscali.nl> (raw)
In-Reply-To: <1438044416-15588-4-git-send-email-christopher.s.hall@intel.com>

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

  parent reply	other threads:[~2015-07-29  8:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  0:46 [PATCH 0/5] Patchset enabling hardware based cross-timestamps for next gen Intel platforms Christopher Hall
2015-07-28  0:46 ` [PATCH 1/5] Add functions producing system time given a backing counter value Christopher Hall
2015-07-28  3:44   ` John Stultz
2015-07-28  4:05     ` John Stultz
2015-07-29 10:19       ` Thomas Gleixner
2015-07-29 10:23         ` Thomas Gleixner
2015-07-29 10:51           ` Peter Zijlstra
2015-07-29 12:30           ` Richard Cochran
2015-07-29 10:49         ` Peter Zijlstra
2015-07-29 11:48           ` Richard Cochran
2015-07-29 12:35             ` Peter Zijlstra
2015-07-29 12:52           ` Thomas Gleixner
2015-07-29  1:41     ` Hall, Christopher S
2015-07-29 14:05       ` Thomas Gleixner
2015-07-28  0:46 ` [PATCH 2/5] Added functions mapping TSC value to system time Christopher Hall
2015-07-28  0:46 ` [PATCH 3/5] Add calls to translate Always Running Timer (ART) " Christopher Hall
2015-07-28  1:32   ` Andy Lutomirski
2015-07-29  1:18     ` Hall, Christopher S
2015-07-29  1:47       ` Andy Lutomirski
2015-07-28  4:11   ` John Stultz
2015-07-29  2:05     ` Hall, Christopher S
2015-07-29  8:25   ` Paul Bolle [this message]
2015-07-28  0:46 ` [PATCH 4/5] Add support for driver cross-timestamp to PTP_SYS_OFFSET ioctl Christopher Hall
2015-07-28  0:46 ` [PATCH 5/5] Enables cross timestamping in the e1000e driver Christopher Hall

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=1438158310.5106.14.camel@tiscali.nl \
    --to=pebolle@tiscali.nl \
    --cc=christopher.s.hall@intel.com \
    --cc=hpa@zytor.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).