linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] treewide: break dependencies on x86's RM header
@ 2019-11-19  0:21 Sean Christopherson
  2019-11-19  0:21 ` [PATCH 01/12] x86/efi: Explicitly include realmode.h to handle RM trampoline quirk Sean Christopherson
                   ` (12 more replies)
  0 siblings, 13 replies; 41+ messages in thread
From: Sean Christopherson @ 2019-11-19  0:21 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: Tony Luck, Fenghua Yu, Peter Zijlstra, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	H. Peter Anvin, Steven Rostedt, Ard Biesheuvel, Darren Hart,
	Andy Shevchenko, Nadav Amit, VMware, Inc.,
	Arnd Bergmann, Greg Kroah-Hartman, Hans de Goede,
	Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-ia64,
	linux-kernel, linux-pm, linux-efi, platform-driver-x86,
	linux-acpi, alsa-devel

x86's asm/realmode.h, which defines low level structures, variables and
helpers used to bring up APs during SMP boot, ends up getting included in
practically every nook and cranny of the kernel because the address used
by ACPI for resuming from S3 also happens to be stored in the real mode
header, and ACPI bleeds the dependency into its widely included headers.

As a result, modifying realmode.h for even the most trivial change to the
boot code triggers a full kernel rebuild, which is frustrating to say the
least as it some of the most difficult code to get exactly right *and* is
also some of the most functionally isolated code in the kernel.

To break the kernel's widespread dependency on realmode.h, add a wrapper
in the aforementioned ACPI S3 code to access the real mode header instead
of derefencing the header directly in asm/acpi.h and thereby exposing it
to the world via linux/acpi.h.

Build tested on x86 with allyesconfig and allmodconfig, so hopefully there
aren't more build issues lurking, but at this point it wouldn't surprise
me in the least if this somehow manages to break the build.

Based on tip/master, commit ceceaf1f12ba ("Merge branch 'WIP.x86/cleanups'").

Patch Synopsis:
  - Patches 01-09 fix a variety of build errors that arise when patch 12
    drops realmode.h from asm/acpi.h.  Most of the errors are quite absurb
    as they have no relation whatsoever to x86's RM boot code, but occur
    because realmode.h happens to include asm/io.h.

  - Patch 10 removes a spurious include of realmode.h from an ACPI header.

  - Patches 11 and 12 implement the wrapper and move it out of acpi.h.


Sean Christopherson (12):
  x86/efi: Explicitly include realmode.h to handle RM trampoline quirk
  x86/boot: Explicitly include realmode.h to handle RM reservations
  x86/ftrace: Explicitly include vmalloc.h for
    set_vm_flush_reset_perms()
  x86/kprobes: Explicitly include vmalloc.h for
    set_vm_flush_reset_perms()
  perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys()
  efi/capsule-loader: Explicitly include linux/io.h for page_to_phys()
  virt: vbox: Explicitly include linux/io.h to pick up various defs
  vmw_balloon: Explicitly include linux/io.h for virt_to_phys()
  ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys()
  x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h
  ACPI/sleep: Convert acpi_wakeup_address into a function
  x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c

 arch/ia64/include/asm/acpi.h             |  5 ++++-
 arch/ia64/kernel/acpi.c                  |  2 --
 arch/x86/events/intel/ds.c               |  1 +
 arch/x86/include/asm/acpi.h              |  3 +--
 arch/x86/kernel/acpi/sleep.c             | 11 +++++++++++
 arch/x86/kernel/acpi/sleep.h             |  2 +-
 arch/x86/kernel/ftrace.c                 |  1 +
 arch/x86/kernel/kprobes/core.c           |  1 +
 arch/x86/kernel/setup.c                  |  1 +
 arch/x86/platform/efi/quirks.c           |  1 +
 drivers/acpi/sleep.c                     |  4 ++--
 drivers/firmware/efi/capsule-loader.c    |  1 +
 drivers/misc/vmw_balloon.c               |  1 +
 drivers/virt/vboxguest/vboxguest_core.c  |  1 +
 drivers/virt/vboxguest/vboxguest_utils.c |  1 +
 sound/soc/intel/skylake/skl-sst-cldma.c  |  1 +
 16 files changed, 29 insertions(+), 8 deletions(-)

-- 
2.24.0


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

end of thread, other threads:[~2019-11-26 11:25 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
2019-11-19  0:21 ` [PATCH 01/12] x86/efi: Explicitly include realmode.h to handle RM trampoline quirk Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 02/12] x86/boot: Explicitly include realmode.h to handle RM reservations Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 03/12] x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms() Sean Christopherson
2019-11-22  2:11   ` Steven Rostedt
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 04/12] x86/kprobes: " Sean Christopherson
2019-11-22  2:12   ` Steven Rostedt
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 05/12] perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys() Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 06/12] efi/capsule-loader: Explicitly include linux/io.h for page_to_phys() Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 07/12] virt: vbox: Explicitly include linux/io.h to pick up various defs Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 08/12] vmw_balloon: Explicitly include linux/io.h for virt_to_phys() Sean Christopherson
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 09/12] ASoC: Intel: Skylake: " Sean Christopherson
2019-11-19 12:00   ` Mark Brown
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 10/12] x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h Sean Christopherson
2019-11-20 10:59   ` Rafael J. Wysocki
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function Sean Christopherson
2019-11-20 10:58   ` Rafael J. Wysocki
2019-11-25 10:48     ` Pavel Machek
2019-11-25 17:00       ` Sean Christopherson
2019-11-26 11:16         ` Ingo Molnar
2019-11-26 11:25           ` Ingo Molnar
2019-11-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
2019-11-19  0:21 ` [PATCH 12/12] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c Sean Christopherson
2019-11-20 11:00   ` Rafael J. Wysocki
2019-11-26  8:00   ` [tip: core/headers] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h> tip-bot2 for Sean Christopherson
2019-11-19 11:10 ` [PATCH 00/12] treewide: break dependencies on x86's RM header Ingo Molnar
2019-11-19 12:06   ` [PATCH] x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys() Ingo Molnar
2019-11-19 12:38     ` Andy Shevchenko
2019-11-19 12:09   ` [PATCH 00/12] treewide: break dependencies on x86's RM header Ard Biesheuvel
2019-11-19 12:22     ` Ingo Molnar
2019-11-19 12:33       ` 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).