Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8208736rwp; Wed, 19 Jul 2023 06:50:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUwz88TUkyZiWAobu7giGDzxnIC/qz/kmh+h/A5TWyzejqWUF9dXqw5676GCpLiUv+9N8P X-Received: by 2002:a05:6a20:7f8c:b0:137:fa5:8519 with SMTP id d12-20020a056a207f8c00b001370fa58519mr3561410pzj.31.1689774623720; Wed, 19 Jul 2023 06:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689774623; cv=none; d=google.com; s=arc-20160816; b=Av0TZ+H4fu5L5G+nWCH4Y7zp1q7vMQlpP5k47Lbxtm7P0xm1nNOUcevbyJe0rQeY2g 3zMOfIS5fZfEWNAPELpyd//9Q+HabVmYtDVxhsb5s/FjAZnOn3NHmlhBM60YSBCPNwGK c0QLv7A6GRNbJGsPbQdmzB+rWR5GT3DwMj4IMQ4EdSKZuYtDO+J+tXJJhP/qZTLyIlF1 aPKv8IwY9lJlk2X1G4Y/7ybHc/2qEE3oNeRG6tWrY1pp8Qbgbvldq6gXg1uHci1ow/oU +O7R//U8KcyOEZp8vaYe5St4vwc848YwnWc4swP0LAw7h9gu7W8Aubz//aZ6ahbTBWmS El7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=ohi9eAkzosqxAXnsMA/wz1vAHobdzzbfArTEu065q9s=; fh=Zm0fuB8AHyd+14H8IG2nS45mvPMEXmUV2Gs3Sa0yQSA=; b=Wwd9l8db8mwu4x7XNQ3nlYAZiYuTWYVaEcCj+4J42cyHOPtPXq+3xyQKweGAu3fkY1 cuHBl1KxFbuiaiNXjN0VOxGlMiXfiFqU0E8BaGx03ymmdQ8FeQJRuGHBzfTkNsvQyiii J8THH0tcqh1E6fkT+qDmzyaUK7GN0XbUQFABMwt6qSM1TtHVJ2y9W78nZ1Cl5p8tnyMM Q1bu7YKkmygLpC45KocVrp0G6m07qGh2JCyLXm+ftiw7RhZwJICp1BaElfbfwD7fsdlz 6oKGdeLjTrS1eRkiRioPp8UQNYqcq7MJeCj3Tzj660MWiO9c3AxSha/jrLP/jjYI2f3/ 1ERw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=QViHAUg4; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv124-20020a632e82000000b0055dcb8ea00fsi3446634pgb.268.2023.07.19.06.50.11; Wed, 19 Jul 2023 06:50:23 -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=@gmail.com header.s=20221208 header.b=QViHAUg4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbjGSNfI (ORCPT + 99 others); Wed, 19 Jul 2023 09:35:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231383AbjGSNfC (ORCPT ); Wed, 19 Jul 2023 09:35:02 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF9110A; Wed, 19 Jul 2023 06:35:00 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-c4cb4919bb9so6839930276.3; Wed, 19 Jul 2023 06:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689773699; x=1692365699; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ohi9eAkzosqxAXnsMA/wz1vAHobdzzbfArTEu065q9s=; b=QViHAUg4gCWTApYFar1FMfjEzYljcMWrNOt3Hc0iorDQjGgF60+Oke32r57DDgyJWb qbUzB0JSvzPpkoMiVclgET+flhnrv1BUmWbwsOFFIED8giuG+G7wucgkt2Kkza6Gf8gp jh9/KFCGVxp/XPTC1AclKJ10ecAL0enfhDMjHUEQnmk28E14VVOxyZF1DyMCvPT51gRs 3oLj9uIwetKY3jGaKGTT8UsAjcXLiQObJxWyOFt02s7GzPequmuxWQGADtgA/WhqBAA3 x2f1tRqj/4mw3g06cu+9RrK+GiqvrIXK8vZ0RVVOGyMZyEf08ahE4wf3KJ5FOPgUkra8 98DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689773699; x=1692365699; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ohi9eAkzosqxAXnsMA/wz1vAHobdzzbfArTEu065q9s=; b=Ssym+PMq3nskk9RoczXO49a1zMpyA94ChpelAJz2yKpbAWsfQ4bIv27EONEiN4Xi8c wC5+/252pncCZ6uWfEhbLKzzAgGg8OWduakMHMl5khTgX9jAokU++9EhvSVpPm6WVNff cK6wtOQORHaEVnXYKrc/2o2aejyfmBhHP3auPDpMmfDZe+csai/tOo4J+7kxqO/AozII ahnZMpMmfIpzp9PPkHYdjaaN0ZZg40qe+yZxNdo7W8di/adwLP46UxBHzgJQCuNBPOpx vdFtMd8iWVViCRDwlhKt3ixJLekYwSfRVRyQ973UkxcJ3L36Nw8xZUIBImI19nL/sHax nVhw== X-Gm-Message-State: ABy/qLZjRCzDBHOCwn05QpkGBJtK3vXUIdNCpNAGsKWwW/KzXG6+oSCT 5aKV+ZCs3MXftX65O+Y7MAz1/VzIa7g= X-Received: by 2002:a25:81c6:0:b0:c42:97f9:cda6 with SMTP id n6-20020a2581c6000000b00c4297f9cda6mr2621439ybm.29.1689773699257; Wed, 19 Jul 2023 06:34:59 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p4-20020a257404000000b00ceb2ac48b9dsm703600ybc.10.2023.07.19.06.34.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jul 2023 06:34:58 -0700 (PDT) Sender: Guenter Roeck Message-ID: <1322270b-da95-7e7c-0a68-fc883ba09dc9@roeck-us.net> Date: Wed, 19 Jul 2023 06:34:57 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2 2/3] hwmon: (peci/cputemp) Add Intel Sapphire Rapids support Content-Language: en-US To: Naresh Solanki , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, iwona.winiarska@intel.com, jdelvare@suse.com Cc: Patrick Rudolph References: <20230712091241.3668454-1-Naresh.Solanki@9elements.com> <20230712091241.3668454-2-Naresh.Solanki@9elements.com> From: Guenter Roeck In-Reply-To: <20230712091241.3668454-2-Naresh.Solanki@9elements.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On 7/12/23 02:12, Naresh Solanki wrote: > From: Patrick Rudolph > > Add support to read DTS for reading Intel Sapphire Rapids platform. > > Signed-off-by: Patrick Rudolph > Signed-off-by: Naresh Solanki I don't know what the plan is to apply this and the next patch, since (I assume) it depends on the first patch of the series. Assuming it will be applied through the peci tree: Acked-by: Guenter Roeck Guenter > --- > Changes in V2: > - Refactored from previous patchset as seperate patch based on subsystem. > --- > drivers/hwmon/peci/cputemp.c | 18 ++++++++++++++++++ > 1 file changed, 18 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);