Received: by 10.223.185.116 with SMTP id b49csp4878338wrg; Wed, 7 Mar 2018 02:35:33 -0800 (PST) X-Google-Smtp-Source: AG47ELskcmH8P9yqzsE6mtUMNhosSiLWdOKLMMAp+1pFM2ScL7wuQsFkcuHDMhL+vujfF6/0YsAS X-Received: by 2002:a17:902:2b84:: with SMTP id l4-v6mr20028849plb.338.1520418933341; Wed, 07 Mar 2018 02:35:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520418933; cv=none; d=google.com; s=arc-20160816; b=VQPNR0VL981YOyG3szGrlv3W1Ff1I3EykrifFeV/15q6YrTL3FJkij3rao2Mhly/oV WvwZKaiIRYfOYfyV1TpV95AuvEbEAaFO54kS37JrVxeFoDEcBvtAju2cX+0uTOx1fbVP 3d91Bu5PptoYvFHEoODpyFg4Wj4huZaIhtUVcRD8GEtnBs2NJjL9ALYegVSFOLogTtj4 6g/OPYYqwpwxEYR4oUrecnUoXINUI3R2WVl7gQI96SelmL7Mu6e/np1i09AjjrmpSvee WC4+tkrrrJWYTGXj4a7pHBnj0v3o9V7zigM55jZkp8nk+qqhVSOjpN9EPP79wImg+EHU 0hsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=9oc9iN1o/P8PW+Q6jmNk+yZsBiTr4JSdZtgmYS3icqw=; b=v6yI9RtbS2Od+40eRx5lPTI+5QfoeF8CRXBXMXvmPaDnp/kuHDHMtEzK4Wj3vMlVbx +Qn9KUEgyNzDIUp4hwOsf4E+RJso7O15yCqEk/hfqlzpWFgLiczJpBX0SHmCpD5U5WcR wBf1S794lXsWLrOmhWqV9yyjzBAtLaIMgLr1PYOodEzo13VuvWCGEkrj4fBSpPFduoVY PHhZ9Xk2eAWA87JXZpHLHLwaoDx6Qe+Yhbp83hQ8DdCNFU6XGjI6jt6DuxaLoswxAQ4v sPs4FcxuOcQ6a4BcqcqZS4WiL4v/51Wq9KiR0vUC6aofA0VQNO+R7tm7z/Q8HGzTkeJm 2GOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si11035959pga.394.2018.03.07.02.35.18; Wed, 07 Mar 2018 02:35:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754291AbeCGKdr (ORCPT + 99 others); Wed, 7 Mar 2018 05:33:47 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:56472 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbeCGKdo (ORCPT ); Wed, 7 Mar 2018 05:33:44 -0500 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id cc55fdadfd70b35d; Wed, 7 Mar 2018 11:33:42 +0100 From: "Rafael J. Wysocki" To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Keith Busch , Sinan Kaya , Lukas Wunner Subject: Re: [PATCH v1 6/9] PCI/portdrv: Remove unused PCIE_PORT_SERVICE_VC Date: Wed, 07 Mar 2018 11:34:26 +0100 Message-ID: <3478220.q9pgEXZY9y@aspire.rjw.lan> In-Reply-To: <152040323671.240786.17190514268346362843.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152040297576.240786.1532465558381209070.stgit@bhelgaas-glaptop.roam.corp.google.com> <152040323671.240786.17190514268346362843.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, March 7, 2018 7:13:56 AM CET Bjorn Helgaas wrote: > From: Bjorn Helgaas > > No driver registers for PCIE_PORT_SERVICE_VC, so remove it. > > This removes the VC "service" files from /sys/bus/pci_express/devices, > e.g., 0000:07:00.0:pcie108, 0000:08:04.0:pcie208 (all the files that > contained "8" as the last digit of the "pcieXXX" part). The port driver > created these files for PCIe port devices that have a VC Capability. > > Since this reduces PCIE_PORT_DEVICE_MAXSERVICES and moves DPC down into the > spot where VC used to be, the DPC sysfs files will now be named "pcieXX8". > I don't think there's anything useful userspace can do with those files, so > I hope nobody cares about these filenames. > > There is no VC driver that calls pcie_port_service_register(), so there > never was a /sys/bus/pci_express/drivers/vc directory. > > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/pcie/portdrv.h | 2 +- > drivers/pci/pcie/portdrv_acpi.c | 2 +- > drivers/pci/pcie/portdrv_core.c | 14 ++++---------- > include/linux/pcieport_if.h | 4 +--- > 4 files changed, 7 insertions(+), 15 deletions(-) > > diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h > index a4fc44d52206..749d200936d9 100644 > --- a/drivers/pci/pcie/portdrv.h > +++ b/drivers/pci/pcie/portdrv.h > @@ -12,7 +12,7 @@ > > #include > > -#define PCIE_PORT_DEVICE_MAXSERVICES 5 > +#define PCIE_PORT_DEVICE_MAXSERVICES 4 > /* > * The PCIe Capability Interrupt Message Number (PCIe r3.1, sec 7.8.2) must > * be one of the first 32 MSI-X entries. Per PCI r3.0, sec 6.8.3.1, MSI > diff --git a/drivers/pci/pcie/portdrv_acpi.c b/drivers/pci/pcie/portdrv_acpi.c > index 319c94976873..4a1b50867c98 100644 > --- a/drivers/pci/pcie/portdrv_acpi.c > +++ b/drivers/pci/pcie/portdrv_acpi.c > @@ -48,7 +48,7 @@ void pcie_port_acpi_setup(struct pci_dev *port, int *srv_mask) > > flags = root->osc_control_set; > > - *srv_mask = PCIE_PORT_SERVICE_VC | PCIE_PORT_SERVICE_DPC; > + *srv_mask = PCIE_PORT_SERVICE_DPC; > if (flags & OSC_PCI_EXPRESS_NATIVE_HP_CONTROL) > *srv_mask |= PCIE_PORT_SERVICE_HP; > if (flags & OSC_PCI_EXPRESS_PME_CONTROL) > diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c > index 9db77c683732..94ce4dc50d1a 100644 > --- a/drivers/pci/pcie/portdrv_core.c > +++ b/drivers/pci/pcie/portdrv_core.c > @@ -189,10 +189,8 @@ static int pcie_init_service_irqs(struct pci_dev *dev, int *irqs, int mask) > if (ret < 0) > return -ENODEV; > > - for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) { > - if (i != PCIE_PORT_SERVICE_VC_SHIFT) > - irqs[i] = pci_irq_vector(dev, 0); > - } > + for (i = 0; i < PCIE_PORT_DEVICE_MAXSERVICES; i++) > + irqs[i] = pci_irq_vector(dev, 0); > > return 0; > } > @@ -212,8 +210,7 @@ static int get_port_device_capability(struct pci_dev *dev) > int services = 0; > int cap_mask = 0; > > - cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP > - | PCIE_PORT_SERVICE_VC; > + cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP; > if (pci_aer_available()) > cap_mask |= PCIE_PORT_SERVICE_AER | PCIE_PORT_SERVICE_DPC; > > @@ -240,9 +237,6 @@ static int get_port_device_capability(struct pci_dev *dev) > */ > pci_disable_pcie_error_reporting(dev); > } > - /* VC support */ > - if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_VC)) > - services |= PCIE_PORT_SERVICE_VC; > /* Root ports are capable of generating PME too */ > if ((cap_mask & PCIE_PORT_SERVICE_PME) > && pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT) { > @@ -332,7 +326,7 @@ int pcie_port_device_register(struct pci_dev *dev) > */ > status = pcie_init_service_irqs(dev, irqs, capabilities); > if (status) { > - capabilities &= PCIE_PORT_SERVICE_VC | PCIE_PORT_SERVICE_HP; > + capabilities &= PCIE_PORT_SERVICE_HP; > if (!capabilities) > goto error_disable; > } > diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h > index b69769dbf659..28eb21731db6 100644 > --- a/include/linux/pcieport_if.h > +++ b/include/linux/pcieport_if.h > @@ -20,9 +20,7 @@ > #define PCIE_PORT_SERVICE_AER (1 << PCIE_PORT_SERVICE_AER_SHIFT) > #define PCIE_PORT_SERVICE_HP_SHIFT 2 /* Native Hotplug */ > #define PCIE_PORT_SERVICE_HP (1 << PCIE_PORT_SERVICE_HP_SHIFT) > -#define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */ > -#define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT) > -#define PCIE_PORT_SERVICE_DPC_SHIFT 4 /* Downstream Port Containment */ > +#define PCIE_PORT_SERVICE_DPC_SHIFT 3 /* Downstream Port Containment */ > #define PCIE_PORT_SERVICE_DPC (1 << PCIE_PORT_SERVICE_DPC_SHIFT) > > struct pcie_device { > > Reviewed-by: Rafael J. Wysocki