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=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 6B14EC432C3 for ; Wed, 20 Nov 2019 11:00:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E8A32245D for ; Wed, 20 Nov 2019 11:00:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728968AbfKTLAx (ORCPT ); Wed, 20 Nov 2019 06:00:53 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:64928 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727374AbfKTLAx (ORCPT ); Wed, 20 Nov 2019 06:00:53 -0500 Received: from 79.184.253.244.ipv4.supernova.orange.pl (79.184.253.244) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.292) id a3504edb7f1d7620; Wed, 20 Nov 2019 12:00:49 +0100 From: "Rafael J. Wysocki" To: Sean Christopherson Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, 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@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 12/12] x86/ACPI/sleep: Move acpi_wakeup_address() definition into sleep.c Date: Wed, 20 Nov 2019 12:00:48 +0100 Message-ID: <1707133.c5szpGgj5A@kreacher> In-Reply-To: <20191119002121.4107-13-sean.j.christopherson@intel.com> References: <20191119002121.4107-1-sean.j.christopherson@intel.com> <20191119002121.4107-13-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Rafael J. Wysocki > --- > 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 > #include > #include > -#include > #include > > #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. >