linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, Len Brown <len.brown@intel.com>,
	Pavel Machek <pavel@ucw.cz>, Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Nadav Amit <namit@vmware.com>,
	"VMware, Inc." <pv-drivers@vmware.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-efi@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
Date: Wed, 20 Nov 2019 11:58:31 +0100	[thread overview]
Message-ID: <7338293.UcAxln0NAJ@kreacher> (raw)
In-Reply-To: <20191119002121.4107-12-sean.j.christopherson@intel.com>

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();
> 





  reply	other threads:[~2019-11-20 10:58 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7338293.UcAxln0NAJ@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andy@infradead.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=dvhart@infradead.org \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=len.brown@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=namit@vmware.com \
    --cc=pavel@ucw.cz \
    --cc=perex@perex.cz \
    --cc=peterz@infradead.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=rostedt@goodmis.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=yang.jie@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).