NetBSD-Bugs archive

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

Re: kern/51921: src/sys/arch/arm/arm/cpufunc.c:3079: possible typo ?



The following reply was made to PR kern/51921; it has been noted by GNATS.

From: "Jonathan A. Kollasch" <jakllsch%kollasch.net@localhost>
To: Paul Goyette <paul%whooppee.com@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/51921: src/sys/arch/arm/arm/cpufunc.c:3079: possible typo ?
Date: Sat, 28 Jan 2017 19:03:05 -0600

 On Sun, Jan 29, 2017 at 07:45:55AM +0800, Paul Goyette wrote:
 > On Sat, 28 Jan 2017, dcb314%hotmail.com@localhost wrote:
 > 
 > >Source code is
 > >
 > >   cpuctrl |= (0x5 << 16) | (1 < 22);
 > >
 > >But maybe this code was intended:
 > >
 > >   cpuctrl |= (0x5 << 16) | (1 << 22);
 > 
 > In any case, we really should have meaningfully-named macros for
 > these values, rather than "magic numbers".
 
 In the Cortex-A5 TRM SCTLR bits 18, 16, and 6,5,4,3 are
 Reserved and Read-As-One/Writes-Ignored, other Reserved bits here are
 Read-As-Zero/Writes-Ignored.  I do not know if this is also true of the
 PJ4B ARMv7 implementation.
 


Home | Main Index | Thread Index | Old Index