Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1374914rdb; Fri, 1 Dec 2023 14:56:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJXLPdtK6M9LHA35Gn0YL3BMLLesvvSjYdwMNLKz6QMyolT3RCtBu1K5N+nBUdqwTJZ/Oj X-Received: by 2002:a05:6871:284:b0:1fb:75a:6d3d with SMTP id i4-20020a056871028400b001fb075a6d3dmr318699oae.100.1701471383269; Fri, 01 Dec 2023 14:56:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701471383; cv=none; d=google.com; s=arc-20160816; b=L/1xB7DRsVOgsjQJXe8k8vq6Hudf6wGASBEB9kMw4O7WdpelQ1uaM4GlfIpyE4tvTe buJmAfrtB0uEDCBmkuoPy3hhzfJe7lYFvUFGrVbtGUhmQLJrUbux4lmLYQjBi0jNcxAM 5mn+oZb2B9YYoRHyWo5HWbL6++YnK3MVdOZkHm901feDYXYjwW8aTe9d7ugLhYASxdO8 cdyCKFQIzyOqxqV+zWoArWWQ4X4YlOqyWaaIMZoL6jVgIrHM6s9v54TrGpOlEFy25Seu 9WVCVPkajH4RYz6xBwfJEQodHUFMJC2P5SDj9xHpV71hZE1tqOlrobqjMrsPHdn6iwGT UXAw== 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-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=i5IYaibHFs5L7B7v4w5GkSkw9w9jcw+POQ0++CCoOvc=; fh=PIhZ8RRywL+RoCMsaM54ComTkmo70upfFhuDSeqkeKU=; b=V36UZR0b4PaV4DCVeM0GC1NupdaQTGlxgk9acqn0KUUTWc+GKvz6KsRJRHaW0G4Vlz j5DHBGIM318hdMr48OZOtiaMXPXK8BQIbU+DscDLJyItTj2rQmeZ1GMVN3xlyPYgxFK9 s950RObG1uW7/PaYU42aIxGiFdHDpCxja3Yyz3IcndMEo10WR91xGkOLagDrzEZpHBTQ wnnyv8NcDnkBytiG4/5u3Y3AzWHSUaSQG0v+rSZt0TQTBPK9VuwCsd2zBmCm2wQcc+QQ 6mHkpaxoX21pfgUA/guSqyuuI5AF9CbD3az4FMsQyZ+4R8nPmaZSawutUwWCddPF095T m6iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZlTyL5Na; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r5-20020a632045000000b005bd0f2c2671si4147133pgm.626.2023.12.01.14.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 14:56:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZlTyL5Na; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9DFA781DE394; Fri, 1 Dec 2023 14:56:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjLAW4G (ORCPT + 99 others); Fri, 1 Dec 2023 17:56:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjLAW4F (ORCPT ); Fri, 1 Dec 2023 17:56:05 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD2F91712 for ; Fri, 1 Dec 2023 14:56:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32A08C433C8; Fri, 1 Dec 2023 22:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701471371; bh=GVeXptVzISkp+LH6rP7ABvt7j/9kuofhAXSzf6mU7l8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZlTyL5Navjtt+nMUpk0afajOVeVQDR77Pt7SGMWB4Q7v/stMRvKg3qER0HZe0B/tB SOc6ksiIaqIceMMqt2hyLiNeFTVS4WRQ3p6fUsddPqqsV5Bh0BeNEoKk9OKPGDaMlf Wuu/Guum7yPnLVyDB3umrP6cNa74sdsmvkBuxIXV8c9f4XyuMby/fN5k0ejxocAJ/9 bGSWcZEPs0mAZucGyrGTFJxwRtOoRXK2dy8JGsNNXP5tQcE59nU3vgWcvPx+tuPqe3 SCsPX4Z13RNDe+WXBEL70a7MB7WnSEc7eNxEq/3d9IAffSRPCTblWTd57tl+pLeO78 uYLdLsWN9Nviw== Date: Fri, 1 Dec 2023 16:56:09 -0600 From: Bjorn Helgaas To: Ilpo =?utf-8?B?SsOkcnZpbmVu?= Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org Subject: Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Message-ID: <20231201225609.GA534714@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231201204447.GA527927@bhelgaas> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 01 Dec 2023 14:56:20 -0800 (PST) [+cc scsi, powerpc folks] On Fri, Dec 01, 2023 at 02:44:47PM -0600, Bjorn Helgaas wrote: > 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 > > 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. OK, b4 picked up the entire series but I was only cc'd on this first patch, so I missed the responses about EDAC, xtensa, bcma already being applied elsewhere. So I kept these in the PCI tree: 420ac76610d7 ("scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal") 3773343dd890 ("powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal") 197e0da1f1a3 ("x86/pci: Use PCI_HEADER_TYPE_* instead of literals") and dropped the others. x86, SCSI, powerpc folks, if you want to take these instead, let me know and I'll drop them. > > --- > > 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 > >