linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] arch/x86: Remove unnecessary dependencies on bootparam.h
@ 2023-12-06 12:38 Thomas Zimmermann
  2023-12-06 12:38 ` [PATCH 1/3] arch/x86: Move struct pci_setup_rom into pci_setup.h Thomas Zimmermann
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2023-12-06 12:38 UTC (permalink / raw)
  To: ardb, tglx, mingo, bp, dave.hansen, x86, hpa, bhelgaas, arnd,
	zohar, dmitry.kasatkin, paul, jmorris, serge, javierm
  Cc: linux-arch, linux-efi, linux-kernel, linux-pci, linux-integrity,
	linux-security-module, Thomas Zimmermann

Reduce built time in some cases by removing unnecessary include statements
for <asm/bootparam.h>. Reorganize some header files accordingly.

While working on the kernel's boot-up graphics, I noticed that touching
include/linux/screen_info.h triggers a complete rebuilt of the kernel
on x86. It turns out that the architecture's PCI and EFI headers include
<asm/bootparam.h>, which depends on <linux/screen_info.h>. But none of
the drivers have any business with boot parameters or the screen_info
state.

The patchset moves a few limes from pci.h and efi.h into separate header
files and then removes the obsolete include statements on x86. I did

  make allmodconfig
  make -j28
  touch include/linus/screen_info.h
  time -j28 make

to measure the time it takes to rebuild. Results without the patchset
are around 20 minutes.

  real    20m46,705s
  user    354m29,166s
  sys     28m27,359s

And with the patchset applied it goes down to about a minute.

  real    0m58,232s
  user    4m37,617s
  sys     0m34,993s

The test system was an Intel i5-13500.

Thomas Zimmermann (3):
  arch/x86: Move struct pci_setup_rom into pci_setup.h
  arch/x86: Add <asm/ima-efi.h> for arch_ima_efi_boot_mode
  arch/x86: Do not include <asm/bootparam.h> in several header files

 arch/x86/include/asm/efi.h              |  3 ---
 arch/x86/include/asm/ima-efi.h          | 12 ++++++++++++
 arch/x86/include/asm/kexec.h            |  1 -
 arch/x86/include/asm/mem_encrypt.h      |  2 +-
 arch/x86/include/asm/pci.h              | 13 -------------
 arch/x86/include/asm/pci_setup.h        | 19 +++++++++++++++++++
 arch/x86/include/asm/sev.h              |  3 ++-
 arch/x86/include/asm/x86_init.h         |  2 --
 arch/x86/pci/common.c                   |  1 +
 drivers/firmware/efi/libstub/x86-stub.c |  1 +
 include/asm-generic/Kbuild              |  1 +
 include/asm-generic/ima-efi.h           | 16 ++++++++++++++++
 security/integrity/ima/ima_efi.c        |  5 +----
 13 files changed, 54 insertions(+), 25 deletions(-)
 create mode 100644 arch/x86/include/asm/ima-efi.h
 create mode 100644 arch/x86/include/asm/pci_setup.h
 create mode 100644 include/asm-generic/ima-efi.h


base-commit: a9d99261a978835b02e248fe18af3026416af3e8
-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-15 12:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06 12:38 [PATCH 0/3] arch/x86: Remove unnecessary dependencies on bootparam.h Thomas Zimmermann
2023-12-06 12:38 ` [PATCH 1/3] arch/x86: Move struct pci_setup_rom into pci_setup.h Thomas Zimmermann
2023-12-07 15:35   ` Ard Biesheuvel
2023-12-15 12:15     ` Thomas Zimmermann
2023-12-06 12:38 ` [PATCH 2/3] arch/x86: Add <asm/ima-efi.h> for arch_ima_efi_boot_mode Thomas Zimmermann
2023-12-07 15:37   ` Ard Biesheuvel
2023-12-15 12:16     ` Thomas Zimmermann
2023-12-06 12:38 ` [PATCH 3/3] arch/x86: Do not include <asm/bootparam.h> in several header files Thomas Zimmermann
2023-12-07 15:38   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).