public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check()
@ 2023-09-21 12:58 Rafael J. Wysocki
  2023-09-21 13:09 ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2023-09-21 12:58 UTC (permalink / raw)
  To: Linux ACPI
  Cc: LKML, Michal Wilczynski, Guenter Roeck, Frank Scheiner,
	Ard Biesheuvel

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(-)

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) {}




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check()
  2023-09-21 12:58 [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check() Rafael J. Wysocki
@ 2023-09-21 13:09 ` Ard Biesheuvel
  2023-09-21 14:00   ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2023-09-21 13:09 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux ACPI, LKML, Michal Wilczynski, Guenter Roeck,
	Frank Scheiner

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) {}
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check()
  2023-09-21 13:09 ` Ard Biesheuvel
@ 2023-09-21 14:00   ` Rafael J. Wysocki
  2023-11-22 19:39     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2023-09-21 14:00 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Linux ACPI, LKML, Michal Wilczynski, Guenter Roeck,
	Frank Scheiner, Rafael J. Wysocki

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) {}
> >
> >
> >
> 





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check()
  2023-09-21 14:00   ` Rafael J. Wysocki
@ 2023-11-22 19:39     ` Rafael J. Wysocki
  2023-11-24 15:54       ` Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2023-11-22 19:39 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Ard Biesheuvel, Linux ACPI, LKML, Michal Wilczynski,
	Guenter Roeck, Frank Scheiner, Rafael J. Wysocki

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check()
  2023-11-22 19:39     ` Rafael J. Wysocki
@ 2023-11-24 15:54       ` Ard Biesheuvel
  0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-11-24 15:54 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J. Wysocki, Linux ACPI, LKML, Michal Wilczynski,
	Guenter Roeck, Frank Scheiner

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-24 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-21 12:58 [PATCH v1] ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check() Rafael J. Wysocki
2023-09-21 13:09 ` Ard Biesheuvel
2023-09-21 14:00   ` Rafael J. Wysocki
2023-11-22 19:39     ` Rafael J. Wysocki
2023-11-24 15:54       ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox