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

* [PATCH 01/12] x86/efi: Explicitly include realmode.h to handle RM trampoline quirk
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 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

Explicitly include asm/realmode.h, which is needed to handle a real mode
trampoline quirk in efi_free_boot_services(), instead of picking it up
by way of linux/acpi.h.  acpi.h will soon stop including realmode.h so
that changing realmode.h doesn't require a full kernel rebuild.

Fixes: 5bc653b731821 ("x86/efi: Allocate a trampoline if needed in efi_free_boot_services()")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/platform/efi/quirks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 3b9fd679cea9..f9ef5c5346ca 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -16,6 +16,7 @@
 #include <asm/efi.h>
 #include <asm/uv/uv.h>
 #include <asm/cpu_device_id.h>
+#include <asm/realmode.h>
 #include <asm/reboot.h>
 
 #define EFI_MIN_RESERVE 5120
-- 
2.24.0


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

* [PATCH 02/12] x86/boot: Explicitly include realmode.h to handle RM reservations
  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-19  0:21 ` 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
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 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

Explicitly include asm/realmode.h, which provides reserve_real_mode(),
instead of picking it up by an indirect include of asm/acpi.h.  acpi.h
will soon stop including realmode.h so that changing realmode.h doesn't
require a full kernel rebuild.

Fixes: c1877650f3c9 ("x86/setup: Clean up the header portion of setup.c")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kernel/setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 559764a4af5f..b6d7301b1037 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -33,6 +33,7 @@
 #include <asm/kaslr.h>
 #include <asm/mce.h>
 #include <asm/mtrr.h>
+#include <asm/realmode.h>
 #include <asm/olpc_ofw.h>
 #include <asm/pci-direct.h>
 #include <asm/prom.h>
-- 
2.24.0


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

* [PATCH 03/12] x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
  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-19  0:21 ` [PATCH 02/12] x86/boot: Explicitly include realmode.h to handle RM reservations Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (9 subsequent siblings)
  12 siblings, 2 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

The inclusion of linux/vmalloc.h, which is required for its definition
of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h
being included by asm/acpi.h.  Explicitly include linux/vmalloc.h so
that a future patch can drop the realmode.h include from asm/acpi.h
without breaking the build.

Fixes: 7fdfe1e40b225 ("x86/ftrace: Use vmalloc special flag")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kernel/ftrace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 2a179fb35cd1..681eae0fb64d 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -23,6 +23,7 @@
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/memory.h>
+#include <linux/vmalloc.h>
 
 #include <trace/syscall.h>
 
-- 
2.24.0


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

* [PATCH 04/12] x86/kprobes: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (2 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 03/12] x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms() Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (8 subsequent siblings)
  12 siblings, 2 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

The inclusion of linux/vmalloc.h, which is required for its definition
of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h
being included by asm/acpi.h.  Explicitly include linux/vmalloc.h so
that a future patch can drop the realmode.h include from asm/acpi.h
without breaking the build.

Fixes: 241a1f2238064 ("x86/kprobes: Use vmalloc special flag")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kernel/kprobes/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 4f13af7cbcdb..a0c223ab7264 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -40,6 +40,7 @@
 #include <linux/frame.h>
 #include <linux/kasan.h>
 #include <linux/moduleloader.h>
+#include <linux/vmalloc.h>
 
 #include <asm/text-patching.h>
 #include <asm/cacheflush.h>
-- 
2.24.0


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

* [PATCH 05/12] perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys()
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (3 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 04/12] x86/kprobes: " Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 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

Through a labyrinthian sequence of includes, usage of virt_to_phys() is
dependent on the include of asm/io.h in asm/realmode.h via asm/acpi.h.
Explicitly include asm/io.h to break the dependency on realmode.h so
that a future patch can remove the realmode.h include from acpi.h
without breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/events/intel/ds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index ce83950036c5..4b94ae4ae369 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -7,6 +7,7 @@
 #include <asm/perf_event.h>
 #include <asm/tlbflush.h>
 #include <asm/insn.h>
+#include <asm/io.h>
 
 #include "../perf_event.h"
 
-- 
2.24.0


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

* [PATCH 06/12] efi/capsule-loader: Explicitly include linux/io.h for page_to_phys()
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (4 preceding siblings ...)
  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-19  0:21 ` 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
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 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

Through a labyrinthian sequence of includes, usage of page_to_phys() is
dependent on the include of asm/io.h in x86's asm/realmode.h, which is
included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
include linux/io.h to break the dependency on realmode.h so that a
future patch can remove the realmode.h include from acpi.h without
breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 drivers/firmware/efi/capsule-loader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c
index b1395133389e..d3067cbd5114 100644
--- a/drivers/firmware/efi/capsule-loader.c
+++ b/drivers/firmware/efi/capsule-loader.c
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/miscdevice.h>
 #include <linux/highmem.h>
+#include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/mutex.h>
 #include <linux/efi.h>
-- 
2.24.0


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

* [PATCH 07/12] virt: vbox: Explicitly include linux/io.h to pick up various defs
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (5 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 06/12] efi/capsule-loader: Explicitly include linux/io.h for page_to_phys() Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 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

Through a labyrinthian sequence of includes, usage of page_to_phys(),
virt_to_phys() and out*() is dependent on the include of asm/io.h in
x86's asm/realmode.h, which is included in x86's asm/acpi.h and thus by
linux/acpi.h.  Explicitly include linux/io.h to break the dependency on
realmode.h so that a future patch can remove the realmode.h include from
acpi.h without breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 drivers/virt/vboxguest/vboxguest_core.c  | 1 +
 drivers/virt/vboxguest/vboxguest_utils.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
index 2307b0329aec..d823d558c0c4 100644
--- a/drivers/virt/vboxguest/vboxguest_core.c
+++ b/drivers/virt/vboxguest/vboxguest_core.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/io.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/sizes.h>
diff --git a/drivers/virt/vboxguest/vboxguest_utils.c b/drivers/virt/vboxguest/vboxguest_utils.c
index 43c391626a00..50920b6fc319 100644
--- a/drivers/virt/vboxguest/vboxguest_utils.c
+++ b/drivers/virt/vboxguest/vboxguest_utils.c
@@ -7,6 +7,7 @@
  */
 
 #include <linux/errno.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/module.h>
-- 
2.24.0


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

* [PATCH 08/12] vmw_balloon: Explicitly include linux/io.h for virt_to_phys()
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (6 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 07/12] virt: vbox: Explicitly include linux/io.h to pick up various defs Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 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

iThrough a labyrinthian sequence of includes, usage of virt_to_phys() is
dependent on the include of asm/io.h in x86's asm/realmode.h, which is
included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
include linux/io.h to break the dependency on realmode.h so that a
future patch can remove the realmode.h include from acpi.h without
breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 drivers/misc/vmw_balloon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index 5e6be1527571..b837e7eba5f7 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -17,6 +17,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/types.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
-- 
2.24.0


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

* [PATCH 09/12] ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys()
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (7 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 08/12] vmw_balloon: Explicitly include linux/io.h for virt_to_phys() Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (3 subsequent siblings)
  12 siblings, 2 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

Through a labyrinthian sequence of includes, usage of virt_to_phys() is
dependent on the include of asm/io.h in x86's asm/realmode.h, which is
included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
include linux/io.h to break the dependency on realmode.h so that a
future patch can remove the realmode.h include from acpi.h without
breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 sound/soc/intel/skylake/skl-sst-cldma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/skylake/skl-sst-cldma.c b/sound/soc/intel/skylake/skl-sst-cldma.c
index 5a2c35f58fda..36f697c61074 100644
--- a/sound/soc/intel/skylake/skl-sst-cldma.c
+++ b/sound/soc/intel/skylake/skl-sst-cldma.c
@@ -8,6 +8,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/io.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include "../common/sst-dsp.h"
-- 
2.24.0


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

* [PATCH 10/12] x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (8 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 09/12] ASoC: Intel: Skylake: " Sean Christopherson
@ 2019-11-19  0:21 ` 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
                   ` (2 subsequent siblings)
  12 siblings, 2 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

None of the declarations in x86's acpi/sleep.h are in any way dependent
on the real mode boot code.  Remove sleep.h's include of asm/realmode.h
to limit the dependencies on realmode.h to code that actually interacts
with the boot code.

Fixes: c9b77ccb52a5c ("x86, realmode: Move ACPI wakeup to unified realmode code")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kernel/acpi/sleep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
index fbb60ca4255c..d06c2079b6c1 100644
--- a/arch/x86/kernel/acpi/sleep.h
+++ b/arch/x86/kernel/acpi/sleep.h
@@ -3,7 +3,7 @@
  *	Variables and functions used by the code in sleep.c
  */
 
-#include <asm/realmode.h>
+#include <linux/linkage.h>
 
 extern unsigned long saved_video_mode;
 extern long saved_magic;
-- 
2.24.0


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

* [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (9 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 10/12] x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h Sean Christopherson
@ 2019-11-19  0:21 ` Sean Christopherson
  2019-11-20 10:58   ` Rafael J. Wysocki
  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-19 11:10 ` [PATCH 00/12] treewide: break dependencies on x86's RM header Ingo Molnar
  12 siblings, 2 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

Convert acpi_wakeup_address from a raw variable into a function so that
x86 can wrap its dereference of the real mode boot header in a function
instead of broadcasting it to the world via a #define.  This sets the
stage for a future patch to move the definition of acpi_wakeup_address()
out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h.

No functional change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/ia64/include/asm/acpi.h | 5 ++++-
 arch/ia64/kernel/acpi.c      | 2 --
 arch/x86/include/asm/acpi.h  | 5 ++++-
 drivers/acpi/sleep.c         | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index f886d4dc9d55..36d7003eee71 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -38,7 +38,10 @@ int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 /* Low-level suspend routine. */
 extern int acpi_suspend_lowlevel(void);
 
-extern unsigned long acpi_wakeup_address;
+static inline unsigned long acpi_wakeup_address(void)
+{
+	return 0;
+}
 
 /*
  * Record the cpei override flag and current logical cpu. This is
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 70d1587ddcd4..a5636524af76 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -42,8 +42,6 @@ int acpi_lapic;
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
-unsigned long acpi_wakeup_address = 0;
-
 #define ACPI_MAX_PLATFORM_INTERRUPTS	256
 
 /* Array to record platform interrupt vectors for generic interrupt routing. */
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index bc9693c9107e..57788ec6fa82 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -62,7 +62,10 @@ static inline void acpi_disable_pci(void)
 extern int (*acpi_suspend_lowlevel)(void);
 
 /* Physical address to resume after wakeup */
-#define acpi_wakeup_address ((unsigned long)(real_mode_header->wakeup_start))
+static inline unsigned long acpi_wakeup_address(void)
+{
+	return ((unsigned long)(real_mode_header->wakeup_start));
+}
 
 /*
  * Check if the CPU can handle C2 and deeper
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 2af937a8b1c5..9e66c4109556 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
 #ifdef CONFIG_ACPI_SLEEP
 	/* do we have a wakeup address for S2 and S3? */
 	if (acpi_state == ACPI_STATE_S3) {
-		if (!acpi_wakeup_address)
+		if (!acpi_wakeup_address())
 			return -EFAULT;
-		acpi_set_waking_vector(acpi_wakeup_address);
+		acpi_set_waking_vector(acpi_wakeup_address());
 
 	}
 	ACPI_FLUSH_CPU_CACHE();
-- 
2.24.0


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

* [PATCH 12/12] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (10 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function Sean Christopherson
@ 2019-11-19  0:21 ` 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
  12 siblings, 2 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

Move the definition of acpi_wakeup_address() into sleep.c to break
linux/acpi.h's dependency (by way of asm/acpi.h) on asm/realmode.h.
Everyone and their mother includes linux/acpi.h, i.e. modifying
realmode.h results in a full kernel rebuild, which makes the already
inscrutable real mode boot code even more difficult to understand and is
positively rage inducing when trying to make changes to x86's boot flow.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/include/asm/acpi.h  |  6 +-----
 arch/x86/kernel/acpi/sleep.c | 11 +++++++++++
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 57788ec6fa82..0cae3f773d44 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -13,7 +13,6 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/mpspec.h>
-#include <asm/realmode.h>
 #include <asm/x86_init.h>
 
 #ifdef CONFIG_ACPI_APEI
@@ -62,10 +61,7 @@ static inline void acpi_disable_pci(void)
 extern int (*acpi_suspend_lowlevel)(void);
 
 /* Physical address to resume after wakeup */
-static inline unsigned long acpi_wakeup_address(void)
-{
-	return ((unsigned long)(real_mode_header->wakeup_start));
-}
+unsigned long acpi_wakeup_address(void);
 
 /*
  * Check if the CPU can handle C2 and deeper
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index ca13851f0570..44d3fb1a1de3 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -26,6 +26,17 @@ unsigned long acpi_realmode_flags;
 static char temp_stack[4096];
 #endif
 
+/**
+ * acpi_wakeup_address - provide physical address for S3 wakeup
+ *
+ * Returns the physical address where the kernel should be resumed after the
+ * system awakes from S3, e.g. for programming into the firmware waking vector.
+ */
+unsigned long acpi_wakeup_address(void)
+{
+	return ((unsigned long)(real_mode_header->wakeup_start));
+}
+
 /**
  * x86_acpi_enter_sleep_state - enter sleep state
  * @state: Sleep state to enter.
-- 
2.24.0


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

* Re: [PATCH 00/12] treewide: break dependencies on x86's RM header
  2019-11-19  0:21 [PATCH 00/12] treewide: break dependencies on x86's RM header Sean Christopherson
                   ` (11 preceding siblings ...)
  2019-11-19  0:21 ` [PATCH 12/12] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c Sean Christopherson
@ 2019-11-19 11:10 ` 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:09   ` [PATCH 00/12] treewide: break dependencies on x86's RM header Ard Biesheuvel
  12 siblings, 2 replies; 41+ messages in thread
From: Ingo Molnar @ 2019-11-19 11:10 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	Rafael J. Wysocki, Len Brown, Pavel Machek, 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


* Sean Christopherson <sean.j.christopherson@intel.com> wrote:

> 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.

Yeah, these kind of parasitic header dependencies are the main driving 
force behind kernel header spaghetti hell: it's super easy to add a new 
header, but very hard to remove them...

Hence they practically only accumulate.

As a result header removal patches get priority, from me at least. :-)

>   - 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.

So if the ACPI maintainers are fine with -tip carrying patches #11 and #12
then I'd be glad to route these patches upstream.

I've applied them to tip:WIP.core/headers as a work-in-progress tree, and 
I'm testing them on randconfigs to make sure there's no broken 
dependencies. I'll wait for the ACPI acks.

I edited the title of patch 12 slightly, to:

   c8bceb321209: x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>

to make sure the big header dependency change is obvious at first sight.

Thanks,

	Ingo

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

* Re: [PATCH 09/12] ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys()
  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
  1 sibling, 0 replies; 41+ messages in thread
From: Mark Brown @ 2019-11-19 12:00 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	Rafael J. Wysocki, Len Brown, Pavel Machek, 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,
	Jaroslav Kysela, Takashi Iwai, linux-ia64, linux-kernel,
	linux-pm, linux-efi, platform-driver-x86, linux-acpi, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

On Mon, Nov 18, 2019 at 04:21:18PM -0800, Sean Christopherson wrote:
> Through a labyrinthian sequence of includes, usage of virt_to_phys() is
> dependent on the include of asm/io.h in x86's asm/realmode.h, which is
> included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
> include linux/io.h to break the dependency on realmode.h so that a
> future patch can remove the realmode.h include from acpi.h without
> breaking the build.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [PATCH] x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys()
  2019-11-19 11:10 ` [PATCH 00/12] treewide: break dependencies on x86's RM header Ingo Molnar
@ 2019-11-19 12:06   ` 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
  1 sibling, 1 reply; 41+ messages in thread
From: Ingo Molnar @ 2019-11-19 12:06 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	Rafael J. Wysocki, Len Brown, Pavel Machek, 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


* Ingo Molnar <mingo@kernel.org> wrote:

> I've applied them to tip:WIP.core/headers as a work-in-progress tree, 
> and I'm testing them on randconfigs to make sure there's no broken 
> dependencies. I'll wait for the ACPI acks.

One more fix was needed, for the intel-quark driver that is only built on 
32-bit configs:

==================>
From: Ingo Molnar <mingo@kernel.org>
Date: Tue, 19 Nov 2019 12:51:56 +0100
Subject: [PATCH] x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys()

Similarly to the previous patches by Sean Christopherson:

 "Through a labyrinthian sequence of includes, usage of virt_to_phys() is
  dependent on the include of asm/io.h in x86's asm/realmode.h, which is
  included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
  include linux/io.h to break the dependency on realmode.h so that a
  future patch can remove the realmode.h include from acpi.h without
  breaking the build."

Cc: linux-kernel@vger.kernel.org
Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/intel-quark/imr.c          | 2 ++
 arch/x86/platform/intel-quark/imr_selftest.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/x86/platform/intel-quark/imr.c b/arch/x86/platform/intel-quark/imr.c
index 6dd25dc5f027..e9d97d52475e 100644
--- a/arch/x86/platform/intel-quark/imr.c
+++ b/arch/x86/platform/intel-quark/imr.c
@@ -29,6 +29,8 @@
 #include <asm/cpu_device_id.h>
 #include <asm/imr.h>
 #include <asm/iosf_mbi.h>
+#include <asm/io.h>
+
 #include <linux/debugfs.h>
 #include <linux/init.h>
 #include <linux/mm.h>
diff --git a/arch/x86/platform/intel-quark/imr_selftest.c b/arch/x86/platform/intel-quark/imr_selftest.c
index 42f879b75f9b..4307830e1b6f 100644
--- a/arch/x86/platform/intel-quark/imr_selftest.c
+++ b/arch/x86/platform/intel-quark/imr_selftest.c
@@ -14,6 +14,8 @@
 #include <asm-generic/sections.h>
 #include <asm/cpu_device_id.h>
 #include <asm/imr.h>
+#include <asm/io.h>
+
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/types.h>


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

* Re: [PATCH 00/12] treewide: break dependencies on x86's RM header
  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:09   ` Ard Biesheuvel
  2019-11-19 12:22     ` Ingo Molnar
  1 sibling, 1 reply; 41+ messages in thread
From: Ard Biesheuvel @ 2019-11-19 12:09 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Sean Christopherson, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, the arch/x86 maintainers, Rafael J. Wysocki,
	Len Brown, Pavel Machek, 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 Mailing List, linux-pm, linux-efi,
	platform-driver-x86, ACPI Devel Maling List, alsa-devel

On Tue, 19 Nov 2019 at 12:10, Ingo Molnar <mingo@kernel.org> wrote:
>
>
> * Sean Christopherson <sean.j.christopherson@intel.com> wrote:
>
> > 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.
>
> Yeah, these kind of parasitic header dependencies are the main driving
> force behind kernel header spaghetti hell: it's super easy to add a new
> header, but very hard to remove them...
>
> Hence they practically only accumulate.
>
> As a result header removal patches get priority, from me at least. :-)
>
> >   - 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.
>
> So if the ACPI maintainers are fine with -tip carrying patches #11 and #12
> then I'd be glad to route these patches upstream.
>
> I've applied them to tip:WIP.core/headers as a work-in-progress tree, and
> I'm testing them on randconfigs to make sure there's no broken
> dependencies. I'll wait for the ACPI acks.
>
> I edited the title of patch 12 slightly, to:
>
>    c8bceb321209: x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>
>
> to make sure the big header dependency change is obvious at first sight.
>

I'm fine with the patches but can we drop the fixes headers please?
This doesn't actually fix anything, and touching early boot stuff for
no good reason should be avoided imo.

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

* Re: [PATCH 00/12] treewide: break dependencies on x86's RM header
  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
  0 siblings, 1 reply; 41+ messages in thread
From: Ingo Molnar @ 2019-11-19 12:22 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Sean Christopherson, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, the arch/x86 maintainers, Rafael J. Wysocki,
	Len Brown, Pavel Machek, 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 Mailing List, linux-pm, linux-efi,
	platform-driver-x86, ACPI Devel Maling List, alsa-devel


* Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:

> On Tue, 19 Nov 2019 at 12:10, Ingo Molnar <mingo@kernel.org> wrote:
> >
> >
> > * Sean Christopherson <sean.j.christopherson@intel.com> wrote:
> >
> > > 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.
> >
> > Yeah, these kind of parasitic header dependencies are the main driving
> > force behind kernel header spaghetti hell: it's super easy to add a new
> > header, but very hard to remove them...
> >
> > Hence they practically only accumulate.
> >
> > As a result header removal patches get priority, from me at least. :-)
> >
> > >   - 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.
> >
> > So if the ACPI maintainers are fine with -tip carrying patches #11 and #12
> > then I'd be glad to route these patches upstream.
> >
> > I've applied them to tip:WIP.core/headers as a work-in-progress tree, and
> > I'm testing them on randconfigs to make sure there's no broken
> > dependencies. I'll wait for the ACPI acks.
> >
> > I edited the title of patch 12 slightly, to:
> >
> >    c8bceb321209: x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>
> >
> > to make sure the big header dependency change is obvious at first sight.
> >
> 
> I'm fine with the patches but can we drop the fixes headers please?
> This doesn't actually fix anything, and touching early boot stuff for
> no good reason should be avoided imo.

Agreed and done.

Thanks,

	Ingo

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

* Re: [PATCH 00/12] treewide: break dependencies on x86's RM header
  2019-11-19 12:22     ` Ingo Molnar
@ 2019-11-19 12:33       ` Ard Biesheuvel
  0 siblings, 0 replies; 41+ messages in thread
From: Ard Biesheuvel @ 2019-11-19 12:33 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Sean Christopherson, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, the arch/x86 maintainers, Rafael J. Wysocki,
	Len Brown, Pavel Machek, 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 Mailing List, linux-pm, linux-efi,
	platform-driver-x86, ACPI Devel Maling List, alsa-devel

On Tue, 19 Nov 2019 at 13:22, Ingo Molnar <mingo@kernel.org> wrote:
>
>
> * Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> > On Tue, 19 Nov 2019 at 12:10, Ingo Molnar <mingo@kernel.org> wrote:
> > >
> > >
> > > * Sean Christopherson <sean.j.christopherson@intel.com> wrote:
> > >
> > > > 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.
> > >
> > > Yeah, these kind of parasitic header dependencies are the main driving
> > > force behind kernel header spaghetti hell: it's super easy to add a new
> > > header, but very hard to remove them...
> > >
> > > Hence they practically only accumulate.
> > >
> > > As a result header removal patches get priority, from me at least. :-)
> > >
> > > >   - 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.
> > >
> > > So if the ACPI maintainers are fine with -tip carrying patches #11 and #12
> > > then I'd be glad to route these patches upstream.
> > >
> > > I've applied them to tip:WIP.core/headers as a work-in-progress tree, and
> > > I'm testing them on randconfigs to make sure there's no broken
> > > dependencies. I'll wait for the ACPI acks.
> > >
> > > I edited the title of patch 12 slightly, to:
> > >
> > >    c8bceb321209: x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>
> > >
> > > to make sure the big header dependency change is obvious at first sight.
> > >
> >
> > I'm fine with the patches but can we drop the fixes headers please?
> > This doesn't actually fix anything, and touching early boot stuff for
> > no good reason should be avoided imo.
>
> Agreed and done.
>

Thanks Ingo

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

* Re: [PATCH] x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys()
  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
  0 siblings, 0 replies; 41+ messages in thread
From: Andy Shevchenko @ 2019-11-19 12:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Sean Christopherson, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	Rafael J. Wysocki, Len Brown, Pavel Machek, 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 Mailing List, Linux PM, linux-efi, Platform Driver,
	ACPI Devel Maling List, ALSA Development Mailing List

On Tue, Nov 19, 2019 at 2:07 PM Ingo Molnar <mingo@kernel.org> wrote:
>
>
> * Ingo Molnar <mingo@kernel.org> wrote:
>
> > I've applied them to tip:WIP.core/headers as a work-in-progress tree,
> > and I'm testing them on randconfigs to make sure there's no broken
> > dependencies. I'll wait for the ACPI acks.
>
> One more fix was needed, for the intel-quark driver that is only built on
> 32-bit configs:
>
> ==================>
> From: Ingo Molnar <mingo@kernel.org>
> Date: Tue, 19 Nov 2019 12:51:56 +0100
> Subject: [PATCH] x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys()
>
> Similarly to the previous patches by Sean Christopherson:
>
>  "Through a labyrinthian sequence of includes, usage of virt_to_phys() is
>   dependent on the include of asm/io.h in x86's asm/realmode.h, which is
>   included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
>   include linux/io.h to break the dependency on realmode.h so that a
>   future patch can remove the realmode.h include from acpi.h without
>   breaking the build."
>

LGTM,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Cc: linux-kernel@vger.kernel.org
> Cc: Sean Christopherson <sean.j.christopherson@intel.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
>  arch/x86/platform/intel-quark/imr.c          | 2 ++
>  arch/x86/platform/intel-quark/imr_selftest.c | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/arch/x86/platform/intel-quark/imr.c b/arch/x86/platform/intel-quark/imr.c
> index 6dd25dc5f027..e9d97d52475e 100644
> --- a/arch/x86/platform/intel-quark/imr.c
> +++ b/arch/x86/platform/intel-quark/imr.c
> @@ -29,6 +29,8 @@
>  #include <asm/cpu_device_id.h>
>  #include <asm/imr.h>
>  #include <asm/iosf_mbi.h>
> +#include <asm/io.h>

A nit: perhaps put it after imr.h.

> +
>  #include <linux/debugfs.h>
>  #include <linux/init.h>
>  #include <linux/mm.h>
> diff --git a/arch/x86/platform/intel-quark/imr_selftest.c b/arch/x86/platform/intel-quark/imr_selftest.c
> index 42f879b75f9b..4307830e1b6f 100644
> --- a/arch/x86/platform/intel-quark/imr_selftest.c
> +++ b/arch/x86/platform/intel-quark/imr_selftest.c
> @@ -14,6 +14,8 @@
>  #include <asm-generic/sections.h>
>  #include <asm/cpu_device_id.h>
>  #include <asm/imr.h>
> +#include <asm/io.h>
> +
>  #include <linux/init.h>
>  #include <linux/mm.h>
>  #include <linux/types.h>
>


-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
  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-26  8:00   ` [tip: core/headers] " tip-bot2 for Sean Christopherson
  1 sibling, 1 reply; 41+ messages in thread
From: Rafael J. Wysocki @ 2019-11-20 10:58 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86, Len Brown,
	Pavel Machek, 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

On Tuesday, November 19, 2019 1:21:20 AM CET Sean Christopherson wrote:
> Convert acpi_wakeup_address from a raw variable into a function so that
> x86 can wrap its dereference of the real mode boot header in a function
> instead of broadcasting it to the world via a #define.  This sets the
> stage for a future patch to move the definition of acpi_wakeup_address()
> out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h.
> 
> No functional change intended.
> 
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  arch/ia64/include/asm/acpi.h | 5 ++++-
>  arch/ia64/kernel/acpi.c      | 2 --
>  arch/x86/include/asm/acpi.h  | 5 ++++-
>  drivers/acpi/sleep.c         | 4 ++--
>  4 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
> index f886d4dc9d55..36d7003eee71 100644
> --- a/arch/ia64/include/asm/acpi.h
> +++ b/arch/ia64/include/asm/acpi.h
> @@ -38,7 +38,10 @@ int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
>  /* Low-level suspend routine. */
>  extern int acpi_suspend_lowlevel(void);
>  
> -extern unsigned long acpi_wakeup_address;
> +static inline unsigned long acpi_wakeup_address(void)
> +{
> +	return 0;
> +}
>  
>  /*
>   * Record the cpei override flag and current logical cpu. This is
> diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
> index 70d1587ddcd4..a5636524af76 100644
> --- a/arch/ia64/kernel/acpi.c
> +++ b/arch/ia64/kernel/acpi.c
> @@ -42,8 +42,6 @@ int acpi_lapic;
>  unsigned int acpi_cpei_override;
>  unsigned int acpi_cpei_phys_cpuid;
>  
> -unsigned long acpi_wakeup_address = 0;
> -
>  #define ACPI_MAX_PLATFORM_INTERRUPTS	256
>  
>  /* Array to record platform interrupt vectors for generic interrupt routing. */
> diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
> index bc9693c9107e..57788ec6fa82 100644
> --- a/arch/x86/include/asm/acpi.h
> +++ b/arch/x86/include/asm/acpi.h
> @@ -62,7 +62,10 @@ static inline void acpi_disable_pci(void)
>  extern int (*acpi_suspend_lowlevel)(void);
>  
>  /* Physical address to resume after wakeup */
> -#define acpi_wakeup_address ((unsigned long)(real_mode_header->wakeup_start))
> +static inline unsigned long acpi_wakeup_address(void)
> +{
> +	return ((unsigned long)(real_mode_header->wakeup_start));
> +}
>  
>  /*
>   * Check if the CPU can handle C2 and deeper
> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> index 2af937a8b1c5..9e66c4109556 100644
> --- a/drivers/acpi/sleep.c
> +++ b/drivers/acpi/sleep.c
> @@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
>  #ifdef CONFIG_ACPI_SLEEP
>  	/* do we have a wakeup address for S2 and S3? */
>  	if (acpi_state == ACPI_STATE_S3) {
> -		if (!acpi_wakeup_address)
> +		if (!acpi_wakeup_address())
>  			return -EFAULT;
> -		acpi_set_waking_vector(acpi_wakeup_address);
> +		acpi_set_waking_vector(acpi_wakeup_address());
>  
>  	}
>  	ACPI_FLUSH_CPU_CACHE();
> 





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

* Re: [PATCH 10/12] x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h
  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
  1 sibling, 0 replies; 41+ messages in thread
From: Rafael J. Wysocki @ 2019-11-20 10:59 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86, Len Brown,
	Pavel Machek, 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

On Tuesday, November 19, 2019 1:21:19 AM CET Sean Christopherson wrote:
> None of the declarations in x86's acpi/sleep.h are in any way dependent
> on the real mode boot code.  Remove sleep.h's include of asm/realmode.h
> to limit the dependencies on realmode.h to code that actually interacts
> with the boot code.
> 
> Fixes: c9b77ccb52a5c ("x86, realmode: Move ACPI wakeup to unified realmode code")
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  arch/x86/kernel/acpi/sleep.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
> index fbb60ca4255c..d06c2079b6c1 100644
> --- a/arch/x86/kernel/acpi/sleep.h
> +++ b/arch/x86/kernel/acpi/sleep.h
> @@ -3,7 +3,7 @@
>   *	Variables and functions used by the code in sleep.c
>   */
>  
> -#include <asm/realmode.h>
> +#include <linux/linkage.h>
>  
>  extern unsigned long saved_video_mode;
>  extern long saved_magic;
> 





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

* Re: [PATCH 12/12] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c
  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
  1 sibling, 0 replies; 41+ messages in thread
From: Rafael J. Wysocki @ 2019-11-20 11:00 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86, Len Brown,
	Pavel Machek, 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

On Tuesday, November 19, 2019 1:21:21 AM CET Sean Christopherson wrote:
> Move the definition of acpi_wakeup_address() into sleep.c to break
> linux/acpi.h's dependency (by way of asm/acpi.h) on asm/realmode.h.
> Everyone and their mother includes linux/acpi.h, i.e. modifying
> realmode.h results in a full kernel rebuild, which makes the already
> inscrutable real mode boot code even more difficult to understand and is
> positively rage inducing when trying to make changes to x86's boot flow.
> 
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  arch/x86/include/asm/acpi.h  |  6 +-----
>  arch/x86/kernel/acpi/sleep.c | 11 +++++++++++
>  2 files changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
> index 57788ec6fa82..0cae3f773d44 100644
> --- a/arch/x86/include/asm/acpi.h
> +++ b/arch/x86/include/asm/acpi.h
> @@ -13,7 +13,6 @@
>  #include <asm/processor.h>
>  #include <asm/mmu.h>
>  #include <asm/mpspec.h>
> -#include <asm/realmode.h>
>  #include <asm/x86_init.h>
>  
>  #ifdef CONFIG_ACPI_APEI
> @@ -62,10 +61,7 @@ static inline void acpi_disable_pci(void)
>  extern int (*acpi_suspend_lowlevel)(void);
>  
>  /* Physical address to resume after wakeup */
> -static inline unsigned long acpi_wakeup_address(void)
> -{
> -	return ((unsigned long)(real_mode_header->wakeup_start));
> -}
> +unsigned long acpi_wakeup_address(void);
>  
>  /*
>   * Check if the CPU can handle C2 and deeper
> diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
> index ca13851f0570..44d3fb1a1de3 100644
> --- a/arch/x86/kernel/acpi/sleep.c
> +++ b/arch/x86/kernel/acpi/sleep.c
> @@ -26,6 +26,17 @@ unsigned long acpi_realmode_flags;
>  static char temp_stack[4096];
>  #endif
>  
> +/**
> + * acpi_wakeup_address - provide physical address for S3 wakeup
> + *
> + * Returns the physical address where the kernel should be resumed after the
> + * system awakes from S3, e.g. for programming into the firmware waking vector.
> + */
> +unsigned long acpi_wakeup_address(void)
> +{
> +	return ((unsigned long)(real_mode_header->wakeup_start));
> +}
> +
>  /**
>   * x86_acpi_enter_sleep_state - enter sleep state
>   * @state: Sleep state to enter.
> 





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

* Re: [PATCH 03/12] x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
  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
  1 sibling, 0 replies; 41+ messages in thread
From: Steven Rostedt @ 2019-11-22  2:11 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	Rafael J. Wysocki, Len Brown, Pavel Machek, Tony Luck,
	Fenghua Yu, Peter Zijlstra, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	H. Peter Anvin, 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

On Mon, 18 Nov 2019 16:21:12 -0800
Sean Christopherson <sean.j.christopherson@intel.com> wrote:

> The inclusion of linux/vmalloc.h, which is required for its definition
> of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h
> being included by asm/acpi.h.  Explicitly include linux/vmalloc.h so
> that a future patch can drop the realmode.h include from asm/acpi.h
> without breaking the build.
> 
> Fixes: 7fdfe1e40b225 ("x86/ftrace: Use vmalloc special flag")
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> ---
>  arch/x86/kernel/ftrace.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index 2a179fb35cd1..681eae0fb64d 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -23,6 +23,7 @@
>  #include <linux/list.h>
>  #include <linux/module.h>
>  #include <linux/memory.h>
> +#include <linux/vmalloc.h>
>  
>  #include <trace/syscall.h>
>  


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

* Re: [PATCH 04/12] x86/kprobes: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
  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
  1 sibling, 0 replies; 41+ messages in thread
From: Steven Rostedt @ 2019-11-22  2:12 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	Rafael J. Wysocki, Len Brown, Pavel Machek, Tony Luck,
	Fenghua Yu, Peter Zijlstra, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	H. Peter Anvin, 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

On Mon, 18 Nov 2019 16:21:13 -0800
Sean Christopherson <sean.j.christopherson@intel.com> wrote:

> The inclusion of linux/vmalloc.h, which is required for its definition
> of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h
> being included by asm/acpi.h.  Explicitly include linux/vmalloc.h so
> that a future patch can drop the realmode.h include from asm/acpi.h
> without breaking the build.
> 
> Fixes: 241a1f2238064 ("x86/kprobes: Use vmalloc special flag")
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

> ---
>  arch/x86/kernel/kprobes/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
> index 4f13af7cbcdb..a0c223ab7264 100644
> --- a/arch/x86/kernel/kprobes/core.c
> +++ b/arch/x86/kernel/kprobes/core.c
> @@ -40,6 +40,7 @@
>  #include <linux/frame.h>
>  #include <linux/kasan.h>
>  #include <linux/moduleloader.h>
> +#include <linux/vmalloc.h>
>  
>  #include <asm/text-patching.h>
>  #include <asm/cacheflush.h>


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

* Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
  2019-11-20 10:58   ` Rafael J. Wysocki
@ 2019-11-25 10:48     ` Pavel Machek
  2019-11-25 17:00       ` Sean Christopherson
  0 siblings, 1 reply; 41+ messages in thread
From: Pavel Machek @ 2019-11-25 10:48 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Sean Christopherson, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, Len Brown, 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

> On Tuesday, November 19, 2019 1:21:20 AM CET Sean Christopherson wrote:
> > Convert acpi_wakeup_address from a raw variable into a function so that
> > x86 can wrap its dereference of the real mode boot header in a function
> > instead of broadcasting it to the world via a #define.  This sets the
> > stage for a future patch to move the definition of acpi_wakeup_address()
> > out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> > --- a/drivers/acpi/sleep.c
> > +++ b/drivers/acpi/sleep.c
> > @@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
> >  #ifdef CONFIG_ACPI_SLEEP
> >  	/* do we have a wakeup address for S2 and S3? */
> >  	if (acpi_state == ACPI_STATE_S3) {
> > -		if (!acpi_wakeup_address)
> > +		if (!acpi_wakeup_address())
> >  			return -EFAULT;
> > -		acpi_set_waking_vector(acpi_wakeup_address);
> > +		acpi_set_waking_vector(acpi_wakeup_address());
> >  

You might want to store result in a variable... especially since you are
turning inline function into real one in a next patch.

And maybe function should be called get_acip_wakeup_address or
something? This way it is easy to mistake actual wakeup address from
function that gets it...

Best regards,
									Pavel
> 
> 

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

* Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
  2019-11-25 10:48     ` Pavel Machek
@ 2019-11-25 17:00       ` Sean Christopherson
  2019-11-26 11:16         ` Ingo Molnar
  0 siblings, 1 reply; 41+ messages in thread
From: Sean Christopherson @ 2019-11-25 17:00 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Rafael J. Wysocki, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	x86, Len Brown, 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

On Mon, Nov 25, 2019 at 11:48:03AM +0100, Pavel Machek wrote:
> > On Tuesday, November 19, 2019 1:21:20 AM CET Sean Christopherson wrote:
> > > Convert acpi_wakeup_address from a raw variable into a function so that
> > > x86 can wrap its dereference of the real mode boot header in a function
> > > instead of broadcasting it to the world via a #define.  This sets the
> > > stage for a future patch to move the definition of acpi_wakeup_address()
> > > out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h.
> > > 
> > > No functional change intended.
> > > 
> > > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > 
> > Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > > --- a/drivers/acpi/sleep.c
> > > +++ b/drivers/acpi/sleep.c
> > > @@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
> > >  #ifdef CONFIG_ACPI_SLEEP
> > >  	/* do we have a wakeup address for S2 and S3? */
> > >  	if (acpi_state == ACPI_STATE_S3) {
> > > -		if (!acpi_wakeup_address)
> > > +		if (!acpi_wakeup_address())
> > >  			return -EFAULT;
> > > -		acpi_set_waking_vector(acpi_wakeup_address);
> > > +		acpi_set_waking_vector(acpi_wakeup_address());
> > >  
> 
> You might want to store result in a variable... especially since you are
> turning inline function into real one in a next patch.
> 
> And maybe function should be called get_acip_wakeup_address or
> something? This way it is easy to mistake actual wakeup address from
> function that gets it...

Agreed on both counts.


Ingo,

Would you prefer a v2 of the entire series (with Acks and removal of Fixes),
or a v2 that includes only the last two patches?

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

* [tip: core/headers] vmw_balloon: Explicitly include linux/io.h for virt_to_phys()
  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-bot2 for Sean Christopherson
  0 siblings, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     0ea1d7c60b8c88283e2656c7cfe688dc68646d44
Gitweb:        https://git.kernel.org/tip/0ea1d7c60b8c88283e2656c7cfe688dc68646d44
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:17 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:27 +01:00

vmw_balloon: Explicitly include linux/io.h for virt_to_phys()

iThrough a labyrinthian sequence of includes, usage of virt_to_phys() is
dependent on the include of asm/io.h in x86's asm/realmode.h, which is
included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
include linux/io.h to break the dependency on realmode.h so that a
future patch can remove the realmode.h include from acpi.h without
breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-9-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/misc/vmw_balloon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index 5e6be15..b837e7e 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -17,6 +17,7 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/types.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>

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

* [tip: core/headers] ACPI/sleep: Convert acpi_wakeup_address into a function
  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-26  8:00   ` tip-bot2 for Sean Christopherson
  1 sibling, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     a9760aba02b346e74fffe8e35e4f1e9067de5281
Gitweb:        https://git.kernel.org/tip/a9760aba02b346e74fffe8e35e4f1e9067de5281
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:20 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:27 +01:00

ACPI/sleep: Convert acpi_wakeup_address into a function

Convert acpi_wakeup_address from a raw variable into a function so that
x86 can wrap its dereference of the real mode boot header in a function
instead of broadcasting it to the world via a #define.  This sets the
stage for a future patch to move the definition of acpi_wakeup_address()
out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h.

No functional change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-12-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/ia64/include/asm/acpi.h | 5 ++++-
 arch/ia64/kernel/acpi.c      | 2 --
 arch/x86/include/asm/acpi.h  | 5 ++++-
 drivers/acpi/sleep.c         | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index f886d4d..36d7003 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -38,7 +38,10 @@ int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 /* Low-level suspend routine. */
 extern int acpi_suspend_lowlevel(void);
 
-extern unsigned long acpi_wakeup_address;
+static inline unsigned long acpi_wakeup_address(void)
+{
+	return 0;
+}
 
 /*
  * Record the cpei override flag and current logical cpu. This is
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 70d1587..a563652 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -42,8 +42,6 @@ int acpi_lapic;
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
-unsigned long acpi_wakeup_address = 0;
-
 #define ACPI_MAX_PLATFORM_INTERRUPTS	256
 
 /* Array to record platform interrupt vectors for generic interrupt routing. */
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index bc9693c..57788ec 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -62,7 +62,10 @@ static inline void acpi_disable_pci(void)
 extern int (*acpi_suspend_lowlevel)(void);
 
 /* Physical address to resume after wakeup */
-#define acpi_wakeup_address ((unsigned long)(real_mode_header->wakeup_start))
+static inline unsigned long acpi_wakeup_address(void)
+{
+	return ((unsigned long)(real_mode_header->wakeup_start));
+}
 
 /*
  * Check if the CPU can handle C2 and deeper
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 9fa77d7..f5cca9f 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
 #ifdef CONFIG_ACPI_SLEEP
 	/* do we have a wakeup address for S2 and S3? */
 	if (acpi_state == ACPI_STATE_S3) {
-		if (!acpi_wakeup_address)
+		if (!acpi_wakeup_address())
 			return -EFAULT;
-		acpi_set_waking_vector(acpi_wakeup_address);
+		acpi_set_waking_vector(acpi_wakeup_address());
 
 	}
 	ACPI_FLUSH_CPU_CACHE();

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

* [tip: core/headers] virt: vbox: Explicitly include linux/io.h to pick up various defs
  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-bot2 for Sean Christopherson
  0 siblings, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     3f61b293e48068606fac988f6d72a710c0dce668
Gitweb:        https://git.kernel.org/tip/3f61b293e48068606fac988f6d72a710c0dce668
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:16 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:27 +01:00

virt: vbox: Explicitly include linux/io.h to pick up various defs

Through a labyrinthian sequence of includes, usage of page_to_phys(),
virt_to_phys() and out*() is dependent on the include of asm/io.h in
x86's asm/realmode.h, which is included in x86's asm/acpi.h and thus by
linux/acpi.h.  Explicitly include linux/io.h to break the dependency on
realmode.h so that a future patch can remove the realmode.h include from
acpi.h without breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-8-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/virt/vboxguest/vboxguest_core.c  | 1 +
 drivers/virt/vboxguest/vboxguest_utils.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
index 2307b03..d823d55 100644
--- a/drivers/virt/vboxguest/vboxguest_core.c
+++ b/drivers/virt/vboxguest/vboxguest_core.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/io.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
 #include <linux/sizes.h>
diff --git a/drivers/virt/vboxguest/vboxguest_utils.c b/drivers/virt/vboxguest/vboxguest_utils.c
index 75fd140..80e0f12 100644
--- a/drivers/virt/vboxguest/vboxguest_utils.c
+++ b/drivers/virt/vboxguest/vboxguest_utils.c
@@ -7,6 +7,7 @@
  */
 
 #include <linux/errno.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/module.h>

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

* [tip: core/headers] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>
  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-bot2 for Sean Christopherson
  1 sibling, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     7c8dfff8783bdc19696b563e01c588e81205ef15
Gitweb:        https://git.kernel.org/tip/7c8dfff8783bdc19696b563e01c588e81205ef15
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:21 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:27 +01:00

x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c, remove <asm/realmode.h> from <asm/acpi.h>

Move the definition of acpi_wakeup_address() into sleep.c to break
linux/acpi.h's dependency (by way of asm/acpi.h) on asm/realmode.h.
Everyone and their mother includes linux/acpi.h, i.e. modifying
realmode.h results in a full kernel rebuild, which makes the already
inscrutable real mode boot code even more difficult to understand and is
positively rage inducing when trying to make changes to x86's boot flow.

[ mingo: Renamed acpi_wakeup_address() to acpi_get_wakeup_address(), as suggested by Borislav Petkov. ]

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-13-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/ia64/include/asm/acpi.h |  2 +-
 arch/x86/include/asm/acpi.h  |  6 +-----
 arch/x86/kernel/acpi/sleep.c | 11 +++++++++++
 drivers/acpi/sleep.c         |  4 ++--
 4 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index 36d7003..b66ba90 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -38,7 +38,7 @@ int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 /* Low-level suspend routine. */
 extern int acpi_suspend_lowlevel(void);
 
-static inline unsigned long acpi_wakeup_address(void)
+static inline unsigned long acpi_get_wakeup_address(void)
 {
 	return 0;
 }
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index 57788ec..ca09764 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -13,7 +13,6 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/mpspec.h>
-#include <asm/realmode.h>
 #include <asm/x86_init.h>
 
 #ifdef CONFIG_ACPI_APEI
@@ -62,10 +61,7 @@ static inline void acpi_disable_pci(void)
 extern int (*acpi_suspend_lowlevel)(void);
 
 /* Physical address to resume after wakeup */
-static inline unsigned long acpi_wakeup_address(void)
-{
-	return ((unsigned long)(real_mode_header->wakeup_start));
-}
+unsigned long acpi_get_wakeup_address(void);
 
 /*
  * Check if the CPU can handle C2 and deeper
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index ca13851..26b7256 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -27,6 +27,17 @@ static char temp_stack[4096];
 #endif
 
 /**
+ * acpi_get_wakeup_address - provide physical address for S3 wakeup
+ *
+ * Returns the physical address where the kernel should be resumed after the
+ * system awakes from S3, e.g. for programming into the firmware waking vector.
+ */
+unsigned long acpi_get_wakeup_address(void)
+{
+	return ((unsigned long)(real_mode_header->wakeup_start));
+}
+
+/**
  * x86_acpi_enter_sleep_state - enter sleep state
  * @state: Sleep state to enter.
  *
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index f5cca9f..6d3b2ea 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
 #ifdef CONFIG_ACPI_SLEEP
 	/* do we have a wakeup address for S2 and S3? */
 	if (acpi_state == ACPI_STATE_S3) {
-		if (!acpi_wakeup_address())
+		if (!acpi_get_wakeup_address())
 			return -EFAULT;
-		acpi_set_waking_vector(acpi_wakeup_address());
+		acpi_set_waking_vector(acpi_get_wakeup_address());
 
 	}
 	ACPI_FLUSH_CPU_CACHE();

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

* [tip: core/headers] x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h
  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-bot2 for Sean Christopherson
  1 sibling, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     25466d56fbadb785a1342aae4b2147ea1781d55a
Gitweb:        https://git.kernel.org/tip/25466d56fbadb785a1342aae4b2147ea1781d55a
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:19 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:27 +01:00

x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h

None of the declarations in x86's acpi/sleep.h are in any way dependent
on the real mode boot code.  Remove sleep.h's include of asm/realmode.h
to limit the dependencies on realmode.h to code that actually interacts
with the boot code.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-11-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/acpi/sleep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
index fbb60ca..d06c207 100644
--- a/arch/x86/kernel/acpi/sleep.h
+++ b/arch/x86/kernel/acpi/sleep.h
@@ -3,7 +3,7 @@
  *	Variables and functions used by the code in sleep.c
  */
 
-#include <asm/realmode.h>
+#include <linux/linkage.h>
 
 extern unsigned long saved_video_mode;
 extern long saved_magic;

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

* [tip: core/headers] ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys()
  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-bot2 for Sean Christopherson
  1 sibling, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Mark Brown, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     6d1002c4229fa3cfdb5b73a2c8a45a4b6090ba0a
Gitweb:        https://git.kernel.org/tip/6d1002c4229fa3cfdb5b73a2c8a45a4b6090ba0a
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:18 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:27 +01:00

ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys()

Through a labyrinthian sequence of includes, usage of virt_to_phys() is
dependent on the include of asm/io.h in x86's asm/realmode.h, which is
included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
include linux/io.h to break the dependency on realmode.h so that a
future patch can remove the realmode.h include from acpi.h without
breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-10-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 sound/soc/intel/skylake/skl-sst-cldma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/intel/skylake/skl-sst-cldma.c b/sound/soc/intel/skylake/skl-sst-cldma.c
index 5a2c35f..36f697c 100644
--- a/sound/soc/intel/skylake/skl-sst-cldma.c
+++ b/sound/soc/intel/skylake/skl-sst-cldma.c
@@ -8,6 +8,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/io.h>
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include "../common/sst-dsp.h"

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

* [tip: core/headers] x86/kprobes: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
  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-bot2 for Sean Christopherson
  1 sibling, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     d5d411f81e552a67f2aa7cc39bba0c1d7d3db09a
Gitweb:        https://git.kernel.org/tip/d5d411f81e552a67f2aa7cc39bba0c1d7d3db09a
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:13 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:26 +01:00

x86/kprobes: Explicitly include vmalloc.h for set_vm_flush_reset_perms()

The inclusion of linux/vmalloc.h, which is required for its definition
of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h
being included by asm/acpi.h.  Explicitly include linux/vmalloc.h so
that a future patch can drop the realmode.h include from asm/acpi.h
without breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-5-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/kprobes/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 43fc13c..e7d4c89 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -40,6 +40,7 @@
 #include <linux/frame.h>
 #include <linux/kasan.h>
 #include <linux/moduleloader.h>
+#include <linux/vmalloc.h>
 
 #include <asm/text-patching.h>
 #include <asm/cacheflush.h>

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

* [tip: core/headers] perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys()
  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-bot2 for Sean Christopherson
  0 siblings, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     7bd4cb7e93c288dbec40cd3065e4fceb21343b11
Gitweb:        https://git.kernel.org/tip/7bd4cb7e93c288dbec40cd3065e4fceb21343b11
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:14 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:26 +01:00

perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys()

Through a labyrinthian sequence of includes, usage of virt_to_phys() is
dependent on the include of asm/io.h in asm/realmode.h via asm/acpi.h.
Explicitly include asm/io.h to break the dependency on realmode.h so
that a future patch can remove the realmode.h include from acpi.h
without breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-6-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/events/intel/ds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index ce83950..4b94ae4 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -7,6 +7,7 @@
 #include <asm/perf_event.h>
 #include <asm/tlbflush.h>
 #include <asm/insn.h>
+#include <asm/io.h>
 
 #include "../perf_event.h"
 

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

* [tip: core/headers] x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms()
  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-bot2 for Sean Christopherson
  1 sibling, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     68f461af8bb9f1d4e69469aa91a741f12f679f19
Gitweb:        https://git.kernel.org/tip/68f461af8bb9f1d4e69469aa91a741f12f679f19
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:12 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:26 +01:00

x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms()

The inclusion of linux/vmalloc.h, which is required for its definition
of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h
being included by asm/acpi.h.  Explicitly include linux/vmalloc.h so
that a future patch can drop the realmode.h include from asm/acpi.h
without breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-4-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/ftrace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 024c305..2009047 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -23,6 +23,7 @@
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/memory.h>
+#include <linux/vmalloc.h>
 
 #include <trace/syscall.h>
 

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

* [tip: core/headers] efi/capsule-loader: Explicitly include linux/io.h for page_to_phys()
  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-bot2 for Sean Christopherson
  0 siblings, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     53db61e1d344adda56a2a9dc8ae4fc099df0f95a
Gitweb:        https://git.kernel.org/tip/53db61e1d344adda56a2a9dc8ae4fc099df0f95a
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:15 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:26 +01:00

efi/capsule-loader: Explicitly include linux/io.h for page_to_phys()

Through a labyrinthian sequence of includes, usage of page_to_phys() is
dependent on the include of asm/io.h in x86's asm/realmode.h, which is
included in x86's asm/acpi.h and thus by linux/acpi.h.  Explicitly
include linux/io.h to break the dependency on realmode.h so that a
future patch can remove the realmode.h include from acpi.h without
breaking the build.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-7-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/capsule-loader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c
index b139513..d3067cb 100644
--- a/drivers/firmware/efi/capsule-loader.c
+++ b/drivers/firmware/efi/capsule-loader.c
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/miscdevice.h>
 #include <linux/highmem.h>
+#include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/mutex.h>
 #include <linux/efi.h>

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

* [tip: core/headers] x86/boot: Explicitly include realmode.h to handle RM reservations
  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-bot2 for Sean Christopherson
  0 siblings, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     db802ef3c91fad3b40a240f63d8e2fda23a1a9b1
Gitweb:        https://git.kernel.org/tip/db802ef3c91fad3b40a240f63d8e2fda23a1a9b1
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:11 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:26 +01:00

x86/boot: Explicitly include realmode.h to handle RM reservations

Explicitly include asm/realmode.h, which provides reserve_real_mode(),
instead of picking it up by an indirect include of asm/acpi.h.  acpi.h
will soon stop including realmode.h so that changing realmode.h doesn't
require a full kernel rebuild.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-3-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index a871381..38dfb61 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -35,6 +35,7 @@
 #include <asm/kaslr.h>
 #include <asm/mce.h>
 #include <asm/mtrr.h>
+#include <asm/realmode.h>
 #include <asm/olpc_ofw.h>
 #include <asm/pci-direct.h>
 #include <asm/prom.h>

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

* [tip: core/headers] x86/efi: Explicitly include realmode.h to handle RM trampoline quirk
  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-bot2 for Sean Christopherson
  0 siblings, 0 replies; 41+ messages in thread
From: tip-bot2 for Sean Christopherson @ 2019-11-26  8:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sean Christopherson, Borislav Petkov, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Ingo Molnar, x86, LKML

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     950e3ce5372c474066ccfc66f424be6bc2828c99
Gitweb:        https://git.kernel.org/tip/950e3ce5372c474066ccfc66f424be6bc2828c99
Author:        Sean Christopherson <sean.j.christopherson@intel.com>
AuthorDate:    Mon, 18 Nov 2019 16:21:10 -08:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 19 Nov 2019 17:50:26 +01:00

x86/efi: Explicitly include realmode.h to handle RM trampoline quirk

Explicitly include asm/realmode.h, which is needed to handle a real mode
trampoline quirk in efi_free_boot_services(), instead of picking it up
by way of linux/acpi.h.  acpi.h will soon stop including realmode.h so
that changing realmode.h doesn't require a full kernel rebuild.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20191119002121.4107-2-sean.j.christopherson@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/platform/efi/quirks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 3b9fd67..f9ef5c5 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -16,6 +16,7 @@
 #include <asm/efi.h>
 #include <asm/uv/uv.h>
 #include <asm/cpu_device_id.h>
+#include <asm/realmode.h>
 #include <asm/reboot.h>
 
 #define EFI_MIN_RESERVE 5120

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

* Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
  2019-11-25 17:00       ` Sean Christopherson
@ 2019-11-26 11:16         ` Ingo Molnar
  2019-11-26 11:25           ` Ingo Molnar
  0 siblings, 1 reply; 41+ messages in thread
From: Ingo Molnar @ 2019-11-26 11:16 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Pavel Machek, Rafael J. Wysocki, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, Len Brown, 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


* Sean Christopherson <sean.j.christopherson@intel.com> wrote:

> On Mon, Nov 25, 2019 at 11:48:03AM +0100, Pavel Machek wrote:
> > > On Tuesday, November 19, 2019 1:21:20 AM CET Sean Christopherson wrote:
> > > > Convert acpi_wakeup_address from a raw variable into a function so that
> > > > x86 can wrap its dereference of the real mode boot header in a function
> > > > instead of broadcasting it to the world via a #define.  This sets the
> > > > stage for a future patch to move the definition of acpi_wakeup_address()
> > > > out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h.
> > > > 
> > > > No functional change intended.
> > > > 
> > > > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > > 
> > > Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > 
> > > > --- a/drivers/acpi/sleep.c
> > > > +++ b/drivers/acpi/sleep.c
> > > > @@ -63,9 +63,9 @@ static int acpi_sleep_prepare(u32 acpi_state)
> > > >  #ifdef CONFIG_ACPI_SLEEP
> > > >  	/* do we have a wakeup address for S2 and S3? */
> > > >  	if (acpi_state == ACPI_STATE_S3) {
> > > > -		if (!acpi_wakeup_address)
> > > > +		if (!acpi_wakeup_address())
> > > >  			return -EFAULT;
> > > > -		acpi_set_waking_vector(acpi_wakeup_address);
> > > > +		acpi_set_waking_vector(acpi_wakeup_address());
> > > >  
> > 
> > You might want to store result in a variable... especially since you are
> > turning inline function into real one in a next patch.
> > 
> > And maybe function should be called get_acip_wakeup_address or
> > something? This way it is easy to mistake actual wakeup address from
> > function that gets it...
> 
> Agreed on both counts.
> 
> 
> Ingo,
> 
> Would you prefer a v2 of the entire series (with Acks and removal of Fixes),
> or a v2 that includes only the last two patches?

Yep, that would be handy. I have them committed to tip:core/headers, but 
haven't sent it to Linus yet, and can redo that all with these 
improvements.

Thanks,

	Ingo

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

* Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
  2019-11-26 11:16         ` Ingo Molnar
@ 2019-11-26 11:25           ` Ingo Molnar
  0 siblings, 0 replies; 41+ messages in thread
From: Ingo Molnar @ 2019-11-26 11:25 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Pavel Machek, Rafael J. Wysocki, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, Len Brown, 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


* Ingo Molnar <mingo@kernel.org> wrote:

> > Would you prefer a v2 of the entire series (with Acks and removal of 
> > Fixes), or a v2 that includes only the last two patches?
> 
> Yep, that would be handy. I have them committed to tip:core/headers, 
> but haven't sent it to Linus yet, and can redo that all with these 
> improvements.

Now these bits are back in tip:WIP.core/headers, waiting for the v2 
submission.

Thanks,

	Ingo

^ 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).