public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: akpm@linux-foundation.org, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <ak@suse.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Chandramouli Narayanan <mouli@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4 -v5] x86_64 EFI runtime service support: EFI runtime services
Date: Tue, 30 Oct 2007 15:58:31 +0000	[thread overview]
Message-ID: <200710301558.31443.vda.linux@googlemail.com> (raw)
In-Reply-To: <1193723743.23935.352.camel@caritas-dev.intel.com>

On Tuesday 30 October 2007 05:55, Huang, Ying wrote:
> +static inline unsigned long native_get_wallclock(void)
> +{
> +	unsigned long retval;
> +
> +	if (efi_enabled)
> +		retval = efi_get_time();
> +	else
> +		retval = mach_get_cmos_time();
> +
> +	return retval;
> +}

mach_get_cmos_time() is itself an inline, and a _large_ one
(~20 LOC with macro and function calls).

efi_get_time() is an inline too, although strange one:
it is declared inline *only* in efi.c file:
      inline unsigned long efi_get_time(void)
(yes, just inline, not static/extern),
while efi.h has normal extern for it:
      extern unsigned long efi_get_time(void);

Is it supposed to be like that?

> +static inline int native_set_wallclock(unsigned long nowtime)
> +{
> +	int retval;
> +
> +	if (efi_enabled)
> +		retval = efi_set_rtc_mmss(nowtime);
> +	else
> +		retval = mach_set_rtc_mmss(nowtime);
> +
> +	return retval;
> +}

Same here, only mach_set_rtc_mmss is 50 LOC, not 20.
--
vda

  reply	other threads:[~2007-10-30 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30  5:55 [PATCH 2/4 -v5] x86_64 EFI runtime service support: EFI runtime services Huang, Ying
2007-10-30 15:58 ` Denys Vlasenko [this message]
2007-10-30 20:39   ` Thomas Gleixner
2007-10-31  0:47   ` Huang, Ying

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=200710301558.31443.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mouli@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=ying.huang@intel.com \
    /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