Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp35143pxv; Wed, 30 Jun 2021 14:14:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXNzeKdOn/afnL+nSrFE5l5pw2TzJ35SbizSikAuIURX/P+BDFH55g63fvFGarrNIfVRHA X-Received: by 2002:a5d:934d:: with SMTP id i13mr9413213ioo.164.1625087674895; Wed, 30 Jun 2021 14:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625087674; cv=none; d=google.com; s=arc-20160816; b=K5Y2vXSPigZkNu484v+Uy3p9UW+Zjmb9GrGitwbAeiwZ4RT8OM8ueyyhY3GsmdxzgQ +VbKtEO0GZC9IoLWzP6+eNstFbHvF2QZF1YOs330cAoROW6NtjzoaQFJHMN/DdGsAjDo 8cZZbOAt89uoKqyYEzUgIXp+EEiQg4vuTpGurpT27je+oUJEeG3fUEF5SwTQuREN2F+k cLHUk2KfJgNQlMB68uiECE3AZx41A1qMrpFgchwO6tGzfzaXpk5CvtitU6TIBhPlpAH3 odtvuX+ecemPlWt9gDiOccS54rcY9JBBWRj3PS6iP+hO+B1uxHtZhzwA5bms34u5hEpw aooA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:reply-to :from:subject:message-id; bh=GWCCfEqSJaOIozjq5S7tMM/npdbn7XYJvSyi+bGqBjc=; b=0yktU83i1Y6Wi9TSqtFH5WAHQEUoYv6W2UrZb8OaIudN+z+I4ngeMlJDfYMsPpzAFQ LHugiDjnHKqBdxAtwRhJnw6ozKbjukAcWoRYi/WGKKpREC9OGNerADp77+BTRMbi6puM v9n9tHWA/NtzAE05iN6s8GxeQY2QZr9xHmUcxr+V/ozwRsMLWzi27VTvNvNNSpCO0ynL MsAj4+byE0JsVlxBYqnVkG503cRmR772yychGZcqSN9iz8C0V5NaSdICmyXuxyt5ZzeC stsJKPk8eVRVDPAua8DBlbNBkwXwZPIibrDa0yQX/jWLkhSqYTcLra4yXc0ylPS4E3gi m7kA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si25884250jap.83.2021.06.30.14.14.22; Wed, 30 Jun 2021 14:14:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235548AbhF3VOX (ORCPT + 99 others); Wed, 30 Jun 2021 17:14:23 -0400 Received: from mga18.intel.com ([134.134.136.126]:4366 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235470AbhF3VOI (ORCPT ); Wed, 30 Jun 2021 17:14:08 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10031"; a="195720895" X-IronPort-AV: E=Sophos;i="5.83,312,1616482800"; d="scan'208";a="195720895" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2021 14:11:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,312,1616482800"; d="scan'208";a="447630144" Received: from linux.intel.com ([10.54.29.200]) by orsmga007.jf.intel.com with ESMTP; 30 Jun 2021 14:11:39 -0700 Received: from debox1-desk1.jf.intel.com (debox1-desk1.jf.intel.com [10.54.75.174]) by linux.intel.com (Postfix) with ESMTP id EE3C4580279; Wed, 30 Jun 2021 14:11:38 -0700 (PDT) Message-ID: Subject: Re: [PATCH 2/4] MFD: intel_pmt: Remove OOBMSM device From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: Lee Jones 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 Date: Wed, 30 Jun 2021 14:11:38 -0700 In-Reply-To: References: <20210617215408.1412409-1-david.e.box@linux.intel.com> <20210617215408.1412409-3-david.e.box@linux.intel.com> Organization: David E. Box Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > 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 >