Date: Tue, 12 Jun 2018 16:40:01 -0700 From: Conrad Meyer <cem@freebsd.org> To: Sean Bruno <sbruno@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335010 - head/usr.sbin/cpucontrol Message-ID: <CAG6CVpUYTQa2-FF2peifEz3Qx0%2BM5GGh_RVkrSt0CPZN=O7P-g@mail.gmail.com> In-Reply-To: <201806121858.w5CIwvwB066102@repo.freebsd.org> References: <201806121858.w5CIwvwB066102@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 12, 2018 at 11:58 AM, Sean Bruno <sbruno@freebsd.org> wrote: > Author: sbruno > Date: Tue Jun 12 18:58:56 2018 > New Revision: 335010 > URL: https://svnweb.freebsd.org/changeset/base/335010 > > Log: > cpucontrol: > - fix debugging for family on AMD cpus and add useful debugging for > which file is being selected for update. > > Reviewed by: cem > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D15574 > > Modified: > head/usr.sbin/cpucontrol/amd10h.c > > Modified: head/usr.sbin/cpucontrol/amd10h.c > ============================================================================== > --- head/usr.sbin/cpucontrol/amd10h.c Tue Jun 12 18:42:41 2018 (r335009) > +++ head/usr.sbin/cpucontrol/amd10h.c Tue Jun 12 18:58:56 2018 (r335010) > @@ -139,7 +139,8 @@ amd10h_update(const char *dev, const char *path) > > WARNX(1, "found cpu family %#x model %#x " > "stepping %#x extfamily %#x extmodel %#x.", > - (signature >> 8) & 0x0f, (signature >> 4) & 0x0f, > + ((signature >> 8) & 0x0f) + ((signature >> 20) & 0xff), > + (signature >> 4) & 0x0f, Hm, I suggested using CPUID_TO_FAMILY() here and would still suggest that. At least some of the other shifts and masks can probably also be replaced with existing named macros. Best, Conrad
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpUYTQa2-FF2peifEz3Qx0%2BM5GGh_RVkrSt0CPZN=O7P-g>