Message ID | 12299447.O9o76ZdvQC@kreacher |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;pwkd43@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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" <rjw@rjwysocki.net> To: Linux ACPI <linux-acpi@vger.kernel.org> Cc: LKML <linux-kernel@vger.kernel.org>, Michal Wilczynski <michal.wilczynski@intel.com>, Guenter Roeck <linux@roeck-us.net>, Frank Scheiner <frank.scheiner@web.de>, Ard Biesheuvel <ardb@kernel.org> 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 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" 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: <linux-kernel.vger.kernel.org> 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 |
Series |
[v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check()
|
|
Commit Message
Rafael J. Wysocki
Sept. 21, 2023, 12:58 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> 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 <linux@roeck-us.net> Reported-by: Frank Scheiner <frank.scheiner@web.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- 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(-)
Comments
On Thu, 21 Sept 2023 at 13:04, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > 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 <linux@roeck-us.net> > Reported-by: Frank Scheiner <frank.scheiner@web.de> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > --- > > 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. > You mean when other arches #define CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC too, right? In any case, this is going to conflict with my change, which is already in linux-next (you were cc'ed on the PR to asm-generic). What do you propose here? > --- > 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) {} > > >
On Thursday, September 21, 2023 3:09:04 PM CEST Ard Biesheuvel wrote: > On Thu, 21 Sept 2023 at 13:04, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > 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 <linux@roeck-us.net> > > Reported-by: Frank Scheiner <frank.scheiner@web.de> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > --- > > > > 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. > > > > You mean when other arches #define CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC too, right? > > In any case, this is going to conflict with my change, which is > already in linux-next (you were cc'ed on the PR to asm-generic). What > do you propose here? IIUC, the conflict is that the empty stub will be defined twice if this is applied before removing ia64. But if it is applied on top of the ia64 removal, all should be fine, so that's what I would do (and tell the -stable people to ignore it). > > --- > > 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) {} > > > > > > >
On Thu, Sep 21, 2023 at 4:00 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > On Thursday, September 21, 2023 3:09:04 PM CEST Ard Biesheuvel wrote: > > On Thu, 21 Sept 2023 at 13:04, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > > > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > > > 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 <linux@roeck-us.net> > > > Reported-by: Frank Scheiner <frank.scheiner@web.de> > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > --- > > > > > > 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. > > > > > > > You mean when other arches #define CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC too, right? > > > > In any case, this is going to conflict with my change, which is > > already in linux-next (you were cc'ed on the PR to asm-generic). What > > do you propose here? > > IIUC, the conflict is that the empty stub will be defined twice if this is > applied before removing ia64. > > But if it is applied on top of the ia64 removal, all should be fine, so that's > what I would do (and tell the -stable people to ignore it). And ia64 is gone now, so applied.
On Wed, 22 Nov 2023 at 20:39, Rafael J. Wysocki <rafael@kernel.org> wrote: > > On Thu, Sep 21, 2023 at 4:00 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > > > On Thursday, September 21, 2023 3:09:04 PM CEST Ard Biesheuvel wrote: > > > On Thu, 21 Sept 2023 at 13:04, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > > > > > > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > > > > > 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 <linux@roeck-us.net> > > > > Reported-by: Frank Scheiner <frank.scheiner@web.de> > > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > --- > > > > > > > > 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. > > > > > > > > > > You mean when other arches #define CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC too, right? > > > > > > In any case, this is going to conflict with my change, which is > > > already in linux-next (you were cc'ed on the PR to asm-generic). What > > > do you propose here? > > > > IIUC, the conflict is that the empty stub will be defined twice if this is > > applied before removing ia64. > > > > But if it is applied on top of the ia64 removal, all should be fine, so that's > > what I would do (and tell the -stable people to ignore it). > > And ia64 is gone now, so applied. Excellent.
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) {}