Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4238514ybg; Tue, 29 Oct 2019 04:18:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgMXpj5IVeM6V1Z1WO6os1iEf8B4LJ5NhSI+z+GX78HPZgEuCFRrXWj/RgQBbqpndAEWt0 X-Received: by 2002:aa7:da10:: with SMTP id r16mr1134379eds.304.1572347933802; Tue, 29 Oct 2019 04:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572347933; cv=none; d=google.com; s=arc-20160816; b=Sg/31PqxCbotMI5r87zimTRr6IRIQKXbTKWao7kHAbeCI26MvqzaTNeyw+kZ8pp4wl VRyJatWwOAc0wDSCDcyHSntUSqRMm/CJT1vSIiYLQ7Tv/DAcKrg8iwGBZqpMXbJXmXHB N68Pnjr0xT86i0kSoqqVdpjWsbX7j+If+VoKxugq42iSd6SS91rXbVj1n3lp2RVXw+HA u+oMM9ATEvcfMuOYhF1Pbd00ACU2r8wxMzem9p5F4j11lJMEQXT2qXRnSW3YmPjlSUR+ wOCGlRwIJ/rR5A/2UC5joK/yd1Osc6LDIzqi9Hxjskc2zlc87gQEdqBxRoECFIiElx55 pqMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=WSjPNv90mxoa4Qm6nfEtDVRJH8OLwkZxWcgMkuqr8yo=; b=KmCroE4x3DsAlA+Uvc5klP5do6hdujbu75/QkpxYUdewvn7vGv0ERbEZKI7XuZyijd Ixnt8JmSXlHr4GrCV/6mISdx3yEfIyE66IZkDCil75AEyqXXm9avG/xreZvcxxOXeoxr YzgGm/6ygqdArMZgZTqeO5ROxHVycRTE0ijJhQS8TK2f4F0Umt+35AW/klq03QJZAZrA oYRpxXvAF+M9pjI7xBr7neZdMQXQbZ+7Qt50LD5IORjH5k0Y2yPx0hvWg49Nqg6GIhHm yMnlVIuCG+JIhCr2kc9wIAZTSQahpKvG9yXtj3GuLhZJTQh67T0TJN/9Ca2ychoPsBp6 GJLw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 17si7471965ejt.419.2019.10.29.04.18.29; Tue, 29 Oct 2019 04:18:53 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728337AbfJ2KnF (ORCPT + 99 others); Tue, 29 Oct 2019 06:43:05 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:39711 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726689AbfJ2KnF (ORCPT ); Tue, 29 Oct 2019 06:43:05 -0400 Received: by mail-oi1-f194.google.com with SMTP id v138so8507207oif.6; Tue, 29 Oct 2019 03:43:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WSjPNv90mxoa4Qm6nfEtDVRJH8OLwkZxWcgMkuqr8yo=; b=bGxNvv0I7soLyaU5RO3amJ8UY4P89c8UoLbIQFC8q965tXolSK1ftj4zirr/CGRlA1 5MS6HF+1hByzBdb/Y3u99ivirCq+WerZVFPSbV7YX0YFzXVbAyGIhUbTuJvzX8vD2pJn Q68h8y6hLKU2TLp9tDbc++GyNOS9xbtxsjqSswA/bKYLjm1HNgPvZqHJbqD0ye1fRV45 MWViArvUau9meYlU+AUAWlbHQeVT8xLGvE3D7FuMLDXpCmIpotcta3l0Vm3u0ZWi00k3 ihq3gc0uys5yl+gckypOnvF26QKTuqL6rnYWqroJNNKkBL88jXtqwa25nexyecyGuq3W Kgbg== X-Gm-Message-State: APjAAAVBV/xCMJ738VF2TNJ75iauPibhbPUHLJ5/0zqI4VezmGHJJoMt fsSiMfmsiZ1wR/rvhLbcw674JhKZdtAdC1f9DDg= X-Received: by 2002:aca:d4c6:: with SMTP id l189mr3312579oig.68.1572345784471; Tue, 29 Oct 2019 03:43:04 -0700 (PDT) MIME-Version: 1.0 References: <187a1a7d-80bd-a0e9-a0d9-7fc53bff8907@linux.intel.com> <20191022125950.GA133170@google.com> In-Reply-To: <20191022125950.GA133170@google.com> From: "Rafael J. Wysocki" Date: Tue, 29 Oct 2019 11:42:53 +0100 Message-ID: Subject: Re: [PATCH v4 3/3] pci: intel: Add sysfs attributes to configure pcie link To: Bjorn Helgaas Cc: Dilip Kota , Andrew Murray , Jingoo Han , gustavo.pimentel@synopsys.com, Lorenzo Pieralisi , Rob Herring , martin.blumenstingl@googlemail.com, Linux PCI , Christoph Hellwig , "devicetree@vger.kernel.org" , Linux Kernel Mailing List , "Shevchenko, Andriy" , cheol.yong.kim@intel.com, chuanhua.lei@linux.intel.com, qi-ming.wu@intel.com, "Rafael J. Wysocki" , Linux PM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 22, 2019 at 2:59 PM Bjorn Helgaas wrote: > > [+cc Rafael, linux-pm, beginning of discussion at > https://lore.kernel.org/r/d8574605f8e70f41ce1e88ccfb56b63c8f85e4df.1571638827.git.eswara.kota@linux.intel.com] > > On Tue, Oct 22, 2019 at 05:27:38PM +0800, Dilip Kota wrote: > > On 10/22/2019 1:18 AM, Bjorn Helgaas wrote: > > > On Mon, Oct 21, 2019 at 02:38:50PM +0100, Andrew Murray wrote: > > > > On Mon, Oct 21, 2019 at 02:39:20PM +0800, Dilip Kota wrote: > > > > > PCIe RC driver on Intel Gateway SoCs have a requirement > > > > > of changing link width and speed on the fly. > > > Please add more details about why this is needed. Since you're adding > > > sysfs files, it sounds like it's not actually the *driver* that needs > > > this; it's something in userspace? > > > We have use cases to change the link speed and width on the fly. > > One is EMI check and other is power saving. Some battery backed > > applications have to switch PCIe link from higher GEN to GEN1 and > > width to x1. During the cases like external power supply got > > disconnected or broken. Once external power supply is connected then > > switch PCIe link to higher GEN and width. > > That sounds plausible, but of course nothing there is specific to the > Intel Gateway, so we should implement this generically so it would > work on all hardware. > > I'm not sure what the interface should look like -- should it be a > low-level interface as you propose where userspace would have to > identify each link of interest, or is there some system-wide > power/performance knob that could tune all links? Cc'd Rafael and > linux-pm in case they have ideas. Frankly, I need some time to think about this and, in case you are wondering about whether or not it has been discussed with me already, it hasn't. At this point I can only say that since we have an ASPM interface, which IMO is not fantastic, it may be good to come up with a common link management interface. Cheers!