Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp282403ybt; Wed, 17 Jun 2020 00:22:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJym6NuTssSL0aFGjN0S7IX/iUglTeHb9weEpt6dw5tf9uPfTxFjX6dETwNjTB+3YuMgh1Rl X-Received: by 2002:a50:bf4c:: with SMTP id g12mr6091359edk.203.1592378539508; Wed, 17 Jun 2020 00:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592378539; cv=none; d=google.com; s=arc-20160816; b=KKUwtp+7RYkTF74jsYtx5rzbANhiUdr37ZAeExPqv6p17bCUmsyaRaQuKKhEUn/9jN 841yCB8y45GCoyPy5PIpDNhnpGs6LvCR6mRBvXXnHzWe5I+AI1/z/zwDzkup2urSm2sz mKYiuyxxlRB3F/2lac0KlijN7MxtuiMO/fvP5ApXRCKSlftCD4yyAusCdrn9aXxSBJLv Q5BfJD5jTm13vh55M4K7Nvl+oSFSFLtIN0uC397oXoVgiLD8TuJK1HIB6pJYsyyV8Szi in9WJMiyUMhhDS4/m27X/UC5agcksrhJIo47kEbR+F1sXTEFiN/5or92CzO5MbNj/Oe3 vkzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZZQRc8cSih9KfpaA3PdbcUNW5+QnVP16MnOdITJs0uY=; b=mWzHxWWV3Tmgx7v8DzvbwOlgx9TIGectyUuU9bB5fhDxYKATKdcyoU51JvwUU53aq1 tzaewPtcFBIE1orczg7HdRNyp94n7fqpUc+RAp9PvRS60ccHliM67UhrQPpRQBidTBOD CcdjMGeC9MvfXkgedmeyyH2kKtU84GNB6CgAX+c2klfsYexMBLcN7fMraCa3O6hkq6aN NB8Q2aEr/n9m/1cS+7/c7+NlGL1lZOGUSZg+Ya1ZtXkaQxJcrTJKn1BwxX2t587P7Lme HZ7Bg/ytgtg102nCvJDkeo2ABhpuG7WevGcXS9AxdKPoFem1FYPOt23GozzEjSRNT0W1 luuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VtyYKKn+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si12813197ejz.660.2020.06.17.00.21.56; Wed, 17 Jun 2020 00:22:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VtyYKKn+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbgFQHTb (ORCPT + 99 others); Wed, 17 Jun 2020 03:19:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbgFQHTb (ORCPT ); Wed, 17 Jun 2020 03:19:31 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56C38C061573; Wed, 17 Jun 2020 00:19:31 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id ga6so565189pjb.1; Wed, 17 Jun 2020 00:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ZZQRc8cSih9KfpaA3PdbcUNW5+QnVP16MnOdITJs0uY=; b=VtyYKKn+sOaDU5VHlilWhWIIv2BrJkFOKuEqsvLnfoNTBZ5mHTRltx4dfm1p1stZ7E WoZkW6kUztSKZc8w+bFhkVEHxALpSn7ZNj8wZckvhsBDuZeCD/1ukiFIU/jRIEarAt3G pDuEOdYRA5A6hy49OjN8g7ddOOtE+htt6OhqHSJFtMldh+taw2Bs4JYrD+dxLPUCVu60 zyYw1+f6MHtx9KU4OUYr/uJaIeYCpWxd7QSLwTxuMNSbKWkDjTV2YdBpX7oI4/Pz+90T 8Wh4IMAzHY690hi6WmzLhbhNlh0wTGmJGJK+vzR9rvbHBpH+TA6hgwCIQpEvebi7U1Bp 3yCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ZZQRc8cSih9KfpaA3PdbcUNW5+QnVP16MnOdITJs0uY=; b=sRFcMBSf81QhmDRANeCUL8euTc8FXhmpzS21fpLfqtuNM+H9xnFiNHwgWqprTF68LD Z4Uc7rTsDqKhAuG55sg58Vcwrkm7KzyWYY0p5CuTGXHPIxRxPEqiw5/uERMKR6jgZp8J VPut8UVS3I7OyvaLNuIHXCePdQ9crH9u3RERJU8i7W2OyOLr9p//Xjkjzod1mxMDnKBr 5jhpKEAEJtBqSXaIufQGXhF6xxU9WSOp6FWmt+CG9j8FjtLAr12q+0f0qL0zvStQExTZ 2olng5L8AoGNj57MmjBJxPJgB755w9u5q3r1HfC71fZguj+3QB+c6LgypoSi4bx/yOeb OFxg== X-Gm-Message-State: AOAM533ploVOZlU2mJd0X8U65vzVDEom7AWH2TMQXhOTgjU4NLWXQmyI 8vFerzgAbmMtrS3yLwnM2w== X-Received: by 2002:a17:90a:6047:: with SMTP id h7mr6370455pjm.145.1592378370875; Wed, 17 Jun 2020 00:19:30 -0700 (PDT) Received: from localhost (98.86.92.34.bc.googleusercontent.com. [34.92.86.98]) by smtp.gmail.com with ESMTPSA id c7sm16548917pgh.84.2020.06.17.00.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 00:19:30 -0700 (PDT) Date: Wed, 17 Jun 2020 15:19:27 +0800 From: Jacky Hu To: Guenter Roeck Cc: linux-hwmon@vger.kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, tony.luck@intel.com, x86@kernel.org, yazen.ghannam@amd.com, bp@alien8.de, clemens@ladisch.de Subject: Re: [PATCH] hwmon: (k10temp) Add AMD family 17h model 60h probe Message-ID: <20200617071927.GA398128@i716> References: <20200616180940.GN13515@zn.tnic> <20200617013255.391975-1-hengqing.hu@gmail.com> <20200617034028.GA1614@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200617034028.GA1614@roeck-us.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guenter, By increasing the regs count from 32 to 256 and looking into the output of `cat /sys/kernel/debug/k10temp-0000\:00\:18.3/svi` There is some data from 0x05a300 - 0x05a330 Do you have any idea how we can guess the offset for this model? 0x05a000: 00000000 00000000 00000000 00000000 0x05a010: 00000000 00000000 00000000 00000000 0x05a020: 00000000 00000000 00000000 00000000 0x05a030: 00000000 00000000 00000000 00000000 0x05a040: 00000000 00000000 00000000 00000000 0x05a050: 00000000 00000000 00000000 00000000 0x05a060: 00000000 00000000 00000000 00000000 0x05a070: 00000000 00000000 00000000 00000000 0x05a080: 00000000 00000000 00000000 00000000 0x05a090: 00000000 00000000 00000000 00000000 0x05a0a0: 00000000 00000000 00000000 00000000 0x05a0b0: 00000000 00000000 00000000 00000000 0x05a0c0: 00000000 00000000 00000000 00000000 0x05a0d0: 00000000 00000000 00000000 00000000 0x05a0e0: 00000000 00000000 00000000 00000000 0x05a0f0: 00000000 00000000 00000000 00000000 0x05a100: 00000000 00000000 00000000 00000000 0x05a110: 00000000 00000000 00000000 00000000 0x05a120: 00000000 00000000 00000000 00000000 0x05a130: 00000000 00000000 00000000 00000000 0x05a140: 00000000 00000000 00000000 00000000 0x05a150: 00000000 00000000 00000000 00000000 0x05a160: 00000000 00000000 00000000 00000000 0x05a170: 00000000 00000000 00000000 00000000 0x05a180: 00000000 00000000 00000000 00000000 0x05a190: 00000000 00000000 00000000 00000000 0x05a1a0: 00000000 00000000 00000000 00000000 0x05a1b0: 00000000 00000000 00000000 00000000 0x05a1c0: 00000000 00000000 00000000 00000000 0x05a1d0: 00000000 00000000 00000000 00000000 0x05a1e0: 00000000 00000000 00000000 00000000 0x05a1f0: 00000000 00000000 00000000 00000000 0x05a200: 00000000 00000000 00000000 00000000 0x05a210: 00000000 00000000 00000000 00000000 0x05a220: 00000000 00000000 00000000 00000000 0x05a230: 00000000 00000000 00000000 00000000 0x05a240: 00000000 00000000 00000000 00000000 0x05a250: 00000000 00000000 00000000 00000000 0x05a260: 00000000 00000000 00000000 00000000 0x05a270: 00000000 00000000 00000000 00000000 0x05a280: 00000000 00000000 00000000 00000000 0x05a290: 00000000 00000000 00000000 00000000 0x05a2a0: 00000000 00000000 00000000 00000000 0x05a2b0: 00000000 00000000 00000000 00000000 0x05a2c0: 00000000 00000000 00000000 00000000 0x05a2d0: 00000000 00000000 00000000 00000000 0x05a2e0: 00000000 00000000 00000000 00000000 0x05a2f0: 00000000 00000000 00000000 00000000 0x05a300: 00000000 00000001 00000000 00002710 0x05a310: 00000000 00000008 0000000e 00000000 0x05a320: 00000001 0000c000 00000000 0000000b 0x05a330: 00000001 00000000 00000000 00000000 0x05a340: 00000000 00000000 00000000 00000000 0x05a350: 00000000 00000000 00000000 00000000 0x05a360: 00000000 00000000 00000000 00000000 0x05a370: 00000000 00000000 00000000 00000000 0x05a380: 00000000 00000000 00000000 00000000 0x05a390: 00000000 00000000 00000000 00000000 0x05a3a0: 00000000 00000000 00000000 00000000 0x05a3b0: 00000000 00000000 00000000 00000000 0x05a3c0: 00000000 00000000 00000000 00000000 0x05a3d0: 00000000 00000000 00000000 00000000 0x05a3e0: 00000000 00000000 00000000 00000000 0x05a3f0: 00000000 00000000 00000000 00000000 Thanks. Jacky On Tue, Jun 16, 2020 at 08:40:28PM -0700, Guenter Roeck wrote: > On Wed, Jun 17, 2020 at 09:32:55AM +0800, Jacky Hu wrote: > > With this patch applied, output from 4800H (idle) looks as follows: > > > > k10temp-pci-00c3 > > Adapter: PCI adapter > > Vcore: 1.55 V > > Vsoc: 1.55 V > > Tctl: +49.6°C > > Tdie: +49.6°C > > Icore: 0.00 A > > Isoc: 0.00 A > > > > Signed-off-by: Jacky Hu > > --- > > drivers/hwmon/k10temp.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c > > index 8f12995ec133..287e9cf2aab9 100644 > > --- a/drivers/hwmon/k10temp.c > > +++ b/drivers/hwmon/k10temp.c > > @@ -583,6 +583,7 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) > > k10temp_get_ccd_support(pdev, data, 4); > > break; > > case 0x31: /* Zen2 Threadripper */ > > + case 0x60: /* Zen2 APU */ > > Unfortunately it is not that simple. Output above and the little data I have > available suggests that current and voltage measurements are different on the > APU. That means that show_current must remain false. > This will require a separate case statement which doesn't set any flags. > > Guenter > > > case 0x71: /* Zen2 */ > > data->show_current = !is_threadripper() && !is_epyc(); > > data->cfactor[0] = CFACTOR_ICORE; > > -- > > 2.27.0 > >