* [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled
@ 2024-04-07 6:33 Kuppuswamy Sathyanarayanan
2024-04-08 14:53 ` Andy Shevchenko
2024-04-22 16:37 ` Rafael J. Wysocki
0 siblings, 2 replies; 7+ messages in thread
From: Kuppuswamy Sathyanarayanan @ 2024-04-07 6:33 UTC (permalink / raw)
To: Rafael J . Wysocki, linux-acpi; +Cc: linux-kernel, Len Brown, Andy Shevchenko
The function acpi_blacklisted() is defined only when CONFIG_X86 is
enabled. So to keep it consistent, protect its declaration with
CONFIG_X86.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
---
include/linux/acpi.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 34829f2c517a..3ad6bed9eb4f 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -421,7 +421,9 @@ extern char *wmi_get_acpi_device_uid(const char *guid);
extern char acpi_video_backlight_string[];
extern long acpi_is_video_device(acpi_handle handle);
+#ifdef CONFIG_X86
extern int acpi_blacklisted(void);
+#endif
extern void acpi_osi_setup(char *str);
extern bool acpi_osi_is_win8(void);
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled
2024-04-07 6:33 [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled Kuppuswamy Sathyanarayanan
@ 2024-04-08 14:53 ` Andy Shevchenko
2024-04-08 15:42 ` Kuppuswamy Sathyanarayanan
2024-04-22 16:37 ` Rafael J. Wysocki
1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2024-04-08 14:53 UTC (permalink / raw)
To: Kuppuswamy Sathyanarayanan
Cc: Rafael J . Wysocki, linux-acpi, linux-kernel, Len Brown
On Sat, Apr 06, 2024 at 11:33:41PM -0700, Kuppuswamy Sathyanarayanan wrote:
> The function acpi_blacklisted() is defined only when CONFIG_X86 is
> enabled. So to keep it consistent, protect its declaration with
> CONFIG_X86.
...
> extern char acpi_video_backlight_string[];
> extern long acpi_is_video_device(acpi_handle handle);
> +#ifdef CONFIG_X86
> extern int acpi_blacklisted(void);
> +#endif
> extern void acpi_osi_setup(char *str);
> extern bool acpi_osi_is_win8(void);
IIRC there is already similar ifdeffery, can we just move the declaration
there?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled
2024-04-08 14:53 ` Andy Shevchenko
@ 2024-04-08 15:42 ` Kuppuswamy Sathyanarayanan
2024-04-08 15:53 ` Andy Shevchenko
0 siblings, 1 reply; 7+ messages in thread
From: Kuppuswamy Sathyanarayanan @ 2024-04-08 15:42 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Rafael J . Wysocki, linux-acpi, linux-kernel, Len Brown
On Mon, Apr 8, 2024 at 7:53 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Sat, Apr 06, 2024 at 11:33:41PM -0700, Kuppuswamy Sathyanarayanan wrote:
> > The function acpi_blacklisted() is defined only when CONFIG_X86 is
> > enabled. So to keep it consistent, protect its declaration with
> > CONFIG_X86.
>
> ...
>
> > extern char acpi_video_backlight_string[];
> > extern long acpi_is_video_device(acpi_handle handle);
> > +#ifdef CONFIG_X86
> > extern int acpi_blacklisted(void);
> > +#endif
> > extern void acpi_osi_setup(char *str);
> > extern bool acpi_osi_is_win8(void);
>
> IIRC there is already similar ifdeffery, can we just move the declaration
> there?
There is none for CONFIG_X86. We only have some combinations or
derived config checks like below:
#if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH)
#ifdef CONFIG_X86_IO_APIC
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled
2024-04-08 15:42 ` Kuppuswamy Sathyanarayanan
@ 2024-04-08 15:53 ` Andy Shevchenko
0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2024-04-08 15:53 UTC (permalink / raw)
To: Kuppuswamy Sathyanarayanan
Cc: Rafael J . Wysocki, linux-acpi, linux-kernel, Len Brown
On Mon, Apr 08, 2024 at 08:42:48AM -0700, Kuppuswamy Sathyanarayanan wrote:
> On Mon, Apr 8, 2024 at 7:53 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Sat, Apr 06, 2024 at 11:33:41PM -0700, Kuppuswamy Sathyanarayanan wrote:
...
> > > extern char acpi_video_backlight_string[];
> > > extern long acpi_is_video_device(acpi_handle handle);
> > > +#ifdef CONFIG_X86
> > > extern int acpi_blacklisted(void);
> > > +#endif
> > > extern void acpi_osi_setup(char *str);
> > > extern bool acpi_osi_is_win8(void);
> >
> > IIRC there is already similar ifdeffery, can we just move the declaration
> > there?
>
> There is none for CONFIG_X86. We only have some combinations or
> derived config checks like below:
>
> #if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH)
> #ifdef CONFIG_X86_IO_APIC
Okay, it seems I mixed this with acpi_bus.h.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled
2024-04-07 6:33 [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled Kuppuswamy Sathyanarayanan
2024-04-08 14:53 ` Andy Shevchenko
@ 2024-04-22 16:37 ` Rafael J. Wysocki
2024-04-23 13:02 ` Andy Shevchenko
1 sibling, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2024-04-22 16:37 UTC (permalink / raw)
To: Kuppuswamy Sathyanarayanan
Cc: Rafael J . Wysocki, linux-acpi, linux-kernel, Len Brown,
Andy Shevchenko
On Sun, Apr 7, 2024 at 8:33 AM Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
>
> The function acpi_blacklisted() is defined only when CONFIG_X86 is
> enabled. So to keep it consistent, protect its declaration with
> CONFIG_X86.
>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> ---
> include/linux/acpi.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 34829f2c517a..3ad6bed9eb4f 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -421,7 +421,9 @@ extern char *wmi_get_acpi_device_uid(const char *guid);
>
> extern char acpi_video_backlight_string[];
> extern long acpi_is_video_device(acpi_handle handle);
> +#ifdef CONFIG_X86
> extern int acpi_blacklisted(void);
> +#endif
> extern void acpi_osi_setup(char *str);
> extern bool acpi_osi_is_win8(void);
>
> --
Applied (as 6.10 material), but it looks to me like this declaration
could be moved away from this header file at all, as the function is
only used in one place in arch-x86 code.
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled
2024-04-22 16:37 ` Rafael J. Wysocki
@ 2024-04-23 13:02 ` Andy Shevchenko
2024-04-29 4:06 ` Kuppuswamy Sathyanarayanan
0 siblings, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2024-04-23 13:02 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Kuppuswamy Sathyanarayanan, Rafael J . Wysocki, linux-acpi,
linux-kernel, Len Brown
On Mon, Apr 22, 2024 at 06:37:59PM +0200, Rafael J. Wysocki wrote:
> On Sun, Apr 7, 2024 at 8:33 AM Kuppuswamy Sathyanarayanan
> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
...
> Applied (as 6.10 material), but it looks to me like this declaration
> could be moved away from this header file at all, as the function is
> only used in one place in arch-x86 code.
Yes, we probably may move it to asm/acpi.h for x86.
I don't remember if I ever expressed that idea, but I definitely was thinking
about this.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled
2024-04-23 13:02 ` Andy Shevchenko
@ 2024-04-29 4:06 ` Kuppuswamy Sathyanarayanan
0 siblings, 0 replies; 7+ messages in thread
From: Kuppuswamy Sathyanarayanan @ 2024-04-29 4:06 UTC (permalink / raw)
To: Andy Shevchenko, Rafael J. Wysocki
Cc: Rafael J . Wysocki, linux-acpi, linux-kernel, Len Brown
On 4/23/24 6:02 AM, Andy Shevchenko wrote:
> On Mon, Apr 22, 2024 at 06:37:59PM +0200, Rafael J. Wysocki wrote:
>> On Sun, Apr 7, 2024 at 8:33 AM Kuppuswamy Sathyanarayanan
>> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
> ...
>
>> Applied (as 6.10 material), but it looks to me like this declaration
>> could be moved away from this header file at all, as the function is
>> only used in one place in arch-x86 code.
> Yes, we probably may move it to asm/acpi.h for x86.
>
> I don't remember if I ever expressed that idea, but I definitely was thinking
> about this.
>
Makes sense. I have moved it to asm/acpi.h
https://lore.kernel.org/lkml/20240429040441.748479-1-sathyanarayanan.kuppuswamy@linux.intel.com/T/#u
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-04-29 4:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-07 6:33 [PATCH v1] ACPI: Declare acpi_blacklisted() only if CONFIG_X86 is enabled Kuppuswamy Sathyanarayanan
2024-04-08 14:53 ` Andy Shevchenko
2024-04-08 15:42 ` Kuppuswamy Sathyanarayanan
2024-04-08 15:53 ` Andy Shevchenko
2024-04-22 16:37 ` Rafael J. Wysocki
2024-04-23 13:02 ` Andy Shevchenko
2024-04-29 4:06 ` Kuppuswamy Sathyanarayanan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox