Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1897609rdb; Mon, 9 Oct 2023 06:32:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTKAzrHusuS28sKX5wYvL3j3yFauYAvohyLQAVD1RGj5z6CPE0Ik1wi05vdBPztJYB3CpY X-Received: by 2002:a05:6358:885:b0:143:91a2:8e0a with SMTP id m5-20020a056358088500b0014391a28e0amr17362523rwj.4.1696858349305; Mon, 09 Oct 2023 06:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696858349; cv=none; d=google.com; s=arc-20160816; b=dChWcJb1rgxoIuFhWbclQfLvx/6D06/Zp8aj0nNDLznQuTWeRn/Q39DrswD/z5lNx/ UQLhjZZ3QrcsC3JwZ3HCGXNJvnTpsylwVjnkI2j9e5/vdozAqEWbv4rZOFaFamMOal5p 4plwaDrq4yQ/DIE+GS88+NdaWd3vF8OUEFQEnNb2i74gcTm5Sk3YnvCCbwbemW7zoWxU wUQe6adwcs1jbimTi/oZArsFu6Vhgs74iuwMqhJ5Zn4Tpwp0d2FOvmrA/9Ot/0akhA3W NYMLkNtXkWAWhAp/CIuJch81ouPWxs3h4FdkWgrn/23zRFQ1uQ+qJpAxBZbxj6cf/rLZ lodQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iOgJR4wS1UUrEdwGnvSxy1lxaroFCOrRdSqPrZg1EDU=; fh=xDd0Qwl4MrjIQcp9OHZVw4DuXaTa/GWyorukZppqvkQ=; b=KtnEsZ7jm9ykbUWK9ASt++jlusm9VQCzGhonpBa9QgwuL52On5U49rjxf6oQ5CO52i U5mBeFUOnYvHucZyql3Zf+TxaKLMH/gOk7JvHmHouWTPnmuDwXxrUNtamYh1MJa3mUGQ Hg+pSEbUo783rhecFRtRP3qyu5lNA5TnF8rl5oWlhytwdEdXJadW//VDPY1Bbic3qq0p SeC3bqamsUiaqCvtyRcrLHHD6Ng1bllKCPH78o+6o+ZgVxYLvnpMkkbZeXMS5KkUVleI ppdmBIE9loJmT/hweJitJZARRxIlJqPfdwN9gTbY4oZM2eYfQbbib33OnMn39uIxcti0 RL5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F8oCP8+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ng18-20020a17090b1a9200b002769b4b64e7si13053455pjb.20.2023.10.09.06.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 06:32:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F8oCP8+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7D2A0809D3DC; Mon, 9 Oct 2023 06:32:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377108AbjJINc0 (ORCPT + 99 others); Mon, 9 Oct 2023 09:32:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377102AbjJINcY (ORCPT ); Mon, 9 Oct 2023 09:32:24 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F15DDB6 for ; Mon, 9 Oct 2023 06:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696858344; x=1728394344; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=l6X7t52RMQYAzBBtDAQ5xYHufke1Kv7hNGxphb4I9Vo=; b=F8oCP8+kW0jsRTjB6FqaslR8rHMYpWQP8if9VE2O09Y+doyPLUmnz12j FB1o5LbeL/9oix5ivslYFPiuDP02DSfB/8NsWZu5nZopXEt2h1065Why6 tcdcPA9ZJLZZeAu6FMR6wqx2fPeduG0XqlwPko3AzXMU8WbyGtCuHu4QE Ppfuc9JTIeEMV1dICbJchXSa++ZBWlavyEJzpHH4mmHbDGW143STvzrR2 bjspJZfggz6z0nuzV/wQ+POV6lCbd24A/x+Dhc5boZfnH8muwD/vXZP0D BS/jRouH4DtVhJwr/XzEE/d2z5Z5rQrHUH/QyBxY11SMnXCebAQ3Wj98Q A==; X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="450644569" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="450644569" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2023 06:32:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="756719143" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="756719143" Received: from ahuge-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.40.233]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2023 06:32:18 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id 40F1710A196; Mon, 9 Oct 2023 16:32:16 +0300 (+03) Date: Mon, 9 Oct 2023 16:32:16 +0300 From: "Kirill A. Shutemov" To: Kuppuswamy Sathyanarayanan Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/13] x86/acpi: Extract ACPI MADT wakeup code into a separate file Message-ID: <20231009133216.pmihemrukk6k63mo@box.shutemov.name> References: <20231005131402.14611-1-kirill.shutemov@linux.intel.com> <20231005131402.14611-2-kirill.shutemov@linux.intel.com> <2be8a356-79c8-49a0-ba93-2a92df119af3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2be8a356-79c8-49a0-ba93-2a92df119af3@linux.intel.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 06:32:28 -0700 (PDT) On Fri, Oct 06, 2023 at 11:33:47AM -0700, Kuppuswamy Sathyanarayanan wrote: > Hi Kirill, > > On 10/5/2023 6:13 AM, Kirill A. Shutemov wrote: > > In order to prepare for the expansion of support for the ACPI MADT > > wakeup method, the relevant code has been moved into a separate file. > > A new configuration option has been introduced to clearly indicate > > dependencies without the use of ifdefs. > > > > There have been no functional changes. > > > > Signed-off-by: Kirill A. Shutemov > > --- > > arch/x86/Kconfig | 7 +++ > > arch/x86/include/asm/acpi.h | 5 ++ > > arch/x86/kernel/acpi/Makefile | 11 ++-- > > arch/x86/kernel/acpi/boot.c | 86 +----------------------------- > > arch/x86/kernel/acpi/madt_wakeup.c | 80 +++++++++++++++++++++++++++ > > 5 files changed, 99 insertions(+), 90 deletions(-) > > create mode 100644 arch/x86/kernel/acpi/madt_wakeup.c > > > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > > index 3154dbc49cf5..7368d254d01f 100644 > > --- a/arch/x86/Kconfig > > +++ b/arch/x86/Kconfig > > @@ -1108,6 +1108,13 @@ config X86_LOCAL_APIC > > depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI > > select IRQ_DOMAIN_HIERARCHY > > > > +config X86_ACPI_MADT_WAKEUP > > + def_bool y > > + depends on X86_64 > > + depends on ACPI > > + depends on SMP > > + depends on X86_LOCAL_APIC > > + > > config X86_IO_APIC > > def_bool y > > depends on X86_LOCAL_APIC || X86_UP_IOAPIC > > diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h > > index c8a7fc23f63c..b536b5a6a57b 100644 > > --- a/arch/x86/include/asm/acpi.h > > +++ b/arch/x86/include/asm/acpi.h > > @@ -73,6 +73,11 @@ static inline bool acpi_skip_set_wakeup_address(void) > > > > #define acpi_skip_set_wakeup_address acpi_skip_set_wakeup_address > > > > +union acpi_subtable_headers; > > + > > +int __init acpi_parse_mp_wake(union acpi_subtable_headers *header, > > + const unsigned long end); > > + > > IMO, you don't need to declare acpi_parse_mp_wake() in asm/acpi.h. Since the > only user of this function is in arch/x86/kernel/acpi, you can either create > a header file there or re-use sleep.h. Is it a really a bid deal? I don't see how it fits into sleep.h and introducing one more header file for one declaration seems excessive. > If you want to leave it here, do you want to protect it with > CONFIG_X86_ACPI_MADT_WAKEUP? Declarations are harmless if nobody uses them. Needless ifdeffery hurts eyes :P -- Kiryl Shutsemau / Kirill A. Shutemov