Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3765904pxm; Tue, 1 Mar 2022 05:11:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzo7cFbur5xohoJW9fpmUhdT04AdNuHDCM555sspLC/7tB9c/3N76WXxXWD7dLE8t6GFoGk X-Received: by 2002:a17:906:a2d2:b0:6d6:e5c5:9ca1 with SMTP id by18-20020a170906a2d200b006d6e5c59ca1mr1973521ejb.33.1646140284867; Tue, 01 Mar 2022 05:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646140284; cv=none; d=google.com; s=arc-20160816; b=PM4se9tnsiS+mY7Xho1vTaPJjs9oIZUAy+KEHqkUNskALVUXd3+bPuwtcnkL4/S6uJ dGdkF8xo+FfmVC8w5oc7/wDJ0o2mwkoRegV8BdW6zusVqyoXoL9CN7IdbGgZH7WNcjqk SvKxMPdka0QBGoVohc3mCumIVY3oJssXdb8gPvx3melh/hrSsBV/ab198+HC1CMqEWm2 jfhFsONmNmFoemb2N0iGdv4po+BxbcfC1H7RlsPE9w7L/SDd78Y1lz84rAVguoowm9rD w+j5M7ud6bDwfs6ycMm+JIB0pxZNA9+BlW4Bz2CfdPxuBEJVSr2U6wcR8+APz7xYJg8O 68rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZKFMzW+Kv859HQuOCSrtHRjHr81yrDge18ehzpKSGjE=; b=weUcuJiduP9zyQmqFEFeVc0NQzqQLGthRnxK3XTKZZtbqnYCRyNecrGVDX0kQm3X9e wvuzLsUeG4gLCu8Icd7K1cXts4NNydOEP6c8YA8Cv7V1IaWl4Og/pZKCkAO4X7aJWQnF f98vM83RZOStbAfNpzmuxyXg7NXNd+/m0l4R2+vrQXMB7h7MPUcYpfk8A2xfAE4Mxe0b u5iCCyg8V3T4XyPO9hKaoR4b4WsdEhPfnpU8LCtsmfnuqbgGZdeTN8Nvrwp0vkymQ36k uYHDHmFOHY77SqOVsUMM5bQ/JAaPOrUbwVdz3OHuqMuGSXRU5v7u6N9jPfW1JAcbRxDH XyGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Wc1YJkdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a056402358600b004138bb9e211si7939166edc.22.2022.03.01.05.11.00; Tue, 01 Mar 2022 05:11:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Wc1YJkdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232034AbiCAIOh (ORCPT + 99 others); Tue, 1 Mar 2022 03:14:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiCAIOf (ORCPT ); Tue, 1 Mar 2022 03:14:35 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDA2345785; Tue, 1 Mar 2022 00:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZKFMzW+Kv859HQuOCSrtHRjHr81yrDge18ehzpKSGjE=; b=Wc1YJkdbx0+7ppx32Pf7erlmtn 84YNscLIGC1EB1Aj+TAWGXCyTQh3AtwRW8Ccr3lALMMmjEwZ4+5Ommu6/VVnOhDUoqNMmy4NzhNvG oCaWkGg8nz+rpkWbXZvof1bcNrDpSJGcD8ASv+qgYH2wAMXvNWTSXD0Pr2V79k9k3bxznmrjHK5XZ REiKcBAw1B5kAlLs5CheLYJUcabGItx20jaPlMW7X0g+BD0Qjzh+uKeiyJpBMEXGym4A1QeyUd8vV ADUui96TURRvs42n7iSCddMlzzV5Ml+7ZrQ1iCqkEWItpesEzeAmUYKe+LwJBkV94pGedqAvMPlCy Hcq4fT3Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOxdf-00FXIk-7i; Tue, 01 Mar 2022 08:13:43 +0000 Date: Tue, 1 Mar 2022 00:13:43 -0800 From: Christoph Hellwig To: "David E. Box" Cc: nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev, lorenzo.pieralisi@arm.com, hch@infradead.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, michael.a.bottini@linux.intel.com, rafael@kernel.org, me@adhityamohan.in, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V6 1/3] PCI/ASPM: Add pci_enable_default_link_state() Message-ID: References: <20220301041943.2935892-1-david.e.box@linux.intel.com> <20220301041943.2935892-2-david.e.box@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220301041943.2935892-2-david.e.box@linux.intel.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 28, 2022 at 08:19:41PM -0800, David E. Box wrote: > + down_read(&pci_bus_sem); > + mutex_lock(&aspm_lock); > + link->aspm_default = 0; > + if (state & PCIE_LINK_STATE_L0S) > + link->aspm_default |= ASPM_STATE_L0S; > + if (state & PCIE_LINK_STATE_L1) > + /* L1 PM substates require L1 */ > + link->aspm_default |= ASPM_STATE_L1 | ASPM_STATE_L1SS; > + if (state & PCIE_LINK_STATE_L1_1) > + link->aspm_default |= ASPM_STATE_L1_1; > + if (state & PCIE_LINK_STATE_L1_2) > + link->aspm_default |= ASPM_STATE_L1_2; > + if (state & PCIE_LINK_STATE_L1_1_PCIPM) > + link->aspm_default |= ASPM_STATE_L1_1_PCIPM; > + if (state & PCIE_LINK_STATE_L1_2_PCIPM) > + link->aspm_default |= ASPM_STATE_L1_2_PCIPM; > + pcie_config_aspm_link(link, policy_to_aspm_state(link)); Is there any reason the ASPM_* values aren't passed directly to this function?