Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7611557rdb; Thu, 4 Jan 2024 01:55:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUPEkqRC3qTPIgjfeh6wYhiAzDZQ4ofCTJ6fUG8P0KD3HNuPBvJlylpe7+rVjdV+7S1CyF X-Received: by 2002:a05:6808:1184:b0:3bc:c82:69e6 with SMTP id j4-20020a056808118400b003bc0c8269e6mr355338oil.5.1704362132957; Thu, 04 Jan 2024 01:55:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704362132; cv=none; d=google.com; s=arc-20160816; b=SaF7zjujw38GOObB+KndY/2I6fBevwAtxmW/4ltJ/mPMqd4WvkQPk+ZrrP6hajY1jJ b8EbeX0MYS2yIezotysOAGeYTuktSw01XYKqzS4yZN/vuvE/mXVObUsIMJW1sHeEipJG lwFvGcZdWAJyjqT6G+DD4h35rpeBduY5Vk5XuO2eQtn6mwikX3icyY9ipdH8CbiRQMdC bMQGU7De+7RXy0yhyMRsQ+frdXXSMOrHjDVS8Ojbn5Lct77QXHnR1vlFkeONxQ/M6wXe /U6/WRrJ3nnAyXNqYNkmNZ1zlgtd8hliIHjF9mN4rqVdnGYCuK+OlY0DFpwUykI0JTDt SYDA== 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:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=CLL7UbqwTRO+jPA8knyhwnEyA/q8aoU+IUIrhnjEs40=; fh=3EXpYsI7hLQV0a9eUbfkxmF0Cz25dlM5iw5kZeQ5VbU=; b=chxR/c8fFyQNufe8UESPycORcAP5ZAQzIClRwi+QFKKrMLCx7GUP8rHkwXxBmavtIl mswSgi8/BukQqKz8raHnr9gjZwCim8zQjYOBw5Nw7CNQmqmmfgLJFkCADvKR5T2SP9wD z3pzDChZ0XFGtTqE6yGloFFGKam0IgAsncmMA1XzB5cBmMDm2pMA0b/sflmucJd1ph3l bZFlbcU2l/48384HkJXfbN/Elu4Ti/JSaVOSqEcQlT7NK+iZIKUd83aR51FGiOnirAqk Zd24SE1ivNRUPUQ2l9kF67cBCH4KuKdhf/BLfTan2O38cJgdH2+ZoGAAE0d29TpQDEOB cGiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YH1aV4yL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YH1aV4yL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-16469-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y188-20020a6364c5000000b005cec9fcfff8si791508pgb.62.2024.01.04.01.55.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 01:55:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16469-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YH1aV4yL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YH1aV4yL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-16469-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9219C281187 for ; Thu, 4 Jan 2024 09:55:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22CC4210E2; Thu, 4 Jan 2024 09:54:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="YH1aV4yL"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="R1xWLgMz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="YH1aV4yL"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="R1xWLgMz" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 AAD27208D3; Thu, 4 Jan 2024 09:54:26 +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-out1.suse.de (Postfix) with ESMTPS id C7AF521F0F; Thu, 4 Jan 2024 09:54:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704362064; 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=CLL7UbqwTRO+jPA8knyhwnEyA/q8aoU+IUIrhnjEs40=; b=YH1aV4yLrk9meVu0XNKIngWongI1TckMY9H7HVaVFpox6CgGvocoUtYhLfEBbTDC/20wuW nYQ7O6YyPXgOe1WkekoQlERviU8Mb/sSYHOopoWX4TeSlp0cN3E2iEZAj7GKxJlC/wgw15 U6/mrI9wb6SJG2/Ea+iiuH6NNlA9t9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704362064; 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=CLL7UbqwTRO+jPA8knyhwnEyA/q8aoU+IUIrhnjEs40=; b=R1xWLgMzpbgbhN8YizS+Gi0TjW8suHutFJwUPnsb47pFQkci7gLhE983gKF1AnUhinlvVq iPTtyIlFFTzzjGBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1704362064; 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=CLL7UbqwTRO+jPA8knyhwnEyA/q8aoU+IUIrhnjEs40=; b=YH1aV4yLrk9meVu0XNKIngWongI1TckMY9H7HVaVFpox6CgGvocoUtYhLfEBbTDC/20wuW nYQ7O6YyPXgOe1WkekoQlERviU8Mb/sSYHOopoWX4TeSlp0cN3E2iEZAj7GKxJlC/wgw15 U6/mrI9wb6SJG2/Ea+iiuH6NNlA9t9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1704362064; 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=CLL7UbqwTRO+jPA8knyhwnEyA/q8aoU+IUIrhnjEs40=; b=R1xWLgMzpbgbhN8YizS+Gi0TjW8suHutFJwUPnsb47pFQkci7gLhE983gKF1AnUhinlvVq iPTtyIlFFTzzjGBg== 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 3E2A613C96; Thu, 4 Jan 2024 09:54:24 +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 SIfSDVCAlmXPZwAAD6G6ig (envelope-from ); Thu, 04 Jan 2024 09:54:24 +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 v3 1/4] arch/x86: Move UAPI setup structures into setup_data.h Date: Thu, 4 Jan 2024 10:51:19 +0100 Message-ID: <20240104095421.12772-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104095421.12772-1-tzimmermann@suse.de> References: <20240104095421.12772-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: ************ X-Spamd-Bar: ++++++++++++ Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=YH1aV4yL; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=R1xWLgMz X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [12.49 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; R_RATELIMIT(0.00)[to_ip_from(RLfgmttzabnpkr34rizty4fwu5)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.de:+]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; 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]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.00)[38.99%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; SPAM_FLAG(5.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_SPAM_LONG(3.50)[1.000]; RCPT_COUNT_TWELVE(0.00)[22]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from] X-Spam-Score: 12.49 X-Rspamd-Queue-Id: C7AF521F0F X-Spam-Flag: NO 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