Port-arm archive

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

Re: Cortex-A9 delay() shorten rarely




To: port-arm%NetBSD.org@localhost

Subject: Re: Cortex-A9 delay() shorten rarely

From: Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>

Date: Thu, 13 Aug 2015 11:25:28 +0900


Hi,

On 2015/08/10 19:34, Kengo NAKAHARA wrote:
> I am testing NetBSD on Cortex-A9 development board. I found delay()
> shorten rarely.
> 
> I found below patch fix this issue.
> ====================
> diff --git a/sys/arch/arm/arm32/cortex_pmc.c b/sys/arch/arm/arm32/cortex_pmc.c
> index 277c272..16c9cc6 100644
> --- a/sys/arch/arm/arm32/cortex_pmc.c
> +++ b/sys/arch/arm/arm32/cortex_pmc.c
> @@ -103,7 +103,7 @@ delay(u_int arg)
>                 if (ctrl & CORTEX_CNTOFL_C) {
>                   /* Reset overflow flag for cycle counter in overflow register */
>                         armreg_pmovsr_write(CORTEX_CNTOFL_C);
> -                       delta += (last + (counts_per_wrap - cur));
> +                       delta += (cur + (counts_per_wrap - last));
>                 } else {
>                         delta += (cur - last);
>                 }
> ====================
> 
> Could you comment this patch?
> If there is no objection, I will commit this patch after a few days.

I committed this patch.


Thanks,

-- 
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Core Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>



References:

Cortex-A9 delay() shorten rarely
From: Kengo NAKAHARA




Prev by Date: Re: Please advise usb wifi device for raspberry pi 2, NetBSD 7

Next by Date: 2015-08-08-netbsd-odroid_c1.img.gz (Re: NetBSD on ODROID-C1

Previous by Thread: Cortex-A9 delay() shorten rarely

Next by Thread: proposal to change some defaults in GENERIC.common

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index