From owner-svn-src-all@freebsd.org Tue Jun 12 23:47:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE839100B6FD; Tue, 12 Jun 2018 23:47:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60EE3802B6; Tue, 12 Jun 2018 23:47:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f169.google.com with SMTP id f1-v6so1455752ioh.6; Tue, 12 Jun 2018 16:47:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=4G/O1GWiuqrYgbrxjU71LqlEPySueLyZHMNFOtwD59k=; b=Dwdw336tCeyJA56tLI7smv6AOE/CuXNHLDTz8Nrwp27vsqrizhS8h9DmkjpDaJ49jM 90mzzZSifZ/u0VNINpWRyA3aOHMxPhnwkwZV7esMLFZLn8226qYKxVteM4e66ekRQvhc 37AOJ+Yaq/uzffM82OC/R9CH8RRC2fRZLmBua6//KdSIdSrQv4u5KZ1lCi2EeM5ECptq PcthMa2iFKAd+qNRL7+ELJaod5Y3Gzch0THZAyWABLx0j2Lm8RqDhhJ3OhaW2UvERtb/ 4AvfxjIq+DYyGfqveBMJFTBp3W3u/sHApP2NtAGOejNunRpYiOvhppwj7COIW5fgZm4+ ZUgw== X-Gm-Message-State: APt69E0Ea6pQUzvD6nI2+b4epknzZIulT0Vv7Qjcx3LLBFKRcH2u8FIC GOlvUeM1lFnLKwZsCOs5/ZEaoa/l X-Google-Smtp-Source: ADUXVKKj5KNWKbl8SJz5qE4skFbB4esOLOX5k0TgHC3FJX6CaSrKYYxh3VzZ4mCNot3S3jpyIpUXxA== X-Received: by 2002:a6b:ee17:: with SMTP id i23-v6mr2451246ioh.52.1528846801964; Tue, 12 Jun 2018 16:40:01 -0700 (PDT) Received: from mail-it0-f49.google.com (mail-it0-f49.google.com. [209.85.214.49]) by smtp.gmail.com with ESMTPSA id e92-v6sm479213iod.29.2018.06.12.16.40.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 16:40:01 -0700 (PDT) Received: by mail-it0-f49.google.com with SMTP id j135-v6so1590794itj.1; Tue, 12 Jun 2018 16:40:01 -0700 (PDT) X-Received: by 2002:a24:ed4a:: with SMTP id r71-v6mr2547402ith.53.1528846801728; Tue, 12 Jun 2018 16:40:01 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:5995:0:0:0:0:0 with HTTP; Tue, 12 Jun 2018 16:40:01 -0700 (PDT) In-Reply-To: <201806121858.w5CIwvwB066102@repo.freebsd.org> References: <201806121858.w5CIwvwB066102@repo.freebsd.org> From: Conrad Meyer Date: Tue, 12 Jun 2018 16:40:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335010 - head/usr.sbin/cpucontrol To: Sean Bruno Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 23:47:53 -0000 On Tue, Jun 12, 2018 at 11:58 AM, Sean Bruno 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