lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4875266B.4020504@keyaccess.nl>
Date:	Wed, 09 Jul 2008 22:58:19 +0200
From:	Rene Herman <rene.herman@...access.nl>
To:	Russ Anderson <rja@....com>
CC:	mingo@...e.hu, tglx@...utronix.de, linux-kernel@...r.kernel.org,
	Jack Steiner <steiner@....com>
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ