Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
- Subject: Re: [PATCH 11/12] ACPI/sleep: Convert acpi_wakeup_address into a function
- From: Pavel Machek <pavel@xxxxxx>
- Date: Mon, 25 Nov 2019 11:48:03 +0100
- Cc: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, x86@xxxxxxxxxx, Len Brown <len.brown@xxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Ard Biesheuvel <ardb@xxxxxxxxxx>, Darren Hart <dvhart@xxxxxxxxxxxxx>, Andy Shevchenko <andy@xxxxxxxxxxxxx>, Nadav Amit <namit@xxxxxxxxxx>, "VMware, Inc." <pv-drivers@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Hans de Goede <hdegoede@xxxxxxxxxx>, Cezary Rojewski <cezary.rojewski@xxxxxxxxx>, Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>, Liam Girdwood <liam.r.girdwood@xxxxxxxxxxxxxxx>, Jie Yang <yang.jie@xxxxxxxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, alsa-devel@xxxxxxxxxxxxxxxx
- In-reply-to: <7338293.UcAxln0NAJ@kreacher>
- References: <20191119002121.4107-1-sean.j.christopherson@intel.com> <20191119002121.4107-12-sean.j.christopherson@intel.com> <7338293.UcAxln0NAJ@kreacher>
- User-agent: NeoMutt/20170113 (1.7.2)
> 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@xxxxxxxxx>
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> > --- 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
>
>
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]