Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1317790rdb; Fri, 1 Dec 2023 12:45:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwwH/CDRTyN4nbNpGSaKsxGfoD8uSZ4N+NDl6ZrIvVawphEOItlUuPbpx/jbstcg72Topf X-Received: by 2002:a17:903:2351:b0:1d0:5933:beac with SMTP id c17-20020a170903235100b001d05933beacmr135373plh.22.1701463507543; Fri, 01 Dec 2023 12:45:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701463507; cv=none; d=google.com; s=arc-20160816; b=TUPpKkBuRNsZtMi7ZYvsOSjjZ9jmNWq8pDjkJR3xeQ82XR86JUn0QXMLy6gJX0Zucw XV3UcM6uoXiTNXuPwmoDcyX0hU458LfNCatV7edwSm0YLoWUd5fyV7yUrKhxc+LE49iu lZBrafPu8NNQPsrTvSpaMcPjURAJaHYwKpZMIfAc0ga/n+Nr0eaGniP6DXwxVSZwJXxM Nm6vV21bmtaB7cfgcldkePF8SXGnWUhoCJiCylIDHz0vl0fB2xDB8R8a5FmkfJTOkaOJ GBgquJvlXmc9vp/weXoS3FunB2auQuCkde8e4dTWIh3rn6bQDXIPQAeH3L5EMqP8uZsU 0Vyg== 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=yPJP1AN9vqNd1gU955YE5yz5P/S3Z3Bz1r4GfRI48Lw=; fh=cUCQEnDzh5zbxnyDThLpDTCBdT+wy+ewJWq5Bxr0SLk=; b=fNeLmJQRsbPumHIX1YSDrAXBeBOkhGBRLmWY4fSXShCMpgVS1LLVsLoDLNhiYLTg/Y 87iFOtqy4uSBUNJ8l4KzsBS3eQKqLxqMt4FdFCqJeislnDCDM3CjjSfPWMS2JwjosJPm 3sqmvxHBgBJTvSOTWA8ta9dQvGr9si0B5kSgoGNC9DFvE8lS8JWPDAFLc5lKGWbjq8LG MLnIFRSjdja+fvCWg1IWfXn3/00GYG0zEfgXQY6KAF0PgJE6nV0FwI0GxO0ispRTgtUd WV7b9r44mw3xJMWoUCzrGCdnsSZxPthfemHw/GR9QwUTOXLizDBmtRvrPmXZhG5DB54C ONVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OmCqXnAH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q20-20020a170902789400b001cfb2ab4cf6si3651833pll.163.2023.12.01.12.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 12:45:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OmCqXnAH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id A8BD48135C40; Fri, 1 Dec 2023 12:44:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbjLAUon (ORCPT + 99 others); Fri, 1 Dec 2023 15:44:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbjLAUom (ORCPT ); Fri, 1 Dec 2023 15:44:42 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2DB210C2 for ; Fri, 1 Dec 2023 12:44:49 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2CD9C433C7; Fri, 1 Dec 2023 20:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701463489; bh=R0KLOaBddoeXEw/EtG4OX2U5+CrTSAjm9fGyYL9KSqs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=OmCqXnAHiVuL9yQlbR2ds/qVSUIw9nC0VsUXeymmKDx5pmaN8Ehe5qLt+bRqvSANy +VBAJQZjGJWozu223P1INBj0XYjwPsCUlsbkx5dukIPV4V02FYjb68VClUs6dZjbIR PSwturEf88P9HidF7ldAlwikwepmVimtKbuNK/IuWLwcHOcblS5y3/M3I1vKb8+0eh i1pdMLjXebTwxni4wsWU7sBSfQEjmmyqpmIjRuJQSNx3OKxbc2tzcFwUblHmrY+Ux3 UDHFjkYDbow5mzm48yMw/XrG/+2r/iVCsCNfXcgxqF8obcB1fDco37/reYksHvKxjv aydNrClft96bw== Date: Fri, 1 Dec 2023 14:44:47 -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 Subject: Re: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Message-ID: <20231201204447.GA527927@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com> 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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 01 Dec 2023 12:44:59 -0800 (PST) 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. > --- > 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 >