Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp950433rdb; Wed, 6 Dec 2023 04:54:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBdDCflPka6ilErZerXXbxqgg6aAtLxTEGGwYo06tonAmG8sNI5yj9lhQpC+zlWupZq1Q9 X-Received: by 2002:a05:6358:7248:b0:170:4205:a974 with SMTP id i8-20020a056358724800b001704205a974mr1261488rwa.13.1701867298294; Wed, 06 Dec 2023 04:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701867298; cv=none; d=google.com; s=arc-20160816; b=xTOQETj6iFkwBdeWNwbmXT6lqeYmwEBK08SWX+7gmlczOK0vrhueE4fmWFL8l13qVv Kn5rTiPfAIxLTzxvDJSyE4exc/QmG8LGly5txRw1Qwkwbj2+JMpjeGk0Lgo9VKQlBgpX t/5+b9ZSkDOn6LojxkW1Q3WHdoC581fvAkEIlhxpAZv5NgeoYLrEC/CRmDmBzcMl9IVp gZjI81evl/SHEPmk56uPIpsmpoESeLGwU+YfwqnShJJ0+9LeyoMydNdogoZudCpQ3xE8 9o0nz0OQpi1yd3+Bx8WZoEuy8KaiJbpPIo/uqV04aKE16uPDd3c8YAv2YHSgJMoTduZ/ jFcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Qj72gcam6ZOgbPA7jLBKhrKJdI1UayiC+aw5zIvz5kc=; fh=3EXpYsI7hLQV0a9eUbfkxmF0Cz25dlM5iw5kZeQ5VbU=; b=zH8nkxbklZC1ddAIdN0k10ebdpjAVRydlbfnM1raDsprUsD3AjLJMPbw64dIj10/uj UDvksGL3NalM2B3yWO4ujhQLzuOchxw1EiwEMkuKEdBNWPltf0otPnWaiaiCvGsYe4Hy dQ6CpWVf9Eh8pDvrs0cFiKCIviI3Ee8MPf9w0Jq0CaIGkX1C13ThPvoqf7kbsDU8zTIE JA/iu/zSKNDFCcHa/+RLskkBj/e2XGR+pZocWRUdLv/Tzh/OaJiDSzJo3wRTD/uKvUah PkIgntxgawDFsOwcKtCTq2G53IwAY9KtorWVco24y3s99suqZbRPNgwzxEDuarQKBsRf YrYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=v8TF6YlG; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/P2CsblD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id k187-20020a6324c4000000b005c69246e16bsi5004565pgk.2.2023.12.06.04.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 04:54:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=v8TF6YlG; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b="/P2CsblD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id EC54A826ED10; Wed, 6 Dec 2023 04:54:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378222AbjLFMye (ORCPT + 99 others); Wed, 6 Dec 2023 07:54:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378112AbjLFMyc (ORCPT ); Wed, 6 Dec 2023 07:54:32 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D5021A5; Wed, 6 Dec 2023 04:54:38 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2D3A31FD0D; Wed, 6 Dec 2023 12:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1701867276; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qj72gcam6ZOgbPA7jLBKhrKJdI1UayiC+aw5zIvz5kc=; b=v8TF6YlGTAT1dsLbU/AVFy+6XxDM+kdUJtr49J2z3Bw3ADPgdGoUrU2R8jqYhHSEotD2qb aQTWPlmzT0sXvVmlPhIA9GMJ36dp/FzFtQ04p405WlZm4+BbXY8RQiXbrsKpwDszp9bh9k g4cJ069YEwpwDP5TnEN5bXCKmHeVAUI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1701867276; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qj72gcam6ZOgbPA7jLBKhrKJdI1UayiC+aw5zIvz5kc=; b=/P2CsblDpuVxsZ2yqCSmzm+k2EfrrjxiEkHJLU5p8b7TLQmLZqvccqgBsvL2ofBonAkkcn h4Y9dyfCFjPcD5Dw== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id A25AE13B3C; Wed, 6 Dec 2023 12:54:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id AORtJgtvcGV6dAAAn2gu4w (envelope-from ); Wed, 06 Dec 2023 12:54:35 +0000 From: Thomas Zimmermann To: ardb@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, bhelgaas@google.com, arnd@arndb.de, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, javierm@redhat.com Cc: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 1/3] arch/x86: Move struct pci_setup_rom into pci_setup.h Date: Wed, 6 Dec 2023 13:38:37 +0100 Message-ID: <20231206125433.18420-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231206125433.18420-1-tzimmermann@suse.de> References: <20231206125433.18420-1-tzimmermann@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out2.suse.de; none X-Spam-Score: 3.20 X-Spamd-Result: default: False [3.20 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; BAYES_HAM(-3.00)[100.00%]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWELVE(0.00)[22]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FREEMAIL_TO(0.00)[kernel.org,linutronix.de,redhat.com,alien8.de,linux.intel.com,zytor.com,google.com,arndb.de,linux.ibm.com,gmail.com,paul-moore.com,namei.org,hallyn.com]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 04:54:54 -0800 (PST) The type definition of struct pci_setup_rom in requires struct setup_data from . Many drivers include , but do not use boot parameters. Changes to bootparam.h or its included header files could easily trigger a large, unnecessary rebuild of the kernel. Moving struct pci_setup_rom into its own header file avoid including in . Update the only two users of the struct in the x86 PCI code and in the EFI code. Also remove the include statement for x86_init.h, which is unnecessary but pulls in bootparams.h. Signed-off-by: Thomas Zimmermann --- arch/x86/include/asm/pci.h | 13 ------------- arch/x86/include/asm/pci_setup.h | 19 +++++++++++++++++++ arch/x86/pci/common.c | 1 + drivers/firmware/efi/libstub/x86-stub.c | 1 + 4 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 arch/x86/include/asm/pci_setup.h diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index b40c462b4af3..b3ab80a03365 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -10,7 +10,6 @@ #include #include #include -#include struct pci_sysdata { int domain; /* PCI domain */ @@ -124,16 +123,4 @@ cpumask_of_pcibus(const struct pci_bus *bus) } #endif -struct pci_setup_rom { - struct setup_data data; - uint16_t vendor; - uint16_t devid; - uint64_t pcilen; - unsigned long segment; - unsigned long bus; - unsigned long device; - unsigned long function; - uint8_t romdata[]; -}; - #endif /* _ASM_X86_PCI_H */ diff --git a/arch/x86/include/asm/pci_setup.h b/arch/x86/include/asm/pci_setup.h new file mode 100644 index 000000000000..b4b246ef6f2b --- /dev/null +++ b/arch/x86/include/asm/pci_setup.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_X86_PCI_SETUP_H +#define _ASM_X86_PCI_SETUP_H + +#include + +struct pci_setup_rom { + struct setup_data data; + uint16_t vendor; + uint16_t devid; + uint64_t pcilen; + unsigned long segment; + unsigned long bus; + unsigned long device; + unsigned long function; + uint8_t romdata[]; +}; + +#endif /* _ASM_X86_PCI_SETUP_H */ diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index ddb798603201..c6cbb9182160 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c index 1bfdae34df39..0c878ebe5257 100644 --- a/drivers/firmware/efi/libstub/x86-stub.c +++ b/drivers/firmware/efi/libstub/x86-stub.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "efistub.h" #include "x86-stub.h" -- 2.43.0