From: Haakon Bugge <haakon.bugge@oracle.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Niklas Schnelle <schnelle@linux.ibm.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
Oliver O'Halloran <oohall@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
Alex Williamson <alex@shazbot.org>,
Johannes Thumshirn <morbidrsa@gmail.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v3 2/2] PCI/ACPI: Confine program_hpx_type2 to the AER bits
Date: Thu, 29 Jan 2026 16:36:10 +0000 [thread overview]
Message-ID: <E8CB259F-49BB-47FB-8D41-591DD302F168@oracle.com> (raw)
In-Reply-To: <5B14DFEB-18F2-46C0-8DD1-166A3BC275B4@oracle.com>
>>> Thanks for the word-smithing and improved accuracy!
>>>
>>> + /* Log if _HPX attempts to modify PCIe Link Control register */
>>> if (pcie_cap_has_lnkctl(dev)) {
>>> -
>>> - /*
>>> - * If the Root Port supports Read Completion Boundary of
>>> - * 128, set RCB to 128. Otherwise, clear it.
>>> - */
>>> - hpx->pci_exp_lnkctl_and |= PCI_EXP_LNKCTL_RCB;
>>> - hpx->pci_exp_lnkctl_or &= ~PCI_EXP_LNKCTL_RCB;
>>> - if (pcie_root_rcb_set(dev))
>>> - hpx->pci_exp_lnkctl_or |= PCI_EXP_LNKCTL_RCB;
>>> -
>>> - pcie_capability_clear_and_set_word(dev, PCI_EXP_LNKCTL,
>>> - ~hpx->pci_exp_lnkctl_and, hpx->pci_exp_lnkctl_or);
>>>
> This was what confused me a lot, the bit-wise NOT above. That must be wrong, as pcie_capability_clear_and_set_word() inverts the "clear" argument.
Have to correct myself here. ACPI states:
When configuring a given register, OSPM uses the following algorithm:
1. Read the register’s current value, which contains the register’s default value.
2. Perform a bit-wise AND operation with the “AND mask” from the table below.
[]
Because pcie_capability_clear_and_set_word() inverts the "clear" argument, the above bitwise NOT is of course correct. Two bitwise NOTs is a no-op and we follow the ACPI outlined algorithm.
Sorry for the noise, Håkon
prev parent reply other threads:[~2026-01-29 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260122130957.68757-1-haakon.bugge@oracle.com>
2026-01-22 13:09 ` [PATCH v3 2/2] PCI/ACPI: Confine program_hpx_type2 to the AER bits Håkon Bugge
2026-01-27 22:24 ` Bjorn Helgaas
2026-01-28 17:19 ` Haakon Bugge
2026-01-29 16:36 ` Haakon Bugge [this message]
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=E8CB259F-49BB-47FB-8D41-591DD302F168@oracle.com \
--to=haakon.bugge@oracle.com \
--cc=alex@shazbot.org \
--cc=bhelgaas@google.com \
--cc=gregkh@suse.de \
--cc=helgaas@kernel.org \
--cc=kaneshige.kenji@jp.fujitsu.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=mahesh@linux.ibm.com \
--cc=morbidrsa@gmail.com \
--cc=oohall@gmail.com \
--cc=rafael@kernel.org \
--cc=schnelle@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox