From patchwork Tue Aug 24 12:20:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 12454915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4E21C4320A for ; Tue, 24 Aug 2021 12:21:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A44F061360 for ; Tue, 24 Aug 2021 12:21:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237149AbhHXMVr (ORCPT ); Tue, 24 Aug 2021 08:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237036AbhHXMVr (ORCPT ); Tue, 24 Aug 2021 08:21:47 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B35EC061757; Tue, 24 Aug 2021 05:21:03 -0700 (PDT) Received: from cap.home.8bytes.org (p4ff2b1ea.dip0.t-ipconnect.de [79.242.177.234]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by theia.8bytes.org (Postfix) with ESMTPSA id 49C16ED; Tue, 24 Aug 2021 14:20:59 +0200 (CEST) From: Joerg Roedel To: Bjorn Helgaas , "Rafael J . Wysocki" , Len Brown Cc: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, joro@8bytes.org, jroedel@suse.de Subject: [PATCH v3 0/4] PCI/ACPI: Simplify PCIe _OSC feature negotiation Date: Tue, 24 Aug 2021 14:20:50 +0200 Message-Id: <20210824122054.29481-1-joro@8bytes.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Joerg Roedel Hi, here is the third version of my patches to simplify the _OSC negotiation of PCIe features between Linux and the firmware. This version is a complete rewrite, so there is no changelog to the previous version. Patches 1-3 are cleanups and small restructurings of the code as a preparation for patch 4. The last patch gets rid of the dedicated _OSC query to check for _OSC support and merges that functionality into acpi_pci_osc_control_set(). This allows to simplify and/or remove other functions and consilidate error handling in negotiate_os_control(). I have tested the patches with and without 'pcie_ports=compat' and found no regressions on my test machine. Please review. Thanks, Joerg Joerg Roedel (4): PCI/ACPI: Remove OSC_PCI_SUPPORT_MASKS and OSC_PCI_CONTROL_MASKS PCI/ACPI: Move supported and control calculations to separaten functions PCI/ACPI: Move _OSC query checks to separate function PCI/ACPI: Check for _OSC support in acpi_pci_osc_control_set() drivers/acpi/pci_root.c | 161 +++++++++++++++++++++------------------- include/linux/acpi.h | 2 - 2 files changed, 84 insertions(+), 79 deletions(-)