[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231201204447.GA527927@bhelgaas>
Date: Fri, 1 Dec 2023 14:44:47 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
On Fri, Nov 24, 2023 at 11:09:13AM +0200, Ilpo Järvinen wrote:
> Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Applied entire series on the PCI "enumeration" branch for v6.8,
thanks!
If anybody wants to take pieces separately, let me know and I'll drop
from PCI.
> ---
> arch/x86/kernel/aperture_64.c | 3 +--
> arch/x86/kernel/early-quirks.c | 4 ++--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 4feaa670d578..89c0c8a3fc7e 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -259,10 +259,9 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp)
> order);
> }
>
> - /* No multi-function device? */
> type = read_pci_config_byte(bus, slot, func,
> PCI_HEADER_TYPE);
> - if (!(type & 0x80))
> + if (!(type & PCI_HEADER_TYPE_MFD))
> break;
> }
> }
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index a6c1867fc7aa..59f4aefc6bc1 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -779,13 +779,13 @@ static int __init check_dev_quirk(int num, int slot, int func)
> type = read_pci_config_byte(num, slot, func,
> PCI_HEADER_TYPE);
>
> - if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) {
> + if ((type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) {
> sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS);
> if (sec > num)
> early_pci_scan_bus(sec);
> }
>
> - if (!(type & 0x80))
> + if (!(type & PCI_HEADER_TYPE_MFD))
> return -1;
>
> return 0;
> --
> 2.30.2
>
Powered by blists - more mailing lists