From patchwork Fri Sep 6 17:14:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2854591 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AB1059F494 for ; Fri, 6 Sep 2013 17:14:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 51CAA202C0 for ; Fri, 6 Sep 2013 17:14:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A34A202E8 for ; Fri, 6 Sep 2013 17:14:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752901Ab3IFROs (ORCPT ); Fri, 6 Sep 2013 13:14:48 -0400 Received: from mail-yh0-f52.google.com ([209.85.213.52]:57658 "EHLO mail-yh0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754138Ab3IFROr (ORCPT ); Fri, 6 Sep 2013 13:14:47 -0400 Received: by mail-yh0-f52.google.com with SMTP id v1so1294455yhn.39 for ; Fri, 06 Sep 2013 10:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=ErEGLvchUhAVRCf5m00avJCO62yGIHD9V61nva3Igyc=; b=AoF3MAEF0TDwZwKWoFgMlQnJFAQ9vp2W7tpLK+St4gEKYA2XpdaJ0INcaj13d8whWZ YjRhw3sFZeVwUk/MrRHKacdNrd94iNJUSiyAqBrgZXbB44Ao8Ap5StYppytdTcxPkWAL rvvgAT34GyBpY4bb1mwNuVho2r6TbCDy9x15uN/5SOl6ac9Ib6LB6IzsaJtUaMK0vVw7 7VkuWQuhtVO8UtUQZXsaaul+kCo1JO/FUN1OKEesQmHiYWjQbN8KK1BwwxAjjqyNrNNw np68wm0pDbow1ch8aQxqlgn0lkVGb2NlTkphSyVK9vV2BalRZQdnjL5JPJ4BKHzAOWQF a4eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=ErEGLvchUhAVRCf5m00avJCO62yGIHD9V61nva3Igyc=; b=GKveycNCFbOtXz5GrezTYQ36DKi+os1qzh4IPRn7cGKL+fIJqdjYq7rmrGq7YlIW8o 3kD8NObs+PWekmcPKJywgtBZSy39kblyWPR3LVIhXucfbpnAMqWQKnSBlTUmLFi8RJeF 0wxnuDUxBlOyoqzCF0Ar647kmYNkrPYHghYuT9vzzzjWIKIBhzrKUcYq80Sy2gMpcm+g u2fKrkOuPGaUa/ZGp4IAVQfoWk2Zfu5/8ZA9rIzyStD2M/SnkzShKntRZ6ZTotnnUNxM NM9bzANZuod5icbVfEB0DAyN2uAry/ZmFDd9dt1SiwRg3qs86y7Hf13QgA7+W/IWFIu0 VqWA== X-Gm-Message-State: ALoCoQnKADd7HWHGK6U0+u0XdF5TXLj6xN6zFEy0EAK0rhGMzSBjAJfZM318mu4LYJRCB1VIMHebBnNOKkk3ZsARuVctjBhwgf67vPNPbp5jWSX0BbDkR9LjhQ6lYi7N/bEthwOjtiQz2t0v1yC1058UhQNy4kjM2eTORM/vUCwqRfpbGXIARCEIkbNMRrOWqGvB2laFPmzw+quGGQ+gAozZRAHMhWHWN0CVBL9em2IZRDvrUY8wRMk= X-Received: by 10.236.57.5 with SMTP id n5mr34845yhc.136.1378487686669; Fri, 06 Sep 2013 10:14:46 -0700 (PDT) Received: from localhost ([172.16.53.165]) by mx.google.com with ESMTPSA id g25sm4089817yhg.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 06 Sep 2013 10:14:46 -0700 (PDT) Subject: [PATCH 10/14] PCI/ACPI: Run _OSC only once for OSPM feature support To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Len Brown Date: Fri, 06 Sep 2013 11:14:44 -0600 Message-ID: <20130906171444.11482.59374.stgit@bhelgaas-glaptop> In-Reply-To: <20130906171010.11482.34235.stgit@bhelgaas-glaptop> References: <20130906171010.11482.34235.stgit@bhelgaas-glaptop> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Previously, we ran _OSC once to tell the platform that we support PCI Segment Groups, then we ran it again if we supported any additional features (ASPM, MSI, or extended config space). I don't think it's necessary to run it twice, since we can easily build the complete mask of features we support before running _OSC the first time. We run _OSC again later when requesting control of PCIe features; that's unaffected by this change. Signed-off-by: Bjorn Helgaas --- drivers/acpi/pci_root.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 3e06d4e..0e20041 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -373,23 +373,18 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, * PCI domains, so we indicate this in _OSC support capabilities. */ support = base_support = OSC_PCI_SEGMENT_GROUPS_SUPPORT; - acpi_pci_osc_support(root, support); - if (pci_ext_cfg_avail()) support |= OSC_PCI_EXT_CONFIG_SUPPORT; - if (pcie_aspm_support_enabled()) { + if (pcie_aspm_support_enabled()) support |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT; - } if (pci_msi_enabled()) support |= OSC_PCI_MSI_SUPPORT; - if (support != base_support) { - status = acpi_pci_osc_support(root, support); - if (ACPI_FAILURE(status)) { - dev_info(&device->dev, "ACPI _OSC support " - "notification failed, disabling PCIe ASPM\n"); - *no_aspm = 1; - support = base_support; - } + status = acpi_pci_osc_support(root, support); + if (ACPI_FAILURE(status)) { + dev_info(&device->dev, "ACPI _OSC support " + "notification failed, disabling PCIe ASPM\n"); + *no_aspm = 1; + support = base_support; } if (!pcie_ports_disabled