Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp426951pxv; Thu, 1 Jul 2021 01:03:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVrrF1JGJ3pGLYS6fLa7HUWxRmqIm4IVHe+GLSwXGDCQsDPAjYmn0apicxFR7biXbzR/hP X-Received: by 2002:a17:906:b190:: with SMTP id w16mr40372376ejy.332.1625126615870; Thu, 01 Jul 2021 01:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625126615; cv=none; d=google.com; s=arc-20160816; b=HsFiaN+aKEJpGzdAwD9/uygeP4MIgv2DJoa8JJEh1b3/1nXsn3xKdnQ1X+hbXD5y+9 uYdzcRhAb2kItMbXG2QDBMz0vZ+w7NHvy/socZg43/kBKfgaLkxXTdCdFy6IT6rolpJG TBmQu9Mv/lcJD+ngFcY/YQ088uFqJh6pVMX8w04m5iXe5SObFhlI/jDooN2tXSQ+2NTn Z/uwbfaNM+YZ+5I3P7gy62r8jRxOqpZrG1Gd7FMStXXfIo7Caxl9Yto2dQFWJmx0lCYv 7Y27PuXn/z8mRXu5f+JReOwfeeythl0pXdQ7yhULq2kqbbXGz/Wopvl8/ScREVOnckpC fIGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Fz/86DzHx2caSczaCAFAcEmUnVZhhFJTlUHOBihelxo=; b=naiZTqu2LE87R0K4wmCncGdBOn8EGVJWjtupXGeU04X8ZvJ3PskiTS7myOWOhqslsl L2h3jx15m9nbKzxJ/p2XMit9yrpoiqSdfbbjbz94kN9lxUd3b8xev+Xiboy4kI4ddvE8 i26QinIoEPHY7imYrkOOh6iA7EyVSns0dE3I4XcWCSeyZyF0H2hVFEInODRf+VAy4248 AQFrCWBPVFkTmeh5rvsz3KnrUen+5xp0E9cbAB94CQTNAehAioxHgnviIpHvMvPdVt3g LEooySQxQ7RUctiJH0cwrAu0r2T0W2KU8OU51eaAeQ8AxjBKfIVFFI9CsKiYlFK+AI/y UxtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CCHDTcc1; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si15699901edc.251.2021.07.01.01.03.11; Thu, 01 Jul 2021 01:03:35 -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=@linaro.org header.s=google header.b=CCHDTcc1; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235011AbhGAIEH (ORCPT + 99 others); Thu, 1 Jul 2021 04:04:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234958AbhGAIEG (ORCPT ); Thu, 1 Jul 2021 04:04:06 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF323C0617AD for ; Thu, 1 Jul 2021 01:01:36 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id a13so6919257wrf.10 for ; Thu, 01 Jul 2021 01:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Fz/86DzHx2caSczaCAFAcEmUnVZhhFJTlUHOBihelxo=; b=CCHDTcc1FiVwvRP6+RDbYv65TuXyYBxQvX26iNkNLoVFa4FqpA0kr8D6B1p2l2iBtG jrDWjmlWkyp5xVYloVHjEdpM+pMmfdyiuOTRZwa6G3syKddHeyo8+C8weuS8nItEKgwF 82oegQw1bNV8XsWQxbeLviKZshzOiEOTDBj4lHAZ3Sm4o7YqxwbfNrKTtSfOcWRypvzR xyV/o6Odzf8QcJwc5qADbYd2WcWXPilugkmME4LEmgYQJYxywMQWnzHl9H5Jk53NRfp0 hjTMajZ1lIcJKPgF+alAbzVPxmyVasXnTrnewGzsPblR1Er3sJyd/jDyr1Ne1DbsBI/e ZvFQ== 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=Fz/86DzHx2caSczaCAFAcEmUnVZhhFJTlUHOBihelxo=; b=HJ/7o5ornplMZySEWq9YhoYjkSBC1Ak/dhvH3gGccNnutwADk1huoWUme5VHceIje8 sleRIrWiV7H+pFmxagm/TYqTbkKSlbO3+ndtKNCQe/SgDHmjUT/7PMtJ68VvlLJgSWgk HJ34x3XR2YQCSLvQWaePSJBIMfbxkWwwYjluvzwPv/t8tusgSOYJEfQiUhZ1HbToRF3O Gyoe7PERRxaJMEWCU3R0Dm4zvc7MfDQASDR45rucR1aPTUq6pdleo1/x32UFGgu/xQla 6lwBzDoNuX+UDP83Htt7T0XuxlracmYJ0TVDOP/YrTsebUksjNRFsHt5/aHTwKE44yND 5g0Q== X-Gm-Message-State: AOAM530dLukLafb8b3brSOciQCAdcAihkrOPhNgU3ADRZG748NX0v+ec nedG83WD6Az4HzXKTrDCLMNAzQ== X-Received: by 2002:a5d:65cc:: with SMTP id e12mr43465985wrw.354.1625126495150; Thu, 01 Jul 2021 01:01:35 -0700 (PDT) Received: from dell ([109.180.115.217]) by smtp.gmail.com with ESMTPSA id h9sm22582904wmb.35.2021.07.01.01.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 01:01:34 -0700 (PDT) Date: Thu, 1 Jul 2021 09:01:33 +0100 From: Lee Jones To: "David E. Box" Cc: hdegoede@redhat.com, mgross@linux.intel.com, bhelgaas@google.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pci@vger.kernel.org, Andy Shevchenko Subject: Re: [PATCH 2/4] MFD: intel_pmt: Remove OOBMSM device Message-ID: References: <20210617215408.1412409-1-david.e.box@linux.intel.com> <20210617215408.1412409-3-david.e.box@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 30 Jun 2021, David E. Box wrote: > On Wed, 2021-06-30 at 11:15 +0100, Lee Jones wrote: > > On Thu, 17 Jun 2021, David E. Box wrote: > > > > > Unlike the other devices in intel_pmt, the Out of Band Management > > > Services > > > Module (OOBMSM) is actually not a PMT dedicated device. It can also > > > be used > > > to describe non-PMT capabilities. Like PMT, these capabilities are > > > also > > > enumerated using PCIe Vendor Specific registers in config space. In > > > order > > > to better support these devices without the confusion of a > > > dependency on > > > MFD_INTEL_PMT, remove the OOBMSM device from intel_pmt so that it > > > can be > > > later placed in its own driver. Since much of the same code will be > > > used by > > > intel_pmt and the new driver, create a new file with symbols to be > > > used by > > > both. > > > > > > While performing this split we need to also handle the creation of > > > platform > > > devices for the non-PMT capabilities. Currently PMT devices are > > > named by > > > their capability (e.g. pmt_telemetry). Instead, generically name > > > them by > > > their capability ID (e.g. intel_extnd_cap_2). This allows the IDs > > > to be > > > created automatically.  However, to ensure that unsupported devices > > > aren't > > > created, use an allow list to specify supported capabilities. > > > > > > Signed-off-by: David E. Box > > > --- > > >  MAINTAINERS                                |   1 + > > >  drivers/mfd/Kconfig                        |   4 + > > >  drivers/mfd/Makefile                       |   1 + > > >  drivers/mfd/intel_extended_caps.c          | 208 > > > +++++++++++++++++++++ > > > > Please consider moving this out to either > > drivers/pci or drivers/platform/x86. > > None of the cell drivers are in MFD, only the PCI drivers from which > the cells are created. I understood that these should be in MFD. But > moving it to drivers/platform/x86 would be fine with me. That keeps the > code together in the same subsystem. Comment from Hans or Andy? You don't need to move everything there. If a driver uses the MFD API (like intel_pmt.c does), it can stay. But all of this PCI/hardware/ platform specific capability craziness has no place here AFAICT. > > I suggest Andy should also be on Cc. > > > > >  drivers/mfd/intel_extended_caps.h          |  40 ++++ > > >  drivers/mfd/intel_pmt.c                    | 198 ++--------------- > > > --- > > >  drivers/platform/x86/intel_pmt_crashlog.c  |   2 +- > > >  drivers/platform/x86/intel_pmt_telemetry.c |   2 +- > > >  8 files changed, 270 insertions(+), 186 deletions(-) > > >  create mode 100644 drivers/mfd/intel_extended_caps.c > > >  create mode 100644 drivers/mfd/intel_extended_caps.h > > > > -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog