> Date: Sun, 12 Jul 2020 18:12:39 +0200
> From: Christian Weisgerber <na...@mips.inka.de>
> 
> The PowerPC/Power ISA Time Base is a 64-bit register.  We can use
> the full lower 32 bits.
> 
> OK?

Sure, but this needs to be coordinated with the userland diff.  And
we'd better change it quick because doing it later is an ABI break.

> Index: arch/macppc/macppc/clock.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/macppc/macppc/clock.c,v
> retrieving revision 1.44
> diff -u -p -r1.44 clock.c
> --- arch/macppc/macppc/clock.c        6 Jul 2020 13:33:08 -0000       1.44
> +++ arch/macppc/macppc/clock.c        12 Jul 2020 15:17:48 -0000
> @@ -57,7 +57,7 @@ u_int32_t ns_per_tick = 320;
>  static int32_t ticks_per_intr;
>  
>  static struct timecounter tb_timecounter = {
> -     tb_get_timecount, NULL, 0x7fffffff, 0, "tb", 0, NULL, 0
> +     tb_get_timecount, NULL, 0xffffffff, 0, "tb", 0, NULL, 0
>  };
>  
>  /* calibrate the timecounter frequency for the listed models */
> Index: arch/powerpc64/powerpc64/clock.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/powerpc64/powerpc64/clock.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 clock.c
> --- arch/powerpc64/powerpc64/clock.c  10 Jun 2020 19:06:53 -0000      1.1
> +++ arch/powerpc64/powerpc64/clock.c  12 Jul 2020 15:18:02 -0000
> @@ -37,7 +37,7 @@ struct evcount stat_count;
>  u_int        tb_get_timecount(struct timecounter *);
>  
>  static struct timecounter tb_timecounter = {
> -     tb_get_timecount, NULL, 0x7fffffff, 0, "tb", 0, NULL
> +     tb_get_timecount, NULL, 0xffffffff, 0, "tb", 0, NULL
>  };
>  
>  void cpu_startclock(void);
> -- 
> Christian "naddy" Weisgerber                          na...@mips.inka.de
> 
> 

Reply via email to