From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1C08C432C0 for ; Mon, 25 Nov 2019 10:48:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A40E220740 for ; Mon, 25 Nov 2019 10:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727568AbfKYKsG (ORCPT ); Mon, 25 Nov 2019 05:48:06 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:52386 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727278AbfKYKsF (ORCPT ); Mon, 25 Nov 2019 05:48:05 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 141771C1FD1; Mon, 25 Nov 2019 11:48:03 +0100 (CET) Date: Mon, 25 Nov 2019 11:48:03 +0100 From: Pavel Machek To: "Rafael J. Wysocki" Cc: Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, 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@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 Message-ID: <20191125104803.v6goacte2vjakx64@ucw.cz> References: <20191119002121.4107-1-sean.j.christopherson@intel.com> <20191119002121.4107-12-sean.j.christopherson@intel.com> <7338293.UcAxln0NAJ@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7338293.UcAxln0NAJ@kreacher> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org > 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 > > Acked-by: Rafael J. Wysocki > > > --- 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 > >