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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Apr 2007 14:18:21 -0700
From:	john stultz <johnstul@...ibm.com>
To:	Peter Keilty <peter.keilty@...com>
Cc:	linux-ia64@...r.kernel.org, Eric Whitney <eric.whitney@...com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] ia64: convert to use clocksource code

On Thu, 2007-04-26 at 16:26 -0400, Peter Keilty wrote:
> From: Peter Keilty <peter.keilty@...com>
> 
> Initial ia64 conversion to the generic timekeeping/clocksource code.
> 
> Signed-off-by: Peter Keilty <peter.keilty@...com>
> Signed-off-by: John Stultz <johnstul@...ibm.com>

Peter,
	Thanks so much for pushing this on! I suspect this patch needs to be
updated a touch, as I'm not sure if it still compiles in light of recent
changes...


> diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
> index e00b215..280383b 100644
> --- a/arch/ia64/kernel/cyclone.c
> +++ b/arch/ia64/kernel/cyclone.c
> @@ -3,6 +3,7 @@ #include <linux/smp.h>
>  #include <linux/time.h>
>  #include <linux/errno.h>
>  #include <linux/timex.h>
> +#include <linux/clocksource.h>
>  #include <asm/io.h>
> 
>  /* IBM Summit (EXA) Cyclone counter code*/
> @@ -18,13 +19,21 @@ void __init cyclone_setup(void)
>  	use_cyclone = 1;
>  }
> 
> +static void __iomem *cyclone_mc_ptr;
> 
> -struct time_interpolator cyclone_interpolator = {
> -	.source =	TIME_SOURCE_MMIO64,
> -	.shift =	16,
> -	.frequency =	CYCLONE_TIMER_FREQ,
> -	.drift =	-100,
> -	.mask =		(1LL << 40) - 1
> +static cycle_t read_cyclone(void)
> +{
> +	return (cycle_t)readq((void __iomem *)cyclone_mc_ptr);
> +}
> +
> +static struct clocksource clocksource_cyclone = {
> +        .name           = "cyclone",
> +        .rating         = 300,
> +        .read           = read_cyclone,
> +        .mask           = (1LL << 40) - 1,

Daniel Walker pointed out to me on IRC that CLOCKSOURCE_MASK() should
probably be used here.

> +        .mult           = 0, /*to be caluclated*/
> +        .shift          = 16,
> +        .is_continuous  = 1,

.is_continuous no longer exists. 

You want to use:
.flags = CLOCK_SOURCE_IS_CONTINUOUS 

This holds for all the clocksources introduced.


thanks
-john


-
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