Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp25640rdh; Wed, 22 Nov 2023 16:49:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUVEhV/W0lD7j6FfNBBtrl8xME9PICud/7DH3fXEI/wPu8V4GUQpVWFfk/CdYkdfsln1qB X-Received: by 2002:a05:6a20:549b:b0:187:758e:9781 with SMTP id i27-20020a056a20549b00b00187758e9781mr1482935pzk.17.1700700551516; Wed, 22 Nov 2023 16:49:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700700551; cv=none; d=google.com; s=arc-20160816; b=TQbDwTumzMAHgKxktetkvTPkIqz/PXFyz2uAI8SHLApBIGNcQLL6t4ujInueD5zuoZ 2gDuvD2c4KBdt6wKDK8Zd3rqAUjLNZqqsCWXiphlhRMH3pwur5sQgYgAOZy0xkI7y5u4 9kejFRcyk/m4tVTQwDuBGiQc5jlwRn1z37NGPrwmHHf+bbJ1uFobtINkr4ILmo5Ua0eO lMkTYD/TPwEBCYe0bS6vjNH3aYxBpq+C+s7lgupap3uI0Iir0aUIVmtUEJZZMH3/c5wc epGw78+NYVtfxFh6szjXBWq3zb9BGkGSvwrM5eCcT0Po4CMc+REDKKBCo7KrzE5YrNOE Q0eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=iCCBsYtVmWupkO3u5mXLmuKOuPQWWJhnGk18ZsFXfQU=; fh=LbJc+26ESPHxBsYHQvEuE116sbQvfgEPUOE2p6r6f4A=; b=P9xdE4AfER7qEClF1oeJ9/x8Ay0VUirzxTmg2XAbVia0FbNGkoeKMsOOTtE1mQGT3W LRB0GUxUtOfJDjuRblos81aDMwo6t0ht0V/K8TxN7VKPZd74I93Z/PqP5WmcP55cb0bq UPonaWsQ7zpSqeGDPv80QYtfs0MCezWZ0ES77EyEjw00xZdRbQQPFALcnHu/kjCuRntH 3X3lcbB2/Xg//olh6r72PoMJhxQ8+rr61j9rDmg6RurCNy13XTS/iP5kpcMAqdt0aEmI DuGHVv7dBYo9rcM0zgc6EeUf03iaSgbTS/GdMydhwMjEMBhbmYCOE9VYGSlj/LExmz7V YSLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b="V2/nGg+l"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b14-20020a6567ce000000b005c1b2eff948si223519pgs.494.2023.11.22.16.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 16:49:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b="V2/nGg+l"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D30ED8299936; Wed, 22 Nov 2023 16:49:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231410AbjKWAtH (ORCPT + 99 others); Wed, 22 Nov 2023 19:49:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjKWAtG (ORCPT ); Wed, 22 Nov 2023 19:49:06 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC41D1B3; Wed, 22 Nov 2023 16:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1700700515; x=1701305315; i=w_armin@gmx.de; bh=yDHyDHS5S4Auj4mc9ZSQ4WBkDIhFW3w9J4NlOR396bA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=V2/nGg+l89FJhovOYpe620NwhhbJeixnNf5TJhKUg/1tNy8FgIBy15nG/3LwbE0s VFFo+VoBAzE0QRJN2xL+6ZC+2PYvnbTCcWl6TtAB7RwF93cj0/2yKsBdyTZnxcmi2 jrs7bRzeD6jbWev8rgWCHfaSdRE8xXgH+i3/1n16IPtCtgFZ0MDsIyuD4zhaHY/Gq tvgX4MnKqp7owsc1z1qr12sHy+mQM+riTxcbFT0TBj5p8HAEVCC7UCJv8DPtkUl4o MZN59DrxGprpNewGzoYvkaEpJDltLpR4/+G0lPqfNkLkvIhBTSwZCTROwf07azSef peeWJeNcVkSG1Go9Zw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1ML9yS-1qnt2n1YNm-00I9EK; Thu, 23 Nov 2023 01:48:35 +0100 From: Armin Wolf To: pali@kernel.org Cc: jdelvare@suse.com, linux@roeck-us.net, hdegoede@redhat.com, markgross@kernel.org, ilpo.jarvinen@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/9] hwmon: (dell-smm) Add support for WMI SMM interface Date: Thu, 23 Nov 2023 01:48:11 +0100 Message-Id: <20231123004820.50635-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:/8/j+v/jLv65EcbwtRVIULNAn+AXMfHuCCmvpDJblvjb9KBaCNQ z8yXIudV5LTlgMloxMGj7afibyf8EQXUY6U6mZ5CpUERbAX5NZxALXOPMleJagbDyZ973Bc Qq27PNbFtWBLtAmJ8Mg9JPoYG/LbNCyq5wXbTnqrDrm4vkzCa65eV9S1yXa4rMt06LunQVk C7dCEkO0SKzo96M2Y5zzQ== UI-OutboundReport: notjunk:1;M01:P0:QEu2HiJ3IXc=;uhPAUJLf6aJNhsq/a4AmdUvLkMv fskxnYN3fHyK/C4fBiQGBo6E+F0GI1mHP+M7nA635SHjT7MiSi69tje66wx5f2mbQvglkv4u9 BoXP8/Zo5svlJwOqzvjXdKMaoLjM8P2sfYkMEdJLbZdtQsexVXeSgBE1gUfRkNbIeukV7CBNs c2H+HKf9zZmFGj5ddmZbvFW+L6uHTn8IP657sz7KLpNJtq3eSocYIbNVYRNMerO6sZUS4GoPC UtLOORNEKONOUS0aSn0Y7iZ9KRPFF4mQJHPQCSn3oQ+O/p3x9A9o7RdoYQVdkxfH20u6SI6Gl eMmL2sMXfKGGjM/IdTpLqQ+aN1Thsv8/KKL+dBNJXMJznUJTXGfEpEvYgM3tfxCtZI7fQpNFb d7UgXSHouXiFEytu4RCmTgnbB0KeloKHlDCqDPvUiGLfC2RHQhLNj3qn5iKiNqrtKupSvfyus jUbWdPAHeWdUOuIhpqZgo9IcTXoa2ZadzNG/agVHXfeuK+WDBoJ9wAZOnhberRNoCeyk/6phQ nMy2iFuDRR/uPmHxsuuxXUlLUHb/FEHdUSgAJ1jCdaX6EkSoEB2EVKBCaavW0Fgpg8JJnVIib W8F1wVGumbvHTO/6McFj66eDYCPrAjr/JcO5Xy+RGIIPSZdpVFv4pNYoSAIkLydSKZLNdXAdm e5LlrpeLGyGVhEBZVe7kNEMDxSUNDGKF3XaXvhQhc4lnWlM6RJLOWxq6NmuMulCPt456/Fa30 07S8Dx+bivUKuO4mRRUjPwKj1Ugpj59oTYAG1mZwcjVFoRQB8WZtw1y6TRijFYGDikeg9n08o gOMKsvrgMBhtz+m/2795hxcz3msGQzYfkAvXxUDzr01OeYKNH4Ohx0A9LjjJMQmoJDg5rVQrU L2e6YOU12AaNCZ5HIjWH1LEE6tFIH4KpIaJqyXxiyWzbd4rGPqQbsVub8mGBa5lYNrauGtdwj df4AJg== X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 16:49:10 -0800 (PST) This patch series adds support for an alternative SMM calling backend to the dell-smm-hwmon driver. The reason for this is that on some modern machines, the legacy SMM calling interface does not work anymore and the SMM handler can be called over ACPI WMI instead. The first four patches prepare the driver by allowing to specify different SMM calling backends, and by moving most of the DMI handling into i8k_init() so that the DMI tables can keep their __initconst attributes (the WMI SMM backend driver does not probe at module init time). The fifth patch does some minor cleanup, while the next three patches implement the new WMI SMM calling backend. The last patch adds the machine of the user who requested and tested the changes to the fan control whitelist. If the driver does not detect the legacy SMM interface, either because the machine is not whitelisted or because the SMM handler does not react, it registers an WMI driver which will then bound to the WMI SMM interface and do the remaining initialization. The deprecated procfs interface is not supported when using the WMI SMM calling backend for the following reason: the WMI driver can potentially be instantiated multiple times while the deprectated procfs interface cannot. This should not cause any regressions because on machines supporting only the WMI SMM interface, the driver would, until now, not load anyway. All patches where tested on a Dell Inspiron 3505 and a Dell OptiPlex 7000. Changes since v3: - Using unsigned integers for registers - use TAB instead of space after comma Changes since v2: - Rework WMI response parsing - Use #define for method number Changes since v1: - Cc platform driver maintainers - Fix formating inside documentation Armin Wolf (9): hwmon: (dell-smm) Prepare for multiple SMM calling backends hwmon: (dell-smm) Move blacklist handling to module init hwmon: (dell-smm) Move whitelist handling to module init hwmon: (dell-smm) Move DMI config handling to module init hwmon: (dell-smm) Move config entries out of i8k_dmi_table hwmon: (dell-smm) Introduce helper function for data init hwmon: (dell-smm) Add support for WMI SMM interface hwmon: (dell-smm) Document the WMI SMM interface hwmon: (dell-smm) Add Optiplex 7000 to fan control whitelist Documentation/hwmon/dell-smm-hwmon.rst | 38 +- drivers/hwmon/Kconfig | 1 + drivers/hwmon/dell-smm-hwmon.c | 604 +++++++++++++++++-------- drivers/platform/x86/wmi.c | 1 + 4 files changed, 454 insertions(+), 190 deletions(-) =2D- 2.39.2