From: Rene Herman <rene.herman@keyaccess.nl>
To: Russ Anderson <rja@sgi.com>
Cc: mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org,
Jack Steiner <steiner@sgi.com>
Subject: Re: [patch] x86 BIOS interface for RTC on SGI UV
Date: Wed, 09 Jul 2008 22:58:19 +0200 [thread overview]
Message-ID: <4875266B.4020504@keyaccess.nl> (raw)
In-Reply-To: <20080709202719.GB22744@sgi.com>
On 09-07-08 22:27, Russ Anderson wrote:
> [patch] x86 BIOS interface for RTC on SGI UV
[ ... ]
> +# define BIOS_CALL(result, a0, a1, a2, a3, a4, a5, a6, a7) \
> + do { \
> + /* XXX - the real call goes here */ \
> + result.status = BIOS_STATUS_UNIMPLEMENTED; \
> + isrv.v0 = 0; \
> + isrv.v1 = 0; \
isrv? should be "result" I guess?
[ ... ]
> +extern long
> +x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
> + unsigned long *drift_info);
[ ... ]
> +unsigned long sn_rtc_cycles_per_second;
> +EXPORT_SYMBOL(sn_rtc_cycles_per_second);
> +
> +static __init void uv_rtc_init(void)
> +{
> + long status, ticks_per_sec, drift;
> +
> + status =
> + x86_bios_freq_base(BIOS_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec,
> + &drift);
> + if (status != 0 || ticks_per_sec < 100000) {
> + printk(KERN_WARNING
> + "unable to determine platform RTC clock frequency, "
> + "guessing.\n");
> + /* BIOS gives wrong value for clock freq. so guess */
> + sn_rtc_cycles_per_second = 1000000000000UL / 30000UL;
> + } else
> + sn_rtc_cycles_per_second = ticks_per_sec;
> +}
It seems ticks_per_sec and drift should be "unsigned long"...
> +const char *
> +x86_bios_strerror(long status)
[ ... ]
> +long
> +x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second,
> + unsigned long *drift_info)
> +{
> + struct uv_bios_retval isrv;
... and wouldn't uv_bios_strerror/uv_bios_freq_base be better names?
Rene.
next prev parent reply other threads:[~2008-07-09 20:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 20:27 [patch] x86 BIOS interface for RTC on SGI UV Russ Anderson
2008-07-09 20:58 ` Rene Herman [this message]
2008-07-09 21:36 ` Russ Anderson
2008-07-09 21:47 ` Rene Herman
2008-07-09 22:09 ` Russ Anderson
2008-07-09 22:54 ` Rene Herman
2008-07-10 1:44 ` H. Peter Anvin
2008-07-10 14:54 ` Russ Anderson
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=4875266B.4020504@keyaccess.nl \
--to=rene.herman@keyaccess.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rja@sgi.com \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
/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