Re: [PATCH] implement get_cpu_clock() for s390/s390x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012-12-30 23:03, Dan Horák wrote:
> ---
>  arch/arch-s390.h |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arch-s390.h b/arch/arch-s390.h
> index fe51791..bcd9163 100644
> --- a/arch/arch-s390.h
> +++ b/arch/arch-s390.h
> @@ -22,4 +22,22 @@
>  #define read_barrier()	asm volatile("bcr 15,0" : : : "memory")
>  #define write_barrier()	asm volatile("bcr 15,0" : : : "memory")
>  
> +static inline unsigned long long get_cpu_clock(void)
> +{
> +	unsigned long long clk;
> +
> +	__asm__ __volatile__("stck %0" : "=Q" (clk) : : "cc");
> +	return clk;
> +}
> +
> +#define ARCH_HAVE_INIT
> +extern int tsc_reliable;
> +static inline int arch_init(char *envp[])
> +{
> +	tsc_reliable = 1;
> +	return 0;
> +}
> +
> +#define ARCH_HAVE_CPU_CLOCK
> +
>  #endif

Thanks, Dan! Applied.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux