All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Cc: helgaas@google.com, austin_bolen@dell.com,
	alex_gagniuc@dellteam.com, Shyam_Iyer@Dell.com, lukas@wunner.de,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Russell Currey <ruscur@russell.cc>,
	Sam Bobroff <sbobroff@linux.ibm.com>,
	Oliver O'Halloran <oohall@gmail.com>,
	linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/2] PCI/AER: Determine AER ownership based on _OSC instead of HEST
Date: Thu, 15 Nov 2018 16:43:38 -0700	[thread overview]
Message-ID: <20181115234338.GE13334@localhost.localdomain> (raw)
In-Reply-To: <20181115231605.24352-3-mr.nuke.me@gmail.com>

On Thu, Nov 15, 2018 at 05:16:03PM -0600, Alexandru Gagniuc wrote:
>  static void aer_set_firmware_first(struct pci_dev *pci_dev)
>  {
> -	int rc;
> -	struct aer_hest_parse_info info = {
> -		.pci_dev	= pci_dev,
> -		.firmware_first	= 0,
> -	};
> +	struct pci_host_bridge *host = pci_find_host_bridge(pci_dev->bus);
>  
> -	rc = apei_hest_parse(aer_hest_parse, &info);
> -
> -	if (rc)
> -		pci_dev->__aer_firmware_first = 0;
> -	else
> -		pci_dev->__aer_firmware_first = info.firmware_first;
> +	pci_dev->__aer_firmware_first = !host->native_aer;
>  	pci_dev->__aer_firmware_first_valid = 1;
>  }

I think we can clean this up even more by removing the setter and the
__aer_firmware_first fields, and have the pcie_aer_get_firmware_first()
go directly to the host bride->native_aer.

WARNING: multiple messages have this Message-ID (diff)
From: Keith Busch <keith.busch@intel.com>
To: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Cc: alex_gagniuc@dellteam.com, helgaas@google.com,
	Sam Bobroff <sbobroff@linux.ibm.com>,
	linux-pci@vger.kernel.org, Shyam_Iyer@Dell.com,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	lukas@wunner.de, Oliver O'Halloran <oohall@gmail.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	austin_bolen@dell.com, linuxppc-dev@lists.ozlabs.org,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 2/2] PCI/AER: Determine AER ownership based on _OSC instead of HEST
Date: Thu, 15 Nov 2018 16:43:38 -0700	[thread overview]
Message-ID: <20181115234338.GE13334@localhost.localdomain> (raw)
In-Reply-To: <20181115231605.24352-3-mr.nuke.me@gmail.com>

On Thu, Nov 15, 2018 at 05:16:03PM -0600, Alexandru Gagniuc wrote:
>  static void aer_set_firmware_first(struct pci_dev *pci_dev)
>  {
> -	int rc;
> -	struct aer_hest_parse_info info = {
> -		.pci_dev	= pci_dev,
> -		.firmware_first	= 0,
> -	};
> +	struct pci_host_bridge *host = pci_find_host_bridge(pci_dev->bus);
>  
> -	rc = apei_hest_parse(aer_hest_parse, &info);
> -
> -	if (rc)
> -		pci_dev->__aer_firmware_first = 0;
> -	else
> -		pci_dev->__aer_firmware_first = info.firmware_first;
> +	pci_dev->__aer_firmware_first = !host->native_aer;
>  	pci_dev->__aer_firmware_first_valid = 1;
>  }

I think we can clean this up even more by removing the setter and the
__aer_firmware_first fields, and have the pcie_aer_get_firmware_first()
go directly to the host bride->native_aer.

  reply	other threads:[~2018-11-15 23:43 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 23:16 [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER Alexandru Gagniuc
2018-11-15 23:16 ` Alexandru Gagniuc
2018-11-15 23:16 ` Alexandru Gagniuc
2018-11-15 23:16 ` [PATCH 1/2] PCI/AER: Do not use APEI/HEST to disable AER services globally Alexandru Gagniuc
2018-11-15 23:16   ` Alexandru Gagniuc
2018-11-15 23:16   ` Alexandru Gagniuc
2018-11-15 23:16 ` [PATCH 2/2] PCI/AER: Determine AER ownership based on _OSC instead of HEST Alexandru Gagniuc
2018-11-15 23:16   ` Alexandru Gagniuc
2018-11-15 23:16   ` Alexandru Gagniuc
2018-11-15 23:43   ` Keith Busch [this message]
2018-11-15 23:43     ` Keith Busch
2018-11-16  1:49 ` [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER Sinan Kaya
2018-11-16  1:49   ` Sinan Kaya
2018-11-16  1:49   ` Sinan Kaya
2018-11-19 16:53   ` Tyler Baicar
2018-11-19 16:53     ` Tyler Baicar
2018-11-19 16:53     ` Keith Busch
2018-11-19 16:53       ` Keith Busch
2018-11-19 17:32       ` Sinan Kaya
2018-11-19 17:32         ` Sinan Kaya
2018-11-19 17:36         ` Keith Busch
2018-11-19 17:36           ` Keith Busch
2018-11-19 17:42         ` Sinan Kaya
2018-11-19 17:42           ` Sinan Kaya
2018-11-19 17:41           ` Keith Busch
2018-11-19 17:41             ` Keith Busch
2018-11-19 17:56             ` Sinan Kaya
2018-11-19 17:56               ` Sinan Kaya
2018-11-19 18:10               ` Keith Busch
2018-11-19 18:10                 ` Keith Busch
2018-11-19 18:24                 ` Sinan Kaya
2018-11-19 18:24                   ` Sinan Kaya
2018-11-19 19:11                   ` Alex G.
2018-11-19 19:11                     ` Alex G.
2018-11-19 19:32                     ` Sinan Kaya
2018-11-19 19:32                       ` Sinan Kaya
2018-11-19 20:16                       ` Alex_Gagniuc
2018-11-19 20:16                         ` Alex_Gagniuc
2018-11-19 20:16                         ` Alex_Gagniuc
2018-11-19 20:33                         ` Sinan Kaya
2018-11-19 20:33                           ` Sinan Kaya
2018-11-19 23:49                           ` Alex_Gagniuc
2018-11-19 23:49                             ` Alex_Gagniuc
2018-11-19 23:49                             ` Alex_Gagniuc
2018-11-20  1:54                             ` Sinan Kaya
2018-11-20  1:54                               ` Sinan Kaya
2018-11-20 20:44                               ` Alex_Gagniuc
2018-11-20 20:44                                 ` Alex_Gagniuc
2018-11-20 20:44                                 ` Alex_Gagniuc
2018-11-20 21:02                                 ` Sinan Kaya
2018-11-20 21:02                                   ` Sinan Kaya
2018-11-20 21:42                                   ` Keith Busch
2018-11-20 21:42                                     ` Keith Busch
2018-11-20 22:28                                     ` Sinan Kaya
2018-11-20 22:28                                       ` Sinan Kaya
2018-11-20 22:35                                       ` Alex G.
2018-11-20 22:35                                         ` Alex G.
2018-11-20 21:46                                   ` Alex_Gagniuc
2018-11-20 21:46                                     ` Alex_Gagniuc
2018-11-20 21:46                                     ` Alex_Gagniuc
2018-11-20 22:08                                     ` Sinan Kaya
2018-11-20 22:08                                       ` Sinan Kaya
2018-11-20 22:36                                       ` Alex_Gagniuc
2018-11-20 22:36                                         ` Alex_Gagniuc
2018-11-20 22:36                                         ` Alex_Gagniuc
2018-11-27 18:22                                       ` Alex_Gagniuc
2018-11-27 18:22                                         ` Alex_Gagniuc
2018-11-27 18:22                                         ` Alex_Gagniuc
2018-11-27 18:32                                         ` Sinan Kaya
2018-11-27 18:32                                           ` Sinan Kaya
2018-11-27 18:46                                           ` Tyler Baicar
2018-11-27 18:46                                             ` Tyler Baicar
2018-11-16 12:37 ` David Laight
2018-11-16 12:37   ` David Laight
2018-11-16 12:37   ` David Laight
2019-03-05 23:16 ` Bjorn Helgaas
2019-03-05 23:16   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181115234338.GE13334@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=Shyam_Iyer@Dell.com \
    --cc=alex_gagniuc@dellteam.com \
    --cc=austin_bolen@dell.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lukas@wunner.de \
    --cc=mr.nuke.me@gmail.com \
    --cc=oohall@gmail.com \
    --cc=rjw@rjwysocki.net \
    --cc=ruscur@russell.cc \
    --cc=sbobroff@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.