From patchwork Thu Sep 21 12:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 142808 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5001526vqi; Thu, 21 Sep 2023 10:09:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGuFwz74XaxyDuY7v4TNTfuvaerWzFPmjqhhk0aSiEEYcmqbMAuNG7jEehSHFjZu26KB8dm X-Received: by 2002:a05:6a20:3250:b0:15a:20e6:ffd8 with SMTP id hm16-20020a056a20325000b0015a20e6ffd8mr5474000pzc.41.1695316158251; Thu, 21 Sep 2023 10:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695316158; cv=none; d=google.com; s=arc-20160816; b=0U7BBFXzsnf5M30m4qm+t0ZepqIxUrv5jXkNYv5W0Thw6u3Uy6VpEFNXKpENG+dFvf ptAw+NXXZFhT1EypvMpZX5eQv47T54VtvuoejF+wqUFupTopV/IgGk/VtP1oLSpzLvFL K3VaNn0zDJzA6uS+oZgB2DAkLrAPxKcM60Cank8uaW4Y6YLJ8xshsZUkKnNps7JyQAyz EM3XUzxrKzJ/bgHas27npi8GG49/NlB6pg+KkyZsn/CRl6h3WTIPtE2AUwgD0DZpGwii fK4hvgnvF7Binv4GCP1Z5sTAAjoU7IbHxdytVw2uC+ui8HZm1gM91lP7NZ3mUJgQXUhL Yj0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Qg3tnOUAKwPqUVT144KrIZ2kIQb0/VLbq1JoNlxVp2w=; fh=YEiQeXvqcUNOx8IVMsptXcvmSH0YJluQGwUOu5pO9T0=; b=b2nsc2QnLVaZw++mvXA4IU31dbNTVTLZqMl8lkHlcPJcgkRvWBB9DJwzdVgWIKwVZe QluCORcfxdfk43v4+f7ELKk174i6ndq/MtD8OqEW0IH+R+0GEf0OTblYb9mwXPEZ9Udk PXKtCZYzBPsYmeOAHVggavVe9rZrnC1lA94fvwbc0s0O6nAWqD87q19354FrKbgXc1Kd Ch1yyUGsP94ygUCP1vdZvjGf4QIa+lVo3J0P3snwjRPELiyQtZ5QHDKc6ZUOWBhbjcpA kCgreatjmttKCDaYEmurAl+s6kh3ql6MOjjbg2Pp9k/GnGbaOPutLedLm/37TDvrw9uf as4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id na7-20020a17090b4c0700b0026b4d5844ccsi2040282pjb.27.2023.09.21.10.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 10:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BC5318239BAF; Thu, 21 Sep 2023 10:01:31 -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 S229927AbjIURBZ (ORCPT + 29 others); Thu, 21 Sep 2023 13:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbjIURBD (ORCPT ); Thu, 21 Sep 2023 13:01:03 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E6DE76; Thu, 21 Sep 2023 09:59:22 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.2.0) id 0edcdbe90458f091; Thu, 21 Sep 2023 14:58:03 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id A529A664DD0; Thu, 21 Sep 2023 14:58:02 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Michal Wilczynski , Guenter Roeck , Frank Scheiner , Ard Biesheuvel Subject: [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check() Date: Thu, 21 Sep 2023 14:58:02 +0200 Message-ID: <12299447.O9o76ZdvQC@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepgeffhfdujeelhfdtgeffkeetudfhtefhhfeiteethfekvefgvdfgfeeikeeigfehnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeeipdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepmhhitghhrghlrdifihhltgiihihnshhkihesihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigsehrohgv tghkqdhushdrnhgvthdprhgtphhtthhopehfrhgrnhhkrdhstghhvghinhgvrhesfigvsgdruggvpdhrtghpthhtoheprghruggssehkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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]); Thu, 21 Sep 2023 10:01:31 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777667835858435646 X-GMAIL-MSGID: 1777667835858435646 From: Rafael J. Wysocki Commit 0a0e2ea642f6 ("ACPI: processor: Move MWAIT quirk out of acpi_processor.c") added acpi_proc_quirk_mwait_check() that is only defined for x86 and is unlikely to be defined for any other architectures, so put it under #ifdef CONFIG_X86 and provide an empty stub implementation of it for the other cases. Link: https://lore.kernel.org/lkml/c7a05a44-c0be-46c2-a21d-b242524d482b@roeck-us.net Link: https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=remove-ia64&id=a0334bf78b95532cec54f56b53e8ae1bfe7e1ca1 Fixes: 0a0e2ea642f6 ("ACPI: processor: Move MWAIT quirk out of acpi_processor.c") Reported-by: Guenter Roeck Reported-by: Frank Scheiner Signed-off-by: Rafael J. Wysocki --- This is kind of orthogonal to https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=remove-ia64&id=a0334bf78b95532cec54f56b53e8ae1bfe7e1ca1 because if any architectures other than x86 and ia64 decide to use the processor _OSC, they will see the reported build error. --- drivers/acpi/internal.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) Index: linux-pm/drivers/acpi/internal.h =================================================================== --- linux-pm.orig/drivers/acpi/internal.h +++ linux-pm/drivers/acpi/internal.h @@ -148,8 +148,11 @@ int acpi_wakeup_device_init(void); #ifdef CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC void acpi_early_processor_control_setup(void); void acpi_early_processor_set_pdc(void); - +#ifdef CONFIG_X86 void acpi_proc_quirk_mwait_check(void); +#else +static inline void acpi_proc_quirk_mwait_check(void) {} +#endif bool processor_physically_present(acpi_handle handle); #else static inline void acpi_early_processor_control_setup(void) {}