From owner-svn-src-head@freebsd.org Wed Nov 14 19:04:44 2018 Return-Path: Delivered-To: svn-src-head@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 C13641131C4F for ; Wed, 14 Nov 2018 19:04:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18AAA859CE for ; Wed, 14 Nov 2018 19:04:44 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1542222213; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=ulKne+PRwXt1B/xX0ZfPnfCCpxiDlzlKM+RJ/ggAFXHNtBCyn90jt0e3dqMlUq/SA2wDrzfqc7B91 Io2dSpoupNUp3q5jKMeXD/9xAc6on22HA43i1eIDEUBjLZiJJw4e4vNf6iwKNwbywbI9KVGjSHnVen DhiCx4hFoUYAFXI2mIy2knhm93Tm3JNQuJLbz/e6wiBzw9iUZjgxB7NE9QOfbAj6LoaZxwT1Z+h69d 421PxSOcc1cdNCsjMNBOm0f95v+VsJgCUKb7BBVPCvR9OwPYkTTRfoOGf7ShqYuNqQRDqR9srzwZPD 64IzL5Zg2rmQXXX8MUQkxmQHI0cc+dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=XnhkjN1aoS3ZyU0mrta6ArFcpDXBhOECOqOfEmdejH8=; b=WdM3c5sGxeepQsEGGWKEO5DRRYaNEesXp5a3ylpqSST5dtSd2wSgk8m5e+AzwFpIxVeqXhnzdnEL8 c7vQPW52eM8v2uFyqfosIu/dTXnDCmd1kpYXcsClfGAhlBMv0btfuhcBIltSt3PzY3MRf3MOP+nW7j vG6KQgpHx7V7/ANRuQyvZvgL+YcieLwSlzlPlIwRZNtp5ANOkCk5E6npRTCuhb33C0JaWMeHPOmUJ3 TMK0juhqtBl/k98ED7aJq5zQY2F/UJPdyo2cpyd1a2k3lDfLtC+6XWmuIO8LmwBLuFAavc9FnqDQfJ Qo1rYc1AqCJF7fzlqH5llHUUBJFMU5Q== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=XnhkjN1aoS3ZyU0mrta6ArFcpDXBhOECOqOfEmdejH8=; b=JxocxGwZaAR3irk+M/J8nTUnfAcWQ7OL6KkhhVWIWOPi8Hmi6y3oh7Cghhf0bqMp25c88uJAh/K5i OFdoZVD2lU9Be39IFU0Ju2TOIMxGBRMYcolb6HN8/lN3Q8+ZrR9ZEsCZjHmDzGAJ3iwPPJeo368t8r SHGvmKZXPC9PuCpgDG1DX0uEEqTfvXfxjvwmkNs5rR6YebV6VJB/A6NRW/j1Sx3kWhU58PQJs5vXbm t+Ziu+T4W7zOQfHdytiUaChgH7tt+rJV7ZPzUoD8L8oRavdOBH08Nb88Oj0N4/vGMX8G88L4rikvAA 2wd+R1x/vFqr7IKLD9rdMAj+lu36g6Q== X-MHO-RoutePath: aGlwcGll X-MHO-User: fa90c30f-e83f-11e8-a59a-7b143e15dabc X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id fa90c30f-e83f-11e8-a59a-7b143e15dabc; Wed, 14 Nov 2018 19:03:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id wAEJ3YpR000629; Wed, 14 Nov 2018 12:03:34 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1542222214.52306.230.camel@freebsd.org> Subject: Re: svn commit: r340426 - head/sys/dev/amdtemp From: Ian Lepore To: rgrimes@freebsd.org, Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 14 Nov 2018 12:03:34 -0700 In-Reply-To: <201811141633.wAEGXSsn036705@pdx.rh.CN85.dnsmgr.net> References: <201811141633.wAEGXSsn036705@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 18AAA859CE X-Spamd-Result: default: False [-103.93 / 200.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ALLOW_DOMAIN_WHITELIST(-100.00)[freebsd.org]; HAS_XOIP(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[outbound.mailhop.org:+]; MX_GOOD(-0.01)[cached: mx66.freebsd.org]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-0.14)[asn: 16509(-0.59), country: US(-0.10)]; ASN(0.00)[asn:16509, ipnet:54.186.0.0/15, country:US]; ARC_ALLOW(-1.00)[i=1]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[60.211.177.67.zen.spamhaus.org : 127.0.0.10]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[outbound.mailhop.org]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[195.57.186.54.list.dnswl.org : 127.0.20.0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 19:04:45 -0000 On Wed, 2018-11-14 at 08:33 -0800, Rodney W. Grimes wrote: > > > > Author: cem > > Date: Wed Nov 14 04:50:29 2018 > > New Revision: 340426 > > URL: https://svnweb.freebsd.org/changeset/base/340426 > > > > Log: > >   amdtemp(4): Fix temperature reporting on AMD 2990WX > >    > >   Update the AMD family 17h temperature reporting based on AMD Tech > > Doc 56255 > >   OSRR, section 4.2.1. > >    > >   For CPUS w/CUR_TEMP_RANGE_SEL set, scale the reported temperature > > into the > >   range -49..206; i.e., subtract 49?C. > >    > >   Submitted by: gallatin@ > >   Reported by: bcran@ > >   Reviewed by: me (long ago) > As per recent discussion on @developers, me@ is actually a valid > committers name and should not be used to describe one self in > commit messages. > There is NO ambiguity, not even a tiny little bit, between the self- referential me and the committer me@ in the context of that commit message. Is there no code to be written? No PRs to be closed? Do we all have so much free time that there's nothing better to do than argue about this kind of stupid angels-on-a-pin thing? -- Ian > > > >   MFC after: 22.57 seconds > >   Relnotes: yea > I do not believe the relnotes processor understands slang. > > > > >   Differential Revision: https://reviews.freebsd.org/D16855 > > > > Modified: > >   head/sys/dev/amdtemp/amdtemp.c > > > > Modified: head/sys/dev/amdtemp/amdtemp.c > > =================================================================== > > =========== > > --- head/sys/dev/amdtemp/amdtemp.c Wed Nov 14 03:42:39 2018 > > (r340425) > > +++ head/sys/dev/amdtemp/amdtemp.c Wed Nov 14 04:50:29 2018 > > (r340426) > > @@ -115,8 +115,15 @@ static struct amdtemp_product { > >   > >  /* > >   * Reported Temperature, Family 17h > > + * > > + * According to AMD OSRR for 17H, section 4.2.1, bits 31-21 of > > this register > > + * provide the current temp.  bit 19, when clear, means the temp > > is reported in > > + * a range 0.."225C" (probable typo for 255C), and when set > > changes the range > > + * to -49..206C. > >   */ > > -#define AMDTEMP_17H_CUR_TMP 0x59800 > > +#define AMDTEMP_17H_CUR_TMP 0x59800 > > +#define AMDTEMP_17H_CUR_TMP_RANGE_SEL (1 << 19) > > +#define AMDTEMP_17H_CUR_TMP_RANGE_OFF 490 > >   > >  /* > >   * Thermaltrip Status Register (Family 0Fh only) > > @@ -595,13 +602,15 @@ static int32_t > >  amdtemp_gettemp17h(device_t dev, amdsensor_t sensor) > >  { > >   struct amdtemp_softc *sc = device_get_softc(dev); > > - uint32_t temp; > > + uint32_t temp, val; > >   int error; > >   > > - error = amdsmn_read(sc->sc_smn, AMDTEMP_17H_CUR_TMP, > > &temp); > > + error = amdsmn_read(sc->sc_smn, AMDTEMP_17H_CUR_TMP, > > &val); > >   KASSERT(error == 0, ("amdsmn_read")); > >   > > - temp = ((temp >> 21) & 0x7ff) * 5 / 4; > > + temp = ((val >> 21) & 0x7ff) * 5 / 4; > > + if ((val & AMDTEMP_17H_CUR_TMP_RANGE_SEL) != 0) > > + temp -= AMDTEMP_17H_CUR_TMP_RANGE_OFF; > >   temp += AMDTEMP_ZERO_C_TO_K + sc->sc_offset * 10; > >   > >   return (temp); > > > >