From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FE08C433F5 for ; Tue, 8 Feb 2022 23:10:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235380AbiBHXKo (ORCPT ); Tue, 8 Feb 2022 18:10:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235138AbiBHXKn (ORCPT ); Tue, 8 Feb 2022 18:10:43 -0500 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C8E5C0612C2; Tue, 8 Feb 2022 15:10:41 -0800 (PST) Received: by mail-qt1-x82c.google.com with SMTP id l14so444763qtp.7; Tue, 08 Feb 2022 15:10:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H4AnW21UTOBpl9IT37GON9GbIZ1V0rMPgsXoaPMebDo=; b=QTbpsk9PRPSO+jL6VeAS/zIqycwhiMi8VI9kFSQ8mz+rJ0Sgl9r+2qTBwIX+W0FPku K3Xe6YfZUw+pzU6PXxC1A1Gc3oyQxKQR6x9VEwI3kmTBdD0AALVccl9qYTy6fd/50fyq 6ttWICxKb8l00IHv8Q8i9FfPBoKi4ItMhqFFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H4AnW21UTOBpl9IT37GON9GbIZ1V0rMPgsXoaPMebDo=; b=H8/p8KIB7xg49orLnyYPeOgIoxlWcQcGyvvC4l5egOBEC7JMSTJOq+kFBjlagf/FsS 9iFBAsWkZ/KUE8vVOVcO6FilrhCAC5GsVc35kA67OzpkB1yqGJHJuoPRdIau50V7pW97 i2OXFsSjD0ZGxHEgt8GrrvPnp7gsljKaD4T1Svv4An7shEeRUkkf8xsy3vhAWR7kfExL JGMOgQ0kFcpSnevCRCNnrpJp/YcFhqwrPwZ67P/UuLbFifwhPkCsPlx982Ld5HJ6V3bj EiJNP040WwAXezQhR+Yo4kRv3yM/KCP5NF5mXMXy5oXlRKmwp0XAbuPYdRcxskC+okTd KfzQ== X-Gm-Message-State: AOAM5328dcML2esI+87ViFai8JxF9KBswASraV8c4ePbg+fIaGEBLEMi ibV6q+9slISjRf8IvluCiDmhGHB2+LVTpvJsEYE2WX/oEG0= X-Google-Smtp-Source: ABdhPJxkCZok6w5MQZS9BOo+D+4Sd3aja5mP4w7wQ435bkoOoCphhvgl5XGJsyBlfcRdrsRN27hO+AY0/gaqcez1v4w= X-Received: by 2002:ac8:7c4c:: with SMTP id o12mr4613615qtv.475.1644361840346; Tue, 08 Feb 2022 15:10:40 -0800 (PST) MIME-Version: 1.0 References: <20220208153639.255278-1-iwona.winiarska@intel.com> In-Reply-To: <20220208153639.255278-1-iwona.winiarska@intel.com> From: Joel Stanley Date: Tue, 8 Feb 2022 23:10:28 +0000 Message-ID: Subject: Re: [PATCH v8 00/13] Introduce PECI subsystem To: Iwona Winiarska Cc: Linux Kernel Mailing List , OpenBMC Maillist , Greg Kroah-Hartman , devicetree , linux-aspeed , Linux ARM , linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Rob Herring , Andrew Jeffery , Jean Delvare , Guenter Roeck , Arnd Bergmann , Olof Johansson , Jonathan Corbet , Borislav Petkov , Pierre-Louis Bossart , Tony Luck , Andy Shevchenko , Dan Williams , Randy Dunlap , Zev Weiss , David Muller , Dave Hansen , Billy Tsai Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On Tue, 8 Feb 2022 at 15:37, Iwona Winiarska wrote: > > Hi Greg, > > I applied the fixups to sysfs ABI docs, I would appreciate if PECI > could go through your tree into v5.18. Acked-by: Joel Stanley > > Here is the usual cover letter from the previous revision: > > The Platform Environment Control Interface (PECI) is a communication > interface between Intel processors and management controllers (e.g. > Baseboard Management Controller, BMC). > > This series adds a PECI subsystem and introduces drivers which run in > the Linux instance on the management controller (not the main Intel > processor) and is intended to be used by the OpenBMC [1], a Linux > distribution for BMC devices. > The information exposed over PECI (like processor and DIMM > temperature) refers to the Intel processor and can be consumed by > daemons running on the BMC to, for example, display the processor > temperature in its web interface. > > The PECI bus is collection of code that provides interface support > between PECI devices (that actually represent processors) and PECI > controllers (such as the "peci-aspeed" controller) that allow to > access physical PECI interface. PECI devices are bound to PECI > drivers that provides access to PECI services. This series introduces > a generic "peci-cpu" driver that exposes hardware monitoring "cputemp" > and "dimmtemp" using the auxiliary bus. > > Exposing "raw" PECI to userspace, either to write userspace drivers or > for debug/testing purpose was left out of this series to encourage > writing kernel drivers instead, but may be pursued in the future. > > Introducing PECI to upstream Linux was already attempted before [2]. > Since it's been over a year since last revision, and the series > changed quite a bit in the meantime, I've decided to start from v1. > > I would also like to give credit to everyone who helped me with > different aspects of preliminary review: > - Pierre-Louis Bossart, > - Tony Luck, > - Andy Shevchenko, > - Dave Hansen. > > [1] https://github.com/openbmc/openbmc > [2] https://lore.kernel.org/openbmc/20191211194624.2872-1-jae.hyun.yoo@linux.intel.com/ > > Changes v7 -> v8: > * Updated "KernelVersion" in sysfs ABI docs (Greg) > > Changes v6 -> v7: > * Fixed Kconfig warnings (lkp@intel.com) > > Changes v5 -> v6: > * Added missing COMMON_CLK selection (lkp@intel.com) > * Fixed WARN_ON always evaluated to true (lkp@intel.com) > * Clean interrupt status unconditionally (Joel) > * Replaced memcpy_toio()/memcpy_fromio() with writel()/readl() to > avoid issues when submitting unaligned PECI commands > > Changes v4 -> v5: > * Added clk_aspeed_peci to express controller programming using common > clock framework (Billy) > * Modified peci-aspeed DTS schema to match clock changes (Billy) > * Added workaround for peci-aspeed controller hang (Billy) > * Removed unnecessary "else after return" (Guenter) > > Changes v3 -> v4: > * Fixed an issue where peci doesn't work after host shutdown (Zev) > * Replaced kill_device() with peci_device_del_lock (Greg) > * Fixed dts_valid() parameter type (Guenter) > * Removed Jae from MAINTAINERS file (Jae) > > Changes v2 -> v3: > > * Dropped x86/cpu patches (Boris) > * Dropped pr_fmt() for PECI module (Dan) > * Fixed releasing peci controller device flow (Dan) > * Improved peci-aspeed commit-msg and Kconfig help (Dan) > * Fixed aspeed_peci_xfer() to use the proper spin_lock function (Dan) > * Wrapped print_hex_dump_bytes() in CONFIG_DYNAMIC_DEBUG (Dan) > * Removed debug status logs from aspeed_peci_irq_handler() (Dan) > * Renamed functions using devres to start with "devm" (Dan) > * Changed request to be allocated on stack in peci_detect (Dan) > * Removed redundant WARN_ON on invalid PECI addr (Dan) > * Changed peci_device_create() to use device_initialize() + device_add() pattern (Dan) > * Fixed peci_device_destroy() to use kill_device() avoiding double-free (Dan) > * Renamed functions that perform xfer using "peci_xfer_*" prefix (Dan) > * Renamed peci_request_data_dib(temp) -> peci_request_dib(temp)_read (Dan) > * Fixed thermal margin readings for older Intel processors (Zev) > * Misc hwmon simplifications (Guenter) > * Used BIT_PER_TYPE to verify macro value constrains (Guenter) > * Improved WARN_ON message to print chan_rank_max and idx_dimm_max (Guenter) > * Improved dimmtemp to not reattempt probe if no dimms are populated > > Changes v1 -> v2: > > Biggest changes when it comes to diffstat are locking in HWMON > (I decided to clean things up a bit while adding it), switching to > devres usage in more places and exposing sysfs interface in separate patch. > > * Moved extending X86 ARCHITECTURE MAINTAINERS earlier in series (Dan) > * Removed "default n" for GENERIC_LIB_X86 (Dan) > * Added vendor prefix for peci-aspeed specific properties (Rob) > * Refactored PECI to use devres consistently (Dan) > * Added missing sysfs documentation and excluded adding peci-sysfs to > separate patch (Dan) > * Used module_init() instead of subsys_init() for peci module initialization (Dan) > * Removed redundant struct peci_device member (Dan) > * Improved PECI Kconfig help (Randy/Dan) > * Fixed/removed log messages (Dan, Guenter) > * Refactored peci-cputemp and peci-dimmtemp and added missing locks (Guenter) > * Removed unused dev_set_drvdata() in peci-cputemp and peci-dimmtemp (Guenter) > * Fixed used types, names, fixed broken and added additional comments > to peci-hwmon (Guenter, Zev) > * Refactored peci-dimmtemp to not return -ETIMEDOUT (Guenter) > * Added sanity check for min_peci_revision in peci-hwmon drivers (Zev) > * Added assert for DIMM_NUMS_MAX and additional warning in peci-dimmtemp (Zev) > * Fixed macro names in peci-aspeed (Zev) > * Refactored peci-aspeed sanitizing properties to a single helper function (Zev) > * Fixed peci_cpu_device_ids definition for Broadwell Xeon D (David) > * Refactor peci_request to use a single allocation (Zev) > * Used min_t() to improve code readability (Zev) > * Added macro for PECI_RDENDPTCFG_MMIO_WR_LEN_BASE and fixed adev type > array name to more descriptive (Zev) > * Fixed peci-hwmon commit-msg and documentation (Zev) > > Thanks > -Iwona > > Iwona Winiarska (11): > dt-bindings: Add generic bindings for PECI > dt-bindings: Add bindings for peci-aspeed > ARM: dts: aspeed: Add PECI controller nodes > peci: Add core infrastructure > peci: Add device detection > peci: Add sysfs interface for PECI bus > peci: Add support for PECI device drivers > peci: Add peci-cpu driver > hwmon: peci: Add cputemp driver > hwmon: peci: Add dimmtemp driver > docs: Add PECI documentation > > Jae Hyun Yoo (2): > peci: Add peci-aspeed controller driver > docs: hwmon: Document PECI drivers > > Documentation/ABI/testing/sysfs-bus-peci | 16 + > .../devicetree/bindings/peci/peci-aspeed.yaml | 72 ++ > .../bindings/peci/peci-controller.yaml | 33 + > Documentation/hwmon/index.rst | 2 + > Documentation/hwmon/peci-cputemp.rst | 90 +++ > Documentation/hwmon/peci-dimmtemp.rst | 57 ++ > Documentation/index.rst | 1 + > Documentation/peci/index.rst | 16 + > Documentation/peci/peci.rst | 51 ++ > MAINTAINERS | 26 + > arch/arm/boot/dts/aspeed-g4.dtsi | 11 + > arch/arm/boot/dts/aspeed-g5.dtsi | 11 + > arch/arm/boot/dts/aspeed-g6.dtsi | 11 + > drivers/Kconfig | 3 + > drivers/Makefile | 1 + > drivers/hwmon/Kconfig | 2 + > drivers/hwmon/Makefile | 1 + > drivers/hwmon/peci/Kconfig | 31 + > drivers/hwmon/peci/Makefile | 7 + > drivers/hwmon/peci/common.h | 58 ++ > drivers/hwmon/peci/cputemp.c | 592 ++++++++++++++++ > drivers/hwmon/peci/dimmtemp.c | 630 ++++++++++++++++++ > drivers/peci/Kconfig | 36 + > drivers/peci/Makefile | 10 + > drivers/peci/controller/Kconfig | 18 + > drivers/peci/controller/Makefile | 3 + > drivers/peci/controller/peci-aspeed.c | 599 +++++++++++++++++ > drivers/peci/core.c | 236 +++++++ > drivers/peci/cpu.c | 343 ++++++++++ > drivers/peci/device.c | 252 +++++++ > drivers/peci/internal.h | 136 ++++ > drivers/peci/request.c | 482 ++++++++++++++ > drivers/peci/sysfs.c | 82 +++ > include/linux/peci-cpu.h | 40 ++ > include/linux/peci.h | 112 ++++ > 35 files changed, 4071 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-peci > create mode 100644 Documentation/devicetree/bindings/peci/peci-aspeed.yaml > create mode 100644 Documentation/devicetree/bindings/peci/peci-controller.yaml > create mode 100644 Documentation/hwmon/peci-cputemp.rst > create mode 100644 Documentation/hwmon/peci-dimmtemp.rst > create mode 100644 Documentation/peci/index.rst > create mode 100644 Documentation/peci/peci.rst > create mode 100644 drivers/hwmon/peci/Kconfig > create mode 100644 drivers/hwmon/peci/Makefile > create mode 100644 drivers/hwmon/peci/common.h > create mode 100644 drivers/hwmon/peci/cputemp.c > create mode 100644 drivers/hwmon/peci/dimmtemp.c > create mode 100644 drivers/peci/Kconfig > create mode 100644 drivers/peci/Makefile > create mode 100644 drivers/peci/controller/Kconfig > create mode 100644 drivers/peci/controller/Makefile > create mode 100644 drivers/peci/controller/peci-aspeed.c > create mode 100644 drivers/peci/core.c > create mode 100644 drivers/peci/cpu.c > create mode 100644 drivers/peci/device.c > create mode 100644 drivers/peci/internal.h > create mode 100644 drivers/peci/request.c > create mode 100644 drivers/peci/sysfs.c > create mode 100644 include/linux/peci-cpu.h > create mode 100644 include/linux/peci.h > > -- > 2.34.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E06ADC433F5 for ; Tue, 8 Feb 2022 23:11:33 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jtf033mP7z30QZ for ; Wed, 9 Feb 2022 10:11:31 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=jms.id.au header.i=@jms.id.au header.a=rsa-sha256 header.s=google header.b=QTbpsk9P; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::82f; helo=mail-qt1-x82f.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=jms.id.au header.i=@jms.id.au header.a=rsa-sha256 header.s=google header.b=QTbpsk9P; dkim-atps=neutral Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JtdzC1vw5z2yNv; Wed, 9 Feb 2022 10:10:45 +1100 (AEDT) Received: by mail-qt1-x82f.google.com with SMTP id l14so444768qtp.7; Tue, 08 Feb 2022 15:10:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H4AnW21UTOBpl9IT37GON9GbIZ1V0rMPgsXoaPMebDo=; b=QTbpsk9PRPSO+jL6VeAS/zIqycwhiMi8VI9kFSQ8mz+rJ0Sgl9r+2qTBwIX+W0FPku K3Xe6YfZUw+pzU6PXxC1A1Gc3oyQxKQR6x9VEwI3kmTBdD0AALVccl9qYTy6fd/50fyq 6ttWICxKb8l00IHv8Q8i9FfPBoKi4ItMhqFFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H4AnW21UTOBpl9IT37GON9GbIZ1V0rMPgsXoaPMebDo=; b=oyYWuTlqVdLJYkxTyNmdIKjTiYJ8pAcoXNkkha4caaUaDx0Z+3sJjKK7L6ujr/VyQJ wzXxa1dR+7aoNynAomZkGYj1fM45uKXkwHqmp5UFcZsRKXFuw0vH4q8s2keqvZzhx4QU +csBNhCQZPWLee3KLngxWaGY9cTX22hUaQ5jDrPXnqEATC+lWIrzqtqUMC8rNuP9QvyH PSfahRu74yPR2VG7H1hdNItPZxGmHSILsO5v7eZjvNui00vZsEePA0DLc70HMtxk94qu 4rX1H7E9uxLt4RsvPQ9K3fy2ZGPKID2IyywWxCDEKU+fv5uDNqWYwsP073EAB71wnUdW S97Q== X-Gm-Message-State: AOAM531EietXuAKFW9bgIiX2leRv8lY8GgyIEO6VUcS/f5q8/9PztM/0 9lHMQDxlykiGSU5qyPToK9oAJAUpT1wXLx8Ge3c= X-Google-Smtp-Source: ABdhPJxkCZok6w5MQZS9BOo+D+4Sd3aja5mP4w7wQ435bkoOoCphhvgl5XGJsyBlfcRdrsRN27hO+AY0/gaqcez1v4w= X-Received: by 2002:ac8:7c4c:: with SMTP id o12mr4613615qtv.475.1644361840346; Tue, 08 Feb 2022 15:10:40 -0800 (PST) MIME-Version: 1.0 References: <20220208153639.255278-1-iwona.winiarska@intel.com> In-Reply-To: <20220208153639.255278-1-iwona.winiarska@intel.com> From: Joel Stanley Date: Tue, 8 Feb 2022 23:10:28 +0000 Message-ID: Subject: Re: [PATCH v8 00/13] Introduce PECI subsystem To: Iwona Winiarska Content-Type: text/plain; charset="UTF-8" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed , linux-doc@vger.kernel.org, Dave Hansen , Zev Weiss , Jonathan Corbet , OpenBMC Maillist , Pierre-Louis Bossart , Guenter Roeck , devicetree , Jean Delvare , Arnd Bergmann , Billy Tsai , Rob Herring , Borislav Petkov , Dan Williams , Andy Shevchenko , Linux ARM , linux-hwmon@vger.kernel.org, Tony Luck , Andrew Jeffery , Greg Kroah-Hartman , Randy Dunlap , Linux Kernel Mailing List , Olof Johansson Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" On Tue, 8 Feb 2022 at 15:37, Iwona Winiarska wrote: > > Hi Greg, > > I applied the fixups to sysfs ABI docs, I would appreciate if PECI > could go through your tree into v5.18. Acked-by: Joel Stanley > > Here is the usual cover letter from the previous revision: > > The Platform Environment Control Interface (PECI) is a communication > interface between Intel processors and management controllers (e.g. > Baseboard Management Controller, BMC). > > This series adds a PECI subsystem and introduces drivers which run in > the Linux instance on the management controller (not the main Intel > processor) and is intended to be used by the OpenBMC [1], a Linux > distribution for BMC devices. > The information exposed over PECI (like processor and DIMM > temperature) refers to the Intel processor and can be consumed by > daemons running on the BMC to, for example, display the processor > temperature in its web interface. > > The PECI bus is collection of code that provides interface support > between PECI devices (that actually represent processors) and PECI > controllers (such as the "peci-aspeed" controller) that allow to > access physical PECI interface. PECI devices are bound to PECI > drivers that provides access to PECI services. This series introduces > a generic "peci-cpu" driver that exposes hardware monitoring "cputemp" > and "dimmtemp" using the auxiliary bus. > > Exposing "raw" PECI to userspace, either to write userspace drivers or > for debug/testing purpose was left out of this series to encourage > writing kernel drivers instead, but may be pursued in the future. > > Introducing PECI to upstream Linux was already attempted before [2]. > Since it's been over a year since last revision, and the series > changed quite a bit in the meantime, I've decided to start from v1. > > I would also like to give credit to everyone who helped me with > different aspects of preliminary review: > - Pierre-Louis Bossart, > - Tony Luck, > - Andy Shevchenko, > - Dave Hansen. > > [1] https://github.com/openbmc/openbmc > [2] https://lore.kernel.org/openbmc/20191211194624.2872-1-jae.hyun.yoo@linux.intel.com/ > > Changes v7 -> v8: > * Updated "KernelVersion" in sysfs ABI docs (Greg) > > Changes v6 -> v7: > * Fixed Kconfig warnings (lkp@intel.com) > > Changes v5 -> v6: > * Added missing COMMON_CLK selection (lkp@intel.com) > * Fixed WARN_ON always evaluated to true (lkp@intel.com) > * Clean interrupt status unconditionally (Joel) > * Replaced memcpy_toio()/memcpy_fromio() with writel()/readl() to > avoid issues when submitting unaligned PECI commands > > Changes v4 -> v5: > * Added clk_aspeed_peci to express controller programming using common > clock framework (Billy) > * Modified peci-aspeed DTS schema to match clock changes (Billy) > * Added workaround for peci-aspeed controller hang (Billy) > * Removed unnecessary "else after return" (Guenter) > > Changes v3 -> v4: > * Fixed an issue where peci doesn't work after host shutdown (Zev) > * Replaced kill_device() with peci_device_del_lock (Greg) > * Fixed dts_valid() parameter type (Guenter) > * Removed Jae from MAINTAINERS file (Jae) > > Changes v2 -> v3: > > * Dropped x86/cpu patches (Boris) > * Dropped pr_fmt() for PECI module (Dan) > * Fixed releasing peci controller device flow (Dan) > * Improved peci-aspeed commit-msg and Kconfig help (Dan) > * Fixed aspeed_peci_xfer() to use the proper spin_lock function (Dan) > * Wrapped print_hex_dump_bytes() in CONFIG_DYNAMIC_DEBUG (Dan) > * Removed debug status logs from aspeed_peci_irq_handler() (Dan) > * Renamed functions using devres to start with "devm" (Dan) > * Changed request to be allocated on stack in peci_detect (Dan) > * Removed redundant WARN_ON on invalid PECI addr (Dan) > * Changed peci_device_create() to use device_initialize() + device_add() pattern (Dan) > * Fixed peci_device_destroy() to use kill_device() avoiding double-free (Dan) > * Renamed functions that perform xfer using "peci_xfer_*" prefix (Dan) > * Renamed peci_request_data_dib(temp) -> peci_request_dib(temp)_read (Dan) > * Fixed thermal margin readings for older Intel processors (Zev) > * Misc hwmon simplifications (Guenter) > * Used BIT_PER_TYPE to verify macro value constrains (Guenter) > * Improved WARN_ON message to print chan_rank_max and idx_dimm_max (Guenter) > * Improved dimmtemp to not reattempt probe if no dimms are populated > > Changes v1 -> v2: > > Biggest changes when it comes to diffstat are locking in HWMON > (I decided to clean things up a bit while adding it), switching to > devres usage in more places and exposing sysfs interface in separate patch. > > * Moved extending X86 ARCHITECTURE MAINTAINERS earlier in series (Dan) > * Removed "default n" for GENERIC_LIB_X86 (Dan) > * Added vendor prefix for peci-aspeed specific properties (Rob) > * Refactored PECI to use devres consistently (Dan) > * Added missing sysfs documentation and excluded adding peci-sysfs to > separate patch (Dan) > * Used module_init() instead of subsys_init() for peci module initialization (Dan) > * Removed redundant struct peci_device member (Dan) > * Improved PECI Kconfig help (Randy/Dan) > * Fixed/removed log messages (Dan, Guenter) > * Refactored peci-cputemp and peci-dimmtemp and added missing locks (Guenter) > * Removed unused dev_set_drvdata() in peci-cputemp and peci-dimmtemp (Guenter) > * Fixed used types, names, fixed broken and added additional comments > to peci-hwmon (Guenter, Zev) > * Refactored peci-dimmtemp to not return -ETIMEDOUT (Guenter) > * Added sanity check for min_peci_revision in peci-hwmon drivers (Zev) > * Added assert for DIMM_NUMS_MAX and additional warning in peci-dimmtemp (Zev) > * Fixed macro names in peci-aspeed (Zev) > * Refactored peci-aspeed sanitizing properties to a single helper function (Zev) > * Fixed peci_cpu_device_ids definition for Broadwell Xeon D (David) > * Refactor peci_request to use a single allocation (Zev) > * Used min_t() to improve code readability (Zev) > * Added macro for PECI_RDENDPTCFG_MMIO_WR_LEN_BASE and fixed adev type > array name to more descriptive (Zev) > * Fixed peci-hwmon commit-msg and documentation (Zev) > > Thanks > -Iwona > > Iwona Winiarska (11): > dt-bindings: Add generic bindings for PECI > dt-bindings: Add bindings for peci-aspeed > ARM: dts: aspeed: Add PECI controller nodes > peci: Add core infrastructure > peci: Add device detection > peci: Add sysfs interface for PECI bus > peci: Add support for PECI device drivers > peci: Add peci-cpu driver > hwmon: peci: Add cputemp driver > hwmon: peci: Add dimmtemp driver > docs: Add PECI documentation > > Jae Hyun Yoo (2): > peci: Add peci-aspeed controller driver > docs: hwmon: Document PECI drivers > > Documentation/ABI/testing/sysfs-bus-peci | 16 + > .../devicetree/bindings/peci/peci-aspeed.yaml | 72 ++ > .../bindings/peci/peci-controller.yaml | 33 + > Documentation/hwmon/index.rst | 2 + > Documentation/hwmon/peci-cputemp.rst | 90 +++ > Documentation/hwmon/peci-dimmtemp.rst | 57 ++ > Documentation/index.rst | 1 + > Documentation/peci/index.rst | 16 + > Documentation/peci/peci.rst | 51 ++ > MAINTAINERS | 26 + > arch/arm/boot/dts/aspeed-g4.dtsi | 11 + > arch/arm/boot/dts/aspeed-g5.dtsi | 11 + > arch/arm/boot/dts/aspeed-g6.dtsi | 11 + > drivers/Kconfig | 3 + > drivers/Makefile | 1 + > drivers/hwmon/Kconfig | 2 + > drivers/hwmon/Makefile | 1 + > drivers/hwmon/peci/Kconfig | 31 + > drivers/hwmon/peci/Makefile | 7 + > drivers/hwmon/peci/common.h | 58 ++ > drivers/hwmon/peci/cputemp.c | 592 ++++++++++++++++ > drivers/hwmon/peci/dimmtemp.c | 630 ++++++++++++++++++ > drivers/peci/Kconfig | 36 + > drivers/peci/Makefile | 10 + > drivers/peci/controller/Kconfig | 18 + > drivers/peci/controller/Makefile | 3 + > drivers/peci/controller/peci-aspeed.c | 599 +++++++++++++++++ > drivers/peci/core.c | 236 +++++++ > drivers/peci/cpu.c | 343 ++++++++++ > drivers/peci/device.c | 252 +++++++ > drivers/peci/internal.h | 136 ++++ > drivers/peci/request.c | 482 ++++++++++++++ > drivers/peci/sysfs.c | 82 +++ > include/linux/peci-cpu.h | 40 ++ > include/linux/peci.h | 112 ++++ > 35 files changed, 4071 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-peci > create mode 100644 Documentation/devicetree/bindings/peci/peci-aspeed.yaml > create mode 100644 Documentation/devicetree/bindings/peci/peci-controller.yaml > create mode 100644 Documentation/hwmon/peci-cputemp.rst > create mode 100644 Documentation/hwmon/peci-dimmtemp.rst > create mode 100644 Documentation/peci/index.rst > create mode 100644 Documentation/peci/peci.rst > create mode 100644 drivers/hwmon/peci/Kconfig > create mode 100644 drivers/hwmon/peci/Makefile > create mode 100644 drivers/hwmon/peci/common.h > create mode 100644 drivers/hwmon/peci/cputemp.c > create mode 100644 drivers/hwmon/peci/dimmtemp.c > create mode 100644 drivers/peci/Kconfig > create mode 100644 drivers/peci/Makefile > create mode 100644 drivers/peci/controller/Kconfig > create mode 100644 drivers/peci/controller/Makefile > create mode 100644 drivers/peci/controller/peci-aspeed.c > create mode 100644 drivers/peci/core.c > create mode 100644 drivers/peci/cpu.c > create mode 100644 drivers/peci/device.c > create mode 100644 drivers/peci/internal.h > create mode 100644 drivers/peci/request.c > create mode 100644 drivers/peci/sysfs.c > create mode 100644 include/linux/peci-cpu.h > create mode 100644 include/linux/peci.h > > -- > 2.34.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48D3EC433F5 for ; Tue, 8 Feb 2022 23:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yYq1IhvGeZXoATDXSXDMNqULtqgH6j6DMcg0WiZV9wY=; b=mizT93EBSEoSXD c0H/rlBxrgtJ8r0pTWZTU7iMEzdGWEHohgX5u51yyJ3Hy3FGPDUdN18X9+7HINtjrwjVFtuU3xp+I ncwyj2tD9vvAC+KdAKegm8Gpb7rK2gDQHmB+5604aN3Rd8sC+ei9h+nknRnndYtqfTKfBOP/XNgAR KgVWbzH0nXLAdQg9VmY1sSQtXbu6zMyGWZaTRWG17Ys10AYqGQMeNW9KMloH7wU1unQCeXx4ZkdRg mM9TEdcR9Tq5hfsa9GD1x6nzyFQ3nJfYckoc6EFUOYXku9XCbJHAWlvKI4fGXxe8wI5nI+b25Svvw Yq3fEaIU6B+JUZFtCuxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHZdF-00FlzC-Gi; Tue, 08 Feb 2022 23:10:45 +0000 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHZdB-00FlyO-Qt for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 23:10:44 +0000 Received: by mail-qt1-x829.google.com with SMTP id t17so484079qto.1 for ; Tue, 08 Feb 2022 15:10:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H4AnW21UTOBpl9IT37GON9GbIZ1V0rMPgsXoaPMebDo=; b=QTbpsk9PRPSO+jL6VeAS/zIqycwhiMi8VI9kFSQ8mz+rJ0Sgl9r+2qTBwIX+W0FPku K3Xe6YfZUw+pzU6PXxC1A1Gc3oyQxKQR6x9VEwI3kmTBdD0AALVccl9qYTy6fd/50fyq 6ttWICxKb8l00IHv8Q8i9FfPBoKi4ItMhqFFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H4AnW21UTOBpl9IT37GON9GbIZ1V0rMPgsXoaPMebDo=; b=rfyUS0L6g1QdpqbqPVIwBi0hbMIeR418aJHOcm9ufjQFu50fa75tFdNb+SEe28Xx/e d5Di201pP3WV0krAwgYP9MosCFcYhCGGtyott5bK+589qEbIiNCA6W3sBJxqTKVWSzKB THODVZBAcDd4GlmeoCSm9C7jWa0ZYOVjuZOhlBjLrkk4EumIj1FwNI8yt/SoYeKBgQ9V e0L6upiwZoio6AdJr1lqGr7lNMd8uWgEK2CaPY73mIEPlmarNYf6+R2yRDUvlrd7ypx/ 2c98SrvaTtn012zKMrrxKo1EdsJ91rRGY4p+j0EWKME2JDY7Go4CUIy2G7xApkCD5vLz pf6w== X-Gm-Message-State: AOAM530nqcNmKHuSWPaUJSs1TAXfKP4iKm+rpoH5mW/5mxZQ1R0MVnE5 rVboV65nHH4AukgLrDJ6qWYORAe39a/h2zIRDHs= X-Google-Smtp-Source: ABdhPJxkCZok6w5MQZS9BOo+D+4Sd3aja5mP4w7wQ435bkoOoCphhvgl5XGJsyBlfcRdrsRN27hO+AY0/gaqcez1v4w= X-Received: by 2002:ac8:7c4c:: with SMTP id o12mr4613615qtv.475.1644361840346; Tue, 08 Feb 2022 15:10:40 -0800 (PST) MIME-Version: 1.0 References: <20220208153639.255278-1-iwona.winiarska@intel.com> In-Reply-To: <20220208153639.255278-1-iwona.winiarska@intel.com> From: Joel Stanley Date: Tue, 8 Feb 2022 23:10:28 +0000 Message-ID: Subject: Re: [PATCH v8 00/13] Introduce PECI subsystem To: Iwona Winiarska Cc: Linux Kernel Mailing List , OpenBMC Maillist , Greg Kroah-Hartman , devicetree , linux-aspeed , Linux ARM , linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Rob Herring , Andrew Jeffery , Jean Delvare , Guenter Roeck , Arnd Bergmann , Olof Johansson , Jonathan Corbet , Borislav Petkov , Pierre-Louis Bossart , Tony Luck , Andy Shevchenko , Dan Williams , Randy Dunlap , Zev Weiss , David Muller , Dave Hansen , Billy Tsai X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220208_151042_049789_CF6A3985 X-CRM114-Status: GOOD ( 41.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 8 Feb 2022 at 15:37, Iwona Winiarska wrote: > > Hi Greg, > > I applied the fixups to sysfs ABI docs, I would appreciate if PECI > could go through your tree into v5.18. Acked-by: Joel Stanley > > Here is the usual cover letter from the previous revision: > > The Platform Environment Control Interface (PECI) is a communication > interface between Intel processors and management controllers (e.g. > Baseboard Management Controller, BMC). > > This series adds a PECI subsystem and introduces drivers which run in > the Linux instance on the management controller (not the main Intel > processor) and is intended to be used by the OpenBMC [1], a Linux > distribution for BMC devices. > The information exposed over PECI (like processor and DIMM > temperature) refers to the Intel processor and can be consumed by > daemons running on the BMC to, for example, display the processor > temperature in its web interface. > > The PECI bus is collection of code that provides interface support > between PECI devices (that actually represent processors) and PECI > controllers (such as the "peci-aspeed" controller) that allow to > access physical PECI interface. PECI devices are bound to PECI > drivers that provides access to PECI services. This series introduces > a generic "peci-cpu" driver that exposes hardware monitoring "cputemp" > and "dimmtemp" using the auxiliary bus. > > Exposing "raw" PECI to userspace, either to write userspace drivers or > for debug/testing purpose was left out of this series to encourage > writing kernel drivers instead, but may be pursued in the future. > > Introducing PECI to upstream Linux was already attempted before [2]. > Since it's been over a year since last revision, and the series > changed quite a bit in the meantime, I've decided to start from v1. > > I would also like to give credit to everyone who helped me with > different aspects of preliminary review: > - Pierre-Louis Bossart, > - Tony Luck, > - Andy Shevchenko, > - Dave Hansen. > > [1] https://github.com/openbmc/openbmc > [2] https://lore.kernel.org/openbmc/20191211194624.2872-1-jae.hyun.yoo@linux.intel.com/ > > Changes v7 -> v8: > * Updated "KernelVersion" in sysfs ABI docs (Greg) > > Changes v6 -> v7: > * Fixed Kconfig warnings (lkp@intel.com) > > Changes v5 -> v6: > * Added missing COMMON_CLK selection (lkp@intel.com) > * Fixed WARN_ON always evaluated to true (lkp@intel.com) > * Clean interrupt status unconditionally (Joel) > * Replaced memcpy_toio()/memcpy_fromio() with writel()/readl() to > avoid issues when submitting unaligned PECI commands > > Changes v4 -> v5: > * Added clk_aspeed_peci to express controller programming using common > clock framework (Billy) > * Modified peci-aspeed DTS schema to match clock changes (Billy) > * Added workaround for peci-aspeed controller hang (Billy) > * Removed unnecessary "else after return" (Guenter) > > Changes v3 -> v4: > * Fixed an issue where peci doesn't work after host shutdown (Zev) > * Replaced kill_device() with peci_device_del_lock (Greg) > * Fixed dts_valid() parameter type (Guenter) > * Removed Jae from MAINTAINERS file (Jae) > > Changes v2 -> v3: > > * Dropped x86/cpu patches (Boris) > * Dropped pr_fmt() for PECI module (Dan) > * Fixed releasing peci controller device flow (Dan) > * Improved peci-aspeed commit-msg and Kconfig help (Dan) > * Fixed aspeed_peci_xfer() to use the proper spin_lock function (Dan) > * Wrapped print_hex_dump_bytes() in CONFIG_DYNAMIC_DEBUG (Dan) > * Removed debug status logs from aspeed_peci_irq_handler() (Dan) > * Renamed functions using devres to start with "devm" (Dan) > * Changed request to be allocated on stack in peci_detect (Dan) > * Removed redundant WARN_ON on invalid PECI addr (Dan) > * Changed peci_device_create() to use device_initialize() + device_add() pattern (Dan) > * Fixed peci_device_destroy() to use kill_device() avoiding double-free (Dan) > * Renamed functions that perform xfer using "peci_xfer_*" prefix (Dan) > * Renamed peci_request_data_dib(temp) -> peci_request_dib(temp)_read (Dan) > * Fixed thermal margin readings for older Intel processors (Zev) > * Misc hwmon simplifications (Guenter) > * Used BIT_PER_TYPE to verify macro value constrains (Guenter) > * Improved WARN_ON message to print chan_rank_max and idx_dimm_max (Guenter) > * Improved dimmtemp to not reattempt probe if no dimms are populated > > Changes v1 -> v2: > > Biggest changes when it comes to diffstat are locking in HWMON > (I decided to clean things up a bit while adding it), switching to > devres usage in more places and exposing sysfs interface in separate patch. > > * Moved extending X86 ARCHITECTURE MAINTAINERS earlier in series (Dan) > * Removed "default n" for GENERIC_LIB_X86 (Dan) > * Added vendor prefix for peci-aspeed specific properties (Rob) > * Refactored PECI to use devres consistently (Dan) > * Added missing sysfs documentation and excluded adding peci-sysfs to > separate patch (Dan) > * Used module_init() instead of subsys_init() for peci module initialization (Dan) > * Removed redundant struct peci_device member (Dan) > * Improved PECI Kconfig help (Randy/Dan) > * Fixed/removed log messages (Dan, Guenter) > * Refactored peci-cputemp and peci-dimmtemp and added missing locks (Guenter) > * Removed unused dev_set_drvdata() in peci-cputemp and peci-dimmtemp (Guenter) > * Fixed used types, names, fixed broken and added additional comments > to peci-hwmon (Guenter, Zev) > * Refactored peci-dimmtemp to not return -ETIMEDOUT (Guenter) > * Added sanity check for min_peci_revision in peci-hwmon drivers (Zev) > * Added assert for DIMM_NUMS_MAX and additional warning in peci-dimmtemp (Zev) > * Fixed macro names in peci-aspeed (Zev) > * Refactored peci-aspeed sanitizing properties to a single helper function (Zev) > * Fixed peci_cpu_device_ids definition for Broadwell Xeon D (David) > * Refactor peci_request to use a single allocation (Zev) > * Used min_t() to improve code readability (Zev) > * Added macro for PECI_RDENDPTCFG_MMIO_WR_LEN_BASE and fixed adev type > array name to more descriptive (Zev) > * Fixed peci-hwmon commit-msg and documentation (Zev) > > Thanks > -Iwona > > Iwona Winiarska (11): > dt-bindings: Add generic bindings for PECI > dt-bindings: Add bindings for peci-aspeed > ARM: dts: aspeed: Add PECI controller nodes > peci: Add core infrastructure > peci: Add device detection > peci: Add sysfs interface for PECI bus > peci: Add support for PECI device drivers > peci: Add peci-cpu driver > hwmon: peci: Add cputemp driver > hwmon: peci: Add dimmtemp driver > docs: Add PECI documentation > > Jae Hyun Yoo (2): > peci: Add peci-aspeed controller driver > docs: hwmon: Document PECI drivers > > Documentation/ABI/testing/sysfs-bus-peci | 16 + > .../devicetree/bindings/peci/peci-aspeed.yaml | 72 ++ > .../bindings/peci/peci-controller.yaml | 33 + > Documentation/hwmon/index.rst | 2 + > Documentation/hwmon/peci-cputemp.rst | 90 +++ > Documentation/hwmon/peci-dimmtemp.rst | 57 ++ > Documentation/index.rst | 1 + > Documentation/peci/index.rst | 16 + > Documentation/peci/peci.rst | 51 ++ > MAINTAINERS | 26 + > arch/arm/boot/dts/aspeed-g4.dtsi | 11 + > arch/arm/boot/dts/aspeed-g5.dtsi | 11 + > arch/arm/boot/dts/aspeed-g6.dtsi | 11 + > drivers/Kconfig | 3 + > drivers/Makefile | 1 + > drivers/hwmon/Kconfig | 2 + > drivers/hwmon/Makefile | 1 + > drivers/hwmon/peci/Kconfig | 31 + > drivers/hwmon/peci/Makefile | 7 + > drivers/hwmon/peci/common.h | 58 ++ > drivers/hwmon/peci/cputemp.c | 592 ++++++++++++++++ > drivers/hwmon/peci/dimmtemp.c | 630 ++++++++++++++++++ > drivers/peci/Kconfig | 36 + > drivers/peci/Makefile | 10 + > drivers/peci/controller/Kconfig | 18 + > drivers/peci/controller/Makefile | 3 + > drivers/peci/controller/peci-aspeed.c | 599 +++++++++++++++++ > drivers/peci/core.c | 236 +++++++ > drivers/peci/cpu.c | 343 ++++++++++ > drivers/peci/device.c | 252 +++++++ > drivers/peci/internal.h | 136 ++++ > drivers/peci/request.c | 482 ++++++++++++++ > drivers/peci/sysfs.c | 82 +++ > include/linux/peci-cpu.h | 40 ++ > include/linux/peci.h | 112 ++++ > 35 files changed, 4071 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-bus-peci > create mode 100644 Documentation/devicetree/bindings/peci/peci-aspeed.yaml > create mode 100644 Documentation/devicetree/bindings/peci/peci-controller.yaml > create mode 100644 Documentation/hwmon/peci-cputemp.rst > create mode 100644 Documentation/hwmon/peci-dimmtemp.rst > create mode 100644 Documentation/peci/index.rst > create mode 100644 Documentation/peci/peci.rst > create mode 100644 drivers/hwmon/peci/Kconfig > create mode 100644 drivers/hwmon/peci/Makefile > create mode 100644 drivers/hwmon/peci/common.h > create mode 100644 drivers/hwmon/peci/cputemp.c > create mode 100644 drivers/hwmon/peci/dimmtemp.c > create mode 100644 drivers/peci/Kconfig > create mode 100644 drivers/peci/Makefile > create mode 100644 drivers/peci/controller/Kconfig > create mode 100644 drivers/peci/controller/Makefile > create mode 100644 drivers/peci/controller/peci-aspeed.c > create mode 100644 drivers/peci/core.c > create mode 100644 drivers/peci/cpu.c > create mode 100644 drivers/peci/device.c > create mode 100644 drivers/peci/internal.h > create mode 100644 drivers/peci/request.c > create mode 100644 drivers/peci/sysfs.c > create mode 100644 include/linux/peci-cpu.h > create mode 100644 include/linux/peci.h > > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel