All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-11-24  9:01 ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-11-24  9:01 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: catalin.marinas, will, matthias.bgg, linux-mediatek, yj.chiang,
	Lecopzer Chen

From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>

Although most of modern devices use ACPI, there still has combination
of APM + ARM64.

In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
default is y if ACPI isn't configured.

Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
---
 arch/arm64/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1515f6f153a0..5e9e3694015a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -260,6 +260,9 @@ config NO_IOPORT_MAP
 config STACKTRACE_SUPPORT
 	def_bool y
 
+config SYS_SUPPORTS_APM_EMULATION
+	def_bool y if !ACPI
+
 config ILLEGAL_POINTER_VALUE
 	hex
 	default 0xdead000000000000
-- 
2.18.0


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

* [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-11-24  9:01 ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-11-24  9:01 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: Lecopzer Chen, catalin.marinas, yj.chiang, linux-mediatek,
	matthias.bgg, will

From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>

Although most of modern devices use ACPI, there still has combination
of APM + ARM64.

In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
default is y if ACPI isn't configured.

Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
---
 arch/arm64/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1515f6f153a0..5e9e3694015a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -260,6 +260,9 @@ config NO_IOPORT_MAP
 config STACKTRACE_SUPPORT
 	def_bool y
 
+config SYS_SUPPORTS_APM_EMULATION
+	def_bool y if !ACPI
+
 config ILLEGAL_POINTER_VALUE
 	hex
 	default 0xdead000000000000
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-11-24  9:01 ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-11-24  9:01 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: Lecopzer Chen, catalin.marinas, yj.chiang, linux-mediatek,
	matthias.bgg, will

From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>

Although most of modern devices use ACPI, there still has combination
of APM + ARM64.

In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
default is y if ACPI isn't configured.

Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
---
 arch/arm64/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1515f6f153a0..5e9e3694015a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -260,6 +260,9 @@ config NO_IOPORT_MAP
 config STACKTRACE_SUPPORT
 	def_bool y
 
+config SYS_SUPPORTS_APM_EMULATION
+	def_bool y if !ACPI
+
 config ILLEGAL_POINTER_VALUE
 	hex
 	default 0xdead000000000000
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
  2020-11-24  9:01 ` Lecopzer Chen
  (?)
@ 2020-11-25 10:36   ` Mark Rutland
  -1 siblings, 0 replies; 24+ messages in thread
From: Mark Rutland @ 2020-11-25 10:36 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: linux-kernel, linux-arm-kernel, catalin.marinas, will,
	matthias.bgg, linux-mediatek, yj.chiang

On Tue, Nov 24, 2020 at 05:01:31PM +0800, Lecopzer Chen wrote:
> From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>
> 
> Although most of modern devices use ACPI, there still has combination
> of APM + ARM64.
> 
> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> default is y if ACPI isn't configured.

I'm a bit confused why this should be enabled for !ACPI. Which DT
platforms need this, and how do they use it? Why should this only be
enabled for kernels without ACPI support, and not for kernels that
support both ACPI and DT?

Thanks,
Mark.

> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
> ---
>  arch/arm64/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1515f6f153a0..5e9e3694015a 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>  config STACKTRACE_SUPPORT
>  	def_bool y
>  
> +config SYS_SUPPORTS_APM_EMULATION
> +	def_bool y if !ACPI
> +
>  config ILLEGAL_POINTER_VALUE
>  	hex
>  	default 0xdead000000000000
> -- 
> 2.18.0
> 

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-11-25 10:36   ` Mark Rutland
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Rutland @ 2020-11-25 10:36 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: catalin.marinas, yj.chiang, linux-kernel, linux-mediatek,
	matthias.bgg, will, linux-arm-kernel

On Tue, Nov 24, 2020 at 05:01:31PM +0800, Lecopzer Chen wrote:
> From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>
> 
> Although most of modern devices use ACPI, there still has combination
> of APM + ARM64.
> 
> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> default is y if ACPI isn't configured.

I'm a bit confused why this should be enabled for !ACPI. Which DT
platforms need this, and how do they use it? Why should this only be
enabled for kernels without ACPI support, and not for kernels that
support both ACPI and DT?

Thanks,
Mark.

> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
> ---
>  arch/arm64/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1515f6f153a0..5e9e3694015a 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>  config STACKTRACE_SUPPORT
>  	def_bool y
>  
> +config SYS_SUPPORTS_APM_EMULATION
> +	def_bool y if !ACPI
> +
>  config ILLEGAL_POINTER_VALUE
>  	hex
>  	default 0xdead000000000000
> -- 
> 2.18.0
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-11-25 10:36   ` Mark Rutland
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Rutland @ 2020-11-25 10:36 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: catalin.marinas, yj.chiang, linux-kernel, linux-mediatek,
	matthias.bgg, will, linux-arm-kernel

On Tue, Nov 24, 2020 at 05:01:31PM +0800, Lecopzer Chen wrote:
> From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>
> 
> Although most of modern devices use ACPI, there still has combination
> of APM + ARM64.
> 
> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> default is y if ACPI isn't configured.

I'm a bit confused why this should be enabled for !ACPI. Which DT
platforms need this, and how do they use it? Why should this only be
enabled for kernels without ACPI support, and not for kernels that
support both ACPI and DT?

Thanks,
Mark.

> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
> ---
>  arch/arm64/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1515f6f153a0..5e9e3694015a 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>  config STACKTRACE_SUPPORT
>  	def_bool y
>  
> +config SYS_SUPPORTS_APM_EMULATION
> +	def_bool y if !ACPI
> +
>  config ILLEGAL_POINTER_VALUE
>  	hex
>  	default 0xdead000000000000
> -- 
> 2.18.0
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
  2020-11-25 10:36   ` Mark Rutland
  (?)
@ 2020-11-25 11:41     ` Lecopzer Chen
  -1 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-11-25 11:41 UTC (permalink / raw)
  To: mark.rutland
  Cc: catalin.marinas, lecopzer.chen, linux-arm-kernel, linux-kernel,
	linux-mediatek, matthias.bgg, will, yj.chiang

>> From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>
>> 
>> Although most of modern devices use ACPI, there still has combination
>> of APM + ARM64.
>> 
>> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
>> default is y if ACPI isn't configured.
>
>I'm a bit confused why this should be enabled for !ACPI. Which DT
>platforms need this, and how do they use it? Why should this only be
>enabled for kernels without ACPI support, and not for kernels that
>support both ACPI and DT?
>
>Thanks,
>Mark.

Hi Mark,

In our internal patch has no !ACPI here,
the reason I add here is that in kernel document[1] it mention:
> No, sorry, you cannot have both ACPI and APM enabled and running at once.
Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
they could exist at the same time or not.

But I think it should be fine without !ACPI if APM and APCI
config won't conflict with each other.

So if it's better to remove !ACPI I'll send v2 for this.


BTW, The platform is for our internal kernel drivers, they utilize APM interface,
/dev/apm_bios to do their works in arm64.





[1] APM or ACPI?:
https://www.kernel.org/doc/html/latest/power/apm-acpi.html


Thanks,
Lecopzer


>> 
>> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
>> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
>> ---
>>  arch/arm64/Kconfig | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 1515f6f153a0..5e9e3694015a 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>>  config STACKTRACE_SUPPORT
>>  	def_bool y
>>  
>> +config SYS_SUPPORTS_APM_EMULATION
>> +	def_bool y if !ACPI
>> +
>>  config ILLEGAL_POINTER_VALUE
>>  	hex
>>  	default 0xdead000000000000
>> -- 
>> 2.18.0
>> 

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-11-25 11:41     ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-11-25 11:41 UTC (permalink / raw)
  To: mark.rutland
  Cc: lecopzer.chen, catalin.marinas, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

>> From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>
>> 
>> Although most of modern devices use ACPI, there still has combination
>> of APM + ARM64.
>> 
>> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
>> default is y if ACPI isn't configured.
>
>I'm a bit confused why this should be enabled for !ACPI. Which DT
>platforms need this, and how do they use it? Why should this only be
>enabled for kernels without ACPI support, and not for kernels that
>support both ACPI and DT?
>
>Thanks,
>Mark.

Hi Mark,

In our internal patch has no !ACPI here,
the reason I add here is that in kernel document[1] it mention:
> No, sorry, you cannot have both ACPI and APM enabled and running at once.
Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
they could exist at the same time or not.

But I think it should be fine without !ACPI if APM and APCI
config won't conflict with each other.

So if it's better to remove !ACPI I'll send v2 for this.


BTW, The platform is for our internal kernel drivers, they utilize APM interface,
/dev/apm_bios to do their works in arm64.





[1] APM or ACPI?:
https://www.kernel.org/doc/html/latest/power/apm-acpi.html


Thanks,
Lecopzer


>> 
>> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
>> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
>> ---
>>  arch/arm64/Kconfig | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 1515f6f153a0..5e9e3694015a 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>>  config STACKTRACE_SUPPORT
>>  	def_bool y
>>  
>> +config SYS_SUPPORTS_APM_EMULATION
>> +	def_bool y if !ACPI
>> +
>>  config ILLEGAL_POINTER_VALUE
>>  	hex
>>  	default 0xdead000000000000
>> -- 
>> 2.18.0
>> 
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-11-25 11:41     ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-11-25 11:41 UTC (permalink / raw)
  To: mark.rutland
  Cc: lecopzer.chen, catalin.marinas, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

>> From: "Lecopzer Chen" <lecopzer.chen@mediatek.com>
>> 
>> Although most of modern devices use ACPI, there still has combination
>> of APM + ARM64.
>> 
>> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
>> default is y if ACPI isn't configured.
>
>I'm a bit confused why this should be enabled for !ACPI. Which DT
>platforms need this, and how do they use it? Why should this only be
>enabled for kernels without ACPI support, and not for kernels that
>support both ACPI and DT?
>
>Thanks,
>Mark.

Hi Mark,

In our internal patch has no !ACPI here,
the reason I add here is that in kernel document[1] it mention:
> No, sorry, you cannot have both ACPI and APM enabled and running at once.
Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
they could exist at the same time or not.

But I think it should be fine without !ACPI if APM and APCI
config won't conflict with each other.

So if it's better to remove !ACPI I'll send v2 for this.


BTW, The platform is for our internal kernel drivers, they utilize APM interface,
/dev/apm_bios to do their works in arm64.





[1] APM or ACPI?:
https://www.kernel.org/doc/html/latest/power/apm-acpi.html


Thanks,
Lecopzer


>> 
>> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
>> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
>> ---
>>  arch/arm64/Kconfig | 3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 1515f6f153a0..5e9e3694015a 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>>  config STACKTRACE_SUPPORT
>>  	def_bool y
>>  
>> +config SYS_SUPPORTS_APM_EMULATION
>> +	def_bool y if !ACPI
>> +
>>  config ILLEGAL_POINTER_VALUE
>>  	hex
>>  	default 0xdead000000000000
>> -- 
>> 2.18.0
>> 
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
  2020-11-25 10:36   ` Mark Rutland
  (?)
@ 2020-12-14  9:28     ` Lecopzer Chen
  -1 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-14  9:28 UTC (permalink / raw)
  To: mark.rutland
  Cc: catalin.marinas, lecopzer.chen, linux-arm-kernel, linux-kernel,
	linux-mediatek, matthias.bgg, will, yj.chiang

Hi,

Could any maintainer help review this?

Thanks a lot for your help,

BRs,
Lecopzer


> Although most of modern devices use ACPI, there still has combination
> of APM + ARM64.
> 
> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> default is y if ACPI isn't configured.
> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
> ---
>  arch/arm64/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1515f6f153a0..5e9e3694015a 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>  config STACKTRACE_SUPPORT
>  	def_bool y
>  
> +config SYS_SUPPORTS_APM_EMULATION
> +	def_bool y if !ACPI
> +
>  config ILLEGAL_POINTER_VALUE
>  	hex
>  	default 0xdead000000000000




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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-14  9:28     ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-14  9:28 UTC (permalink / raw)
  To: mark.rutland
  Cc: lecopzer.chen, catalin.marinas, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

Hi,

Could any maintainer help review this?

Thanks a lot for your help,

BRs,
Lecopzer


> Although most of modern devices use ACPI, there still has combination
> of APM + ARM64.
> 
> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> default is y if ACPI isn't configured.
> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
> ---
>  arch/arm64/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1515f6f153a0..5e9e3694015a 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>  config STACKTRACE_SUPPORT
>  	def_bool y
>  
> +config SYS_SUPPORTS_APM_EMULATION
> +	def_bool y if !ACPI
> +
>  config ILLEGAL_POINTER_VALUE
>  	hex
>  	default 0xdead000000000000


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-14  9:28     ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-14  9:28 UTC (permalink / raw)
  To: mark.rutland
  Cc: lecopzer.chen, catalin.marinas, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

Hi,

Could any maintainer help review this?

Thanks a lot for your help,

BRs,
Lecopzer


> Although most of modern devices use ACPI, there still has combination
> of APM + ARM64.
> 
> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> default is y if ACPI isn't configured.
> 
> Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
> Suggested-by: YJ Chiang <yj.chiang@mediatek.com>
> ---
>  arch/arm64/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1515f6f153a0..5e9e3694015a 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -260,6 +260,9 @@ config NO_IOPORT_MAP
>  config STACKTRACE_SUPPORT
>  	def_bool y
>  
> +config SYS_SUPPORTS_APM_EMULATION
> +	def_bool y if !ACPI
> +
>  config ILLEGAL_POINTER_VALUE
>  	hex
>  	default 0xdead000000000000


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
  2020-11-25 11:41     ` Lecopzer Chen
  (?)
@ 2020-12-16 15:58       ` Catalin Marinas
  -1 siblings, 0 replies; 24+ messages in thread
From: Catalin Marinas @ 2020-12-16 15:58 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: mark.rutland, linux-arm-kernel, linux-kernel, linux-mediatek,
	matthias.bgg, will, yj.chiang

On Wed, Nov 25, 2020 at 07:41:30PM +0800, Lecopzer Chen wrote:
> >> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> >> default is y if ACPI isn't configured.
> >
> >I'm a bit confused why this should be enabled for !ACPI. Which DT
> >platforms need this, and how do they use it? Why should this only be
> >enabled for kernels without ACPI support, and not for kernels that
> >support both ACPI and DT?
> 
> In our internal patch has no !ACPI here,
> the reason I add here is that in kernel document[1] it mention:
> > No, sorry, you cannot have both ACPI and APM enabled and running at once.
> Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
> they could exist at the same time or not.
> 
> But I think it should be fine without !ACPI if APM and APCI
> config won't conflict with each other.
> 
> So if it's better to remove !ACPI I'll send v2 for this.
> 
> BTW, The platform is for our internal kernel drivers, they utilize APM interface,
> /dev/apm_bios to do their works in arm64.

Sorry, I don't think the APM interface makes sense on an arm64 kernel
(and it's also used by an out of tree driver).

-- 
Catalin

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-16 15:58       ` Catalin Marinas
  0 siblings, 0 replies; 24+ messages in thread
From: Catalin Marinas @ 2020-12-16 15:58 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: mark.rutland, yj.chiang, linux-kernel, linux-mediatek,
	matthias.bgg, will, linux-arm-kernel

On Wed, Nov 25, 2020 at 07:41:30PM +0800, Lecopzer Chen wrote:
> >> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> >> default is y if ACPI isn't configured.
> >
> >I'm a bit confused why this should be enabled for !ACPI. Which DT
> >platforms need this, and how do they use it? Why should this only be
> >enabled for kernels without ACPI support, and not for kernels that
> >support both ACPI and DT?
> 
> In our internal patch has no !ACPI here,
> the reason I add here is that in kernel document[1] it mention:
> > No, sorry, you cannot have both ACPI and APM enabled and running at once.
> Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
> they could exist at the same time or not.
> 
> But I think it should be fine without !ACPI if APM and APCI
> config won't conflict with each other.
> 
> So if it's better to remove !ACPI I'll send v2 for this.
> 
> BTW, The platform is for our internal kernel drivers, they utilize APM interface,
> /dev/apm_bios to do their works in arm64.

Sorry, I don't think the APM interface makes sense on an arm64 kernel
(and it's also used by an out of tree driver).

-- 
Catalin

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-16 15:58       ` Catalin Marinas
  0 siblings, 0 replies; 24+ messages in thread
From: Catalin Marinas @ 2020-12-16 15:58 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: mark.rutland, yj.chiang, linux-kernel, linux-mediatek,
	matthias.bgg, will, linux-arm-kernel

On Wed, Nov 25, 2020 at 07:41:30PM +0800, Lecopzer Chen wrote:
> >> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> >> default is y if ACPI isn't configured.
> >
> >I'm a bit confused why this should be enabled for !ACPI. Which DT
> >platforms need this, and how do they use it? Why should this only be
> >enabled for kernels without ACPI support, and not for kernels that
> >support both ACPI and DT?
> 
> In our internal patch has no !ACPI here,
> the reason I add here is that in kernel document[1] it mention:
> > No, sorry, you cannot have both ACPI and APM enabled and running at once.
> Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
> they could exist at the same time or not.
> 
> But I think it should be fine without !ACPI if APM and APCI
> config won't conflict with each other.
> 
> So if it's better to remove !ACPI I'll send v2 for this.
> 
> BTW, The platform is for our internal kernel drivers, they utilize APM interface,
> /dev/apm_bios to do their works in arm64.

Sorry, I don't think the APM interface makes sense on an arm64 kernel
(and it's also used by an out of tree driver).

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
  2020-12-16 15:58       ` Catalin Marinas
  (?)
@ 2020-12-16 16:41         ` Lecopzer Chen
  -1 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-16 16:41 UTC (permalink / raw)
  To: catalin.marinas
  Cc: lecopzer.chen, linux-arm-kernel, linux-kernel, linux-mediatek,
	mark.rutland, matthias.bgg, will, yj.chiang

Hi Catalin,

Thanks for your reply.

so there is two points
1. out-of-tree function can't be approved
    I totally agree with this :) so we may have a driver upstream in the future.
2. APM not make sense on arm64
Could you please let me konw the reason why APM on ARM64 doesn't make sense?


thanks!
BRs,
Lecopzer


> On Wed, Nov 25, 2020 at 07:41:30PM +0800, Lecopzer Chen wrote:
> > >> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> > >> default is y if ACPI isn't configured.
> > >
> > >I'm a bit confused why this should be enabled for !ACPI. Which DT
> > >platforms need this, and how do they use it? Why should this only be
> > >enabled for kernels without ACPI support, and not for kernels that
> > >support both ACPI and DT?
> > 
> > In our internal patch has no !ACPI here,
> > the reason I add here is that in kernel document[1] it mention:
> > > No, sorry, you cannot have both ACPI and APM enabled and running at once.
> > Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
> > they could exist at the same time or not.
> > 
> > But I think it should be fine without !ACPI if APM and APCI
> > config won't conflict with each other.
> > 
> > So if it's better to remove !ACPI I'll send v2 for this.
> > 
> > BTW, The platform is for our internal kernel drivers, they utilize APM interface,
> > /dev/apm_bios to do their works in arm64.
> 
> Sorry, I don't think the APM interface makes sense on an arm64 kernel
> (and it's also used by an out of tree driver).

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-16 16:41         ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-16 16:41 UTC (permalink / raw)
  To: catalin.marinas
  Cc: mark.rutland, lecopzer.chen, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

Hi Catalin,

Thanks for your reply.

so there is two points
1. out-of-tree function can't be approved
    I totally agree with this :) so we may have a driver upstream in the future.
2. APM not make sense on arm64
Could you please let me konw the reason why APM on ARM64 doesn't make sense?


thanks!
BRs,
Lecopzer


> On Wed, Nov 25, 2020 at 07:41:30PM +0800, Lecopzer Chen wrote:
> > >> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> > >> default is y if ACPI isn't configured.
> > >
> > >I'm a bit confused why this should be enabled for !ACPI. Which DT
> > >platforms need this, and how do they use it? Why should this only be
> > >enabled for kernels without ACPI support, and not for kernels that
> > >support both ACPI and DT?
> > 
> > In our internal patch has no !ACPI here,
> > the reason I add here is that in kernel document[1] it mention:
> > > No, sorry, you cannot have both ACPI and APM enabled and running at once.
> > Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
> > they could exist at the same time or not.
> > 
> > But I think it should be fine without !ACPI if APM and APCI
> > config won't conflict with each other.
> > 
> > So if it's better to remove !ACPI I'll send v2 for this.
> > 
> > BTW, The platform is for our internal kernel drivers, they utilize APM interface,
> > /dev/apm_bios to do their works in arm64.
> 
> Sorry, I don't think the APM interface makes sense on an arm64 kernel
> (and it's also used by an out of tree driver).
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-16 16:41         ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-16 16:41 UTC (permalink / raw)
  To: catalin.marinas
  Cc: mark.rutland, lecopzer.chen, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

Hi Catalin,

Thanks for your reply.

so there is two points
1. out-of-tree function can't be approved
    I totally agree with this :) so we may have a driver upstream in the future.
2. APM not make sense on arm64
Could you please let me konw the reason why APM on ARM64 doesn't make sense?


thanks!
BRs,
Lecopzer


> On Wed, Nov 25, 2020 at 07:41:30PM +0800, Lecopzer Chen wrote:
> > >> In order to select CONFIG_APM_EMULATION, make SYS_SUPPORTS_APM_EMULATION
> > >> default is y if ACPI isn't configured.
> > >
> > >I'm a bit confused why this should be enabled for !ACPI. Which DT
> > >platforms need this, and how do they use it? Why should this only be
> > >enabled for kernels without ACPI support, and not for kernels that
> > >support both ACPI and DT?
> > 
> > In our internal patch has no !ACPI here,
> > the reason I add here is that in kernel document[1] it mention:
> > > No, sorry, you cannot have both ACPI and APM enabled and running at once.
> > Thus, I try to limit the scope for who don't use the ACPI because I'm not sure
> > they could exist at the same time or not.
> > 
> > But I think it should be fine without !ACPI if APM and APCI
> > config won't conflict with each other.
> > 
> > So if it's better to remove !ACPI I'll send v2 for this.
> > 
> > BTW, The platform is for our internal kernel drivers, they utilize APM interface,
> > /dev/apm_bios to do their works in arm64.
> 
> Sorry, I don't think the APM interface makes sense on an arm64 kernel
> (and it's also used by an out of tree driver).
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
  2020-12-16 16:41         ` Lecopzer Chen
  (?)
@ 2020-12-17 16:49           ` Catalin Marinas
  -1 siblings, 0 replies; 24+ messages in thread
From: Catalin Marinas @ 2020-12-17 16:49 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: linux-arm-kernel, linux-kernel, linux-mediatek, mark.rutland,
	matthias.bgg, will, yj.chiang

On Thu, Dec 17, 2020 at 12:41:47AM +0800, Lecopzer Chen wrote:
> so there is two points
> 1. out-of-tree function can't be approved
>     I totally agree with this :) so we may have a driver upstream in the future.

It may not be upstreamable if it relies on the old APM interface ;).

> 2. APM not make sense on arm64
> Could you please let me konw the reason why APM on ARM64 doesn't make sense?

It's a very old interface, even on x86 it is disabled in the distro
kernels. There are more modern alternatives and you should update your
driver and user space to use them (e.g. /sys/power/).

-- 
Catalin

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-17 16:49           ` Catalin Marinas
  0 siblings, 0 replies; 24+ messages in thread
From: Catalin Marinas @ 2020-12-17 16:49 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: mark.rutland, yj.chiang, linux-kernel, linux-mediatek,
	matthias.bgg, will, linux-arm-kernel

On Thu, Dec 17, 2020 at 12:41:47AM +0800, Lecopzer Chen wrote:
> so there is two points
> 1. out-of-tree function can't be approved
>     I totally agree with this :) so we may have a driver upstream in the future.

It may not be upstreamable if it relies on the old APM interface ;).

> 2. APM not make sense on arm64
> Could you please let me konw the reason why APM on ARM64 doesn't make sense?

It's a very old interface, even on x86 it is disabled in the distro
kernels. There are more modern alternatives and you should update your
driver and user space to use them (e.g. /sys/power/).

-- 
Catalin

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-17 16:49           ` Catalin Marinas
  0 siblings, 0 replies; 24+ messages in thread
From: Catalin Marinas @ 2020-12-17 16:49 UTC (permalink / raw)
  To: Lecopzer Chen
  Cc: mark.rutland, yj.chiang, linux-kernel, linux-mediatek,
	matthias.bgg, will, linux-arm-kernel

On Thu, Dec 17, 2020 at 12:41:47AM +0800, Lecopzer Chen wrote:
> so there is two points
> 1. out-of-tree function can't be approved
>     I totally agree with this :) so we may have a driver upstream in the future.

It may not be upstreamable if it relies on the old APM interface ;).

> 2. APM not make sense on arm64
> Could you please let me konw the reason why APM on ARM64 doesn't make sense?

It's a very old interface, even on x86 it is disabled in the distro
kernels. There are more modern alternatives and you should update your
driver and user space to use them (e.g. /sys/power/).

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
  2020-12-17 16:49           ` Catalin Marinas
  (?)
@ 2020-12-18  5:02             ` Lecopzer Chen
  -1 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-18  5:02 UTC (permalink / raw)
  To: catalin.marinas
  Cc: lecopzer.chen, linux-arm-kernel, linux-kernel, linux-mediatek,
	mark.rutland, matthias.bgg, will, yj.chiang

Hi Catalin,
 
Thanks for your explanation.
 
> > so there is two points
> > 1. out-of-tree function can't be approved
> >     I totally agree with this :) so we may have a driver upstream in the future.
> 
> It may not be upstreamable if it relies on the old APM interface ;).
> 
> > 2. APM not make sense on arm64
> > Could you please let me konw the reason why APM on ARM64 doesn't make sense?
> 
> It's a very old interface, even on x86 it is disabled in the distro
> kernels. There are more modern alternatives and you should update your
> driver and user space to use them (e.g. /sys/power/).

Got it! I will disscuss with our internal team to update their drivers.

thanks a lot!

BRs,
Lecopzer

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-18  5:02             ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-18  5:02 UTC (permalink / raw)
  To: catalin.marinas
  Cc: mark.rutland, lecopzer.chen, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

Hi Catalin,
 
Thanks for your explanation.
 
> > so there is two points
> > 1. out-of-tree function can't be approved
> >     I totally agree with this :) so we may have a driver upstream in the future.
> 
> It may not be upstreamable if it relies on the old APM interface ;).
> 
> > 2. APM not make sense on arm64
> > Could you please let me konw the reason why APM on ARM64 doesn't make sense?
> 
> It's a very old interface, even on x86 it is disabled in the distro
> kernels. There are more modern alternatives and you should update your
> driver and user space to use them (e.g. /sys/power/).

Got it! I will disscuss with our internal team to update their drivers.

thanks a lot!

BRs,
Lecopzer
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION
@ 2020-12-18  5:02             ` Lecopzer Chen
  0 siblings, 0 replies; 24+ messages in thread
From: Lecopzer Chen @ 2020-12-18  5:02 UTC (permalink / raw)
  To: catalin.marinas
  Cc: mark.rutland, lecopzer.chen, yj.chiang, linux-kernel,
	linux-mediatek, matthias.bgg, will, linux-arm-kernel

Hi Catalin,
 
Thanks for your explanation.
 
> > so there is two points
> > 1. out-of-tree function can't be approved
> >     I totally agree with this :) so we may have a driver upstream in the future.
> 
> It may not be upstreamable if it relies on the old APM interface ;).
> 
> > 2. APM not make sense on arm64
> > Could you please let me konw the reason why APM on ARM64 doesn't make sense?
> 
> It's a very old interface, even on x86 it is disabled in the distro
> kernels. There are more modern alternatives and you should update your
> driver and user space to use them (e.g. /sys/power/).

Got it! I will disscuss with our internal team to update their drivers.

thanks a lot!

BRs,
Lecopzer
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-12-18  5:04 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24  9:01 [PATCH] arm64: Kconfig: Add SYS_SUPPORTS_APM_EMULATION Lecopzer Chen
2020-11-24  9:01 ` Lecopzer Chen
2020-11-24  9:01 ` Lecopzer Chen
2020-11-25 10:36 ` Mark Rutland
2020-11-25 10:36   ` Mark Rutland
2020-11-25 10:36   ` Mark Rutland
2020-11-25 11:41   ` Lecopzer Chen
2020-11-25 11:41     ` Lecopzer Chen
2020-11-25 11:41     ` Lecopzer Chen
2020-12-16 15:58     ` Catalin Marinas
2020-12-16 15:58       ` Catalin Marinas
2020-12-16 15:58       ` Catalin Marinas
2020-12-16 16:41       ` Lecopzer Chen
2020-12-16 16:41         ` Lecopzer Chen
2020-12-16 16:41         ` Lecopzer Chen
2020-12-17 16:49         ` Catalin Marinas
2020-12-17 16:49           ` Catalin Marinas
2020-12-17 16:49           ` Catalin Marinas
2020-12-18  5:02           ` Lecopzer Chen
2020-12-18  5:02             ` Lecopzer Chen
2020-12-18  5:02             ` Lecopzer Chen
2020-12-14  9:28   ` Lecopzer Chen
2020-12-14  9:28     ` Lecopzer Chen
2020-12-14  9:28     ` Lecopzer Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.