Received: by 10.213.65.68 with SMTP id h4csp1731466imn; Mon, 19 Mar 2018 11:42:07 -0700 (PDT) X-Google-Smtp-Source: AG47ELumrq0YQQd/lS5Q5o01DIFWIC00EVBoqlJ45ltelP5Dkp6a86xiKKgR6cyk7N9jxG0mvO7Z X-Received: by 10.98.147.27 with SMTP id b27mr11109936pfe.145.1521484927757; Mon, 19 Mar 2018 11:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521484927; cv=none; d=google.com; s=arc-20160816; b=qOUYHJYa5d5mswWRg030byc3einmVHVMkX+4lWUiVt0HCIacldaH2A4qzvQBcSMNfU xKOyXCZyW+CnKNbZgfEfRxnPrVsw1t24QtsYdqcNW/asbaeBEaY3gWk+uflaZDzPQwu1 Y/dsxzO928w+cNHksGrvQJsNLgo4wK6utK6TeZpfjHcpf6OXmaBmdsP8t/++6j6DvJ4C seGqIny6yDlQvMR6KYKV6Fdt37YLvKqQxikPcQkklxwir1jCsuTdTcaOai53Fv7lR17E hc/7zYBW5NbNqRlGy4Fdkvd1gM9vYJk847tYI+7xi4+PBDpWbC4mAXxZfRjDVVDKJOzb lnUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=kh0p4z88Ae5zzxQIoy+Xn3RBtWHxFZQUdX5TIkBmbZY=; b=anNV56Z0zbw5TtetE1LSnLqhO88YBFwZF6n7NskUE3ivR45a3K5dm7v7Xwhw2WeCJs 2VTrdkOR533M740ZZB1R9Bick+3jR+V8fp/hNnJQhoASOIGoonNfEDrwdIf8Iln6aQka NWF2NKEzCvN1ye+4rjVpIQQO3GawmTMLfBMdiY2RdVVuUGuSNGYBhU9o2Gl9+ethvJJP Z7BGbvkWkgkIIrdnzyKfwhlgYCfZ9KymBkt58TEabm4lL3jB08QHJoGreiumNPP8lWP1 znpX9NLk7YCNqSFwpfwh8k73619qebYlhQbTGPLrD/TGcSOkX+/XD/ms5xHK/VMBlux+ I8cQ== 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 g126si353539pfc.395.2018.03.19.11.41.53; Mon, 19 Mar 2018 11:42:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970445AbeCSShl (ORCPT + 99 others); Mon, 19 Mar 2018 14:37:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:35584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967564AbeCSShg (ORCPT ); Mon, 19 Mar 2018 14:37:36 -0400 Received: from localhost (231.sub-174-234-133.myvzw.com [174.234.133.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C723C2178C; Mon, 19 Mar 2018 18:37:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C723C2178C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Mon, 19 Mar 2018 13:37:34 -0500 From: Bjorn Helgaas To: Lukas Wunner Cc: Christoph Hellwig , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Keith Busch , Sinan Kaya , Frederick Lawler Subject: Re: [PATCH v2 08/13] PCI/portdrv: Simplify PCIe feature permission checking Message-ID: <20180319183734.GA77194@bhelgaas-glaptop.roam.corp.google.com> References: <152062141493.77693.9630397416694091342.stgit@bhelgaas-glaptop.roam.corp.google.com> <152062203293.77693.8159909590216160503.stgit@bhelgaas-glaptop.roam.corp.google.com> <20180312080402.GE10358@infradead.org> <20180312140316.GB194000@bhelgaas-glaptop.roam.corp.google.com> <20180312142059.GA11186@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312142059.GA11186@wunner.de> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 12, 2018 at 03:20:59PM +0100, Lukas Wunner wrote: > On Mon, Mar 12, 2018 at 09:03:16AM -0500, Bjorn Helgaas wrote: > > On Mon, Mar 12, 2018 at 01:04:02AM -0700, Christoph Hellwig wrote: > > > > + * We assume we can manage these PCIe features. Some systems may > > > > + * reserve these for use by the platform itself, e.g., an ACPI BIOS > > > > + * may implement its own AER handling and use _OSC to prevent the > > > > + * OS from interfering. > > > > + */ > > > > + bridge->use_aer = 1; > > > > + bridge->use_hotplug = 1; > > > > + bridge->use_pme = 1; > > > > > > If we start out with enabled maybe these should be disable_foo flags > > > instead? > > > > I went back and forth on that. "disable_foo" is nice because the > > default value is correct (zero means enabled). But then you end up > > with things like: > > > > if (pcie_ports_native || !host->disable_hotplug) > > > > where the "!host->disable_hotplug" is a double negative, and I have a > > really hard time reading that. > > native_hotplug or, if you want it reversed, platform_hotplug > (or firmware_hotplug?) might improve readability. Thanks, I like that. I renamed them to "native_aer", etc.