From patchwork Mon Jan 8 09:57:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 185880 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp922795dyq; Mon, 8 Jan 2024 02:00:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSY4OVQ1/Eti/lvrfJI89ecMfOmwSvVcrF5ZNuv8We+Qh/sqYE1MZLcGbDZ0M05T19SBf8 X-Received: by 2002:a05:6402:1cab:b0:557:2871:8c72 with SMTP id cz11-20020a0564021cab00b0055728718c72mr4433146edb.14.1704708018416; Mon, 08 Jan 2024 02:00:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704708018; cv=none; d=google.com; s=arc-20160816; b=wQIvpUOltIyeJS//kTjy+ow30epoPNtiJVUlBlCuwxOO2rO2vJISAcQMYLjkjWuV8C RfkmeDGam2Bv+u35ML6J0IGoQk9HVPGlvbUIeXukcFm37igIswp7AKya9SMhdITW7MvT lMSbqXHjMucQLZG8004z5NjauaGk5fdYLa+5jv780V4QnxzECFq5dPou8DJ2snDAvxcb 8WZOrJFVcehp2Apf+tP/05a2IhTTZIaSorWXprUbXRFivlkn86bxKYwZVKe7A0BRSF9I mIQDQipV8IR3gzlhoEWEKQxePQxahQC6iykiQNVteeCezD4jwIRGfmx0yCbCNVnF9oxm Kdhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=CLL7UbqwTRO+jPA8knyhwnEyA/q8aoU+IUIrhnjEs40=; fh=3EXpYsI7hLQV0a9eUbfkxmF0Cz25dlM5iw5kZeQ5VbU=; b=MdkuQB/ssE4gmWshWGKseN8DYTY93ylRaSEZ8blbwLQdLwcDCOxTti3j+dQKeoiUU5 0I78AlmidmLR036Og4wRBcASUE7uUZVO10S+SlGASvp+AUZ1GVCv9HLBxqLGUuahKZ7c gPzOEBJUTkQo79o6i5pjk+ZrfMqx2LBaVt7qCl2rxfuR5t+MrU8h5QmL+AqvjiQfl1Wf 65TVPg2pyT8J04E0raOva9B5U3y5rHov+VR7Xl3SNqPX2EPAKt9ONq/LjxIUnfBx/XtR RkZ9JodjG6vNcKaKa00YtnL4b5xINkCP9FZr6KvBBqqmGGnU/oeItKRYe6bnGKtw2Xgf hgdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19306-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19306-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z10-20020a05640235ca00b00557624b7e22si1958923edc.253.2024.01.08.02.00.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 02:00:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19306-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19306-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19306-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D54DD1F22260 for ; Mon, 8 Jan 2024 10:00:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC41A14AAE; Mon, 8 Jan 2024 09:59:11 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 958AC12B7C; Mon, 8 Jan 2024 09:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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 A25101F795; Mon, 8 Jan 2024 09:59:06 +0000 (UTC) Received: from imap1.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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2B07913CA6; Mon, 8 Jan 2024 09:59:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id UIZmCWrHm2XFMwAAD6G6ig (envelope-from ); Mon, 08 Jan 2024 09:59:06 +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 v4 1/4] arch/x86: Move UAPI setup structures into setup_data.h Date: Mon, 8 Jan 2024 10:57:27 +0100 Message-ID: <20240108095903.8427-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240108095903.8427-1-tzimmermann@suse.de> References: <20240108095903.8427-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: A25101F795 X-Spam-Flag: NO X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787515915217378047 X-GMAIL-MSGID: 1787515915217378047 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 setup_data and related code into its own header file avoids including in . Instead include the new header and remove the include statement for x86_init.h, which is unnecessary but pulls in bootparams.h. Suggested-by: Ard Biesheuvel Signed-off-by: Thomas Zimmermann --- v3: * keep setup_header and friends in bootparam.h (Ard) --- arch/x86/include/asm/pci.h | 2 +- arch/x86/include/uapi/asm/bootparam.h | 72 +--------------------- arch/x86/include/uapi/asm/setup_data.h | 83 ++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 72 deletions(-) create mode 100644 arch/x86/include/uapi/asm/setup_data.h diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index b40c462b4af3..f6100df3652e 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include struct pci_sysdata { int domain; /* PCI domain */ diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index 01d19fc22346..4a38e7917756 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h @@ -2,21 +2,7 @@ #ifndef _ASM_X86_BOOTPARAM_H #define _ASM_X86_BOOTPARAM_H -/* setup_data/setup_indirect types */ -#define SETUP_NONE 0 -#define SETUP_E820_EXT 1 -#define SETUP_DTB 2 -#define SETUP_PCI 3 -#define SETUP_EFI 4 -#define SETUP_APPLE_PROPERTIES 5 -#define SETUP_JAILHOUSE 6 -#define SETUP_CC_BLOB 7 -#define SETUP_IMA 8 -#define SETUP_RNG_SEED 9 -#define SETUP_ENUM_MAX SETUP_RNG_SEED - -#define SETUP_INDIRECT (1<<31) -#define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) +#include /* ram_size flags */ #define RAMDISK_IMAGE_START_MASK 0x07FF @@ -48,22 +34,6 @@ #include #include