Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753977AbbG2IZS (ORCPT ); Wed, 29 Jul 2015 04:25:18 -0400 Received: from lb1-smtp-cloud3.xs4all.net ([194.109.24.22]:33364 "EHLO lb1-smtp-cloud3.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbbG2IZO (ORCPT ); Wed, 29 Jul 2015 04:25:14 -0400 Message-ID: <1438158310.5106.14.camel@tiscali.nl> Subject: Re: [PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time From: Paul Bolle To: Christopher Hall 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 Date: Wed, 29 Jul 2015 10:25:10 +0200 In-Reply-To: <1438044416-15588-4-git-send-email-christopher.s.hall@intel.com> References: <1438044416-15588-1-git-send-email-christopher.s.hall@intel.com> <1438044416-15588-4-git-send-email-christopher.s.hall@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.4 (3.16.4-2.fc22) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2114 Lines: 88 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/