Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36993127rwd; Tue, 11 Jul 2023 08:09:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlFKSF9XR6wHM0ezkwW/SFESyfUONf63nrCKsGW/GIVLUbgSQ2WUnNlxyM6yUWE4SwUotTvX X-Received: by 2002:a17:902:eccb:b0:1b9:e9b2:1288 with SMTP id a11-20020a170902eccb00b001b9e9b21288mr3518013plh.38.1689088182166; Tue, 11 Jul 2023 08:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689088182; cv=none; d=google.com; s=arc-20160816; b=OiwAbkNNt6xrzKKxTTOMg6+TUOqDl1Sjs8WGwobwVnnXWNqnegVLWNbVM0BUDfKp4A +VcGNjE0zI0LvubNRRkbJCLv8HY1nul+M6N6RdbK9kb1DEaUoP0Q3ri4HjNiK+lqmk00 enDIopEnuncOw8iaq0Oehd5MHUVKJe7IAJEBfdrqsxTiob2ICQ7JDHwy3sCxxvj3z4ai k7sUi9FUeFfaOn8Rg7+taKm7Qu/M5CBKg1redyCQq7mKnsF+lqnkcZtX6Z4gjhcSXQNO 6aZLHqtojhYAw33TaIXLTR1ep0faDVwhHw1n86swu1VcF8LFd+pwSt8LJ9Pt9E5ckM+x 9Wlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NOHj/qmcYw6nskkjE8RKDb9CPghG0QuzHmlycmErO7k=; fh=Woe2mk4H2UUVFVbcLWUrms9c4QfuSyJW4Wzg1pgS4gQ=; b=vwdjWh03NcsNzjfFuSf7c426OU9zTloVx1jiGUwSgblgiIhElFMXOtWy0t7BdEA9dK dtDLYjhBqoLmrdHFGrWPFMj2xzXWmsmu1D2oH+20DX6iMh6Qtpft5l/FiJdnNOevBMx1 2fhQ7EvkG6a0JTN79YWpjNEVuBe0KEt/S6vvTpBbiASZeJqGkivMFdS60PqySAx1GH1K uAQO+aW5IcPZWbMieEY8EX3lh7L/Ydn8DFL/N2Jl8ZZEI6JzhFd45Y1Ca1O3vdKNP/VS al2eoUVYRTJqaay2rCjVvGGJAq8jY0UuYdMfgVfxvVw+WQTVev1MhjEZApZc2Jfd4Y9P ERNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=UAqGemQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a170903018b00b001b8a2774d60si1769977plg.486.2023.07.11.08.09.27; Tue, 11 Jul 2023 08:09:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=UAqGemQ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231437AbjGKOz5 (ORCPT + 99 others); Tue, 11 Jul 2023 10:55:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231134AbjGKOz4 (ORCPT ); Tue, 11 Jul 2023 10:55:56 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E63EE5C for ; Tue, 11 Jul 2023 07:55:52 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-345df4e68afso22490785ab.0 for ; Tue, 11 Jul 2023 07:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1689087351; x=1691679351; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NOHj/qmcYw6nskkjE8RKDb9CPghG0QuzHmlycmErO7k=; b=UAqGemQ5+fR3NqE1iuHNZOYmiRCYtr+lfFL/vlAa543KS13WS3iNlyK260KwuyvrJQ oDQLBIWWtOAGxsz1EPlMPeNGOdAUixriKE2ItDSySz8c0lU+mLjKVsYDAcGWhwK8/CkS 7PiX/dORprzdKayTOhfCChPNll0xVQ08X3v/mkcbzQGA6cPo7/KuIBTGyC1CpB6xCFm0 F2EiqxlHeQnMw6DnvmXGIUyyjyAYvNUWlZWoYooym3r3QsguLK64Pqsdgz+aoWy9hyFu UTUsFzNW9YnuvSxDab/nBF9V/lzVJU+/kJNw2dUz2+6qfFjugcTqHOCpQj6H2YjqcVvl oFGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689087351; x=1691679351; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NOHj/qmcYw6nskkjE8RKDb9CPghG0QuzHmlycmErO7k=; b=K5x326s+yY/w8GGrePT0VSL6JN0IsoSBqLLwAWslwF9cHaS+Nrbw0aKlL9Ap8XIga+ ine4Kf2bR1DnO1BvBLOyX1G6JjvZlHG9XvNvveKYO0lA8/ioPS/jw4km6sMMy+Qajc3w r2iEp40BJ5MH9U2mFplbaGgmq6gdEF4uTer3RgBL+YKPDMnUuNQvV5ILz4D+K1dKF2vN 4oWV34khEAOkTwoOlK3z3mb/vSJ2JIrYzPefoyqSdQXAFHOccDagOFsx+0nLaJV97Fyq ojWqyeM0ikHaqdjg6u9uBfOCOpL1rUt6k4yyi8lbuoi/6rtZwrp1ObMLzB7zQUoURRH8 Ol3w== X-Gm-Message-State: ABy/qLatT2UkNLdkdnxM/wOdwT8dpY9oyiDowcPR+ix81+Wp7J9e5sYt 1FNJRKgy1GvULTX1LZMmYgB0d4c6yVD07GdMOpXyow== X-Received: by 2002:a92:da86:0:b0:346:6dc2:997b with SMTP id u6-20020a92da86000000b003466dc2997bmr2950323iln.23.1689087351401; Tue, 11 Jul 2023 07:55:51 -0700 (PDT) MIME-Version: 1.0 References: <20230710162724.827833-1-Naresh.Solanki@9elements.com> <1f4c500b-e706-a090-516d-992b68f44f0d@roeck-us.net> In-Reply-To: <1f4c500b-e706-a090-516d-992b68f44f0d@roeck-us.net> From: Naresh Solanki Date: Tue, 11 Jul 2023 16:55:39 +0200 Message-ID: Subject: Re: [PATCH] hwmon: (peci/cputemp) Add Intel Sapphire Rapids support To: Guenter Roeck Cc: devicetree@vger.kernel.org, Jean Delvare , Iwona Winiarska , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Patrick Rudolph , openbmc@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guenter, On Mon, 10 Jul 2023 at 19:43, Guenter Roeck wrote: > > On 7/10/23 09:27, Naresh Solanki wrote: > > From: Patrick Rudolph > > > > Add support to read DTS for reading Intel Sapphire Rapids platform. > > > > Signed-off-by: Patrick Rudolph > > This patch touches code outside the hwmon subsystem, so I won't be able > to apply it without Ack from a maintainer. Yes. I'll split the patch & resubmit. ~Naresh > > Guenter > > > --- > > drivers/hwmon/peci/cputemp.c | 18 ++++++++++++++++++ > > drivers/peci/cpu.c | 5 +++++ > > 2 files changed, 23 insertions(+) > > > > diff --git a/drivers/hwmon/peci/cputemp.c b/drivers/hwmon/peci/cputemp.c > > index e5b65a382772..a812c15948d9 100644 > > --- a/drivers/hwmon/peci/cputemp.c > > +++ b/drivers/hwmon/peci/cputemp.c > > @@ -363,6 +363,7 @@ static int init_core_mask(struct peci_cputemp *priv) > > switch (peci_dev->info.model) { > > case INTEL_FAM6_ICELAKE_X: > > case INTEL_FAM6_ICELAKE_D: > > + case INTEL_FAM6_SAPPHIRERAPIDS_X: > > ret = peci_ep_pci_local_read(peci_dev, 0, reg->bus, reg->dev, > > reg->func, reg->offset + 4, &data); > > if (ret) > > @@ -531,6 +532,13 @@ static struct resolved_cores_reg resolved_cores_reg_icx = { > > .offset = 0xd0, > > }; > > > > +static struct resolved_cores_reg resolved_cores_reg_spr = { > > + .bus = 31, > > + .dev = 30, > > + .func = 6, > > + .offset = 0x80, > > +}; > > + > > static const struct cpu_info cpu_hsx = { > > .reg = &resolved_cores_reg_hsx, > > .min_peci_revision = 0x33, > > @@ -549,6 +557,12 @@ static const struct cpu_info cpu_icx = { > > .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree, > > }; > > > > +static const struct cpu_info cpu_spr = { > > + .reg = &resolved_cores_reg_spr, > > + .min_peci_revision = 0x40, > > + .thermal_margin_to_millidegree = &dts_ten_dot_six_to_millidegree, > > +}; > > + > > static const struct auxiliary_device_id peci_cputemp_ids[] = { > > { > > .name = "peci_cpu.cputemp.hsx", > > @@ -574,6 +588,10 @@ static const struct auxiliary_device_id peci_cputemp_ids[] = { > > .name = "peci_cpu.cputemp.icxd", > > .driver_data = (kernel_ulong_t)&cpu_icx, > > }, > > + { > > + .name = "peci_cpu.cputemp.spr", > > + .driver_data = (kernel_ulong_t)&cpu_spr, > > + }, > > { } > > }; > > MODULE_DEVICE_TABLE(auxiliary, peci_cputemp_ids); > > diff --git a/drivers/peci/cpu.c b/drivers/peci/cpu.c > > index de4a7b3e5966..3668a908d259 100644 > > --- a/drivers/peci/cpu.c > > +++ b/drivers/peci/cpu.c > > @@ -318,6 +318,11 @@ static const struct peci_device_id peci_cpu_device_ids[] = { > > .model = INTEL_FAM6_ICELAKE_X, > > .data = "icx", > > }, > > + { /* Sapphire Rapids Xeon */ > > + .family = 6, > > + .model = INTEL_FAM6_SAPPHIRERAPIDS_X, > > + .data = "spr", > > + }, > > { /* Icelake Xeon D */ > > .family = 6, > > .model = INTEL_FAM6_ICELAKE_D, > > > > base-commit: 4dbbaf8fbdbd13adc80731b2452257857e4c2d8b >