lkml.org 
[lkml]   [2008]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] x86 BIOS interface for RTC on SGI UV
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.


\
 
 \ /
  Last update: 2008-07-09 23:01    [W:0.088 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site